BudgetSquirrel / ApplicationWebApi

Web API application layer for BudgetSquirrel
0 stars 0 forks source link

Budget - Update Budget Amount optionally cascades to percent-based sub-budgets #14

Open ianmann56 opened 5 years ago

ianmann56 commented 5 years ago

Key terms

Percent-based budget: a budget whose amount is calculated as a percentage of it's parents amount. Sub-budget select menu: A list of the currently editing budget's sub-budgets that are percentage-based budgets. This menu will be used to determine which sub-budgets to update the amount on. percentage-based amount updating: The process of updating a sub-budget's set amount based on it's percentage amount of it's parent budget when that parent budget's set amount get's updated. The user can choose not to update the sub-budget's amount.

Description

As a Budget Planner, When I update a budget's amount, I should be able to tell the server to update that budgets sub-budgets (selectively) which have percent-based amount

Details

Given Budget A has sub-budgets and 1 or more of those sub-budgets are percent-based budgets When the user clicks to finalize updating a budget Then the user should be prompted with a select-able check list of all the percentage-based sub-budgets of that budget (the Sub-budget select menu)

Given Budget A has no sub-budgets that are percent-based budgets When the user clicks to finalize updating a budget Then the user should not be prompted with a select-able check list of all the percentage-based sub-budgets of that budget (the Sub-budget select menu)

Given a sub-budget is already selected in the Sub-budget select menu When the user clicks that sub-budget Then that sub-budget will be flagged for percentage-based amount updating.

Given a sub-budget is NOT already selected in the Sub-budget select menu When the user clicks that sub-budget Then that sub-budget will be UN-flagged for percentage-based amount updating.

Given a sub-budget is flagged for percentage-based amount updating When that sub-budget's parent budget's set amount changes, Then that sub-budget's set amount should also be updated according to it's percentage of it's parent budget.

Given a sub-budget is NOT flagged for percentage-based amount updating When that sub-budget's parent budget's set amount changes, Then that sub-budget's set amount should NOT also be changed.

BenjaminGroseclose commented 5 years ago

This is business logic so I am going to transfer this back to the BudgetTracker project

BenjaminGroseclose commented 5 years ago

Mmmmmmmmmmmmm, this is something that should be prompted in the UI and then we can call the update function to the respective budgets.