mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 20:22:07 +00:00
Build account update service.
This commit is contained in:
@@ -62,13 +62,15 @@ class TransactionFactory
|
||||
*/
|
||||
public function create(array $data): Transaction
|
||||
{
|
||||
$currencyId = isset($data['currency']) ? $data['currency']->id : $data['currency_id'];
|
||||
|
||||
return Transaction::create(
|
||||
[
|
||||
'reconciled' => $data['reconciled'],
|
||||
'account_id' => $data['account']->id,
|
||||
'transaction_journal_id' => $data['transaction_journal']->id,
|
||||
'description' => $data['description'],
|
||||
'transaction_currency_id' => $data['currency']->id,
|
||||
'transaction_currency_id' => $currencyId,
|
||||
'amount' => $data['amount'],
|
||||
'foreign_amount' => $data['foreign_amount'],
|
||||
'foreign_currency_id' => null,
|
||||
|
Reference in New Issue
Block a user