summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2025-10-24 04:30:41 +0000
committerIT Fixcomart <it@fixcomart.co.id>2025-10-24 04:30:41 +0000
commit276b0cd8de9997bc63a38df27f97b0920afb9430 (patch)
tree7eba836d274185e71e4b156e36d10e84363d14c0
parent12f1df2b2dabd0fba5dc0e2584c9a588c378118c (diff)
parentdc57520d3e0fe0bb8a314e1cb4ec4b3648fd8a37 (diff)
Merged in refund_system (pull request #451)
Refund system
-rw-r--r--indoteknik_custom/models/refund_sale_order.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/indoteknik_custom/models/refund_sale_order.py b/indoteknik_custom/models/refund_sale_order.py
index 47565dfc..475f0355 100644
--- a/indoteknik_custom/models/refund_sale_order.py
+++ b/indoteknik_custom/models/refund_sale_order.py
@@ -753,10 +753,11 @@ class RefundSaleOrder(models.Model):
line_vals = []
for so in self.sale_order_ids:
for line in so.order_line:
- if line.qty_delivered == 0:
+ barang_kurang = line.product_uom_qty - line.qty_delivered
+ if line.qty_delivered == 0 or barang_kurang >= 0:
line_vals.append((0, 0, {
'product_id': line.product_id.id,
- 'quantity': line.product_uom_qty,
+ 'quantity': barang_kurang,
'from_name': so.name,
'prod_id': so.id,
'reason': '',