From 9dbdfec9b7a4bcc38399a4d849dcc32b54bf9d4a Mon Sep 17 00:00:00 2001 From: Bhavan23 Date: Tue, 8 Oct 2024 16:18:31 +0530 Subject: [PATCH] fix: update item details with actual quantity. --- erpnext/selling/doctype/sales_order/sales_order.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py index 9bd131845218..1fc2c2427e63 100755 --- a/erpnext/selling/doctype/sales_order/sales_order.py +++ b/erpnext/selling/doctype/sales_order/sales_order.py @@ -14,6 +14,7 @@ from frappe.model.utils import get_fetch_values from frappe.query_builder.functions import Sum from frappe.utils import add_days, cint, cstr, flt, get_link_to_form, getdate, nowdate, strip_html +from erpnext.stock.get_item_details import get_bin_details from erpnext.accounts.doctype.sales_invoice.sales_invoice import ( unlink_inter_company_doc, @@ -841,6 +842,7 @@ def update_item(source, target, source_parent): target.project = source_parent.project target.qty = get_remaining_qty(source) target.stock_qty = flt(target.qty) * flt(target.conversion_factor) + target.actual_qty = get_bin_details(target.item_code, target.warehouse, source_parent.company, True).get("actual_qty", 0) args = target.as_dict().copy() args.update(