Fix issues with #1521

This commit is contained in:
James Cole
2018-07-02 15:37:56 +02:00
parent f62fd18b72
commit 7629dfd54a
7 changed files with 101 additions and 7 deletions

View File

@@ -151,6 +151,10 @@ class SingleController extends Controller
$optionalFields = Preferences::get('transaction_journal_optional_fields', [])->data;
$source = (int)$request->get('source');
// grab old currency ID from old data:
$currencyID = (int)$request->old('amount_currency_id_amount');
$preFilled['amount_currency_id_amount'] = $currencyID;
if (($what === 'withdrawal' || $what === 'transfer') && $source > 0) {
$preFilled['source_id'] = $source;
}