Skip to content

Commit

Permalink
fix: update item details with actual quantity.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavan23 committed Oct 8, 2024
1 parent e2f3e87 commit 9dbdfec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions erpnext/selling/doctype/sales_order/sales_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 9dbdfec

Please sign in to comment.