Skip to content

Commit

Permalink
fix: index error on Receivable report based on payment terms
Browse files Browse the repository at this point in the history
cr note's don't have payment terms. So, skip for them.
  • Loading branch information
ruthra-kumar committed Sep 5, 2023
1 parent 13ca474 commit b9c556c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,10 @@ def get_payment_terms(self, row):
original_row = frappe._dict(row)
row.payment_terms = []

# Cr Note's don't have Payment Terms
if not payment_terms_details:
return

# Advance allocated during invoicing is not considered in payment terms
# Deduct that from paid amount pre allocation
row.paid -= flt(payment_terms_details[0].total_advance)
Expand Down

0 comments on commit b9c556c

Please sign in to comment.