diff --git a/jobs/payment-jobs/tasks/eft_task.py b/jobs/payment-jobs/tasks/eft_task.py index f58cb3e78..94d36549b 100644 --- a/jobs/payment-jobs/tasks/eft_task.py +++ b/jobs/payment-jobs/tasks/eft_task.py @@ -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: