Skip to content

Commit

Permalink
Merge pull request #38457 from ruthra-kumar/use_flt_on_outstanding_on…
Browse files Browse the repository at this point in the history
…_ar_ap_summary

refactor: use flt on outstanding on AR/AP summary report
  • Loading branch information
ruthra-kumar authored Nov 30, 2023
2 parents 63313ee + e4bdd3a commit cc053ad
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +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_party_types_from_account_type
from erpnext.accounts.utils import get_currency_precision, get_party_types_from_account_type


def execute(filters=None):
Expand All @@ -34,6 +34,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 @@ -57,7 +58,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 cc053ad

Please sign in to comment.