Higher amounts.

This commit is contained in:
James Cole
2022-10-08 06:05:59 +02:00
parent 553a9be3d5
commit b176308dbd
2 changed files with 5 additions and 5 deletions

View File

@@ -157,8 +157,8 @@ class BudgetLimitController extends Controller
// return empty=ish array: // return empty=ish array:
return response()->json([]); return response()->json([]);
} }
if ((int) $amount > 16777216) { if ((int) $amount > 268435456) {
$amount = '16777216'; $amount = '268435456';
} }
if (null !== $limit) { if (null !== $limit) {
@@ -223,8 +223,8 @@ class BudgetLimitController extends Controller
]; ];
return response()->json($array); return response()->json($array);
} }
if ((int) $amount > 16777216) { // 16 million if ((int) $amount > 268435456) { // 268 million
$amount = '16777216'; $amount = '268435456';
} }
$limit = $this->blRepository->update($budgetLimit, ['amount' => $amount]); $limit = $this->blRepository->update($budgetLimit, ['amount' => $amount]);

View File

@@ -67,7 +67,7 @@ trait ValidatesAutoBudgetRequest
$validator->errors()->add('auto_budget_amount', (string) trans('validation.require_currency_info')); $validator->errors()->add('auto_budget_amount', (string) trans('validation.require_currency_info'));
} }
// too big amount // too big amount
if((int)$amount > 16777216) { if((int)$amount > 268435456) {
$validator->errors()->add('auto_budget_amount', (string) trans('validation.amount_required_for_auto_budget')); $validator->errors()->add('auto_budget_amount', (string) trans('validation.amount_required_for_auto_budget'));
return; return;
} }