From 0333fe1b7332c3a6a879f35c0cc327be7ce92125 Mon Sep 17 00:00:00 2001 From: AbrahamRostampoor <144154569+AbrahamRostampoor@users.noreply.github.com> Date: Wed, 11 Oct 2023 16:21:32 -0700 Subject: [PATCH] 17836 - pay api transaction id (#1278) * 17836_part2 - PAY-API Added Transaction ID to CSV export Signed-off-by: AbrahamRostampoor * 17836_part2 - corrected syntax error Signed-off-by: AbrahamRostampoor --------- Signed-off-by: AbrahamRostampoor --- pay-api/src/pay_api/services/payment.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pay-api/src/pay_api/services/payment.py b/pay-api/src/pay_api/services/payment.py index 08548080d..5bcad3169 100644 --- a/pay-api/src/pay_api/services/payment.py +++ b/pay-api/src/pay_api/services/payment.py @@ -378,7 +378,8 @@ def generate_payment_report(content_type, report_name, results, template_name, **kwargs): # pylint: disable=too-many-locals """Prepare data and generate payment report by calling report api.""" labels = ['Transaction', 'Transaction Details', 'Folio Number', 'Initiated By', 'Date', 'Purchase Amount', - 'GST', 'Statutory Fee', 'BCOL Fee', 'Status', 'Corp Number', 'Invoice Reference Number'] + 'GST', 'Statutory Fee', 'BCOL Fee', 'Status', 'Corp Number', 'Transaction ID', + 'Invoice Reference Number'] # Use the status_code_description instead of status_code. invoice_status_codes = CodeService.find_code_values_by_type(Code.INVOICE_STATUS.value) @@ -479,6 +480,7 @@ def _prepare_csv_data(results): service_fee, invoice.get('status_code'), invoice.get('business_identifier'), + invoice.get('id'), invoice.get('invoice_number') ] cells.append(row_value)