From 38ee053983a272cc907451994d484c19cbedba49 Mon Sep 17 00:00:00 2001 From: Azizbek Khushvakov <113523904+azizbekxm@users.noreply.github.com> Date: Fri, 20 Dec 2024 15:43:23 +0500 Subject: [PATCH] MODFIN-382 - Add dry-run mode for bulk FY finance updates (#496) * [MODFIN-382] - Add update type to finance data for dry-run mode * [MODFIN-382] - Add update type to finance data for dry-run mode * Update budgetAfter Allocation field --- .../examples/fy_finance_data_collection_put.sample | 3 +++ mod-finance/schemas/fy_finance_data.json | 4 ++++ mod-finance/schemas/fy_finance_data_collection.json | 9 +++++++++ 3 files changed, 16 insertions(+) diff --git a/mod-finance/examples/fy_finance_data_collection_put.sample b/mod-finance/examples/fy_finance_data_collection_put.sample index ecf13cf0..8e1b7ee1 100644 --- a/mod-finance/examples/fy_finance_data_collection_put.sample +++ b/mod-finance/examples/fy_finance_data_collection_put.sample @@ -21,6 +21,7 @@ "budgetAllocationChange": -50000, "budgetAllowableExpenditure": 80, "budgetAllowableEncumbrance": 90, + "budgetAfterAllocation": 950000, "budgetAcqUnitIds": ["123e4567-e89b-12d3-a456-426614174008"], "groupId": "123e4567-e89b-12d3-a456-426614174025", "groupCode": "GRP001", @@ -50,6 +51,7 @@ "budgetAllocationChange": -50000, "budgetAllowableExpenditure": 70, "budgetAllowableEncumbrance": 85, + "budgetAfterAllocation": 450000, "budgetAcqUnitIds": ["123e4567-e89b-12d3-a456-426614174009"], "groupId": "123e4567-e89b-12d3-a456-426614174026", "groupCode": "GRP002", @@ -59,5 +61,6 @@ } } ], + "updateType": "Commit", "totalRecords": 2 } diff --git a/mod-finance/schemas/fy_finance_data.json b/mod-finance/schemas/fy_finance_data.json index babc1cfe..ecf44ad5 100644 --- a/mod-finance/schemas/fy_finance_data.json +++ b/mod-finance/schemas/fy_finance_data.json @@ -93,6 +93,10 @@ "description": "The encumbrance percentage limit for this budget", "type": "number" }, + "budgetAfterAllocation": { + "description": "The amount of the budget after the allocation", + "type": "number" + }, "budgetAcqUnitIds": { "description": "List of acquisition unit IDs associated with the budget", "type": "array", diff --git a/mod-finance/schemas/fy_finance_data_collection.json b/mod-finance/schemas/fy_finance_data_collection.json index a30adaf9..f4c92615 100644 --- a/mod-finance/schemas/fy_finance_data_collection.json +++ b/mod-finance/schemas/fy_finance_data_collection.json @@ -12,6 +12,14 @@ "$ref": "fy_finance_data.json" } }, + "updateType": { + "description": "The type of update being performed", + "type": "string", + "enum": [ + "Preview", + "Commit" + ] + }, "totalRecords": { "description": "The number of objects contained in this collection", "type": "integer" @@ -20,6 +28,7 @@ "additionalProperties": false, "required": [ "fyFinanceData", + "updateType", "totalRecords" ] }