Details
-
Story
-
Status: Closed (View Workflow)
-
P3
-
Resolution: Done
-
None
-
None
-
ACQ Sprint 93
-
3
-
Thunderjet
Description
Purpose/Overview:
Provide API to retrieve collection of expense classes with totals within a given Budget.
Requirements/Scope:
- create schema budget_expense_class_totals
- expenseClassName
- expenseClassStatus
- encumbered
- awaitingPayment
- expended
- percentageExpended
- define and implement GET /finance/budgets/id/expense-classes API
Approach:
Retrieve expense-classes for given budget 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 fundId=budget.fundId AND fiscalYearId=budget.fiscalYearId
Calculate for each expense-class:
- encumbered sum of transaction.amount where transactionType==Encumbrance
- awaitingPayment sum of transaction.amount where transactionType==Pending payment
- expended sum of (transaction.amount where transactionType==Payment) and (-transaction.amount where transactionType==Credit)
- percentageExpended = expended / (budget.expended+ budget.overExpened) * 100
Acceptance criteria:
- schema created
- GET /finance/groups/id/expense-classes 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
-
MODFISTO-115 Define and implement budget-expense-classes API
-
- Closed
-
- has to be done before
-
MODFIN-137 Define and implement GET /finance/groups/id/expense-classes-totals API
-
- Closed
-
-
UIF-214 Display expense class information on budget view
-
- Closed
-
-
UIF-230 Display expense classes on Fund record view
-
- Closed
-