diff --git a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P500SendPaymentRequestProvider.cs b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P500SendPaymentRequestProvider.cs
index d470fbec..af51a090 100644
--- a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P500SendPaymentRequestProvider.cs
+++ b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P500SendPaymentRequestProvider.cs
@@ -1,4 +1,5 @@
-using HandlebarsDotNet;
+
+using HandlebarsDotNet;
using Microsoft.Extensions.Options;
using OFM.Infrastructure.WebAPI.Extensions;
using OFM.Infrastructure.WebAPI.Messages;
@@ -88,6 +89,7 @@ public string RequestPaymentLineUri
+
@@ -261,7 +263,7 @@ public async Task RunProcessAsync(ID365AppUserService appUserService
lineAmount = (lineitem.item.ofm_amount < 0 ? "-" : "") + Math.Abs(lineitem.item.ofm_amount.Value).ToString("0.00", System.Globalization.CultureInfo.InvariantCulture).PadLeft(line.FieldLength("lineAmount") - (lineitem.item.ofm_amount < 0 ? 1 : 0), '0'),// come from split funding amount per facility
lineCode = (lineitem.item.ofm_amount > 0 ? "D" : "C"),//if it is positive then line code is Debit otherwise credit
distributionACK = _BCCASApi.InvoiceLines.distributionACK.PadRight(line.FieldLength("distributionACK")),// using test data shared by CAS,should be changed for prod
- lineDescription = string.Concat(lineitem.item?.ofm_application?.ofm_Application, " ", lineitem.item.ofm_payment_type).PadRight(line.FieldLength("lineDescription")), // Pouplate extra info from facility/funding amount
+ lineDescription = (lineitem.item.ofm_payment_type).ToString().PadRight(line.FieldLength("lineDescription")), // Pouplate extra info from facility/funding amount
effectiveDate = lineitem.item.ofm_effective_date?.ToString("yyyyMMdd"), //2 days after invoice posting
quantity = _BCCASApi.InvoiceLines.quantity,//Static Value:0000000.00 not used by feeder
unitPrice = _BCCASApi.InvoiceLines.unitPrice,//Static Value:000000000000.00 not used by feeder
diff --git a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P510ReadPaymentResponseProvider.cs b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P510ReadPaymentResponseProvider.cs
index 9e22e19f..c8e5783a 100644
--- a/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P510ReadPaymentResponseProvider.cs
+++ b/OFM.Infrastructure.WebAPI/Services/Processes/Payments/P510ReadPaymentResponseProvider.cs
@@ -250,7 +250,7 @@ public async Task RunProcessAsync(ID365AppUserService appUserService
var businessclosuresdata = await GetBusinessClosuresDataAsync();
serializedPayData?.ForEach(async pay =>
{
- var line = headers.SelectMany(p => p.feedbackLine).SingleOrDefault(pl => pl.ILInvoice == pay.ofm_invoice_number && pl.ILDescription.StartsWith(string.Concat(pay?.ofm_application?.ofm_Application, " ", pay.ofm_payment_type)));
+ var line = headers.SelectMany(p => p.feedbackLine).FirstOrDefault(pl => pl.ILInvoice == pay.ofm_invoice_number && pl.ILDescription.Contains(pay?.ofm_payment_type.ToString()));
var header = headers.Where(p => p.IHInvoice == pay.ofm_invoice_number).FirstOrDefault();
List holidaysList = GetStartTimes(businessclosuresdata.Data.ToString());
@@ -267,7 +267,7 @@ public async Task RunProcessAsync(ID365AppUserService appUserService
{
var subject = pay.ofm_name;
//create Integration log with an error message.
- createIntregrationLogTasks.Add(CreateIntegrationErrorLog(subject, pay.ofm_application.ofm_applicationid.GetValueOrDefault(), casResponse, "CFS Integration Error", appUserService, d365WebApiService));
+ createIntregrationLogTasks.Add(CreateIntegrationErrorLog(subject, pay.ofm_application.ofm_applicationid.GetValueOrDefault(), casResponse, "CFS Integration Error", appUserService, d365WebApiService));
}
//Update it with latest cas response.