| 
									
										
										
										
											2017-06-17 22:49:44 +02:00
										 |  |  | <?php | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * ImportStorage.php | 
					
						
							|  |  |  |  * Copyright (c) 2017 thegrumpydictator@gmail.com | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2017-10-21 08:40:00 +02:00
										 |  |  |  * 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/>. | 
					
						
							| 
									
										
										
										
											2017-06-17 22:49:44 +02:00
										 |  |  |  */ | 
					
						
							|  |  |  | declare(strict_types=1); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace FireflyIII\Import\Storage; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-13 12:37:09 +02:00
										 |  |  | use ErrorException; | 
					
						
							|  |  |  | use Exception; | 
					
						
							| 
									
										
										
										
											2017-06-24 07:21:10 +02:00
										 |  |  | use FireflyIII\Exceptions\FireflyException; | 
					
						
							| 
									
										
										
										
											2017-06-17 22:49:44 +02:00
										 |  |  | use FireflyIII\Import\Object\ImportJournal; | 
					
						
							| 
									
										
										
										
											2017-06-20 21:04:25 +02:00
										 |  |  | use FireflyIII\Models\ImportJob; | 
					
						
							| 
									
										
										
										
											2017-10-03 10:30:56 +02:00
										 |  |  | use FireflyIII\Models\Note; | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  | use FireflyIII\Models\TransactionType; | 
					
						
							| 
									
										
										
										
											2017-06-17 22:49:44 +02:00
										 |  |  | use Illuminate\Support\Collection; | 
					
						
							|  |  |  | use Log; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * Is capable of storing individual ImportJournal objects. | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |  * Class ImportStorage. | 
					
						
							| 
									
										
										
										
											2017-06-17 22:49:44 +02:00
										 |  |  |  */ | 
					
						
							|  |  |  | class ImportStorage | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |     use ImportSupport; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |     /** @var Collection */ | 
					
						
							| 
									
										
										
										
											2017-06-21 20:04:35 +02:00
										 |  |  |     public $errors; | 
					
						
							| 
									
										
										
										
											2017-07-16 07:45:20 +02:00
										 |  |  |     /** @var Collection */ | 
					
						
							| 
									
										
										
										
											2017-06-21 20:04:35 +02:00
										 |  |  |     public $journals; | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |     /** @var int */ | 
					
						
							| 
									
										
										
										
											2017-09-30 13:16:12 +02:00
										 |  |  |     protected $defaultCurrencyId = 1; // yes, hard coded
 | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |     /** @var ImportJob */ | 
					
						
							| 
									
										
										
										
											2017-09-19 07:51:16 +02:00
										 |  |  |     protected $job; | 
					
						
							| 
									
										
										
										
											2017-06-17 22:49:44 +02:00
										 |  |  |     /** @var Collection */ | 
					
						
							| 
									
										
										
										
											2017-09-17 19:21:03 +02:00
										 |  |  |     protected $rules; | 
					
						
							| 
									
										
										
										
											2017-09-30 13:16:12 +02:00
										 |  |  |     /** @var string */ | 
					
						
							|  |  |  |     private $dateFormat = 'Ymd'; | 
					
						
							|  |  |  |     /** @var Collection */ | 
					
						
							|  |  |  |     private $objects; | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |     /** @var array */ | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |     private $transfers = []; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-17 22:49:44 +02:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * ImportStorage constructor. | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function __construct() | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2017-06-21 20:04:35 +02:00
										 |  |  |         $this->objects  = new Collection; | 
					
						
							|  |  |  |         $this->journals = new Collection; | 
					
						
							|  |  |  |         $this->errors   = new Collection; | 
					
						
							| 
									
										
										
										
											2017-06-17 22:49:44 +02:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param string $dateFormat | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function setDateFormat(string $dateFormat) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $this->dateFormat = $dateFormat; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-20 21:04:25 +02:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * @param ImportJob $job | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function setJob(ImportJob $job) | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2017-08-12 16:42:29 +02:00
										 |  |  |         $this->job               = $job; | 
					
						
							|  |  |  |         $currency                = app('amount')->getDefaultCurrencyByUser($this->job->user); | 
					
						
							|  |  |  |         $this->defaultCurrencyId = $currency->id; | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |         $this->transfers         = $this->getTransfers(); | 
					
						
							|  |  |  |         $this->rules             = $this->getRules(); | 
					
						
							| 
									
										
										
										
											2017-06-20 21:04:25 +02:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-06-17 22:49:44 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							|  |  |  |      * @param Collection $objects | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     public function setObjects(Collection $objects) | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         $this->objects = $objects; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2017-08-12 16:40:51 +02:00
										 |  |  |      * Do storage of import objects. Is the main function. | 
					
						
							| 
									
										
										
										
											2017-06-22 21:50:10 +02:00
										 |  |  |      * | 
					
						
							|  |  |  |      * @return bool | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2017-08-12 16:40:51 +02:00
										 |  |  |     public function store(): bool | 
					
						
							| 
									
										
										
										
											2017-06-22 21:50:10 +02:00
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2017-08-12 16:40:51 +02:00
										 |  |  |         $this->objects->each( | 
					
						
							|  |  |  |             function (ImportJournal $importJournal, int $index) { | 
					
						
							|  |  |  |                 try { | 
					
						
							|  |  |  |                     $this->storeImportJournal($index, $importJournal); | 
					
						
							| 
									
										
										
										
											2017-08-13 12:37:09 +02:00
										 |  |  |                 } catch (FireflyException | ErrorException | Exception $e) { | 
					
						
							| 
									
										
										
										
											2017-08-12 16:40:51 +02:00
										 |  |  |                     $this->errors->push($e->getMessage()); | 
					
						
							|  |  |  |                     Log::error(sprintf('Cannot import row #%d because: %s', $index, $e->getMessage())); | 
					
						
							| 
									
										
										
										
											2017-06-22 21:50:10 +02:00
										 |  |  |                 } | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2017-07-16 07:45:20 +02:00
										 |  |  |         ); | 
					
						
							| 
									
										
										
										
											2017-08-12 16:40:51 +02:00
										 |  |  |         Log::info('ImportStorage has finished.'); | 
					
						
							| 
									
										
										
										
											2017-08-12 07:47:42 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-12 16:40:51 +02:00
										 |  |  |         return true; | 
					
						
							| 
									
										
										
										
											2017-06-24 07:21:10 +02:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2017-08-12 16:40:51 +02:00
										 |  |  |      * @param int           $index | 
					
						
							|  |  |  |      * @param ImportJournal $importJournal | 
					
						
							| 
									
										
										
										
											2017-06-24 07:21:10 +02:00
										 |  |  |      * | 
					
						
							| 
									
										
										
										
											2017-08-12 16:40:51 +02:00
										 |  |  |      * @return bool | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |      * | 
					
						
							| 
									
										
										
										
											2017-08-12 16:40:51 +02:00
										 |  |  |      * @throws FireflyException | 
					
						
							| 
									
										
										
										
											2017-06-24 07:30:05 +02:00
										 |  |  |      */ | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |     protected function storeImportJournal(int $index, ImportJournal $importJournal): bool | 
					
						
							| 
									
										
										
										
											2017-06-24 07:21:10 +02:00
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2017-07-14 17:57:20 +02:00
										 |  |  |         Log::debug(sprintf('Going to store object #%d with description "%s"', $index, $importJournal->getDescription())); | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |         $assetAccount      = $importJournal->asset->getAccount(); | 
					
						
							|  |  |  |         $amount            = $importJournal->getAmount(); | 
					
						
							|  |  |  |         $currencyId        = $this->getCurrencyId($importJournal); | 
					
						
							|  |  |  |         $foreignCurrencyId = $this->getForeignCurrencyId($importJournal, $currencyId); | 
					
						
							|  |  |  |         $date              = $importJournal->getDate($this->dateFormat)->format('Y-m-d'); | 
					
						
							|  |  |  |         $opposingAccount   = $this->getOpposingAccount($importJournal->opposing, $assetAccount->id, $amount); | 
					
						
							|  |  |  |         $transactionType   = $this->getTransactionType($amount, $opposingAccount); | 
					
						
							|  |  |  |         $description       = $importJournal->getDescription(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |         // First step done!
 | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |         $this->job->addStepsDone(1); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         /** | 
					
						
							|  |  |  |          * Check for double transfer. | 
					
						
							|  |  |  |          */ | 
					
						
							|  |  |  |         $parameters = [ | 
					
						
							|  |  |  |             'type'        => $transactionType, | 
					
						
							|  |  |  |             'description' => $description, | 
					
						
							|  |  |  |             'amount'      => $amount, | 
					
						
							|  |  |  |             'date'        => $date, | 
					
						
							|  |  |  |             'asset'       => $assetAccount->name, | 
					
						
							|  |  |  |             'opposing'    => $opposingAccount->name, | 
					
						
							|  |  |  |         ]; | 
					
						
							| 
									
										
										
										
											2017-08-13 08:49:45 +02:00
										 |  |  |         if ($this->isDoubleTransfer($parameters) || $this->hashAlreadyImported($importJournal->hash)) { | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |             $this->job->addStepsDone(3); | 
					
						
							|  |  |  |             // throw error
 | 
					
						
							| 
									
										
										
										
											2017-09-03 18:18:19 +02:00
										 |  |  |             $message = sprintf('Detected a possible duplicate, skip this one (hash: %s).', $importJournal->hash); | 
					
						
							|  |  |  |             Log::error($message, $parameters); | 
					
						
							|  |  |  |             throw new FireflyException($message); | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |         } | 
					
						
							|  |  |  |         unset($parameters); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         // store journal and create transactions:
 | 
					
						
							|  |  |  |         $parameters = [ | 
					
						
							|  |  |  |             'type'             => $transactionType, | 
					
						
							|  |  |  |             'currency'         => $currencyId, | 
					
						
							|  |  |  |             'foreign_currency' => $foreignCurrencyId, | 
					
						
							|  |  |  |             'asset'            => $assetAccount, | 
					
						
							|  |  |  |             'opposing'         => $opposingAccount, | 
					
						
							|  |  |  |             'description'      => $description, | 
					
						
							|  |  |  |             'date'             => $date, | 
					
						
							|  |  |  |             'hash'             => $importJournal->hash, | 
					
						
							|  |  |  |             'amount'           => $amount, | 
					
						
							|  |  |  |         ]; | 
					
						
							|  |  |  |         $journal    = $this->storeJournal($parameters); | 
					
						
							|  |  |  |         unset($parameters); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |         // Another step done!
 | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |         $this->job->addStepsDone(1); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         // store meta object things:
 | 
					
						
							|  |  |  |         $this->storeCategory($journal, $importJournal->category->getCategory()); | 
					
						
							|  |  |  |         $this->storeBudget($journal, $importJournal->budget->getBudget()); | 
					
						
							| 
									
										
										
										
											2017-09-15 06:26:09 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |         // to save bill, also give it the amount:
 | 
					
						
							|  |  |  |         $importJournal->bill->setAmount($amount); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |         $this->storeBill($journal, $importJournal->bill->getBill()); | 
					
						
							|  |  |  |         $this->storeMeta($journal, $importJournal->metaDates); | 
					
						
							|  |  |  |         $this->storeTags($importJournal->tags, $journal); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-03 10:30:56 +02:00
										 |  |  |         // set notes for journal:
 | 
					
						
							|  |  |  |         $dbNote = new Note(); | 
					
						
							|  |  |  |         $dbNote->noteable()->associate($journal); | 
					
						
							|  |  |  |         $dbNote->text = trim($importJournal->notes); | 
					
						
							|  |  |  |         $dbNote->save(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |         // set journal completed:
 | 
					
						
							|  |  |  |         $journal->completed = true; | 
					
						
							|  |  |  |         $journal->save(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |         // Another step done!
 | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |         $this->job->addStepsDone(1); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         // run rules:
 | 
					
						
							|  |  |  |         $this->applyRules($journal); | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |         // Another step done!
 | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |         $this->job->addStepsDone(1); | 
					
						
							|  |  |  |         $this->journals->push($journal); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-13 08:49:45 +02:00
										 |  |  |         Log::info(sprintf('Imported new journal #%d: "%s", amount %s %s.', $journal->id, $journal->description, $journal->transactionCurrency->code, $amount)); | 
					
						
							| 
									
										
										
										
											2017-07-07 08:04:21 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-06-24 07:21:10 +02:00
										 |  |  |         return true; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * @param array $parameters | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      * @return bool | 
					
						
							|  |  |  |      */ | 
					
						
							|  |  |  |     private function isDoubleTransfer(array $parameters): bool | 
					
						
							|  |  |  |     { | 
					
						
							| 
									
										
										
										
											2017-10-04 07:19:19 +02:00
										 |  |  |         Log::debug('Check if is a double transfer.'); | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |         if (TransactionType::TRANSFER !== $parameters['type']) { | 
					
						
							| 
									
										
										
										
											2017-10-04 14:58:03 +02:00
										 |  |  |             Log::debug(sprintf('Is a %s, not a transfer so no.', $parameters['type'])); | 
					
						
							| 
									
										
										
										
											2017-10-04 07:19:19 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |             return false; | 
					
						
							|  |  |  |         } | 
					
						
							| 
									
										
										
										
											2017-08-12 16:40:51 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-03 13:00:36 +02:00
										 |  |  |         $amount   = app('steam')->positive($parameters['amount']); | 
					
						
							|  |  |  |         $names    = [$parameters['asset'], $parameters['opposing']]; | 
					
						
							|  |  |  |         $transfer = []; | 
					
						
							| 
									
										
										
										
											2017-10-04 07:19:19 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |         sort($names); | 
					
						
							| 
									
										
										
										
											2017-08-12 16:40:51 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |         foreach ($this->transfers as $transfer) { | 
					
						
							| 
									
										
										
										
											2017-10-04 07:19:19 +02:00
										 |  |  |             $hits = 0; | 
					
						
							| 
									
										
										
										
											2017-09-05 06:43:33 +02:00
										 |  |  |             if ($parameters['description'] === $transfer['description']) { | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |                 ++$hits; | 
					
						
							| 
									
										
										
										
											2017-10-04 07:19:19 +02:00
										 |  |  |                 Log::debug(sprintf('Description "%s" equals "%s", hits = %d', $parameters['description'], $transfer['description'], $hits)); | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2017-09-05 06:43:33 +02:00
										 |  |  |             if ($names === $transfer['names']) { | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |                 ++$hits; | 
					
						
							| 
									
										
										
										
											2017-10-04 07:19:19 +02:00
										 |  |  |                 Log::debug(sprintf('Involved accounts, "%s" equals "%s", hits = %d', join(',', $names), join(',', $transfer['names']), $hits)); | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |             if (0 === bccomp($amount, $transfer['amount'])) { | 
					
						
							|  |  |  |                 ++$hits; | 
					
						
							| 
									
										
										
										
											2017-10-04 07:19:19 +02:00
										 |  |  |                 Log::debug(sprintf('Amount %s equals %s, hits = %d', $amount, $transfer['amount'], $hits)); | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2017-09-05 06:43:33 +02:00
										 |  |  |             if ($parameters['date'] === $transfer['date']) { | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |                 ++$hits; | 
					
						
							| 
									
										
										
										
											2017-10-04 07:19:19 +02:00
										 |  |  |                 Log::debug(sprintf('Date %s equals %s, hits = %d', $parameters['date'], $transfer['date'], $hits)); | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |             } | 
					
						
							| 
									
										
										
										
											2017-10-04 07:19:19 +02:00
										 |  |  |             // number of hits is 4? Then it's a match
 | 
					
						
							| 
									
										
										
										
											2017-11-15 12:25:49 +01:00
										 |  |  |             if (4 === $hits) { | 
					
						
							| 
									
										
										
										
											2017-10-04 07:19:19 +02:00
										 |  |  |                 Log::error( | 
					
						
							| 
									
										
										
										
											2017-11-15 10:52:29 +01:00
										 |  |  |                     'There already is a transfer imported with these properties. Compare existing with new. ', | 
					
						
							|  |  |  |                     ['existing' => $transfer, 'new' => $parameters] | 
					
						
							| 
									
										
										
										
											2017-10-04 07:19:19 +02:00
										 |  |  |                 ); | 
					
						
							| 
									
										
										
										
											2017-09-30 13:16:12 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-04 07:19:19 +02:00
										 |  |  |                 return true; | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2017-09-05 06:43:33 +02:00
										 |  |  |         } | 
					
						
							| 
									
										
										
										
											2017-07-14 06:41:47 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-09-30 13:16:12 +02:00
										 |  |  |         return false; | 
					
						
							| 
									
										
										
										
											2017-08-12 19:03:42 +02:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2017-07-07 08:09:42 +02:00
										 |  |  | } |