From 36ffc2ee67096d726933b6f54ee3f6448593ee69 Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Tue, 18 Mar 2025 11:43:16 +0530 Subject: [PATCH] fix: patch (cherry picked from commit 7e669c07281a1275a2c254072009af31b626ea86) --- .../patches/v15_0/recalculate_amount_difference_field.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/erpnext/patches/v15_0/recalculate_amount_difference_field.py b/erpnext/patches/v15_0/recalculate_amount_difference_field.py index 2891ac16c44..0b7ab2ec4fe 100644 --- a/erpnext/patches/v15_0/recalculate_amount_difference_field.py +++ b/erpnext/patches/v15_0/recalculate_amount_difference_field.py @@ -27,11 +27,7 @@ def execute(): table.qty, parent.conversion_rate, ) - .where( - (table.amount_difference_with_purchase_invoice != 0) - & (table.docstatus == 1) - & (parent.company == company) - ) + .where((table.docstatus == 1) & (parent.company == company)) ) posting_date = "2024-04-01" @@ -121,6 +117,7 @@ def get_billed_qty_against_purchase_receipt(pr_names): frappe.qb.from_(table) .select(table.pr_detail, Sum(table.qty).as_("qty")) .where((table.pr_detail.isin(pr_names)) & (table.docstatus == 1)) + .groupby(table.pr_detail) ) invoice_data = query.run(as_list=1)