Skip to content

Commit 050dd23

Browse files
Payment Stat Holidays (#276)
* Payment Stat Holidays * StatHoliday Entity update * changes with oob class
1 parent 445d27d commit 050dd23

File tree

8 files changed

+1247
-195
lines changed

8 files changed

+1247
-195
lines changed

ECC.Core.DataContext/DataverseContext.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,17 @@ public System.Linq.IQueryable<ECC.Core.DataContext.ofm_standing_history> ofm_sta
534534
}
535535
}
536536

537+
/// <summary>
538+
/// Gets a binding to the set of all <see cref="ECC.Core.DataContext.ofm_stat_holiday"/> entities.
539+
/// </summary>
540+
public System.Linq.IQueryable<ECC.Core.DataContext.ofm_stat_holiday> ofm_stat_holidaySet
541+
{
542+
get
543+
{
544+
return this.CreateQuery<ECC.Core.DataContext.ofm_stat_holiday>();
545+
}
546+
}
547+
537548
/// <summary>
538549
/// Gets a binding to the set of all <see cref="ECC.Core.DataContext.ofm_subcategory"/> entities.
539550
/// </summary>

ECC.Core.DataContext/Entities/Entities.cs

Lines changed: 1085 additions & 165 deletions
Large diffs are not rendered by default.

ECC.Core.DataContext/OptionSets/OptionSets.cs

Lines changed: 125 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,23 @@ public enum ccof_AdjudicatorRecommendation
13001300
Stage3AFC = 100000005,
13011301
}
13021302

1303+
[System.Runtime.Serialization.DataContractAttribute()]
1304+
public enum ccof_agreement_status
1305+
{
1306+
1307+
[System.Runtime.Serialization.EnumMemberAttribute()]
1308+
[OptionSetMetadataAttribute("I accept", 0, "#0000ff")]
1309+
Iaccept = 1,
1310+
1311+
[System.Runtime.Serialization.EnumMemberAttribute()]
1312+
[OptionSetMetadataAttribute("I decline", 2, "#0000ff")]
1313+
Idecline = 3,
1314+
1315+
[System.Runtime.Serialization.EnumMemberAttribute()]
1316+
[OptionSetMetadataAttribute("I want to upload supporting documents", 1, "#0000ff")]
1317+
Iwanttouploadsupportingdocuments = 2,
1318+
}
1319+
13031320
/// <summary>
13041321
/// Indicates the type of approval for approved parent fees
13051322
/// </summary>
@@ -1452,6 +1469,23 @@ public enum ccof_CCFRIQCDecision
14521469
Stage3AFC = 100000007,
14531470
}
14541471

1472+
[System.Runtime.Serialization.DataContractAttribute()]
1473+
public enum ccof_CCFRIUnlockNotificationType
1474+
{
1475+
1476+
[System.Runtime.Serialization.EnumMemberAttribute()]
1477+
[OptionSetMetadataAttribute("AFS", 1)]
1478+
AFS = 100000001,
1479+
1480+
[System.Runtime.Serialization.EnumMemberAttribute()]
1481+
[OptionSetMetadataAttribute("Standard", 0)]
1482+
Standard = 100000000,
1483+
1484+
[System.Runtime.Serialization.EnumMemberAttribute()]
1485+
[OptionSetMetadataAttribute("Standard and AFS", 2)]
1486+
StandardandAFS = 100000002,
1487+
}
1488+
14551489
[System.Runtime.Serialization.DataContractAttribute()]
14561490
public enum ccof_CCOFStatus
14571491
{
@@ -2082,6 +2116,10 @@ public enum ccof_pcf_unlocked_sections
20822116
[OptionSetMetadataAttribute("CCFRI", 5)]
20832117
CCFRI = 100000005,
20842118

2119+
[System.Runtime.Serialization.EnumMemberAttribute()]
2120+
[OptionSetMetadataAttribute("CCFRI AFS Enable", 9)]
2121+
CCFRIAFSEnable = 100000009,
2122+
20852123
[System.Runtime.Serialization.EnumMemberAttribute()]
20862124
[OptionSetMetadataAttribute("CCFRI AFS Unlock", 8)]
20872125
CCFRIAFSUnlock = 100000008,
@@ -2451,6 +2489,10 @@ public enum chatbotlanguage
24512489
[OptionSetMetadataAttribute("Greek", 22)]
24522490
Greek = 1032,
24532491

2492+
[System.Runtime.Serialization.EnumMemberAttribute()]
2493+
[OptionSetMetadataAttribute("Hebrew", 28)]
2494+
Hebrew = 1037,
2495+
24542496
[System.Runtime.Serialization.EnumMemberAttribute()]
24552497
[OptionSetMetadataAttribute("Hindi", 15)]
24562498
Hindi = 1081,
@@ -4103,6 +4145,22 @@ public enum ecc_health_authorities
41034145
VancouverCoastalHealth = 5,
41044146
}
41054147

4148+
/// <summary>
4149+
/// Holiday Type
4150+
/// </summary>
4151+
[System.Runtime.Serialization.DataContractAttribute()]
4152+
public enum ecc_holiday_type
4153+
{
4154+
4155+
[System.Runtime.Serialization.EnumMemberAttribute()]
4156+
[OptionSetMetadataAttribute("BC Only", 1)]
4157+
BCOnly = 2,
4158+
4159+
[System.Runtime.Serialization.EnumMemberAttribute()]
4160+
[OptionSetMetadataAttribute("Standard", 0)]
4161+
Standard = 1,
4162+
}
4163+
41064164
/// <summary>
41074165
/// Inclusion Policies
41084166
/// </summary>
@@ -14367,6 +14425,37 @@ public enum ofm_fiscal_year_StatusCode
1436714425
Historical = 2,
1436814426
}
1436914427

14428+
[System.Runtime.Serialization.DataContractAttribute()]
14429+
public enum ofm_funding_clauses
14430+
{
14431+
14432+
[System.Runtime.Serialization.EnumMemberAttribute()]
14433+
[OptionSetMetadataAttribute(@"additional educational programming- the Recipient offered additional educational programming through third party contractors with expertise in providing such programing for purchase prior to the Cutoff Date and may continue to offer such additional educational programming on the same terms and conditions as it did prior to the Cutoff Date;", 3)]
14434+
additionaleducationalprogrammingtheRecipientofferedadditionaleducationalprogrammingthroughthirdpartycontractorswithexpertiseinprovidingsuchprogramingforpurchasepriortotheCutoffDateandmaycontinuetooffersuchadditionaleducationalprogrammingonthesametermsandconditionsasitdidpriortotheCutoffDate = 506580003,
14435+
14436+
[System.Runtime.Serialization.EnumMemberAttribute()]
14437+
[OptionSetMetadataAttribute(@"custom transportation- the Recipient offered custom transportation to transport a child to and from their home (or another location requested by their Parent) and the Child Care Centre and may continue to offer custom transportation on the same terms and conditions as it did prior to the Cutoff Date. For certainty, custom transportation does not include transportation that is paid for by a Transportation Allowance;", 4)]
14438+
customtransportationtheRecipientofferedcustomtransportationtotransportachildtoandfromtheirhomeoranotherlocationrequestedbytheirParentandtheChildCareCentreandmaycontinuetooffercustomtransportationonthesametermsandconditionsasitdidpriortotheCutoffDateForcertaintycustomtransportationdoesnotincludetransportationthatispaidforbyaTransportationAllowance = 506580004,
14439+
14440+
[System.Runtime.Serialization.EnumMemberAttribute()]
14441+
[OptionSetMetadataAttribute(@"extracurricular activities- the Recipient offered certain extracurricular activities through third party contractors with expertise in providing such activities for purchase prior to the Cutoff Date and may continue to offer such extracurricular activities on the same terms and conditions as it did prior to the Cutoff Date;", 2)]
14442+
extracurricularactivitiestheRecipientofferedcertainextracurricularactivitiesthroughthirdpartycontractorswithexpertiseinprovidingsuchactivitiesforpurchasepriortotheCutoffDateandmaycontinuetooffersuchextracurricularactivitiesonthesametermsandconditionsasitdidpriortotheCutoffDate = 506580002,
14443+
14444+
[System.Runtime.Serialization.EnumMemberAttribute()]
14445+
[OptionSetMetadataAttribute("meals- the Recipient offered a meal program for purchase prior to the Cutoff Date" +
14446+
" and may continue to offer a meal program on the same terms and conditions as it" +
14447+
" did prior to the Cutoff Date;", 0)]
14448+
mealstheRecipientofferedamealprogramforpurchasepriortotheCutoffDateandmaycontinuetoofferamealprogramonthesametermsandconditionsasitdidpriortotheCutoffDate = 506580000,
14449+
14450+
[System.Runtime.Serialization.EnumMemberAttribute()]
14451+
[OptionSetMetadataAttribute("Not Applicable", 5)]
14452+
NotApplicable = 506580005,
14453+
14454+
[System.Runtime.Serialization.EnumMemberAttribute()]
14455+
[OptionSetMetadataAttribute(@"uniforms- the Recipient offered uniforms to be worn at the Child Care Centre for purchase prior to the Cutoff Date and may continue to offer uniforms on the same terms and conditions as it did prior to the Cutoff Date. Uniforms do not include safety equipment such as matching t-shirts for offsite trips or a supply of clothing available at the Child Care Centre;", 1)]
14456+
uniformstheRecipientoffereduniformstobewornattheChildCareCentreforpurchasepriortotheCutoffDateandmaycontinuetoofferuniformsonthesametermsandconditionsasitdidpriortotheCutoffDateUniformsdonotincludesafetyequipmentsuchasmatchingtshirtsforoffsitetripsorasupplyofclothingavailableattheChildCareCentre = 506580001,
14457+
}
14458+
1437014459
[System.Runtime.Serialization.DataContractAttribute()]
1437114460
public enum ofm_funding_envelopes
1437214461
{
@@ -15478,6 +15567,38 @@ public enum ofm_standing_history_StatusCode
1547815567
Inactive = 2,
1547915568
}
1548015569

15570+
/// <summary>
15571+
/// Status of the Statutory Holiday
15572+
/// </summary>
15573+
[System.Runtime.Serialization.DataContractAttribute()]
15574+
public enum ofm_stat_holiday_statecode
15575+
{
15576+
15577+
[System.Runtime.Serialization.EnumMemberAttribute()]
15578+
[OptionSetMetadataAttribute("Active", 0)]
15579+
Active = 0,
15580+
15581+
[System.Runtime.Serialization.EnumMemberAttribute()]
15582+
[OptionSetMetadataAttribute("Inactive", 1)]
15583+
Inactive = 1,
15584+
}
15585+
15586+
/// <summary>
15587+
/// Reason for the status of the Statutory Holiday
15588+
/// </summary>
15589+
[System.Runtime.Serialization.DataContractAttribute()]
15590+
public enum ofm_stat_holiday_StatusCode
15591+
{
15592+
15593+
[System.Runtime.Serialization.EnumMemberAttribute()]
15594+
[OptionSetMetadataAttribute("Active", 0)]
15595+
Active = 1,
15596+
15597+
[System.Runtime.Serialization.EnumMemberAttribute()]
15598+
[OptionSetMetadataAttribute("Inactive", 1)]
15599+
Inactive = 2,
15600+
}
15601+
1548115602
/// <summary>
1548215603
/// Status of the Sub-Category
1548315604
/// </summary>
@@ -17288,19 +17409,19 @@ public enum sla_slaenabledentities
1728817409
{
1728917410

1729017411
[System.Runtime.Serialization.EnumMemberAttribute()]
17291-
[OptionSetMetadataAttribute("Case", 1)]
17412+
[OptionSetMetadataAttribute("Case", 2)]
1729217413
Case = 112,
1729317414

1729417415
[System.Runtime.Serialization.EnumMemberAttribute()]
17295-
[OptionSetMetadataAttribute("Lead", 0)]
17416+
[OptionSetMetadataAttribute("Lead", 3)]
1729617417
Lead = 4,
1729717418

1729817419
[System.Runtime.Serialization.EnumMemberAttribute()]
17299-
[OptionSetMetadataAttribute("Order", 2)]
17420+
[OptionSetMetadataAttribute("Order", 1)]
1730017421
Order = 1088,
1730117422

1730217423
[System.Runtime.Serialization.EnumMemberAttribute()]
17303-
[OptionSetMetadataAttribute("Quote", 3)]
17424+
[OptionSetMetadataAttribute("Quote", 0)]
1730417425
Quote = 1084,
1730517426
}
1730617427

ECC.Core.DataContext/generatorSettings.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,6 +1607,7 @@ ofm_request_category|
16071607
ofm_section|
16081608
ofm_space_allocation|
16091609
ofm_standing_history|
1610+
ofm_stat_holiday|
16101611
ofm_subcategory|
16111612
ofm_supplementary_schedule|
16121613
ofm_survey|
@@ -1708,7 +1709,7 @@ VoiceMail</TokenCapitalizationOverrides>
17081709
<Namespace>ECC.Core.DataContext</Namespace>
17091710
<ServiceContextName>DataverseContext</ServiceContextName>
17101711
<SuppressGeneratedCodeAttribute>true</SuppressGeneratedCodeAttribute>
1711-
<SettingsVersion>2.2024.2.1</SettingsVersion>
1712+
<SettingsVersion>2.2024.5.16</SettingsVersion>
17121713
<UpdateBuilderSettingsJson>true</UpdateBuilderSettingsJson>
1713-
<Version>2.2024.5.16</Version>
1714+
<Version>2.2024.10.16</Version>
17141715
</Config>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,14 @@ public string BusinessClosuresRequestUri
123123
{
124124
var fetchXml = $$"""
125125
<fetch>
126-
<entity name="msdyn_businessclosure">
127-
<attribute name="msdyn_starttime" />
126+
<entity name="ofm_stat_holiday">
127+
<attribute name="ofm_date_observed" />
128128
</entity>
129129
</fetch>
130130
""";
131131

132132
var requestUri = $"""
133-
msdyn_businessclosures?fetchXml={WebUtility.UrlEncode(fetchXml)}
133+
ofm_stat_holidaies?fetchXml={WebUtility.UrlEncode(fetchXml)}
134134
""";
135135

136136
return requestUri;
@@ -371,8 +371,8 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService
371371
List<D365FiscalYear> fiscalYears = [.. JsonSerializer.Deserialize<List<D365FiscalYear>>(fiscalYearsData.Data)];
372372

373373
var businessClosuresData = await GetBusinessClosuresDataAsync();
374-
var closures = JsonSerializer.Deserialize<List<BusinessClosure>>(businessClosuresData.Data.ToString());
375-
List<DateTime> holidaysList = closures!.Select(closure => DateTime.Parse(closure.msdyn_starttime)).ToList();
374+
var closures = JsonSerializer.Deserialize<List<ofm_stat_holiday>>(businessClosuresData.Data.ToString());
375+
List<DateTime> holidaysList = closures!.Select(closure => (DateTime)closure.ofm_date_observed).ToList();
376376

377377
#endregion
378378

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,20 @@ public string BusinessClosuresRequestUri
6060
{
6161
var fetchXml = $$"""
6262
<fetch>
63-
<entity name="msdyn_businessclosure">
64-
<attribute name="msdyn_starttime" />
63+
<entity name="ofm_stat_holiday">
64+
<attribute name="ofm_date_observed" />
6565
</entity>
6666
</fetch>
6767
""";
6868

6969
var requestUri = $"""
70-
msdyn_businessclosures?fetchXml={WebUtility.UrlEncode(fetchXml)}
70+
ofm_stat_holidaies?fetchXml={WebUtility.UrlEncode(fetchXml)}
7171
""";
7272

7373
return requestUri;
7474
}
7575
}
76+
7677
public string PaymentInProcessUri
7778
{
7879
get
@@ -324,9 +325,8 @@ private async Task<JsonObject> CreateIntegrationErrorLog(string subject, Guid re
324325

325326
private static List<DateTime> GetStartTimes(string jsonData)
326327
{
327-
var closures = JsonSerializer.Deserialize<List<BusinessClosure>>(jsonData);
328-
329-
List<DateTime> startTimeList = closures.Select(closure => DateTime.Parse(closure.msdyn_starttime)).ToList();
328+
var closures = JsonSerializer.Deserialize<List<ofm_stat_holiday>>(jsonData);
329+
List<DateTime> startTimeList = closures!.Select(closure => (DateTime)closure.ofm_date_observed).ToList();
330330

331331
return startTimeList;
332332
}

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ public string BusinessClosuresRequestUri
6363
{
6464
var fetchXml = $$"""
6565
<fetch>
66-
<entity name="msdyn_businessclosure">
67-
<attribute name="msdyn_starttime" />
66+
<entity name="ofm_stat_holiday">
67+
<attribute name="ofm_date_observed" />
6868
</entity>
6969
</fetch>
7070
""";
7171

7272
var requestUri = $"""
73-
msdyn_businessclosures?fetchXml={WebUtility.UrlEncode(fetchXml)}
73+
ofm_stat_holidaies?fetchXml={WebUtility.UrlEncode(fetchXml)}
7474
""";
7575

7676
return requestUri;
@@ -359,9 +359,8 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService
359359
List<D365FiscalYear> fiscalYears = [.. JsonSerializer.Deserialize<List<D365FiscalYear>>(fiscalYearsData.Data)];
360360

361361
var businessClosuresData = await GetBusinessClosuresDataAsync();
362-
var closures = JsonSerializer.Deserialize<List<BusinessClosure>>(businessClosuresData.Data.ToString());
363-
List<DateTime> holidaysList = closures!.Select(closure => DateTime.Parse(closure.msdyn_starttime)).ToList();
364-
362+
var closures = JsonSerializer.Deserialize<List<ofm_stat_holiday>>(businessClosuresData.Data.ToString());
363+
List<DateTime> holidaysList = closures!.Select(closure => (DateTime)closure.ofm_date_observed).ToList();
365364
#endregion
366365

367366
switch (expenseInfo.ofm_payment_frequency)

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,20 +102,20 @@ public string BusinessClosuresRequestUri
102102
{
103103
var fetchXml = $$"""
104104
<fetch>
105-
<entity name="msdyn_businessclosure">
106-
<attribute name="msdyn_starttime" />
105+
<entity name="ofm_stat_holiday">
106+
<attribute name="ofm_date_observed" />
107107
</entity>
108108
</fetch>
109109
""";
110110

111111
var requestUri = $"""
112-
msdyn_businessclosures?fetchXml={WebUtility.UrlEncode(fetchXml)}
112+
ofm_stat_holidaies?fetchXml={WebUtility.UrlEncode(fetchXml)}
113113
""";
114114

115115
return requestUri;
116116
}
117117
}
118-
118+
119119
public string ApplicationRequestUri
120120
{
121121
get
@@ -383,9 +383,9 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService
383383
List<D365FiscalYear> fiscalYears = [.. JsonSerializer.Deserialize<List<D365FiscalYear>>(fiscalYearsData.Data)];
384384

385385
var businessClosuresData = await GetBusinessClosuresDataAsync();
386-
var closures = JsonSerializer.Deserialize<List<BusinessClosure>>(businessClosuresData.Data.ToString());
387-
List<DateTime> holidaysList = closures!.Select(closure => DateTime.Parse(closure.msdyn_starttime)).ToList();
388-
386+
387+
var closures = JsonSerializer.Deserialize<List<ofm_stat_holiday>>(businessClosuresData.Data.ToString());
388+
List<DateTime> holidaysList = closures!.Select(closure => (DateTime)closure.ofm_date_observed).ToList();
389389
#endregion
390390

391391
await ProcessSupportNeedsOrIndigenousPayments(deserializedApplicationData.First(), approvedSA, processParams, fiscalYears, holidaysList, firstAnniversary, secondAnniversary, fundingEndDate);

0 commit comments

Comments
 (0)