Skip to content

Commit

Permalink
Sync with main (#1737)
Browse files Browse the repository at this point in the history
  • Loading branch information
seeker25 authored Sep 10, 2024
1 parent 7844b35 commit 4a77193
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jobs/payment-jobs/tasks/eft_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ def _rollback_receipt_and_invoice(cls, cfs_account: CfsAccountModel,
f'not found for invoice id: {invoice.id} - {invoice.invoice_status_code}')
is_invoice_refund = invoice.invoice_status_code == InvoiceStatus.REFUND_REQUESTED.value
is_reversal = not is_invoice_refund
CFSService.reverse_rs_receipt_in_cfs(cfs_account, receipt_number, ReverseOperation.VOID.value)
if receipt_number:
CFSService.reverse_rs_receipt_in_cfs(cfs_account, receipt_number, ReverseOperation.VOID.value)
if is_invoice_refund:
cls._handle_invoice_refund(invoice, invoice_reference)
else:
Expand Down
4 changes: 4 additions & 0 deletions pay-api/src/pay_api/services/eft_short_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,10 @@ def get_statement_summary_query():
InvoiceModel.id == StatementInvoicesModel.invoice_id,
InvoiceModel.payment_method_code == PaymentMethod.EFT.value
)
).filter(
InvoiceModel.invoice_status_code.notin_([InvoiceStatus.CANCELLED.value,
InvoiceStatus.REFUND_REQUESTED.value,
InvoiceStatus.REFUNDED.value])
).group_by(StatementModel.payment_account_id)

@classmethod
Expand Down

0 comments on commit 4a77193

Please sign in to comment.