fix: handle None value in payment_term_outstanding

* Fix payment entry bug: Handle None value in payment_term_outstanding

* fix: Handle None value in payment_term_outstanding V2

fix linting issue
This commit is contained in:
Husam Hammad 2023-08-02 13:58:05 +03:00 committed by GitHub
parent dedf24b86d
commit 27ebf14f9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -281,7 +281,8 @@ class PaymentEntry(AccountsController):
d.payment_term
and (
(flt(d.allocated_amount)) > 0
and flt(d.allocated_amount) > flt(latest.payment_term_outstanding)
and latest.payment_term_outstanding
and (flt(d.allocated_amount) > flt(latest.payment_term_outstanding))
)
and self.term_based_allocation_enabled_for_reference(d.reference_doctype, d.reference_name)
):