mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-18 00:55:02 +00:00
fix: add validation for amount and hours
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
(cherry picked from commit 43d1d685c6)
This commit is contained in:
committed by
Mergify
parent
84a749e3d0
commit
ce421bb1d4
@@ -360,8 +360,10 @@ class SalesInvoice(SellingController):
|
|||||||
|
|
||||||
if self.is_return and self.return_against:
|
if self.is_return and self.return_against:
|
||||||
for row in self.timesheets:
|
for row in self.timesheets:
|
||||||
row.billing_hours *= -1
|
if row.billing_hours > 0:
|
||||||
row.billing_amount *= -1
|
row.billing_hours *= -1
|
||||||
|
if row.billing_amount > 0:
|
||||||
|
row.billing_amount *= -1
|
||||||
|
|
||||||
self.update_packing_list()
|
self.update_packing_list()
|
||||||
self.set_billing_hours_and_amount()
|
self.set_billing_hours_and_amount()
|
||||||
|
|||||||
Reference in New Issue
Block a user