Skip to content

Commit

Permalink
fix: Handle None value in payment_term_outstanding V2
Browse files Browse the repository at this point in the history
fix linting issue
  • Loading branch information
husamhammad authored and ruthra-kumar committed Aug 2, 2023
1 parent 6e25441 commit 3976e06
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 @@ -281,7 +281,8 @@ def validate_allocated_amount_with_latest_data(self):
d.payment_term
and (
(flt(d.allocated_amount)) > 0
and (not latest.payment_term_outstanding or 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 3976e06

Please sign in to comment.