mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 12:12:18 +00:00
Update API to match new end points.
This commit is contained in:
@@ -40,6 +40,11 @@ use Log;
|
||||
*/
|
||||
class TransactionFactory
|
||||
{
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
use TransactionServiceTrait;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
@@ -50,11 +55,6 @@ class TransactionFactory
|
||||
}
|
||||
}
|
||||
|
||||
use TransactionServiceTrait;
|
||||
|
||||
/** @var User */
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*
|
||||
@@ -109,8 +109,9 @@ class TransactionFactory
|
||||
Log::debug('Start of TransactionFactory::createPair()', $data);
|
||||
// all this data is the same for both transactions:
|
||||
Log::debug('Searching for currency info.');
|
||||
$currency = $this->findCurrency($data['currency_id'], $data['currency_code']);
|
||||
//$description = $data['description'];
|
||||
$defaultCurrency = app('amount')->getDefaultCurrencyByUser($this->user);
|
||||
$currency = $this->findCurrency($data['currency_id'], $data['currency_code']);
|
||||
$currency = $currency ?? $defaultCurrency;
|
||||
|
||||
// type of source account and destination account depends on journal type:
|
||||
$sourceType = $this->accountType($journal, 'source');
|
||||
|
Reference in New Issue
Block a user