🤖 Auto commit for release 'develop' on 2025-12-17

This commit is contained in:
JC5
2025-12-17 08:47:31 +01:00
parent 486e0d5ed5
commit 012df6bb24
50 changed files with 419 additions and 621 deletions

View File

@@ -662,12 +662,12 @@ class JournalUpdateService
return;
}
$origSourceTransaction = $this->getSourceTransaction();
$origSourceTransaction->amount = \FireflyIII\Support\Facades\Steam::negative($amount);
$origSourceTransaction->amount = Steam::negative($amount);
$origSourceTransaction->balance_dirty = true;
$origSourceTransaction->save();
$destTransaction = $this->getDestinationTransaction();
$originalAmount = $destTransaction->amount;
$destTransaction->amount = \FireflyIII\Support\Facades\Steam::positive($amount);
$destTransaction->amount = Steam::positive($amount);
$destTransaction->balance_dirty = true;
$destTransaction->save();
// refresh transactions.
@@ -731,7 +731,7 @@ class JournalUpdateService
// add foreign currency info to source and destination if possible.
if (null !== $foreignCurrency && null !== $foreignAmount) {
$source->foreign_currency_id = $foreignCurrency->id;
$source->foreign_amount = \FireflyIII\Support\Facades\Steam::negative($foreignAmount);
$source->foreign_amount = Steam::negative($foreignAmount);
$source->save();
// if the transaction is a TRANSFER, and the foreign amount and currency are set (like they seem to be)
@@ -744,13 +744,13 @@ class JournalUpdateService
if ($isTransfer || $isBetween) {
Log::debug('Switch amounts, store in amount and not foreign_amount');
$dest->transaction_currency_id = $foreignCurrency->id;
$dest->amount = \FireflyIII\Support\Facades\Steam::positive($foreignAmount);
$dest->foreign_amount = \FireflyIII\Support\Facades\Steam::positive($source->amount);
$dest->amount = Steam::positive($foreignAmount);
$dest->foreign_amount = Steam::positive($source->amount);
$dest->foreign_currency_id = $source->transaction_currency_id;
}
if (!$isTransfer && !$isBetween) {
$dest->foreign_currency_id = $foreignCurrency->id;
$dest->foreign_amount = \FireflyIII\Support\Facades\Steam::positive($foreignAmount);
$dest->foreign_amount = Steam::positive($foreignAmount);
}
$dest->save();