Skip to content

Commit

Permalink
refactor: use flt on outstanding on AR/AP summary report
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Nov 30, 2023
1 parent 9872e37 commit e4bdd3a
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 e4bdd3a

Please sign in to comment.