diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index 98ab2dafb5..ef4820ac2e 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -259,18 +259,9 @@ class JournalRepository implements JournalRepositoryInterface $journal->description = $data['description']; $journal->date = $data['date']; $accounts = $this->storeAccounts($journal->transactionType, $data); + $data = $this->verifyNativeAmount($data, $accounts); $amount = strval($data['amount']); - if ($data['currency_id'] !== $journal->transaction_currency_id) { - // user has entered amount in foreign currency. - // amount in "our" currency is $data['exchanged_amount']: - $amount = strval($data['exchanged_amount']); - // other values must be stored as well: - $data['original_amount'] = $data['amount']; - $data['original_currency_id'] = $data['currency_id']; - - } - // unlink all categories, recreate them: $journal->categories()->detach(); $journal->budgets()->detach();