Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use flt on outstanding on AR/AP summary report #38457

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading