Skip to content

Commit

Permalink
Add in line that checks for CC invoices. (#1351)
Browse files Browse the repository at this point in the history
  • Loading branch information
seeker25 authored Dec 19, 2023
1 parent 3e29183 commit 27c8a31
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,12 @@ async def _process_paid_invoices(inv_references, row):
Update invoice_reference as COMPLETED
Update payment_transaction as COMPLETED.
"""
for inv_ref in inv_references:
invoice: InvoiceModel = InvoiceModel.find_by_id(inv_ref.invoice_id)
if invoice.payment_method_code == PaymentMethod.CC.value:
logger.info('Cannot mark CC invoices as PAID.')
return

receipt_date: datetime = datetime.strptime(_get_row_value(row, Column.APP_DATE), '%d-%b-%y')
receipt_number: str = _get_row_value(row, Column.SOURCE_TXN_NO)
for inv_ref in inv_references:
Expand Down

0 comments on commit 27c8a31

Please sign in to comment.