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:
Logesh Periyasamy
2026-01-09 18:11:42 +05:30
committed by Mergify
parent 03b7aa00ee
commit 2f12de65b9

View File

@@ -331,7 +331,9 @@ 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:
if row.billing_hours > 0:
row.billing_hours *= -1 row.billing_hours *= -1
if row.billing_amount > 0:
row.billing_amount *= -1 row.billing_amount *= -1
self.update_packing_list() self.update_packing_list()