Skip to content

Commit

Permalink
minor changes to check funding status
Browse files Browse the repository at this point in the history
  • Loading branch information
skaur50 committed Jul 23, 2024
1 parent 7657b3c commit 42a7a06
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions OFM.Infrastructure.WebAPI/Models/Fundings/Fundings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ public class SupplementaryApplication : ofm_allowance
public Guid? _ofm_summary_submittedby_value { get; set; }
[property: JsonPropertyName("app.ofm_funding_number_base")]
public string? ofm_funding_number_base { get; set; }
[property: JsonPropertyName("funding.statuscode")]
public int? fundingstatuscode { get; set; }
}

public class BusinessClosure
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Extensions.Options;
using ECC.Core.DataContext;
using Microsoft.Extensions.Options;
using OFM.Infrastructure.WebAPI.Extensions;
using OFM.Infrastructure.WebAPI.Models;
using OFM.Infrastructure.WebAPI.Models.Fundings;
Expand Down Expand Up @@ -74,6 +75,12 @@ public string RequestUri
<attribute name="ofm_last_name" />
<attribute name="ofm_first_name" />
</link-entity>
<link-entity name="ofm_funding" from="ofm_application" to="ofm_applicationid" link-type="inner" alias="funding" >
<attribute name="statuscode" />
<filter>
<condition attribute="ofm_version_number" operator="eq" value="0" />
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>
Expand Down Expand Up @@ -136,6 +143,7 @@ public async Task<JsonObject> RunProcessAsync(ID365AppUserService appUserService
}
try
{
if(deserializedData.First().fundingstatuscode == (int)ofm_funding_StatusCode.Active)
await _emailRepository.CreateAllowanceEmail(deserializedData.First(), _processParams.Notification.SenderId, _informationCommunicationType, ProcessId, d365WebApiService);
}
catch (Exception ex)
Expand Down

0 comments on commit 42a7a06

Please sign in to comment.