Skip to content

Commit

Permalink
24174- Handling statement template invoices with no payment date (#1873)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-barraza authored Jan 10, 2025
1 parent 8f9f822 commit e941747
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pay-api/src/pay_api/services/statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ def _populate_statement_summary(cls, statement: StatementModel, statement_invoic

latest_payment_date = None
for invoice in statement_invoices:
if invoice.payment_date is None:
continue
if latest_payment_date is None or invoice.payment_date > latest_payment_date:
latest_payment_date = invoice.payment_date

Expand Down

0 comments on commit e941747

Please sign in to comment.