mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 19:01:58 +00:00
Code for #660
This commit is contained in:
@@ -363,12 +363,14 @@ class ImportStorage
|
||||
$sourceData = [
|
||||
'account_id' => $accounts['source']->id,
|
||||
'transaction_journal_id' => $journal->id,
|
||||
'transaction_currency_id' => $journal->transaction_currency_id,
|
||||
'description' => null,
|
||||
'amount' => bcmul($amount, '-1'),
|
||||
];
|
||||
|
||||
$destinationData = [
|
||||
'account_id' => $accounts['destination']->id,
|
||||
'transaction_currency_id' => $journal->transaction_currency_id,
|
||||
'transaction_journal_id' => $journal->id,
|
||||
'description' => null,
|
||||
'amount' => $amount,
|
||||
@@ -383,7 +385,7 @@ class ImportStorage
|
||||
}
|
||||
|
||||
if (is_null($two->id)) {
|
||||
Log::error('Could not create transaction 1.', $two->getErrors()->all());
|
||||
Log::error('Could not create transaction 2.', $two->getErrors()->all());
|
||||
$error = true;
|
||||
}
|
||||
|
||||
|
@@ -16,12 +16,15 @@ use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Import\Mapper\MapperInterface;
|
||||
use FireflyIII\Import\MapperPreProcess\PreProcessorInterface;
|
||||
use FireflyIII\Import\Specifics\SpecificInterface;
|
||||
use FireflyIII\Models\ImportJob;
|
||||
use League\Csv\Reader;
|
||||
use Log;
|
||||
|
||||
/**
|
||||
* Trait CsvImportSupportTrait
|
||||
*
|
||||
* @property ImportJob $job
|
||||
*
|
||||
* @package FireflyIII\Support\Import
|
||||
*/
|
||||
trait CsvImportSupportTrait
|
||||
|
Reference in New Issue
Block a user