Skip to content

Commit d129403

Browse files
authored
S24 fix payment description length (#244)
* Quick fix for payment description length * Replace hard code field length
1 parent 107eba3 commit d129403

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

OFM.Infrastructure.WebAPI/Services/Processes/Payments/P500SendPaymentRequestProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,10 +370,10 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService
370370
oracleBatchName = (_BCCASApi.clientCode + fiscalyear?.Substring(2) + "OFM" + (_oracleBatchNumber).ToString("D5")).PadRight(header.FieldLength("oracleBatchName")),//6225OFM00001 incremented by 1 for each header
371371
SIN = string.Empty.PadRight(header.FieldLength("SIN")), //optional field set to blank
372372
payflag = _BCCASApi.InvoiceHeader.payflag,// Static value: Y (separate chq for each line)
373-
description = Regex.Replace(headeritem.First()?.ofm_facility?.name, @"[^\w $\-]", "").PadRight(header.FieldLength("description")),// can be used to pass extra info
373+
description = Regex.Replace(headeritem.First()?.ofm_facility?.name, @"[^\w $\-]", "").PadRight(header.FieldLength("description")).Substring(0, header.FieldLength("description")),// can be used to pass extra info
374374
flow = string.Empty.PadRight(header.FieldLength("flow")),// can be used to pass extra info
375375
invoiceLines = invoiceLines
376-
});
376+
});;
377377
_controlAmount = _controlAmount + invoiceamount;
378378
_controlCount++;
379379

0 commit comments

Comments
 (0)