Skip to content

Commit

Permalink
Merge pull request #38459 from frappe/mergify/bp/version-14/pr-38457
Browse files Browse the repository at this point in the history
fix: use flt on outstanding on AR/AP summary report (backport #38457)
  • Loading branch information
ruthra-kumar authored Nov 30, 2023
2 parents 44b1175 + 161b0da commit 8652889
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from erpnext.accounts.party import get_partywise_advanced_payment_amount
from erpnext.accounts.report.accounts_receivable.accounts_receivable import ReceivablePayableReport
from erpnext.accounts.utils import get_currency_precision


def execute(filters=None):
Expand Down Expand Up @@ -35,6 +36,7 @@ def run(self, args):
def get_data(self, args):
self.data = []
self.receivables = ReceivablePayableReport(self.filters).run(args)[1]
self.currency_precision = get_currency_precision() or 2

self.get_party_total(args)

Expand All @@ -58,7 +60,7 @@ def get_data(self, args):
gl_balance_map = get_gl_balance(self.filters.report_date, self.filters.company)

for party, party_dict in self.party_total.items():
if party_dict.outstanding == 0:
if flt(party_dict.outstanding, self.currency_precision) == 0:
continue

row = frappe._dict()
Expand Down

0 comments on commit 8652889

Please sign in to comment.