-
Type: Story
-
Status: Closed (View Workflow)
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Sprint:2022.R4 New Features Sprint 5
-
SCRUM Team:Brotherhood of Mutants
-
Story Points:3
-
Work Type Classification:Sustaining
Story
As an admin, I would like the C# method provided below converted to SQL to make it easier to troubleshoot and maintain
Details
FK_OnAccountSale is on tbCustomerOnAccountBalanceEvent table
we are looking for "CustomerOnAccountBalanceEvents" in CashDaySummary.cs file -> GetCustomerSalePayment method
here is the method needs to be converted to sql:
~\inform\CFACustom\Mx.CFA.Data\Repositories\OnAccountSaleRepository.cs
// code placeholder public IList<OnAccountSale> GetOnAccountSaleByDateRanges(long entityId, DateRange businessDateRange, DateRange timeRange) { IList<OnAccountSale> result; OnAccountSale oasAlias = null; TransactionSummary tsAlias = null; OnAccountSalePayment payAlias = null; TransactionControlInfo tciAlias = null; using (var tx = Session.BeginTransaction(IsolationLevel.ReadUncommitted)) { Session.Clear(); var trans = Session.QueryOver(() => oasAlias) .Where(o => o.EntityId == entityId) .And(o => o.ReversalFlag != true) .JoinAlias(() => oasAlias.TransactionSummary, () => tsAlias, JoinType.InnerJoin) .JoinAlias(() => oasAlias.Payments, () => payAlias, JoinType.LeftOuterJoin) .JoinAlias(() => payAlias.TransactionControlInfo, () => tciAlias, JoinType.LeftOuterJoin) .Where(() => (tsAlias.BusinessDay >= businessDateRange.Start && tsAlias.BusinessDay <= businessDateRange.End) || (oasAlias.UncollectibleTimestamp >= timeRange.Start && oasAlias.UncollectibleTimestamp < timeRange.End) || (tciAlias.BusinessDay >= businessDateRange.Start && tciAlias.BusinessDay <= businessDateRange.End)) .List<OnAccountSale>().Distinct().ToList(); result = trans; tx.Commit(); } Session.Evict(result); return result; }
AC
Note: QA will need to store some exports before this work for this story is added to JAT so that comparative analysis can be effectively performed.
- Once this method is converted to SQL, the CDS exports successfully with complete data.
- The CDS payment data is accurate.
- is blocked by
-
CFAMX-21218 Updated code not Generating Cash Day Summary for the Business Day the Implementation takes place
- Done
- is caused by
-
CFAMX-14140 CDS Export failures due to the following exception "could not execute batch command.[SQL: SQL not available]".
- Done