This commit is contained in:
James Cole
2021-11-24 20:27:57 +01:00
parent afd4700758
commit b2eeeed0af
4 changed files with 10 additions and 6 deletions

View File

@@ -102,7 +102,8 @@ class EditController extends Controller
'auto_budget_currency_id' => $hasOldInput ? (int)$request->old('auto_budget_currency_id') : $currency->id,
];
if ($autoBudget) {
$preFilled['auto_budget_amount'] = $hasOldInput ? $request->old('auto_budget_amount') : $autoBudget->amount;
$amount = $hasOldInput ? $request->old('auto_budget_amount') : $autoBudget->amount;
$preFilled['auto_budget_amount'] = number_format((float)$amount, $autoBudget->transactionCurrency->decimal_places);
}
// put previous url in session if not redirect from store (not "return_to_edit").