fix(selling): clamp pending qty to qty field precision

This commit is contained in:
Mihir Kandoi
2026-08-11 12:38:26 +05:30
parent dd23cf40e1
commit 9f108e4b75

View File

@@ -471,7 +471,7 @@ def make_sales_invoice(
if source.qty and source.billed_amt:
billable_qty -= get_billed_qty_by_item().get(source.name, 0)
pending_qty_by_item[source.name] = max(flt(billable_qty), 0)
pending_qty_by_item[source.name] = max(flt(billable_qty, source.precision("qty")), 0)
return pending_qty_by_item[source.name]