This commit is contained in:
James Cole
2025-11-26 18:39:05 +01:00
parent 7abd30f4dd
commit 3603ef1cc7
2 changed files with 4 additions and 1 deletions

View File

@@ -75,6 +75,9 @@ class CreateController extends Controller
$subTitleIcon = 'fa-plus';
$request->old('_token');
$preFilled = $request->old();
if(!array_key_exists('transaction_currency_id', $preFilled)) {
$preFilled['transaction_currency_id'] = $this->primaryCurrency->id;
}
// put previous url in session if not redirect from store (not "create another").
if (true !== session('piggy-banks.create.fromStore')) {

View File

@@ -17,7 +17,7 @@
<div class="box-body">
{{ ExpandedForm.text('name') }}
{{ ExpandedForm.amountNoCurrency('target_amount') }}
{{ CurrencyForm.currencyList('transaction_currency_id', null, {helpText:'piggy_default_currency'|_}) }}
{{ CurrencyForm.currencyList('transaction_currency_id', preFilled.transaction_currency_id, {helpText:'piggy_default_currency'|_}) }}
{{ AccountForm.assetLiabilityMultiAccountList('accounts', preFilled.accounts, {label: 'saveOnAccounts'|_, helpText: 'piggy_account_currency_match'|_ }) }}
</div>