Skip to content

Commit

Permalink
Update to pass info in a new field
Browse files Browse the repository at this point in the history
  • Loading branch information
jSylvestre committed Jun 27, 2024
1 parent 4200cda commit 2b117cc
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Sloth.Core/Services/AggieEnterpriseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public async Task<IGlJournalRequestResult> CreateJournal(Source source, Transact
var line = new GlJournalLineInput
{
ExternalSystemIdentifier = transaction.KfsTrackingNumber.StripToGlReferenceField(10),
ExternalSystemReference = transfer.Id.StripToGlReferenceField(25),
ExternalSystemReference = transfer.Id.StripToGlReferenceField(25),
Glide = glide
};

Expand All @@ -124,6 +124,24 @@ public async Task<IGlJournalRequestResult> CreateJournal(Source source, Transact
else if (segmentStringType == FinancialChartStringType.Ppm)
{
line.PpmSegmentString = transfer.FinancialSegmentString;
if(string.IsNullOrWhiteSpace(transaction.Description))
{
line.PpmComment = transfer.Description.SafeTruncate(40);
}
else
{
if(transaction.Description.Contains(transfer.Description) && transfer.Description.Length > transaction.Description.Length)
{
//Payments may have a transaction description like "Funds Distribution INV 7284-001" and a transfer description like "Funds Distribution" we want to use the transaction description
//Grow may have a transaction description like "McGuire_Jarman - Hort Innovation Lab" and a transfer description like "[S] GH183 (EH) / 104sqft________________" we want to use the transfer description
line.PpmComment = transfer.Description.SafeTruncate(40);
}
else
{
line.PpmComment = transaction.Description.SafeTruncate(40);
}
}

containsPpm = true;
}
else
Expand Down

0 comments on commit 2b117cc

Please sign in to comment.