From 7de18ecc470c6716f61683778526ce1b771aea5a Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Wed, 6 Mar 2024 16:10:46 -0800 Subject: [PATCH] ejv_content fix --- .../tasks/ejv_partner_distribution_task.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/jobs/payment-jobs/tasks/ejv_partner_distribution_task.py b/jobs/payment-jobs/tasks/ejv_partner_distribution_task.py index 250036e4e..4a4e3cec0 100644 --- a/jobs/payment-jobs/tasks/ejv_partner_distribution_task.py +++ b/jobs/payment-jobs/tasks/ejv_partner_distribution_task.py @@ -237,16 +237,20 @@ def _create_ejv_file_for_partner(cls, batch_type: str): # pylint:disable=too-ma description = disbursement_desc[:-len(refund_partial_number)] + refund_partial_number description = f'{description[:100]:<100}' - ejv_content = cls.get_jv_line(batch_type, credit_distribution, description, - effective_date, flow_through, journal_name, - refund_partial.refund_amount, partial_refund_number, 'C') + ejv_content = '{}{}'.format(ejv_content, # pylint:disable=consider-using-f-string + cls.get_jv_line(batch_type, credit_distribution, description, + effective_date, flow_through, journal_name, + refund_partial.refund_amount, + partial_refund_number, 'D')) partial_refund_number += 1 control_total += 1 # Add a line here for debit too - ejv_content = cls.get_jv_line(batch_type, debit_distribution, description, - effective_date, flow_through, journal_name, - refund_partial.refund_amount, partial_refund_number, 'D') + ejv_content = '{}{}'.format(ejv_content, # pylint:disable=consider-using-f-string + cls.get_jv_line(batch_type, debit_distribution, description, + effective_date, flow_through, journal_name, + refund_partial.refund_amount, + partial_refund_number, 'C')) control_total += 1 # Update partial refund status