fix: SO ordered qty on PO item removal (#38378)
* fix: SO ordered qty on PO item removal (#38378)
* fix: update ordered_qty for SO when PO items removed
* refactor: use cached value
---------
Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
(cherry picked from commit 9087e1443e)
# Conflicts:
# erpnext/buying/doctype/purchase_order/purchase_order.py
* chore: resolve conflicts
---------
Co-authored-by: Gursheen Kaur Anand <40693548+GursheenK@users.noreply.github.com>
This commit is contained in:
@@ -2874,6 +2874,9 @@ def validate_and_delete_children(parent, data) -> bool:
|
||||
d.cancel()
|
||||
d.delete()
|
||||
|
||||
if parent.doctype == "Purchase Order":
|
||||
parent.update_ordered_qty_in_so_for_removed_items(deleted_children)
|
||||
|
||||
# need to update ordered qty in Material Request first
|
||||
# bin uses Material Request Items to recalculate & update
|
||||
parent.update_prevdoc_status()
|
||||
|
||||
Reference in New Issue
Block a user