Merge pull request #9488 from antoniomrfranco/fix/transfer-dest-foreign-info

fix: set dest foreign_amount and foreign_currency_id for foreign transfers
This commit is contained in:
James Cole 2024-11-23 09:06:07 +01:00 committed by GitHub
commit 775424d3b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -724,6 +724,8 @@ class JournalUpdateService
Log::debug('Switch amounts, store in amount and not foreign_amount');
$dest->transaction_currency_id = $foreignCurrency->id;
$dest->amount = app('steam')->positive($foreignAmount);
$dest->foreign_amount = app('steam')->positive($source->amount);
$dest->foreign_currency_id = $source->transaction_currency_id;
}
if (TransactionType::TRANSFER !== $this->transactionJournal->transactionType->type) {
$dest->foreign_currency_id = $foreignCurrency->id;