Details

    • 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

      Description

      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.

      1. Once this method is converted to SQL, the CDS exports successfully with complete data.
      2. The CDS payment data is accurate.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jason.powell Jason Powell
                Reporter:
                jason.powell Jason Powell
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 13h
                  13h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 6.75h Time Not Required
                  6.75h

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.