Skip to content

Commit

Permalink
fix: handle None value in payment_term_outstanding
Browse files Browse the repository at this point in the history
* Fix payment entry bug: Handle None value in payment_term_outstanding

* fix: Handle None value in payment_term_outstanding V2

fix linting issue

(cherry picked from commit 27ebf14)
  • Loading branch information
husamhammad authored and mergify[bot] committed Aug 2, 2023
1 parent 8c57d56 commit b033b3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion erpnext/accounts/doctype/payment_entry/payment_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ def validate_allocated_amount_with_latest_data(self):
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)
):
Expand Down

0 comments on commit b033b3b

Please sign in to comment.