Some more last-minute fixes.

This commit is contained in:
James Cole
2018-06-02 19:23:46 +02:00
parent a6b09acd5e
commit 2f824ba1a8
3 changed files with 34 additions and 9 deletions

View File

@@ -154,7 +154,9 @@ class ImportArrayStorage
Log::debug(sprintf('Row #%d is a transfer, increase count to %d', ($index + 1), $count));
}
}
Log::debug('Count is zero.');
if (0 === $count) {
Log::debug('Count is zero.');
}
if ($count > 0) {
Log::debug(sprintf('Count is %d', $count));
$this->checkForTransfers = true;
@@ -206,16 +208,19 @@ class ImportArrayStorage
*/
private function getTransfers(): void
{
Log::debug('Now in getTransfers()');
app('preferences')->mark();
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class);
$collector->setUser($this->importJob->user);
$collector->setAllAssetAccounts()
->ignoreCache()
->setTypes([TransactionType::TRANSFER])
->withOpposingAccount();
$collector->removeFilter(InternalTransferFilter::class);
$this->transfers = $collector->getJournals();
Log::debug(sprintf('Count of getTransfers() is %d', $this->transfers->count()));
}
/**