mirror of
https://github.com/frappe/erpnext.git
synced 2026-07-31 00:04:37 +00:00
fix(subcontracting): release raw-material reservation when closing a subcontracting order
the bin reserved-qty recalc filtered out closed purchase orders but not
closed subcontracting orders, so closing a partially-received sco kept the
reservation for the unreceived qty and left projected qty understated.
apply the same closed-status filter to the subcontracting order path.
(cherry picked from commit db91a79d31)
# Conflicts:
# erpnext/stock/doctype/bin/bin.py
This commit is contained in:
@@ -162,7 +162,7 @@ class Bin(Document):
|
||||
& (subcontract_order.docstatus == 1)
|
||||
)
|
||||
if subcontract_doctype == "Purchase Order"
|
||||
else (subcontract_order.docstatus == 1)
|
||||
else ((subcontract_order.status != "Closed") & (subcontract_order.docstatus == 1))
|
||||
)
|
||||
)
|
||||
|
||||
@@ -199,6 +199,7 @@ class Bin(Document):
|
||||
else (
|
||||
(Coalesce(se.subcontracting_order, "") != "")
|
||||
& (subcontract_order.name == se.subcontracting_order)
|
||||
& (subcontract_order.status != "Closed")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user