Skip to content

Commit

Permalink
pushing the code for having same oracle batch name in a file and remo… (
Browse files Browse the repository at this point in the history
#219)

* pushing the code for having same oracle batch name in a file and removing zeroes.

* Update oracleBatchNumber format
  • Loading branch information
Prashanthi-Sivanarayana authored Aug 13, 2024
1 parent 1506abc commit 4bf2be5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public async Task<JsonObject> 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
{
Expand Down Expand Up @@ -364,7 +364,7 @@ public async Task<JsonObject> 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
Expand All @@ -373,7 +373,7 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService
});
_controlAmount = _controlAmount + invoiceamount;
_controlCount++;
_oracleBatchNumber++;

}

// break transaction list into multiple list if it contains more than 250 transactions
Expand Down
2 changes: 1 addition & 1 deletion tools/config/update-configmap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 4bf2be5

Please sign in to comment.