From 1cb47fbb268fb29c55992491f92b239c65d38e2e Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Wed, 1 Feb 2023 12:58:08 +0530 Subject: [PATCH] fix(update_billing_percentage): Remove permlevel checks on aggregated value (cherry picked from commit 3518d4be1d3e1f18f7d76f2cadb7af597f4f892b) --- erpnext/stock/doctype/purchase_receipt/purchase_receipt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py index 390704fa3ed..a4b4df252f6 100644 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py @@ -831,7 +831,7 @@ def update_billing_percentage(pr_doc, update_modified=True): # Update Billing % based on pending accepted qty total_amount, total_billed_amount = 0, 0 for item in pr_doc.items: - return_data = frappe.db.get_list( + return_data = frappe.get_all( "Purchase Receipt", fields=["sum(abs(`tabPurchase Receipt Item`.qty)) as qty"], filters=[