Uploaded image for project: 'CFA MX '
  1. CFA MX
  2. CFAMX-20652

Refactor GetFinancialLinkedGroups to not use UNION

    Details

    • Work Type Classification:
      Sustaining

      Description

      Rewrite the method to use something akin to the joins and where clause in:

      select
      				cd.TransactionCashDepositID,
                        sum(cdf.Amount * (((fg.OperationEnum*2)-1)*-1)) as Amount,
                        sum(cdf.Quantity) as Quantity
                  from
                        tbtransactioncashdeposit cd with (nolock)
                  join tbtransactioncashdepositfinancial cdf with (nolock)
                  on cd.TransactionCashDepositID=cdf.TransactionCashDepositID
                  join dbo.fn_GetFinancialTypeGroups(1) fg 
                  on fg.FinancialGroupID=cdf.FinancialGroupID or fg.ChildFinancialGroupID=cdf.FinancialGroupID
                  LEFT JOIN tbEntityZone ez with (nolock)
                  on ez.ZoneID = fg.ZoneID AND ez.EntityID = cd.EntityID
                  where
                        (fg.ZoneID IS NULL OR ez.EntityID = cd.EntityID)
                        AND fg.Status != 0
      				  AND ISNULL(fg.OperationEnum, 0) != 2
      				  AND cd.EntityID = @EntityID
      				  AND cd.CashDepositDate >= @StartDate 
      				  AND cd.CashDepositDate <= @EndDate 
                  group by
                        cd.TransactionCashDepositID
      

      But replace the EntityID/CashDepositDate WHERE clauses with a TransactionCashDepositID.

        Attachments

          Issue Links

          1.
          Create Test Scripts QA Task Ready for QA Unassigned

          0%

          Original Estimate - 0.5h
          Remaining Estimate - 0.5h
          2.
          Review Test Scripts QA Task Ready for QA Unassigned

          0%

          Original Estimate - 0.5h
          Remaining Estimate - 0.5h
          3.
          Deploy QA Task Ready for QA Unassigned

          0%

          Original Estimate - 0.5h
          Remaining Estimate - 0.5h
          4.
          Execute Test Cases QA Task Ready for QA Unassigned

          0%

          Original Estimate - 0.5h
          Remaining Estimate - 0.5h
          5.
          Functional Review with QA Dev Task Ready for Developer Unassigned

          0%

          Original Estimate - 0.5h
          Remaining Estimate - 0.5h
          6.
          DIT Dev Task Ready for Developer Unassigned

          0%

          Original Estimate - 0.5h
          Remaining Estimate - 0.5h
          7.
          Design Review Dev Task Ready for Developer Unassigned

          0%

          Original Estimate - 0.5h
          Remaining Estimate - 0.5h
          8.
          Story Documentation Dev Task Ready for Developer Unassigned

          0%

          Original Estimate - 0.5h
          Remaining Estimate - 0.5h

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                Corey.Amend Corey Amend (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4h
                  4h
                  Remaining:
                  Remaining Estimate - 4h
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                    PagerDuty

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