fix: Don't use get_list & get_all interchangeably
* fix: Fetch all fields via get_returned_qty_map_for_row * fix(update_billing_percentage): Remove permlevel checks on aggregated value
This commit is contained in:
@@ -301,7 +301,7 @@ def get_returned_qty_map_for_row(return_against, party, row_name, doctype):
|
||||
fields += ["sum(abs(`tab{0}`.received_stock_qty)) as received_stock_qty".format(child_doctype)]
|
||||
|
||||
# Used retrun against and supplier and is_retrun because there is an index added for it
|
||||
data = frappe.db.get_list(
|
||||
data = frappe.get_all(
|
||||
doctype,
|
||||
fields=fields,
|
||||
filters=[
|
||||
|
||||
@@ -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=[
|
||||
|
||||
Reference in New Issue
Block a user