mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-02 12:15:55 +00:00
First part of a large code cleanup commit.
This commit is contained in:
@@ -27,6 +27,7 @@ use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Services\Internal\Support\TransactionServiceTrait;
|
||||
use FireflyIII\User;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Class TransactionUpdateService
|
||||
*/
|
||||
@@ -34,6 +35,9 @@ class TransactionUpdateService
|
||||
{
|
||||
use TransactionServiceTrait;
|
||||
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
@@ -44,9 +48,6 @@ class TransactionUpdateService
|
||||
}
|
||||
}
|
||||
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* @param int $transactionId
|
||||
*
|
||||
@@ -87,10 +88,10 @@ class TransactionUpdateService
|
||||
*/
|
||||
public function update(Transaction $transaction, array $data): Transaction
|
||||
{
|
||||
$currency = $this->findCurrency($data['currency_id'], $data['currency_code']);
|
||||
$journal = $transaction->transactionJournal;
|
||||
$amount = (string)$data['amount'];
|
||||
$account = null;
|
||||
$currency = $this->findCurrency($data['currency_id'], $data['currency_code']);
|
||||
$journal = $transaction->transactionJournal;
|
||||
$amount = (string)$data['amount'];
|
||||
$account = null;
|
||||
// update description:
|
||||
$transaction->description = $data['description'];
|
||||
$foreignAmount = null;
|
||||
|
||||
Reference in New Issue
Block a user