mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-23 08:38:30 +00:00
fix: optimized query (#19026)
Co-authored-by: nabinhait Co-authored-by: sahil28297 <sahilkhan28297@gmail.com>
This commit is contained in:
committed by
Nabin Hait
parent
504e52ff46
commit
a3095c987a
@@ -1173,7 +1173,7 @@ class StockEntry(StockController):
|
||||
frappe.db.sql("""UPDATE `tabPurchase Order Item Supplied` pos
|
||||
SET pos.supplied_qty = (SELECT ifnull(sum(transfer_qty), 0) FROM `tabStock Entry Detail` sed
|
||||
WHERE pos.name = sed.po_detail and sed.docstatus = 1)
|
||||
WHERE pos.docstatus = 1""")
|
||||
WHERE pos.docstatus = 1 and pos.parent = %s""", self.purchase_order)
|
||||
|
||||
#Update reserved sub contracted quantity in bin based on Supplied Item Details and
|
||||
for d in self.get("items"):
|
||||
|
||||
Reference in New Issue
Block a user