feat: a budget type that will rollover but also incorporate overspending from the previous period (if any)

This commit is contained in:
James Cole
2023-05-15 06:18:02 +02:00
parent 63fdc2487f
commit 0b5e0a268a
15 changed files with 100 additions and 9 deletions

View File

@@ -65,7 +65,7 @@ class BudgetFormStoreRequest extends FormRequest
return [
'name' => 'required|between:1,100|uniqueObjectForUser:budgets,name',
'active' => 'numeric|between:0,1',
'auto_budget_type' => 'numeric|integer|gte:0|lte:2',
'auto_budget_type' => 'numeric|integer|gte:0|lte:3',
'auto_budget_currency_id' => 'exists:transaction_currencies,id',
'auto_budget_amount' => 'min:0|max:1000000000|required_if:auto_budget_type,1|required_if:auto_budget_type,2',
'auto_budget_period' => 'in:daily,weekly,monthly,quarterly,half_year,yearly',