fix: Set gross profit in SO item on updating rate after submission (#19311)

This commit is contained in:
Nabin Hait 2019-10-21 13:35:43 +05:30 committed by GitHub
parent 75c5c89909
commit 49a46f08de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1228,6 +1228,8 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
parent.flags.ignore_validate_update_after_submit = True
parent.set_qty_as_per_stock_uom()
parent.calculate_taxes_and_totals()
if parent_doctype == "Sales Order":
parent.set_gross_profit()
frappe.get_doc('Authorization Control').validate_approving_authority(parent.doctype,
parent.company, parent.base_grand_total)