From ad437fd5bacbd6a195679592970a72e6f517f894 Mon Sep 17 00:00:00 2001 From: Xeanth <56108002+xeanth8@users.noreply.github.com> Date: Sun, 22 Jan 2023 19:36:01 +0700 Subject: [PATCH] fix: use stock qty to calculate POS reserved stock (#33735) --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index b543016eaa4..a1239d64a01 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -675,7 +675,7 @@ def get_bin_qty(item_code, warehouse): def get_pos_reserved_qty(item_code, warehouse): reserved_qty = frappe.db.sql( - """select sum(p_item.qty) as qty + """select sum(p_item.stock_qty) as qty from `tabPOS Invoice` p, `tabPOS Invoice Item` p_item where p.name = p_item.parent and ifnull(p.consolidated_invoice, '') = ''