mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Basic amount fix
This commit is contained in:
@@ -148,6 +148,15 @@ class BudgetLimitController extends Controller
|
||||
Log::debug(sprintf('Start: %s, end: %s', $start->format('Y-m-d'), $end->format('Y-m-d')));
|
||||
|
||||
$limit = $this->blRepository->find($budget, $currency, $start, $end);
|
||||
|
||||
// sanity check on amount:
|
||||
if ((float) $amount === 0.0) {
|
||||
$amount = '1';
|
||||
}
|
||||
if ((int) $amount > 65536) {
|
||||
$amount = '65536';
|
||||
}
|
||||
|
||||
if (null !== $limit) {
|
||||
$limit->amount = $amount;
|
||||
$limit->save();
|
||||
|
Reference in New Issue
Block a user