fix: don't update previous doc on rate change (backport #38493) (#38524)

* fix: don't update previous doc on rate change

(cherry picked from commit 68f5dd3e7b)

* fix: `linter`

---------

Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
This commit is contained in:
mergify[bot]
2023-12-03 23:20:53 +05:30
committed by GitHub
parent 33c59a2bb1
commit 0aa96f783d
2 changed files with 5 additions and 2 deletions

View File

@@ -3245,7 +3245,10 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
if parent_doctype == "Purchase Order":
update_last_purchase_rate(parent, is_submit=1)
parent.update_prevdoc_status()
if any_qty_changed or items_added_or_removed or any_conversion_factor_changed:
parent.update_prevdoc_status()
parent.update_requested_qty()
parent.update_ordered_qty()
parent.update_ordered_and_reserved_qty()