firefly-iii/app/Import/Storage/ImportArrayStorage.php

613 lines
23 KiB
PHP
Raw Normal View History

2018-05-03 10:23:16 -05:00
<?php
2018-05-11 03:08:34 -05:00
/**
* ImportArrayStorage.php
* Copyright (c) 2018 thegrumpydictator@gmail.com
*
* This file is part of Firefly III.
*
* Firefly III is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Firefly III is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
*/
2018-05-05 09:51:32 -05:00
declare(strict_types=1);
2018-05-03 10:23:16 -05:00
namespace FireflyIII\Import\Storage;
use Carbon\Carbon;
use DB;
2018-08-04 10:30:06 -05:00
use FireflyIII\Events\RequestedReportOnJournals;
2018-05-03 10:23:16 -05:00
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Helpers\Collector\TransactionCollectorInterface;
2018-05-03 10:23:16 -05:00
use FireflyIII\Helpers\Filter\InternalTransferFilter;
use FireflyIII\Helpers\Filter\NegativeAmountFilter;
use FireflyIII\Helpers\Filter\PositiveAmountFilter;
2018-05-03 10:23:16 -05:00
use FireflyIII\Models\ImportJob;
use FireflyIII\Models\Rule;
2018-05-03 10:23:16 -05:00
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionType;
use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
use FireflyIII\Repositories\Rule\RuleRepositoryInterface;
2018-05-03 10:23:16 -05:00
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
use FireflyIII\TransactionRules\Processor;
use Illuminate\Database\QueryException;
2018-05-03 10:23:16 -05:00
use Illuminate\Support\Collection;
use Log;
/**
2018-09-30 13:14:17 -05:00
* Creates new transactions based on arrays.
2018-05-03 10:23:16 -05:00
*
* Class ImportArrayStorage
2018-07-22 08:08:56 -05:00
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2018-05-03 10:23:16 -05:00
*/
class ImportArrayStorage
{
2019-03-22 00:56:01 -05:00
/** @var int Number of hits required for a transfer to match. */
private const REQUIRED_HITS = 4;
2018-07-22 08:08:56 -05:00
/** @var bool Check for transfers during import. */
2018-05-03 10:23:16 -05:00
private $checkForTransfers = false;
2018-07-22 08:08:56 -05:00
/** @var ImportJob The import job */
2018-05-03 10:23:16 -05:00
private $importJob;
2018-09-30 13:14:17 -05:00
/** @var JournalRepositoryInterface Journal repository for storage. */
private $journalRepos;
2018-07-22 08:08:56 -05:00
/** @var ImportJobRepositoryInterface Import job repository */
2018-05-03 10:23:16 -05:00
private $repository;
2018-09-30 13:14:17 -05:00
/** @var Collection The transfers the user already has. */
2018-05-03 10:23:16 -05:00
private $transfers;
/**
* Set job, count transfers in the array and create the repository.
*
2018-05-03 10:23:16 -05:00
* @param ImportJob $importJob
*/
2018-05-12 08:50:01 -05:00
public function setImportJob(ImportJob $importJob): void
2018-05-03 10:23:16 -05:00
{
$this->importJob = $importJob;
2018-05-03 10:23:16 -05:00
$this->repository = app(ImportJobRepositoryInterface::class);
$this->repository->setUser($importJob->user);
$this->countTransfers();
$this->journalRepos = app(JournalRepositoryInterface::class);
$this->journalRepos->setUser($importJob->user);
2018-05-03 10:23:16 -05:00
Log::debug('Constructed ImportArrayStorage()');
}
/**
* Actually does the storing. Does three things.
* - Store journals
* - Link to tag
* - Run rules (if set to)
2018-05-03 10:23:16 -05:00
*
* @return Collection
* @throws FireflyException
*/
public function store(): Collection
{
// store transactions
$this->setStatus('storing_data');
$collection = $this->storeArray();
$this->setStatus('stored_data');
// link tag:
$this->setStatus('linking_to_tag');
$this->linkToTag($collection);
$this->setStatus('linked_to_tag');
// run rules, if configured to.
$config = $this->importJob->configuration;
2018-07-22 05:52:07 -05:00
if (isset($config['apply-rules']) && true === $config['apply-rules']) {
$this->setStatus('applying_rules');
$this->applyRules($collection);
$this->setStatus('rules_applied');
2018-05-03 10:23:16 -05:00
}
app('preferences')->mark();
2018-08-04 10:30:06 -05:00
// email about this:
2018-10-07 08:55:44 -05:00
event(new RequestedReportOnJournals((int)$this->importJob->user_id, $collection));
2018-08-04 10:30:06 -05:00
2018-05-03 10:23:16 -05:00
return $collection;
}
/**
* Applies the users rules to the created journals.
*
2018-05-03 10:23:16 -05:00
* @param Collection $collection
*
2018-05-03 10:23:16 -05:00
*/
private function applyRules(Collection $collection): void
2018-05-03 10:23:16 -05:00
{
$rules = $this->getRules();
if ($rules->count() > 0) {
foreach ($collection as $journal) {
$rules->each(
function (Rule $rule) use ($journal) {
Log::debug(sprintf('Going to apply rule #%d to journal %d.', $rule->id, $journal->id));
/** @var Processor $processor */
$processor = app(Processor::class);
$processor->make($rule);
$processor->handleTransactionJournal($journal);
$journal->refresh();
if ($rule->stop_processing) {
return false;
}
return true;
}
);
}
2018-05-03 10:23:16 -05:00
}
}
/**
* Count the number of transfers in the array. If this is zero, don't bother checking for double transfers.
*/
private function countTransfers(): void
{
2018-09-30 13:14:17 -05:00
Log::debug('Now in countTransfers()');
/** @var array $array */
$array = $this->repository->getTransactions($this->importJob);
2018-05-03 10:23:16 -05:00
$count = 0;
2018-05-31 15:33:42 -05:00
foreach ($array as $index => $transaction) {
2018-08-16 09:42:58 -05:00
if (strtolower(TransactionType::TRANSFER) === strtolower($transaction['type'])) {
2018-05-03 10:23:16 -05:00
$count++;
2018-07-22 05:52:07 -05:00
Log::debug(sprintf('Row #%d is a transfer, increase count to %d', $index + 1, $count));
2018-05-03 10:23:16 -05:00
}
}
2018-09-30 13:14:17 -05:00
Log::debug(sprintf('Count of transfers in import array is %d.', $count));
2018-05-03 10:23:16 -05:00
if ($count > 0) {
$this->checkForTransfers = true;
2018-09-30 13:14:17 -05:00
Log::debug('Will check for duplicate transfers.');
2018-05-03 10:23:16 -05:00
// get users transfers. Needed for comparison.
$this->getTransfers();
}
2018-09-30 13:14:17 -05:00
}
/**
* @param int $index
* @param array $transaction
*
* @return bool
* @throws FireflyException
*/
private function duplicateDetected(int $index, array $transaction): bool
{
$hash = $this->getHash($transaction);
$existingId = $this->hashExists($hash);
if (null !== $existingId) {
$message = sprintf('Row #%d ("%s") could not be imported. It already exists.', $index, $transaction['description']);
$this->logDuplicateObject($transaction, $existingId);
$this->repository->addErrorMessage($this->importJob, $message);
return true;
}
2018-05-03 10:23:16 -05:00
2018-09-30 13:14:17 -05:00
// do transfer detection:
if ($this->checkForTransfers && $this->transferExists($transaction)) {
$message = sprintf('Row #%d ("%s") could not be imported. Such a transfer already exists.', $index, $transaction['description']);
$this->logDuplicateTransfer($transaction);
$this->repository->addErrorMessage($this->importJob, $message);
return true;
}
return false;
2018-05-03 10:23:16 -05:00
}
/**
2018-07-22 08:08:56 -05:00
* Get hash of transaction.
*
* @param array $transaction
*
* @throws FireflyException
* @return string
*/
private function getHash(array $transaction): string
{
unset($transaction['import_hash_v2'], $transaction['original_source']);
$json = json_encode($transaction);
2018-07-22 05:52:07 -05:00
if (false === $json) {
2018-09-30 04:57:51 -05:00
// @codeCoverageIgnoreStart
2018-07-26 21:46:21 -05:00
/** @noinspection ForgottenDebugOutputInspection */
Log::error('Could not encode import array.', $transaction);
2018-09-30 04:57:51 -05:00
throw new FireflyException('Could not encode import array. Please see the logs.');
// @codeCoverageIgnoreEnd
}
2019-02-13 10:38:41 -06:00
$hash = hash('sha256', $json);
2018-06-02 11:19:35 -05:00
Log::debug(sprintf('The hash is: %s', $hash));
2018-06-02 11:19:35 -05:00
return $hash;
}
/**
* Gets the users rules.
*
* @return Collection
*/
private function getRules(): Collection
{
/** @var RuleRepositoryInterface $repository */
$repository = app(RuleRepositoryInterface::class);
$repository->setUser($this->importJob->user);
$set = $repository->getForImport();
Log::debug(sprintf('Found %d user rules.', $set->count()));
return $set;
}
/**
* @param $journal
*
* @return Transaction
*/
private function getTransactionFromJournal($journal): Transaction
{
// collect transactions using the journal collector
$collector = app(TransactionCollectorInterface::class);
2018-07-31 13:39:36 -05:00
$collector->setUser($this->importJob->user);
$collector->withOpposingAccount();
// filter on specific journals.
$collector->setJournals(new Collection([$journal]));
// add filter to remove transactions:
$transactionType = $journal->transactionType->type;
if ($transactionType === TransactionType::WITHDRAWAL) {
$collector->addFilter(PositiveAmountFilter::class);
}
if (!($transactionType === TransactionType::WITHDRAWAL)) {
$collector->addFilter(NegativeAmountFilter::class);
}
/** @var Transaction $result */
$result = $collector->getTransactions()->first();
Log::debug(sprintf('Return transaction #%d with journal id #%d based on ID #%d', $result->id, $result->journal_id, $journal->id));
return $result;
}
2018-05-03 10:23:16 -05:00
/**
* Get the users transfers, so they can be compared to whatever the user is trying to import.
*/
private function getTransfers(): void
{
2018-06-02 12:23:46 -05:00
Log::debug('Now in getTransfers()');
2018-05-31 15:33:42 -05:00
app('preferences')->mark();
2018-06-02 12:23:46 -05:00
/** @var TransactionCollectorInterface $collector */
$collector = app(TransactionCollectorInterface::class);
$collector->setUser($this->importJob->user);
2018-05-03 10:23:16 -05:00
$collector->setAllAssetAccounts()
2018-06-06 14:23:00 -05:00
->ignoreCache()
2018-05-03 10:23:16 -05:00
->setTypes([TransactionType::TRANSFER])
->withOpposingAccount();
$collector->removeFilter(InternalTransferFilter::class);
$this->transfers = $collector->getTransactions();
2018-06-02 12:23:46 -05:00
Log::debug(sprintf('Count of getTransfers() is %d', $this->transfers->count()));
2018-05-03 10:23:16 -05:00
}
/**
* Check if the hash exists for the array the user wants to import.
*
* @param string $hash
2018-05-03 10:23:16 -05:00
*
* @return int|null
*/
private function hashExists(string $hash): ?int
2018-05-03 10:23:16 -05:00
{
$entry = $this->journalRepos->findByHash($hash);
2018-05-03 10:23:16 -05:00
if (null === $entry) {
2018-06-02 11:19:35 -05:00
Log::debug(sprintf('Found no transactions with hash %s.', $hash));
2018-05-03 10:23:16 -05:00
return null;
}
Log::info(sprintf('Found a transaction journal with an existing hash: %s', $hash));
return (int)$entry->transaction_journal_id;
}
/**
* Link all imported journals to a tag.
*
* @param Collection $collection
*/
private function linkToTag(Collection $collection): void
{
2018-07-22 05:52:07 -05:00
if (0 === $collection->count()) {
return;
}
/** @var TagRepositoryInterface $repository */
$repository = app(TagRepositoryInterface::class);
$repository->setUser($this->importJob->user);
$data = [
2018-07-15 02:38:49 -05:00
'tag' => (string)trans('import.import_with_key', ['key' => $this->importJob->key]),
'date' => new Carbon,
'description' => null,
'latitude' => null,
'longitude' => null,
2019-02-13 10:38:41 -06:00
'zoom_level' => null,
'tagMode' => 'nothing',
];
$tag = $repository->store($data);
Log::debug(sprintf('Created tag #%d ("%s")', $tag->id, $tag->tag));
Log::debug('Looping journals...');
$journalIds = $collection->pluck('id')->toArray();
$tagId = $tag->id;
foreach ($journalIds as $journalId) {
Log::debug(sprintf('Linking journal #%d to tag #%d...', $journalId, $tagId));
try {
DB::table('tag_transaction_journal')->insert(['transaction_journal_id' => $journalId, 'tag_id' => $tagId]);
} catch (QueryException $e) {
2018-05-05 07:40:12 -05:00
Log::error(sprintf('Could not link journal #%d to tag #%d because: %s', $journalId, $tagId, $e->getMessage()));
Log::error($e->getTraceAsString());
}
}
Log::info(sprintf('Linked %d journals to tag #%d ("%s")', $collection->count(), $tag->id, $tag->tag));
$this->repository->setTag($this->importJob, $tag);
}
2018-05-03 10:23:16 -05:00
/**
* Log about a duplicate object (double hash).
*
2018-05-03 10:23:16 -05:00
* @param array $transaction
* @param int $existingId
*/
private function logDuplicateObject(array $transaction, int $existingId): void
{
Log::info(
'Transaction is a duplicate, and will not be imported (the hash exists).',
[
'existing' => $existingId,
'description' => $transaction['description'] ?? '',
'amount' => $transaction['transactions'][0]['amount'] ?? 0,
'date' => $transaction['date'] ?? '',
2018-05-03 10:23:16 -05:00
]
);
}
/**
* Log about a duplicate transfer.
*
2018-05-03 10:23:16 -05:00
* @param array $transaction
*/
private function logDuplicateTransfer(array $transaction): void
{
Log::info(
'Transaction is a duplicate transfer, and will not be imported (such a transfer exists already).',
[
'description' => $transaction['description'] ?? '',
'amount' => $transaction['transactions'][0]['amount'] ?? 0,
2018-07-22 05:52:07 -05:00
'date' => $transaction['date'] ?? '',
2018-05-03 10:23:16 -05:00
]
);
}
/**
* Shorthand method to quickly set job status
*
* @param string $status
*/
private function setStatus(string $status): void
{
$this->repository->setStatus($this->importJob, $status);
}
/**
* Store array as journals.
*
* @return Collection
* @throws FireflyException
2018-07-22 08:08:56 -05:00
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
private function storeArray(): Collection
{
/** @var array $array */
$array = $this->repository->getTransactions($this->importJob);
$count = count($array);
$toStore = [];
Log::notice(sprintf('Will now store the transactions. Count of items is %d.', $count));
2018-09-30 13:14:17 -05:00
/*
* Detect duplicates in initial array:
*/
foreach ($array as $index => $transaction) {
Log::debug(sprintf('Now at item %d out of %d', $index + 1, $count));
2018-09-30 13:14:17 -05:00
if ($this->duplicateDetected($index, $transaction)) {
Log::warning(sprintf('Row #%d seems to be a duplicate entry and will be ignored.', $index));
2018-07-22 05:52:07 -05:00
continue;
}
$transaction['import_hash_v2'] = $this->getHash($transaction);
$toStore[] = $transaction;
}
$count = count($toStore);
2018-07-22 05:52:07 -05:00
if (0 === $count) {
Log::info('No transactions to store left!');
return new Collection;
}
Log::notice(sprintf('After a first check for duplicates, the count of items is %d.', $count));
Log::notice('Going to store...');
// now actually store them:
$collection = new Collection;
foreach ($toStore as $index => $store) {
2018-06-02 11:19:35 -05:00
// do duplicate detection again!
2018-09-30 13:14:17 -05:00
if ($this->duplicateDetected($index, $store)) {
Log::warning(sprintf('Row #%d seems to be a imported already and will be ignored.', $index), $store);
continue;
}
2018-06-02 11:19:35 -05:00
Log::debug(sprintf('Going to store entry %d of %d', $index + 1, $count));
// convert the date to an object:
2019-02-08 09:45:42 -06:00
$store['date'] = Carbon::parse($store['date'], config('app.timezone'));
2018-07-22 05:52:07 -05:00
$store['description'] = '' === $store['description'] ? '(empty description)' : $store['description'];
// store the journal.
try {
$journal = $this->journalRepos->store($store);
2018-06-29 22:21:21 -05:00
} catch (FireflyException $e) {
Log::error($e->getMessage());
Log::error($e->getTraceAsString());
$this->repository->addErrorMessage($this->importJob, sprintf('Row #%d could not be imported. %s', $index, $e->getMessage()));
continue;
}
2018-11-12 12:17:17 -06:00
Log::info(sprintf('Stored #%d: "%s" (ID #%d)', $index, $journal->description, $journal->id));
Log::debug(sprintf('Stored as journal #%d', $journal->id));
$collection->push($journal);
// add to collection of transfers, if necessary:
2018-08-16 09:42:58 -05:00
if ('transfer' === strtolower($store['type'])) {
$transaction = $this->getTransactionFromJournal($journal);
Log::debug('We just stored a transfer, so add the journal to the list of transfers.');
$this->transfers->push($transaction);
Log::debug(sprintf('List length is now %d', $this->transfers->count()));
}
}
Log::notice(sprintf('Done storing. Firefly III has stored %d transactions.', $collection->count()));
return $collection;
}
2018-05-03 10:23:16 -05:00
/**
* Check if a transfer exists.
*
* @param $transaction
*
* @return bool
2018-07-22 08:08:56 -05:00
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings(PHPMD.NPathComplexity)
2018-05-03 10:23:16 -05:00
*/
private function transferExists(array $transaction): bool
{
2019-03-22 00:56:01 -05:00
Log::debug('Check if array is a double transfer.');
2018-08-16 09:42:58 -05:00
if (strtolower(TransactionType::TRANSFER) !== strtolower($transaction['type'])) {
2018-05-03 10:23:16 -05:00
Log::debug(sprintf('Is a %s, not a transfer so no.', $transaction['type']));
return false;
}
// how many hits do we need?
Log::debug(sprintf('Array has %d transactions.', count($transaction['transactions'])));
Log::debug(sprintf('System has %d existing transfers', count($this->transfers)));
2018-05-03 10:23:16 -05:00
// loop over each split:
Log::debug(sprintf('This transfer has %d split(s)', count($transaction['transactions'])));
2019-03-22 00:56:01 -05:00
foreach ($transaction['transactions'] as $index => $current) {
Log::debug(sprintf('Required hits for transfer comparison is %d', self::REQUIRED_HITS));
Log::debug(sprintf('Now at transfer split %d of %d', $index + 1, count($transaction['transactions'])));
2018-05-03 10:23:16 -05:00
// get the amount:
2018-07-25 23:10:17 -05:00
/** @noinspection UnnecessaryCastingInspection */
2018-05-03 10:23:16 -05:00
$amount = (string)($current['amount'] ?? '0');
if (bccomp($amount, '0') === -1) {
$amount = bcmul($amount, '-1'); // @codeCoverageIgnore
2018-05-03 10:23:16 -05:00
}
// get the description:
$description = '' === (string)$current['description'] ? $transaction['description'] : $current['description'];
2018-05-03 10:23:16 -05:00
// get the source and destination ID's:
$currentSourceIDs = [(int)$current['source_id'], (int)$current['destination_id']];
sort($currentSourceIDs);
// get the source and destination names:
$currentSourceNames = [(string)$current['source_name'], (string)$current['destination_name']];
sort($currentSourceNames);
// then loop all transfers:
/** @var Transaction $transfer */
foreach ($this->transfers as $transfer) {
// number of hits for this split-transfer combination:
$hits = 0;
Log::debug(sprintf('Now looking at transaction journal #%d', $transfer->journal_id));
// compare amount:
Log::debug(sprintf('Amount %s compared to %s', $amount, $transfer->transaction_amount));
if (0 !== bccomp($amount, $transfer->transaction_amount)) {
2019-03-22 00:56:01 -05:00
Log::debug('Amount is not a match, continue with next transfer.');
2018-05-03 10:23:16 -05:00
continue;
}
++$hits;
Log::debug(sprintf('Comparison is a hit! (%s)', $hits));
// compare description:
$comparison = '(empty description)' === $transfer->description ? '' : $transfer->description;
Log::debug(sprintf('Comparing "%s" to "%s" (original: "%s")', $description, $transfer->description, $comparison));
if ($description !== $comparison) {
2019-03-22 00:56:01 -05:00
Log::debug('Description is not a match, continue with next transfer.');
2018-05-05 07:40:12 -05:00
continue; // @codeCoverageIgnore
2018-05-03 10:23:16 -05:00
}
++$hits;
Log::debug(sprintf('Comparison is a hit! (%s)', $hits));
// compare date:
2019-02-08 09:45:42 -06:00
$transferDate = $transfer->date->format('Y-m-d H:i:s');
2018-05-03 10:23:16 -05:00
Log::debug(sprintf('Comparing dates "%s" to "%s"', $transaction['date'], $transferDate));
if ($transaction['date'] !== $transferDate) {
2019-03-22 00:56:01 -05:00
Log::debug('Date is not a match, continue with next transfer.');
2018-05-05 07:40:12 -05:00
continue; // @codeCoverageIgnore
2018-05-03 10:23:16 -05:00
}
++$hits;
Log::debug(sprintf('Comparison is a hit! (%s)', $hits));
// compare source and destination id's
$transferSourceIDs = [(int)$transfer->account_id, (int)$transfer->opposing_account_id];
sort($transferSourceIDs);
2018-07-22 05:52:07 -05:00
/** @noinspection DisconnectedForeachInstructionInspection */
2018-05-03 10:23:16 -05:00
Log::debug('Comparing current transaction source+dest IDs', $currentSourceIDs);
Log::debug('.. with current transfer source+dest IDs', $transferSourceIDs);
if ($currentSourceIDs === $transferSourceIDs) {
++$hits;
Log::debug(sprintf('Source IDs are the same! (%d)', $hits));
}
2019-03-17 02:18:42 -05:00
Log::debug('Source IDs are not the same.');
2018-05-03 10:23:16 -05:00
unset($transferSourceIDs);
// compare source and destination names
2019-03-17 02:18:42 -05:00
$transferSource = [(string)$transfer->account_name, (string)$transfer->opposing_account_name];
2018-05-03 10:23:16 -05:00
sort($transferSource);
2018-07-22 05:52:07 -05:00
/** @noinspection DisconnectedForeachInstructionInspection */
2018-05-03 10:23:16 -05:00
Log::debug('Comparing current transaction source+dest names', $currentSourceNames);
Log::debug('.. with current transfer source+dest names', $transferSource);
if ($currentSourceNames === $transferSource) {
2018-05-05 07:40:12 -05:00
// @codeCoverageIgnoreStart
2018-05-03 10:23:16 -05:00
++$hits;
2019-03-17 02:18:42 -05:00
Log::debug(sprintf('Source names are the same! (%d)', $hits));
2018-05-05 07:40:12 -05:00
// @codeCoverageIgnoreEnd
2018-05-03 10:23:16 -05:00
}
2019-03-17 02:18:42 -05:00
Log::debug('Source names are not the same.');
2019-03-22 00:56:01 -05:00
Log::debug(sprintf('Number of hits is %d', $hits));
if ($hits >= self::REQUIRED_HITS) {
Log::debug(sprintf('Is more than %d, return true.', self::REQUIRED_HITS));
2018-05-03 10:23:16 -05:00
return true;
}
}
}
2019-03-22 00:56:01 -05:00
Log::debug('Is not an existing transfer, return false.');
2018-05-03 10:23:16 -05:00
2019-03-22 00:56:01 -05:00
return false;
2018-05-03 10:23:16 -05:00
}
2018-05-05 09:51:32 -05:00
}