fix: minor issues in subcontracting inward

This commit is contained in:
Mihir Kandoi
2025-11-03 17:50:59 +05:30
parent 44363c069e
commit 553ec40d4a
5 changed files with 12 additions and 13 deletions

View File

@@ -1361,7 +1361,7 @@ def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False, a
.select(
child.required_qty,
child.consumed_qty,
(child.billed_qty - child.returned_qty).as_("qty"),
child.billed_qty,
child.rm_item_code,
child.stock_uom,
child.name,
@@ -1377,7 +1377,7 @@ def make_sales_invoice(source_name, target_doc=None, ignore_permissions=False, a
if result:
idx = len(doclist.items) + 1
for item in result:
if (qty := max(item.required_qty, item.consumed_qty) - item.qty) > 0:
if (qty := max(item.required_qty, item.consumed_qty) - item.billed_qty) > 0:
doclist.append(
"items",
{