diff --git a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P500SendPaymentRequestProvider.cs b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P500SendPaymentRequestProvider.cs index 4a70a77..ac78acf 100644 --- a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P500SendPaymentRequestProvider.cs +++ b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P500SendPaymentRequestProvider.cs @@ -290,7 +290,7 @@ public async Task RunProcessAsync(ID365AppUserService appUserService { _oracleBatchNumber = Convert.ToInt32(serializedPFXData[0].ofm_oracle_batch_name) + 1; _cgiBatchNumber = (Convert.ToInt32(serializedPFXData[0].ofm_batch_number)).ToString("D9").Substring(0, 9); - oracleBatchName = _BCCASApi.clientCode + fiscalyear?.Substring(2) + "OFM" + (_oracleBatchNumber).ToString("D13"); + oracleBatchName = _BCCASApi.clientCode + fiscalyear?.Substring(2) + "OFM" + (_oracleBatchNumber).ToString("D5"); } else { @@ -364,7 +364,7 @@ public async Task RunProcessAsync(ID365AppUserService appUserService termsName = _BCCASApi.InvoiceHeader.termsName.PadRight(header.FieldLength("termsName")),//setting it to immediate for successful testing, this needs to be dynamic going forward. goodsDate = string.Empty.PadRight(header.FieldLength("goodsDate")),//optional field so set to null invoiceRecDate = headeritem.First().ofm_invoice_received_date?.ToString("yyyyMMdd"),//ideally is is 4 days before current date - oracleBatchName = (_BCCASApi.clientCode + fiscalyear?.Substring(2) + "OFM" + (_oracleBatchNumber).ToString("D13")).PadRight(header.FieldLength("oracleBatchName")),//6225OFM00001 incremented by 1 for each header + oracleBatchName = (_BCCASApi.clientCode + fiscalyear?.Substring(2) + "OFM" + (_oracleBatchNumber).ToString("D5")).PadRight(header.FieldLength("oracleBatchName")),//6225OFM00001 incremented by 1 for each header SIN = string.Empty.PadRight(header.FieldLength("SIN")), //optional field set to blank payflag = _BCCASApi.InvoiceHeader.payflag,// Static value: Y (separate chq for each line) description = Regex.Replace(headeritem.First()?.ofm_facility?.name, @"[^\w $\-]", "").PadRight(header.FieldLength("description")),// can be used to pass extra info @@ -373,7 +373,7 @@ public async Task RunProcessAsync(ID365AppUserService appUserService }); _controlAmount = _controlAmount + invoiceamount; _controlCount++; - _oracleBatchNumber++; + } // break transaction list into multiple list if it contains more than 250 transactions diff --git a/tools/config/update-configmap.sh b/tools/config/update-configmap.sh index 5d7fe40..aa090f9 100644 --- a/tools/config/update-configmap.sh +++ b/tools/config/update-configmap.sh @@ -278,7 +278,7 @@ D365_CONFIGURATION=$(jq << JSON "transactionCount": 250, "clientCode": "62", "cGIBatchNumber": "$D365_CGI_BATCH_NUMBER", - "oracleBatchNumber": "0000000000001", + "oracleBatchNumber": "00001", "batchType": "AP", "delimiter": "\u001d", "transactionType": "BH",