From 69075c7db06ae7be977b8c4e6b5e6d34a4c56279 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 10 Jun 2026 05:34:47 +0000 Subject: [PATCH] fix(accounts): add account to GROUP BY for PostgreSQL compatibility, fix ruff formatting --- erpnext/accounts/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/accounts/utils.py b/erpnext/accounts/utils.py index 93c1bf1af05..2265d01cb1a 100644 --- a/erpnext/accounts/utils.py +++ b/erpnext/accounts/utils.py @@ -2384,7 +2384,7 @@ class QueryPaymentLedger: .where(Criterion.all(self.common_filter)) .where(Criterion.all(self.dimensions_filter)) .where(Criterion.all(self.voucher_posting_date)) - .groupby(ple.voucher_type, ple.voucher_no, ple.party_type, ple.party) + .groupby(ple.account, ple.voucher_type, ple.voucher_no, ple.party_type, ple.party) ) # build query for voucher outstanding @@ -2405,7 +2405,7 @@ class QueryPaymentLedger: .where(ple.delinked == 0) .where(Criterion.all(filter_on_against_voucher_no)) .where(Criterion.all(self.common_filter)) - .groupby(ple.against_voucher_type, ple.against_voucher_no, ple.party_type, ple.party) + .groupby(ple.account, ple.against_voucher_type, ple.against_voucher_no, ple.party_type, ple.party) ) # build CTE for combining voucher amount and outstanding