From 4c5540aef9232d044b9a0bd3de278a3b04222230 Mon Sep 17 00:00:00 2001 From: vishakhdesai Date: Fri, 20 Dec 2024 18:03:42 +0530 Subject: [PATCH] fix: update correct cost center in Accounts Receivable Report (cherry picked from commit 09776e9a5ab6221329b3f6e8e3ad94aee0e43d5d) --- .../accounts/report/accounts_receivable/accounts_receivable.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py index 1d67109d68d..0d70225c919 100644 --- a/erpnext/accounts/report/accounts_receivable/accounts_receivable.py +++ b/erpnext/accounts/report/accounts_receivable/accounts_receivable.py @@ -150,6 +150,9 @@ class ReceivablePayableReport: if key not in self.voucher_balance: self.voucher_balance[key] = self.build_voucher_dict(ple) + if ple.voucher_type == ple.against_voucher_type and ple.voucher_no == ple.against_voucher_no: + self.voucher_balance[key].cost_center = ple.cost_center + self.get_invoices(ple) if self.filters.get("group_by_party"):