Skip to content

Commit

Permalink
Fix the logic for selecting template (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
yiyiwang-cgi authored Aug 6, 2024
1 parent 9cf6853 commit d64972a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService

var currentUTC = DateTime.UtcNow;
DateTime monthEndDate = new DateTime();
DateTime monthEndDateInPST = new DateTime();



//batch create the monthly report
if (batchFlag)
{
Expand All @@ -174,6 +175,7 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService
// april report
//Run at PST May 1 1AM -> Min 1 month -> April 1 1AM
monthEndDate = currentUTC.ToLocalPST().AddMonths(-1);
monthEndDateInPST = new DateTime(monthEndDate.Year, monthEndDate.Month, DateTime.DaysInMonth(monthEndDate.Year, monthEndDate.Month), 23, 59, 00);
}
else
{
Expand All @@ -189,9 +191,9 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService

//when funding is expired or terminated -> create the report for current month
monthEndDate = currentUTC.ToLocalPST();
monthEndDateInPST = monthEndDate;
}

var monthEndDateInPST = new DateTime(monthEndDate.Year, monthEndDate.Month, DateTime.DaysInMonth(monthEndDate.Year, monthEndDate.Month), 23, 59, 00);
var monthEndDateInUTC = monthEndDateInPST.ToUTC();

//Set the fiscal year and duedate
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": "001",
"oracleBatchNumber": "0000000000001",
"batchType": "AP",
"delimiter": "\u001d",
"transactionType": "BH",
Expand Down

0 comments on commit d64972a

Please sign in to comment.