Fix various import bugs.

This commit is contained in:
James Cole
2017-06-24 08:37:09 +02:00
parent da3a56c144
commit 8e3ba7caf2
8 changed files with 25 additions and 22 deletions

View File

@@ -97,7 +97,6 @@ class ImportStorage
{
$this->defaultCurrency = Amount::getDefaultCurrencyByUser($this->job->user);
// routine below consists of 3 steps.
/**
* @var int $index
@@ -283,10 +282,8 @@ class ImportStorage
private function storeImportJournal(int $index, ImportJournal $importJournal): bool
{
sleep(1);
Log::debug(sprintf('Going to store object #%d with description "%s"', $index, $importJournal->description));
$errors = new MessageBag;
$asset = $importJournal->asset->getAccount();
$amount = $importJournal->getAmount();
$currency = $this->getCurrency($importJournal);
@@ -354,7 +351,6 @@ class ImportStorage
$this->job->addStepsDone(1);
$this->journals->push($journal);
$this->errors->push($errors);
return true;
}