Author | Andrei Makaranka |
---|---|
JIRA task | |
Business Requirements | |
Architects Review | IN PROGRESS |
PO review | IN PROGRESS |
Revision History
Version | Date | Owner | Description | Reason |
---|---|---|---|---|
v1.0 | 06.14.2022 | Andrei Makaranka | Initial version | |
v2.0 | 06.22.2022 | Andrei Makaranka | Schema changed and WBS added |
Overview
Allow user to generate a rollover report that will tell the user what errors may occur if rolling over with current data.
Preview report should contain : finance rollover errors (budget errors) and clone of new generated budgets.
Constraints
- The current approach can cover rollover for the only one ledger though in real life there can be several ledgers - but this needs to be considered
Assumptions, dependencies
- Ledger Fiscal Year Rollover already implemented.
- It is likely that we will be creating upwards of 75000 - 100000 encumbrances during this process. (statistics from Library).
- Prepare report with Unpaid invoices is UI responsibility.
Out of Scope
- Prepare report for orders rollover.
- Prepare report for encumbrances rollover.
- Support exchange rate.
Architecturally Significant Requirements
- The preview process should not make changes in real tables, but store the results in a temporary or separate tables.
- Finance rollover preview should be done by the same SQL script as used for Real rollover process.
- Must be compatible with PostgreSQL 10.x
Solution Design
- Current scheme for rollover records - add a column/flag to mark every rollover if it is a real or a preview one - this will also keep the history of completed previews
- mod-finance-storage-master\src\main\resources\templates\db_scripts\budget_encumbrances_rollover.sql - make this script parameterizable; pass a real/preview flag as the input parameter; use different tables depending on the flag value. This will allow not to duplicate the SQL script, but to use the same script for both the real rollover and the preview, and thereby get the correct results for the preview.
- Add another table to store preview data, including Export budget and errors that have occurred; data from this table can then be exported to any convenient format or displayed on the UI
Data Model
Update schema "ledger_fiscal_year_rollover" with new "action" field
Property | Type | Read Only | Default | Required | Notes |
---|---|---|---|---|---|
action | enum ["Preview", "Commit", "Rollback"] | true | Commit | Y |
|
Create duplicate of the Budget schema
New schema name : preview_rollover_budget
Schema should be copy of ramls/acq-models/mod-finance/schemas/budget.json where all amounts are "persistent"(remove readOnly flag from all amounts).
Create new table "preview_ledger_fiscal_year_rollover"
Schema for the table "preview_ledger_fiscal_year_rollover"
Schema for the preview result "preview_ledger_fiscal_year_rollover_result"
APIs
Preview Ledger Rollover Business API
Method | Path | Request | Response | Description | Interface | Notes |
---|---|---|---|---|---|---|
POST | /finance/ledger-rollovers/previews | ramls/acq-models/mod-finance/schemas/ledger_fiscal_year_rollover.json | preview_ledger_fiscal_year_rollover | Run preview of the ledger fiscal year rollovers | finance.ledger-rollovers.previews.collection.post | Status : 201 |
GET | /finance/ledger-rollovers/previews/{id} | NA | preview_ledger_fiscal_year_rollover | GET preview of the ledger fiscal year rollover by id | finance.ledger-rollovers.previews.item.get | Status : 200 |
GET | /finance/ledger-rollovers/previews | NA | preview_ledger_fiscal_year_rollover_collection | GET previews of the ledger fiscal year rollovers | finance.ledger-rollovers.previews.collection.get | Status : 200 |
DELETE | /finance-storage/ledger-rollovers/previews/{id} | NA | NA | DELETE preview of the ledger fiscal year rollover by id | finance.ledger-rollovers.previews.item.delete | Status : 204 |
Preview Ledger Rollover Storage API
Method | Path | Request | Response | Description | Interface | Notes |
---|---|---|---|---|---|---|
POST | /finance-storage/ledger-rollovers/previews | ramls/acq-models/mod-finance/schemas/ledger_fiscal_year_rollover.json | preview_ledger_fiscal_year_rollover | POST previews of the ledger fiscal year rollovers | finance-storage.ledger-rollovers.previews.collection.post | Status : 201 |
GET | /finance-storage/ledger-rollovers/previews/{id} | NA | preview_ledger_fiscal_year_rollover | GET preview of the ledger fiscal year rollover by id | finance-storage.ledger-rollovers.previews.item.get | Status : 200 |
GET | /finance-storage/ledger-rollovers/previews | NA | preview_ledger_fiscal_year_rollover_collection | GET previews of the ledger fiscal year rollovers | finance-storage.ledger-rollovers.previews.collection.get | Status : 200 |
DELETE | /finance-storage/ledger-rollovers/previews/{id} | NA | NA | DELETE previews of the ledger fiscal year rollover by id | finance-storage.ledger-rollovers.previews.item.delete | Status : 204 |
Design
Work Breakdown Structure
Work | Comments | Story | ~ Estimate | |
---|---|---|---|---|
1 |
| acq-models, mod-finance-storage, mod-finance | 1 | |
2 |
| mod-finance-storage | 1 | |
3 |
| mod-finance | 1 | |
4 |
| mod-finance-storage All all open technical questions should be resolved | 5 | |
5 |
| mod-finance-storage | ||
6 | Implement Preview rollover flow and update budgets with all calculated amounts
1.1 Rollover script run, 1.2. Calculation budgets amounts, 1.3. Storing them in the rollover preview table → preview_ledger_fiscal_year_rollover | mod-finance-storage | ||
7 |
| mod-finance | ||
8 |
| mod-finance |
Open Items
Question | Answer | Story |
---|