Details
-
Story
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Done
-
None
-
None
-
-
ACQ Sprint 94, ACQ Sprint 95
-
3
-
Thunderjet
Description
Purpose/Overview:
To support ability to summarize the amounts associated with an expense class for all funds in given group with that type we need to provide GET /finance/groups/id/expense-classes-totals API
Requirements/Scope:
- create schema group_expense_class_totals
- expenseClassName
- expended
- percentageExpended
- define and implement GET /finance/groups/id/expense-classes-totals API
Approach:
Retrieve group-fund-fiscal-year records by groupId
Retrieve expense-classes for each budgetId from above request using GET /finance-storage/expense-classes?query=budgetExpenseClass.budgetId==id
For each expense-class get transactions using GET /finance-storage/transactions?query=expenseClassId==expense-class.id AND
Calculate for each expense-class:
- expended sum of (transaction.amount where transactionType==Payment) and (-transaction.amount where transactionType==Credit)
- percentageExpended = expended/ (sum of all expense classes expended related to given group) * 100
Acceptance criteria:
- schema created
- GET /finance/groups/id/expense-classes-totals API defined and implemented
- unit tests updated
- API tests updated
TestRail: Results
Attachments
Issue Links
- defines
-
UXPROD-2362 Shared allocation for budgets
-
- Closed
-
- has to be done after
-
MODFIN-136 Define and implement GET /finance/budgets/id/expense-classes-totals API
-
- Closed
-
-
MODFISTO-115 Define and implement budget-expense-classes API
-
- Closed
-
- has to be done before
-
UIF-227 Display expense class information on Group view
-
- Closed
-