Skip to content

Commit 4bf2be5

Browse files
pushing the code for having same oracle batch name in a file and remo… (#219)
* pushing the code for having same oracle batch name in a file and removing zeroes. * Update oracleBatchNumber format
1 parent 1506abc commit 4bf2be5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService
290290
{
291291
_oracleBatchNumber = Convert.ToInt32(serializedPFXData[0].ofm_oracle_batch_name) + 1;
292292
_cgiBatchNumber = (Convert.ToInt32(serializedPFXData[0].ofm_batch_number)).ToString("D9").Substring(0, 9);
293-
oracleBatchName = _BCCASApi.clientCode + fiscalyear?.Substring(2) + "OFM" + (_oracleBatchNumber).ToString("D13");
293+
oracleBatchName = _BCCASApi.clientCode + fiscalyear?.Substring(2) + "OFM" + (_oracleBatchNumber).ToString("D5");
294294
}
295295
else
296296
{
@@ -364,7 +364,7 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService
364364
termsName = _BCCASApi.InvoiceHeader.termsName.PadRight(header.FieldLength("termsName")),//setting it to immediate for successful testing, this needs to be dynamic going forward.
365365
goodsDate = string.Empty.PadRight(header.FieldLength("goodsDate")),//optional field so set to null
366366
invoiceRecDate = headeritem.First().ofm_invoice_received_date?.ToString("yyyyMMdd"),//ideally is is 4 days before current date
367-
oracleBatchName = (_BCCASApi.clientCode + fiscalyear?.Substring(2) + "OFM" + (_oracleBatchNumber).ToString("D13")).PadRight(header.FieldLength("oracleBatchName")),//6225OFM00001 incremented by 1 for each header
367+
oracleBatchName = (_BCCASApi.clientCode + fiscalyear?.Substring(2) + "OFM" + (_oracleBatchNumber).ToString("D5")).PadRight(header.FieldLength("oracleBatchName")),//6225OFM00001 incremented by 1 for each header
368368
SIN = string.Empty.PadRight(header.FieldLength("SIN")), //optional field set to blank
369369
payflag = _BCCASApi.InvoiceHeader.payflag,// Static value: Y (separate chq for each line)
370370
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<JsonObject> RunProcessAsync(ID365AppUserService appUserService
373373
});
374374
_controlAmount = _controlAmount + invoiceamount;
375375
_controlCount++;
376-
_oracleBatchNumber++;
376+
377377
}
378378

379379
// break transaction list into multiple list if it contains more than 250 transactions

tools/config/update-configmap.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ D365_CONFIGURATION=$(jq << JSON
278278
"transactionCount": 250,
279279
"clientCode": "62",
280280
"cGIBatchNumber": "$D365_CGI_BATCH_NUMBER",
281-
"oracleBatchNumber": "0000000000001",
281+
"oracleBatchNumber": "00001",
282282
"batchType": "AP",
283283
"delimiter": "\u001d",
284284
"transactionType": "BH",

0 commit comments

Comments
 (0)