Skip to content

Commit 44aa724

Browse files
feat: new receipt for updated qnty logic
1 parent 48f5dca commit 44aa724

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

d2h/overrides.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ def on_submit_purchase_receipt(doc, method):
99
"item_code": item.item_code,
1010
"parent": item.purchase_order
1111
})
12-
if(item_order.custom_good_in_transit_qty > item.qty):
13-
item_order.custom_good_in_transit_qty -= item.qty
12+
if(item_order.custom_good_in_transit_qty > item.original_quantity):
13+
item_order.custom_good_in_transit_qty -= item.original_quantity
1414
else:
1515
item_order.custom_good_in_transit_qty = 0
1616
item_order.save(ignore_permissions=True)

0 commit comments

Comments
 (0)