diff --git a/CHANGELOG.md b/CHANGELOG.md
index 222370819f..f68ff4250a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,12 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
+## [4.6.2] - 2017-07-08
+### Added
+- Links added to boxes, idea by @simonsmiley
+
+### Fixed
+- Various bugs in import routine
## [4.6.1] - 2017-07-02
### Fixed
diff --git a/app/Console/Commands/Import.php b/app/Console/Commands/Import.php
index b8cecf4202..f37203cc41 100644
--- a/app/Console/Commands/Import.php
+++ b/app/Console/Commands/Import.php
@@ -16,9 +16,7 @@ namespace FireflyIII\Console\Commands;
use FireflyIII\Import\Logging\CommandHandler;
use FireflyIII\Import\Routine\ImportRoutine;
use FireflyIII\Models\ImportJob;
-use FireflyIII\Models\TransactionJournal;
use Illuminate\Console\Command;
-use Illuminate\Support\Collection;
use Illuminate\Support\MessageBag;
use Log;
diff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.php
index d02815963a..43e23ad1a4 100644
--- a/app/Generator/Report/Audit/MonthReportGenerator.php
+++ b/app/Generator/Report/Audit/MonthReportGenerator.php
@@ -163,7 +163,7 @@ class MonthReportGenerator implements ReportGeneratorInterface
/** @var Transaction $journal */
foreach ($journals as $transaction) {
$transaction->before = $startBalance;
- $transactionAmount = $transaction->transaction_amount;
+ $transactionAmount = $transaction->transaction_amount;
if ($currency->id === $transaction->foreign_currency_id) {
$transactionAmount = $transaction->transaction_foreign_amount;
diff --git a/app/Helpers/Filter/AmountFilter.php b/app/Helpers/Filter/AmountFilter.php
index eb4ab55662..7fdd9eb966 100644
--- a/app/Helpers/Filter/AmountFilter.php
+++ b/app/Helpers/Filter/AmountFilter.php
@@ -53,4 +53,4 @@ class AmountFilter implements FilterInterface
}
);
}
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Filter/EmptyFilter.php b/app/Helpers/Filter/EmptyFilter.php
index 23a4172e88..5fa9f64521 100644
--- a/app/Helpers/Filter/EmptyFilter.php
+++ b/app/Helpers/Filter/EmptyFilter.php
@@ -31,4 +31,4 @@ class EmptyFilter implements FilterInterface
{
return $set;
}
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Filter/FilterInterface.php b/app/Helpers/Filter/FilterInterface.php
index d2dcb9eda4..f189eb10ff 100644
--- a/app/Helpers/Filter/FilterInterface.php
+++ b/app/Helpers/Filter/FilterInterface.php
@@ -23,4 +23,4 @@ interface FilterInterface
*/
public function filter(Collection $set): Collection;
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Filter/InternalTransferFilter.php b/app/Helpers/Filter/InternalTransferFilter.php
index 24b4b9727c..7ab06618aa 100644
--- a/app/Helpers/Filter/InternalTransferFilter.php
+++ b/app/Helpers/Filter/InternalTransferFilter.php
@@ -70,4 +70,4 @@ class InternalTransferFilter implements FilterInterface
}
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Filter/NegativeAmountFilter.php b/app/Helpers/Filter/NegativeAmountFilter.php
index f2ef34bcc4..e1e494127e 100644
--- a/app/Helpers/Filter/NegativeAmountFilter.php
+++ b/app/Helpers/Filter/NegativeAmountFilter.php
@@ -44,4 +44,4 @@ class NegativeAmountFilter implements FilterInterface
}
);
}
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Filter/OpposingAccountFilter.php b/app/Helpers/Filter/OpposingAccountFilter.php
index 69a1567943..663f9a35ce 100644
--- a/app/Helpers/Filter/OpposingAccountFilter.php
+++ b/app/Helpers/Filter/OpposingAccountFilter.php
@@ -60,4 +60,4 @@ class OpposingAccountFilter implements FilterInterface
}
);
}
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Filter/PositiveAmountFilter.php b/app/Helpers/Filter/PositiveAmountFilter.php
index ddb71841da..e3d4065942 100644
--- a/app/Helpers/Filter/PositiveAmountFilter.php
+++ b/app/Helpers/Filter/PositiveAmountFilter.php
@@ -47,4 +47,4 @@ class PositiveAmountFilter implements FilterInterface
}
);
}
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Filter/TransferFilter.php b/app/Helpers/Filter/TransferFilter.php
index d33d5e41ed..1aa0b5bd43 100644
--- a/app/Helpers/Filter/TransferFilter.php
+++ b/app/Helpers/Filter/TransferFilter.php
@@ -55,4 +55,4 @@ class TransferFilter implements FilterInterface
return $new;
}
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Report/PopupReport.php b/app/Helpers/Report/PopupReport.php
index 265c930e6c..7823eb95b8 100644
--- a/app/Helpers/Report/PopupReport.php
+++ b/app/Helpers/Report/PopupReport.php
@@ -196,4 +196,4 @@ class PopupReport implements PopupReportInterface
return $journals;
}
-}
\ No newline at end of file
+}
diff --git a/app/Helpers/Report/PopupReportInterface.php b/app/Helpers/Report/PopupReportInterface.php
index 79ca4be007..388c1a1d91 100644
--- a/app/Helpers/Report/PopupReportInterface.php
+++ b/app/Helpers/Report/PopupReportInterface.php
@@ -80,4 +80,4 @@ interface PopupReportInterface
* @return Collection
*/
public function byIncome(Account $account, array $attributes): Collection;
-}
\ No newline at end of file
+}
diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php
index 8e1bba3a03..3f06091f35 100644
--- a/app/Http/Controllers/AttachmentController.php
+++ b/app/Http/Controllers/AttachmentController.php
@@ -105,7 +105,6 @@ class AttachmentController extends Controller
$quoted = sprintf('"%s"', addcslashes(basename($attachment->filename), '"\\'));
-
/** @var LaravelResponse $response */
$response = response($content, 200);
$response
diff --git a/app/Http/Controllers/Chart/TagReportController.php b/app/Http/Controllers/Chart/TagReportController.php
index 2aca50bc77..5c3ee98ed1 100644
--- a/app/Http/Controllers/Chart/TagReportController.php
+++ b/app/Http/Controllers/Chart/TagReportController.php
@@ -364,4 +364,4 @@ class TagReportController extends Controller
return $grouped;
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Controllers/ImportController.php b/app/Http/Controllers/ImportController.php
index 310b418789..c4b0bd1342 100644
--- a/app/Http/Controllers/ImportController.php
+++ b/app/Http/Controllers/ImportController.php
@@ -246,7 +246,7 @@ class ImportController extends Controller
/** @var ImportRoutine $routine */
$routine = app(ImportRoutine::class);
$routine->setJob($job);
- $result = $routine->run();
+ $result = $routine->run();
if ($result) {
return Response::json(['run' => 'ok']);
}
diff --git a/app/Http/Controllers/Json/ExchangeController.php b/app/Http/Controllers/Json/ExchangeController.php
index 79f88acf2c..b1e3b5a60d 100644
--- a/app/Http/Controllers/Json/ExchangeController.php
+++ b/app/Http/Controllers/Json/ExchangeController.php
@@ -62,4 +62,4 @@ class ExchangeController extends Controller
return Response::json($return);
}
-}
\ No newline at end of file
+}
diff --git a/app/Http/Controllers/PiggyBankController.php b/app/Http/Controllers/PiggyBankController.php
index f4dc60cee9..207f98cd6f 100644
--- a/app/Http/Controllers/PiggyBankController.php
+++ b/app/Http/Controllers/PiggyBankController.php
@@ -329,8 +329,8 @@ class PiggyBankController extends Controller
Session::flash(
'error', strval(
- trans('firefly.cannot_remove_from_piggy', ['amount' => Amount::formatAnything($currency, $amount, false), 'name' => e($piggyBank->name)])
- )
+ trans('firefly.cannot_remove_from_piggy', ['amount' => Amount::formatAnything($currency, $amount, false), 'name' => e($piggyBank->name)])
+ )
);
return redirect(route('piggy-banks.index'));
@@ -397,7 +397,7 @@ class PiggyBankController extends Controller
// @codeCoverageIgnoreEnd
}
- return redirect($this->getPreviousUri('piggy-banks.edit.uri'));
+ return redirect($this->getPreviousUri('piggy-banks.create.uri'));
}
/**
diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php
index 969ea8afdc..250e54dde9 100644
--- a/app/Http/Controllers/Report/CategoryController.php
+++ b/app/Http/Controllers/Report/CategoryController.php
@@ -120,7 +120,7 @@ class CategoryController extends Controller
foreach ($categories as $category) {
$spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $end);
if (bccomp($spent, '0') !== 0) {
- $report[$category->id] = ['name' => $category->name, 'spent' => $spent,'id' => $category->id];
+ $report[$category->id] = ['name' => $category->name, 'spent' => $spent, 'id' => $category->id];
}
}
diff --git a/app/Http/Controllers/Transaction/SingleController.php b/app/Http/Controllers/Transaction/SingleController.php
index ca4bcc66f6..f091cc2691 100644
--- a/app/Http/Controllers/Transaction/SingleController.php
+++ b/app/Http/Controllers/Transaction/SingleController.php
@@ -21,6 +21,7 @@ use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Requests\JournalFormRequest;
use FireflyIII\Models\AccountType;
+use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
@@ -90,39 +91,42 @@ class SingleController extends Controller
public function cloneTransaction(TransactionJournal $journal)
{
- $source = $journal->sourceAccountList()->first();
- $destination = $journal->destinationAccountList()->first();
- $budget = $journal->budgets()->first();
- $budgetId = is_null($budget) ? 0 : $budget->id;
- $category = $journal->categories()->first();
- $categoryName = is_null($category) ? '' : $category->name;
- $tags = join(',', $journal->tags()->get()->pluck('tag')->toArray());
+ $source = $journal->sourceAccountList()->first();
+ $destination = $journal->destinationAccountList()->first();
+ $budget = $journal->budgets()->first();
+ $budgetId = is_null($budget) ? 0 : $budget->id;
+ $category = $journal->categories()->first();
+ $categoryName = is_null($category) ? '' : $category->name;
+ $tags = join(',', $journal->tags()->get()->pluck('tag')->toArray());
+ /** @var Transaction $transaction */
$transaction = $journal->transactions()->first();
$amount = Steam::positive($transaction->amount);
$foreignAmount = is_null($transaction->foreign_amount) ? null : Steam::positive($transaction->foreign_amount);
$preFilled = [
- 'description' => $journal->description,
- 'source_account_id' => $source->id,
- 'source_account_name' => $source->name,
- 'destination_account_id' => $destination->id,
- 'destination_account_name' => $destination->name,
- 'amount' => $amount,
- 'source_amount' => $amount,
- 'destination_amount' => $foreignAmount,
- 'foreign_amount' => $foreignAmount,
- 'date' => $journal->date->format('Y-m-d'),
- 'budget_id' => $budgetId,
- 'category' => $categoryName,
- 'tags' => $tags,
- 'interest_date' => $journal->getMeta('interest_date'),
- 'book_date' => $journal->getMeta('book_date'),
- 'process_date' => $journal->getMeta('process_date'),
- 'due_date' => $journal->getMeta('due_date'),
- 'payment_date' => $journal->getMeta('payment_date'),
- 'invoice_date' => $journal->getMeta('invoice_date'),
- 'internal_reference' => $journal->getMeta('internal_reference'),
- 'notes' => $journal->getMeta('notes'),
+ 'description' => $journal->description,
+ 'source_account_id' => $source->id,
+ 'source_account_name' => $source->name,
+ 'destination_account_id' => $destination->id,
+ 'destination_account_name' => $destination->name,
+ 'amount' => $amount,
+ 'source_amount' => $amount,
+ 'destination_amount' => $foreignAmount,
+ 'foreign_amount' => $foreignAmount,
+ 'native_amount' => $foreignAmount,
+ 'amount_currency_id_amount' => $transaction->foreign_currency_id ?? 0,
+ 'date' => $journal->date->format('Y-m-d'),
+ 'budget_id' => $budgetId,
+ 'category' => $categoryName,
+ 'tags' => $tags,
+ 'interest_date' => $journal->getMeta('interest_date'),
+ 'book_date' => $journal->getMeta('book_date'),
+ 'process_date' => $journal->getMeta('process_date'),
+ 'due_date' => $journal->getMeta('due_date'),
+ 'payment_date' => $journal->getMeta('payment_date'),
+ 'invoice_date' => $journal->getMeta('invoice_date'),
+ 'internal_reference' => $journal->getMeta('internal_reference'),
+ 'notes' => $journal->getMeta('notes'),
];
Session::flash('preFilled', $preFilled);
diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.php
index 1636ded76c..6d088942b4 100644
--- a/app/Http/Controllers/TransactionController.php
+++ b/app/Http/Controllers/TransactionController.php
@@ -86,7 +86,7 @@ class TransactionController extends Controller
$first = $repository->first();
$start = $first->date ?? new Carbon;
$end = new Carbon;
- $path = '/transactions/'.$what.'/all/';
+ $path = '/transactions/' . $what . '/all/';
}
// prep for "specific date" view.
diff --git a/app/Import/Configurator/ConfiguratorInterface.php b/app/Import/Configurator/ConfiguratorInterface.php
index 4969109b01..1f120d30d3 100644
--- a/app/Import/Configurator/ConfiguratorInterface.php
+++ b/app/Import/Configurator/ConfiguratorInterface.php
@@ -34,13 +34,6 @@ interface ConfiguratorInterface
*/
public function configureJob(array $data): bool;
- /**
- * @param ImportJob $job
- *
- * @return void
- */
- public function setJob(ImportJob $job);
-
/**
* Return the data required for the next step in the job configuration.
*
@@ -62,4 +55,11 @@ interface ConfiguratorInterface
*/
public function isJobConfigured(): bool;
-}
\ No newline at end of file
+ /**
+ * @param ImportJob $job
+ *
+ * @return void
+ */
+ public function setJob(ImportJob $job);
+
+}
diff --git a/app/Import/Configurator/CsvConfigurator.php b/app/Import/Configurator/CsvConfigurator.php
index a3c9750fee..4e7d4ff476 100644
--- a/app/Import/Configurator/CsvConfigurator.php
+++ b/app/Import/Configurator/CsvConfigurator.php
@@ -156,4 +156,4 @@ class CsvConfigurator implements ConfiguratorInterface
return $class;
}
-}
\ No newline at end of file
+}
diff --git a/app/Import/FileProcessor/CsvProcessor.php b/app/Import/FileProcessor/CsvProcessor.php
index 5585cf4b04..5be25f5ed1 100644
--- a/app/Import/FileProcessor/CsvProcessor.php
+++ b/app/Import/FileProcessor/CsvProcessor.php
@@ -232,4 +232,4 @@ class CsvProcessor implements FileProcessorInterface
return $row;
}
-}
\ No newline at end of file
+}
diff --git a/app/Import/FileProcessor/FileProcessorInterface.php b/app/Import/FileProcessor/FileProcessorInterface.php
index 5dfccd4dd7..0813246750 100644
--- a/app/Import/FileProcessor/FileProcessorInterface.php
+++ b/app/Import/FileProcessor/FileProcessorInterface.php
@@ -39,4 +39,4 @@ interface FileProcessorInterface
* @return FileProcessorInterface
*/
public function setJob(ImportJob $job): FileProcessorInterface;
-}
\ No newline at end of file
+}
diff --git a/app/Import/Object/ImportAccount.php b/app/Import/Object/ImportAccount.php
index 19ff1c8f40..334709d8bb 100644
--- a/app/Import/Object/ImportAccount.php
+++ b/app/Import/Object/ImportAccount.php
@@ -67,6 +67,22 @@ class ImportAccount
return $this->account;
}
+ /**
+ * @return string
+ */
+ public function getExpectedType(): string
+ {
+ return $this->expectedType;
+ }
+
+ /**
+ * @param string $expectedType
+ */
+ public function setExpectedType(string $expectedType)
+ {
+ $this->expectedType = $expectedType;
+ }
+
/**
* @param array $accountIban
*/
@@ -99,14 +115,6 @@ class ImportAccount
$this->accountNumber = $accountNumber;
}
- /**
- * @param string $expectedType
- */
- public function setExpectedType(string $expectedType)
- {
- $this->expectedType = $expectedType;
- }
-
/**
* @param User $user
*/
@@ -241,6 +249,16 @@ class ImportAccount
$search = intval($array['mapped']);
$account = $this->repository->find($search);
+ if ($account->accountType->type !== $this->expectedType) {
+ Log::error(
+ sprintf(
+ 'Mapped account #%d is of type "%s" but we expect a "%s"-account. Mapping will be ignored.', $account->id, $account->accountType->type,
+ $this->expectedType
+ )
+ );
+ return new Account;
+ }
+
Log::debug(sprintf('Found account! #%d ("%s"). Return it', $account->id, $account->name));
return $account;
@@ -296,4 +314,4 @@ class ImportAccount
}
-}
\ No newline at end of file
+}
diff --git a/app/Import/Object/ImportBill.php b/app/Import/Object/ImportBill.php
index c3d5f2f93d..729a290d3b 100644
--- a/app/Import/Object/ImportBill.php
+++ b/app/Import/Object/ImportBill.php
@@ -225,4 +225,4 @@ class ImportBill
return true;
}
-}
\ No newline at end of file
+}
diff --git a/app/Import/Object/ImportBudget.php b/app/Import/Object/ImportBudget.php
index b3732a4efa..011fef8c8e 100644
--- a/app/Import/Object/ImportBudget.php
+++ b/app/Import/Object/ImportBudget.php
@@ -226,4 +226,4 @@ class ImportBudget
}
-}
\ No newline at end of file
+}
diff --git a/app/Import/Object/ImportCategory.php b/app/Import/Object/ImportCategory.php
index f8ee78442e..69265fcd3a 100644
--- a/app/Import/Object/ImportCategory.php
+++ b/app/Import/Object/ImportCategory.php
@@ -30,33 +30,17 @@ class ImportCategory
private $repository;
/** @var User */
private $user;
- /**
- * @param array $id
- */
- public function setId(array $id)
- {
- $this->id = $id;
- }
/**
* ImportCategory constructor.
*/
public function __construct()
{
- $this->category = new Category();
+ $this->category = new Category();
$this->repository = app(CategoryRepositoryInterface::class);
Log::debug('Created ImportCategory.');
}
- /**
- * @param array $name
- */
- public function setName(array $name)
- {
- $this->name = $name;
- }
-
-
/**
* @return Category
*/
@@ -68,6 +52,23 @@ class ImportCategory
return $this->category;
}
+
+ /**
+ * @param array $id
+ */
+ public function setId(array $id)
+ {
+ $this->id = $id;
+ }
+
+ /**
+ * @param array $name
+ */
+ public function setName(array $name)
+ {
+ $this->name = $name;
+ }
+
/**
* @param User $user
*/
@@ -100,7 +101,7 @@ class ImportCategory
if (count($this->name) === 3) {
/** @var Collection $categories */
$categories = $this->repository->getCategories();
- $name = $this->name['value'];
+ $name = $this->name['value'];
Log::debug(sprintf('Finding category with name %s', $name));
$filtered = $categories->filter(
function (Category $category) use ($name) {
@@ -219,4 +220,4 @@ class ImportCategory
}
-}
\ No newline at end of file
+}
diff --git a/app/Import/Object/ImportCurrency.php b/app/Import/Object/ImportCurrency.php
index 8427f3ce5f..983c2591ae 100644
--- a/app/Import/Object/ImportCurrency.php
+++ b/app/Import/Object/ImportCurrency.php
@@ -53,7 +53,7 @@ class ImportCurrency
}
Log::debug('In createCurrency()');
// check if any of them is mapped:
- $mapped = $this->findMappedObject();
+ $mapped = $this->findMappedObject();
if (!is_null($mapped->id)) {
@@ -77,7 +77,7 @@ class ImportCurrency
'decimal_places' => 2,
];
if (is_null($data['code'])) {
- Log::info('Need at least a code to create currency, return nothing.');
+ Log::debug('Need at least a code to create currency, return nothing.');
return new TransactionCurrency();
}
@@ -215,4 +215,4 @@ class ImportCurrency
}
-}
\ No newline at end of file
+}
diff --git a/app/Import/Object/ImportJournal.php b/app/Import/Object/ImportJournal.php
index a86cdffe5d..adebaea1f6 100644
--- a/app/Import/Object/ImportJournal.php
+++ b/app/Import/Object/ImportJournal.php
@@ -19,6 +19,8 @@ use FireflyIII\Import\Converter\ConverterInterface;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\User;
use Illuminate\Support\Collection;
+use InvalidArgumentException;
+use Log;
use Steam;
/**
@@ -30,22 +32,26 @@ class ImportJournal
{
/** @var ImportAccount */
public $asset;
+ /** @var ImportBill */
+ public $bill;
/** @var ImportBudget */
public $budget;
+ /** @var ImportCategory */
+ public $category;
/** @var string */
public $description = '';
/** @var Collection */
public $errors;
/** @var string */
public $hash;
+ /** @var array */
+ public $metaDates = [];
+ /** @var string */
+ public $notes = '';
/** @var ImportAccount */
public $opposing;
/** @var string */
private $amount = '0';
- /** @var ImportBill */
- public $bill;
- /** @var ImportCategory */
- public $category;
/** @var ImportCurrency */
private $currency;
/** @var string */
@@ -54,16 +60,10 @@ class ImportJournal
private $externalId = '';
/** @var array */
private $modifiers = [];
- /** @var array */
- private $tags = [];
- /** @var string */
- public $notes = '';
- /** @var string */
- private $transactionType = '';
+ /** @var array */
+ private $tags = [];
/** @var User */
private $user;
- /** @var array */
- public $metaDates = [];
/**
* ImportEntry constructor.
@@ -133,7 +133,15 @@ class ImportJournal
*/
public function getDate(string $format): Carbon
{
- return Carbon::createFromFormat($format, $this->date);
+ $date = new Carbon;
+ try {
+ $date = Carbon::createFromFormat($format, $this->date);
+ } catch (InvalidArgumentException $e) {
+ // don't care, just log.
+ Log::error(sprintf('Import journal cannot parse date "%s" from value "%s" so will return current date instead.', $format, $this->date));
+ }
+
+ return $date;
}
/**
@@ -223,7 +231,7 @@ class ImportJournal
case 'sepa-ct-op':
case 'sepa-ct-id':
case 'sepa-db':
- $this->notes .= ' '.$array['value'];
+ $this->notes .= ' ' . $array['value'];
$this->notes = trim($this->notes);
break;
case 'external-id':
@@ -262,4 +270,4 @@ class ImportJournal
break;
}
}
-}
\ No newline at end of file
+}
diff --git a/app/Import/Object/ImportTransaction.php b/app/Import/Object/ImportTransaction.php
deleted file mode 100644
index cbb6a453cd..0000000000
--- a/app/Import/Object/ImportTransaction.php
+++ /dev/null
@@ -1,157 +0,0 @@
-currency = new ImportCurrency;
- }
-
- public function addToModifier(array $modifier)
- {
- $this->modifiers[] = $modifier;
- }
-
- /**
- * @return string
- */
- public function getAmount(): string
- {
- // use converter:
- $this->amount = strval($this->parseAmount());
-
-
- // also apply modifiers:
- $this->amount = Steam::positive($this->amount);
-
- // Can handle ING
- foreach ($this->modifiers as $modifier) {
- $class = sprintf('FireflyIII\Import\Converter\%s', config(sprintf('csv.import_roles.%s.converter', $modifier['role'])));
- /** @var ConverterInterface $converter */
- $converter = app($class);
- if ($converter->convert($modifier['value']) === -1) {
- $this->amount = Steam::negative($this->amount);
- }
- }
-
- return $this->amount;
- }
-
- /**
- * @param string $amount
- */
- public function setAmount(string $amount)
- {
- $this->amount = $amount;
- }
-
- /**
- * @return ImportCurrency
- */
- public function getCurrency(): ImportCurrency
- {
- return $this->currency;
- }
-
- /**
- * @param ImportCurrency $currency
- */
- public function setCurrency(ImportCurrency $currency)
- {
- $this->currency = $currency;
- }
-
- /**
- * @param string $date
- */
- public function setDate(string $date)
- {
- $this->date = $date;
- }
-
- /**
- * @param string $description
- */
- public function setDescription(string $description)
- {
- $this->description = $description;
- }
-
- /**
- * @param bool $positive
- */
- public function setPositive(bool $positive)
- {
- $this->positive = $positive;
- }
-
- /**
- * Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
- * - Jamie Zawinski
- *
- * @return float
- */
- private function parseAmount()
- {
- $value = $this->amount;
- $len = strlen($value);
- $decimalPosition = $len - 3;
- $decimal = null;
-
- if (($len > 2 && $value{$decimalPosition} == '.') || ($len > 2 && strpos($value, '.') > $decimalPosition)) {
- $decimal = '.';
- }
- if ($len > 2 && $value{$decimalPosition} == ',') {
- $decimal = ',';
- }
-
- // if decimal is dot, replace all comma's and spaces with nothing. then parse as float (round to 4 pos)
- if ($decimal === '.') {
- $search = [',', ' '];
- $value = str_replace($search, '', $value);
- }
- if ($decimal === ',') {
- $search = ['.', ' '];
- $value = str_replace($search, '', $value);
- $value = str_replace(',', '.', $value);
- }
- if (is_null($decimal)) {
- // replace all:
- $search = ['.', ' ', ','];
- $value = str_replace($search, '', $value);
- }
-
- return round(floatval($value), 12);
- }
-
-}
\ No newline at end of file
diff --git a/app/Import/Routine/ImportRoutine.php b/app/Import/Routine/ImportRoutine.php
index 62da476f86..ee8fd22c6b 100644
--- a/app/Import/Routine/ImportRoutine.php
+++ b/app/Import/Routine/ImportRoutine.php
@@ -44,15 +44,6 @@ class ImportRoutine
$this->errors = new Collection;
}
- /**
- * @param ImportJob $job
- */
- public function setJob(ImportJob $job)
- {
- $this->job = $job;
- }
-
-
/**
*
*/
@@ -86,9 +77,18 @@ class ImportRoutine
Log::info(sprintf('Done with import job %s', $this->job->key));
+
return true;
}
+ /**
+ * @param ImportJob $job
+ */
+ public function setJob(ImportJob $job)
+ {
+ $this->job = $job;
+ }
+
/**
* @return Collection
*/
@@ -163,4 +163,4 @@ class ImportRoutine
return $storage;
}
-}
\ No newline at end of file
+}
diff --git a/app/Import/Storage/ImportStorage.php b/app/Import/Storage/ImportStorage.php
index d0eea39f5d..4986bfbb29 100644
--- a/app/Import/Storage/ImportStorage.php
+++ b/app/Import/Storage/ImportStorage.php
@@ -27,9 +27,9 @@ use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionCurrency;
use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
+use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface;
use FireflyIII\Rules\Processor;
use Illuminate\Support\Collection;
-use Illuminate\Support\MessageBag;
use Log;
use Steam;
@@ -44,6 +44,8 @@ class ImportStorage
/** @var Collection */
public $errors;
public $journals;
+ /** @var CurrencyRepositoryInterface */
+ private $currencyRepository;
/** @var string */
private $dateFormat = 'Ymd';
/** @var TransactionCurrency */
@@ -78,8 +80,11 @@ class ImportStorage
*/
public function setJob(ImportJob $job)
{
- $this->job = $job;
- $this->rules = $this->getUserRules();
+ $this->job = $job;
+ $repository = app(CurrencyRepositoryInterface::class);
+ $repository->setUser($job->user);
+ $this->currencyRepository = $repository;
+ $this->rules = $this->getUserRules();
}
/**
@@ -107,6 +112,7 @@ class ImportStorage
$this->storeImportJournal($index, $object);
} catch (FireflyException $e) {
$this->errors->push($e->getMessage());
+ Log::error(sprintf('Cannot import row #%d because: %s', $index, $e->getMessage()));
}
}
@@ -168,13 +174,23 @@ class ImportStorage
*
* @return TransactionCurrency
*/
- private function getCurrency(ImportJournal $importJournal): TransactionCurrency
+ private function getCurrency(ImportJournal $importJournal, Account $account): TransactionCurrency
{
- $currency = $importJournal->getCurrency()->getTransactionCurrency();
- if (is_null($currency->id)) {
- $currency = $this->defaultCurrency;
+ // start with currency pref of account, if any:
+ $currency = $this->currencyRepository->find(intval($account->getMeta('currency_id')));
+ if (!is_null($currency->id)) {
+ return $currency;
}
+ // use given currency
+ $currency = $importJournal->getCurrency()->getTransactionCurrency();
+ if (!is_null($currency->id)) {
+ return $currency;
+ }
+
+ // backup to default
+ $currency = $this->defaultCurrency;
+
return $currency;
}
@@ -196,7 +212,9 @@ class ImportStorage
// amount is positive, it's a deposit, opposing is an revenue:
$account->setExpectedType(AccountType::REVENUE);
- return $account->getAccount();
+ $databaseAccount = $account->getAccount();
+
+ return $databaseAccount;
}
@@ -286,7 +304,7 @@ class ImportStorage
$asset = $importJournal->asset->getAccount();
$amount = $importJournal->getAmount();
- $currency = $this->getCurrency($importJournal);
+ $currency = $this->getCurrency($importJournal, $asset);
$date = $importJournal->getDate($this->dateFormat);
$transactionType = $this->getTransactionType($amount);
$opposing = $this->getOpposingAccount($importJournal->opposing, $amount);
@@ -297,6 +315,11 @@ class ImportStorage
$transactionType = TransactionType::whereType(TransactionType::TRANSFER)->first();
}
+ // verify that opposing account is of the correct type:
+ if ($opposing->accountType->type === AccountType::EXPENSE && $transactionType->type !== TransactionType::WITHDRAWAL) {
+ Log::error(sprintf('Row #%d is imported as a %s but opposing is an expense account. This cannot be!', $index, $transactionType->type));
+ }
+
/*** First step done! */
$this->job->addStepsDone(1);
@@ -351,6 +374,13 @@ class ImportStorage
$this->journals->push($journal);
+ Log::info(
+ sprintf(
+ 'Imported new journal #%d with description "%s" and amount %s %s.', $journal->id, $journal->description, $journal->transactionCurrency->code,
+ $amount
+ )
+ );
+
return true;
}
@@ -372,4 +402,4 @@ class ImportStorage
}
}
-}
\ No newline at end of file
+}
diff --git a/app/Mail/RegisteredUser.php b/app/Mail/RegisteredUser.php
index d988506393..ea8e6a7e63 100644
--- a/app/Mail/RegisteredUser.php
+++ b/app/Mail/RegisteredUser.php
@@ -22,8 +22,8 @@ class RegisteredUser extends Mailable
*/
public function __construct(string $address, string $ipAddress)
{
- $this->address = $address;
- $this->ipAddress = $ipAddress;
+ $this->address = $address;
+ $this->ipAddress = $ipAddress;
}
/**
diff --git a/app/Models/CurrencyExchangeRate.php b/app/Models/CurrencyExchangeRate.php
index 2c7d12558c..bfd66f881f 100644
--- a/app/Models/CurrencyExchangeRate.php
+++ b/app/Models/CurrencyExchangeRate.php
@@ -50,4 +50,4 @@ class CurrencyExchangeRate extends Model
return $this->belongsTo(User::class);
}
-}
\ No newline at end of file
+}
diff --git a/app/Models/ImportJob.php b/app/Models/ImportJob.php
index 5b3febd6c5..4f23de2c83 100644
--- a/app/Models/ImportJob.php
+++ b/app/Models/ImportJob.php
@@ -86,7 +86,7 @@ class ImportJob extends Model
*/
public function addStepsDone(int $count)
{
- $status = $this->extended_status;
+ $status = $this->extended_status;
$status['done'] += $count;
$this->extended_status = $status;
$this->save();
diff --git a/app/Models/Tag.php b/app/Models/Tag.php
index 19573b2b29..21430124c2 100644
--- a/app/Models/Tag.php
+++ b/app/Models/Tag.php
@@ -133,9 +133,10 @@ class Tag extends Model
*/
public function getTagAttribute($value)
{
- if(is_null($value)) {
+ if (is_null($value)) {
return null;
}
+
return Crypt::decrypt($value);
}
diff --git a/app/Repositories/Account/FindAccountsTrait.php b/app/Repositories/Account/FindAccountsTrait.php
index a3a4248ab2..e06a598a47 100644
--- a/app/Repositories/Account/FindAccountsTrait.php
+++ b/app/Repositories/Account/FindAccountsTrait.php
@@ -212,4 +212,4 @@ trait FindAccountsTrait
return $account;
}
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php
index bef618f634..e0a9f262b7 100644
--- a/app/Repositories/Category/CategoryRepository.php
+++ b/app/Repositories/Category/CategoryRepository.php
@@ -160,42 +160,19 @@ class CategoryRepository implements CategoryRepositoryInterface
*/
public function lastUseDate(Category $category, Collection $accounts): Carbon
{
- $last = null;
+ $last = new Carbon('1900-01-01');
+ $lastJournalDate = $this->getLastJournalDate($category, $accounts);
- /** @var TransactionJournal $first */
- $lastJournalQuery = $category->transactionJournals()->orderBy('date', 'DESC');
-
- if ($accounts->count() > 0) {
- // filter journals:
- $ids = $accounts->pluck('id')->toArray();
- $lastJournalQuery->leftJoin('transactions as t', 't.transaction_journal_id', '=', 'transaction_journals.id');
- $lastJournalQuery->whereIn('t.account_id', $ids);
+ if ($lastJournalDate->year !== 1900) {
+ $last = clone $lastJournalDate;
+ unset($lastJournalDate);
}
- $lastJournal = $lastJournalQuery->first(['transaction_journals.*']);
+ $lastTransactionDate = $this->getLastTransactionDate($category, $accounts);
- if ($lastJournal) {
- $last = $lastJournal->date;
- }
-
- // check transactions:
-
- $lastTransactionQuery = $category->transactions()
- ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
- ->orderBy('transaction_journals.date', 'DESC');
- if ($accounts->count() > 0) {
- // filter journals:
- $ids = $accounts->pluck('id')->toArray();
- $lastTransactionQuery->whereIn('transactions.account_id', $ids);
- }
-
- $lastTransaction = $lastTransactionQuery->first(['transaction_journals.*']);
- if (!is_null($lastTransaction) && ((!is_null($last) && $lastTransaction->date < $last) || is_null($last))) {
- $last = new Carbon($lastTransaction->date);
- }
-
- if (is_null($last)) {
- return new Carbon('1900-01-01');
+ if ($lastTransactionDate->year !== 1900 && $lastTransactionDate < $last) {
+ $last = clone $lastTransactionDate;
+ unset($lastTransactionDate);
}
return $last;
@@ -479,4 +456,53 @@ class CategoryRepository implements CategoryRepositoryInterface
return $category;
}
+ /**
+ * @param Category $category
+ * @param Collection $accounts
+ *
+ * @return Carbon
+ */
+ private function getLastJournalDate(Category $category, Collection $accounts): Carbon
+ {
+ $query = $category->transactionJournals()->orderBy('date', 'DESC');
+
+ if ($accounts->count() > 0) {
+ $query->leftJoin('transactions as t', 't.transaction_journal_id', '=', 'transaction_journals.id');
+ $query->whereIn('t.account_id', $accounts->pluck('id')->toArray());
+ }
+
+ $result = $query->first(['transaction_journals.*']);
+
+ if (!is_null($result)) {
+ return $result->date;
+ }
+
+ return new Carbon('1900-01-01');
+ }
+
+ /**
+ * @param Category $category
+ * @param Collection $accounts
+ *
+ * @return Carbon
+ */
+ private function getLastTransactionDate(Category $category, Collection $accounts): Carbon
+ {
+ // check transactions:
+ $query = $category->transactions()
+ ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
+ ->orderBy('transaction_journals.date', 'DESC');
+ if ($accounts->count() > 0) {
+ // filter journals:
+ $query->whereIn('transactions.account_id', $accounts->pluck('id')->toArray());
+ }
+
+ $lastTransaction = $query->first(['transaction_journals.*']);
+ if (!is_null($lastTransaction)) {
+ return new Carbon($lastTransaction->date);
+ }
+
+ return new Carbon('1900-01-01');
+ }
+
}
diff --git a/app/Repositories/ImportJob/ImportJobRepositoryInterface.php b/app/Repositories/ImportJob/ImportJobRepositoryInterface.php
index 421a7849b2..bfdc0493b9 100644
--- a/app/Repositories/ImportJob/ImportJobRepositoryInterface.php
+++ b/app/Repositories/ImportJob/ImportJobRepositoryInterface.php
@@ -42,17 +42,17 @@ interface ImportJobRepositoryInterface
* @param ImportJob $job
* @param UploadedFile $file
*
- * @return mixed
+ * @return bool
*/
- public function processFile(ImportJob $job, UploadedFile $file): bool;
+ public function processConfiguration(ImportJob $job, UploadedFile $file): bool;
/**
* @param ImportJob $job
* @param UploadedFile $file
*
- * @return bool
+ * @return mixed
*/
- public function processConfiguration(ImportJob $job, UploadedFile $file): bool;
+ public function processFile(ImportJob $job, UploadedFile $file): bool;
/**
* @param ImportJob $job
diff --git a/app/Repositories/Journal/CreateJournalsTrait.php b/app/Repositories/Journal/CreateJournalsTrait.php
index 77b97eadd2..44064b7432 100644
--- a/app/Repositories/Journal/CreateJournalsTrait.php
+++ b/app/Repositories/Journal/CreateJournalsTrait.php
@@ -188,4 +188,4 @@ trait CreateJournalsTrait
}
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/Journal/SupportJournalsTrait.php b/app/Repositories/Journal/SupportJournalsTrait.php
index 601c8cf9b7..df57879971 100644
--- a/app/Repositories/Journal/SupportJournalsTrait.php
+++ b/app/Repositories/Journal/SupportJournalsTrait.php
@@ -243,4 +243,4 @@ trait SupportJournalsTrait
return $data;
}
-}
\ No newline at end of file
+}
diff --git a/app/Repositories/Journal/UpdateJournalsTrait.php b/app/Repositories/Journal/UpdateJournalsTrait.php
index 8e249d5bff..9bf2cae058 100644
--- a/app/Repositories/Journal/UpdateJournalsTrait.php
+++ b/app/Repositories/Journal/UpdateJournalsTrait.php
@@ -153,4 +153,4 @@ trait UpdateJournalsTrait
return true;
}
-}
\ No newline at end of file
+}
diff --git a/app/Rules/Triggers/HasAttachment.php b/app/Rules/Triggers/HasAttachment.php
index 4fc3bd720f..6fc86c6a6c 100644
--- a/app/Rules/Triggers/HasAttachment.php
+++ b/app/Rules/Triggers/HasAttachment.php
@@ -58,4 +58,4 @@ class HasAttachment extends AbstractTrigger implements TriggerInterface
return false;
}
-}
\ No newline at end of file
+}
diff --git a/app/Services/Currency/ExchangeRateInterface.php b/app/Services/Currency/ExchangeRateInterface.php
index a37133db9a..69a8040a5d 100644
--- a/app/Services/Currency/ExchangeRateInterface.php
+++ b/app/Services/Currency/ExchangeRateInterface.php
@@ -35,4 +35,4 @@ interface ExchangeRateInterface
*/
public function setUser(User $user);
-}
\ No newline at end of file
+}
diff --git a/app/Services/Currency/FixerIO.php b/app/Services/Currency/FixerIO.php
index e77a7777ba..7a3290bb96 100644
--- a/app/Services/Currency/FixerIO.php
+++ b/app/Services/Currency/FixerIO.php
@@ -68,4 +68,4 @@ class FixerIO implements ExchangeRateInterface
{
$this->user = $user;
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/Binder/CurrencyCode.php b/app/Support/Binder/CurrencyCode.php
index 4616ce5ef2..39b0a73915 100644
--- a/app/Support/Binder/CurrencyCode.php
+++ b/app/Support/Binder/CurrencyCode.php
@@ -36,4 +36,4 @@ class CurrencyCode implements BinderInterface
}
throw new NotFoundHttpException;
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php
index dab2ed286d..c1dc2fc174 100644
--- a/app/Support/ExpandedForm.php
+++ b/app/Support/ExpandedForm.php
@@ -565,6 +565,19 @@ class ExpandedForm
unset($options['currency']);
unset($options['placeholder']);
+ // perhaps the currency has been sent to us in the field $amount_currency_id_$name (amount_currency_id_amount)
+ $preFilled = session('preFilled');
+ $key = 'amount_currency_id_' . $name;
+ $sentCurrencyId = isset($preFilled[$key]) ? intval($preFilled[$key]) : $defaultCurrency->id;
+
+ // find this currency in set of currencies:
+ foreach ($currencies as $currency) {
+ if ($currency->id === $sentCurrencyId) {
+ $defaultCurrency = $currency;
+ break;
+ }
+ }
+
// make sure value is formatted nicely:
if (!is_null($value) && $value !== '') {
$value = round($value, $defaultCurrency->decimal_places);
diff --git a/app/Support/Import/Configuration/ConfigurationInterface.php b/app/Support/Import/Configuration/ConfigurationInterface.php
index f44203517e..7f13ebe167 100644
--- a/app/Support/Import/Configuration/ConfigurationInterface.php
+++ b/app/Support/Import/Configuration/ConfigurationInterface.php
@@ -43,4 +43,4 @@ interface ConfigurationInterface
*/
public function storeConfiguration(array $data): bool;
-}
\ No newline at end of file
+}
diff --git a/app/Support/Import/Configuration/Csv/Initial.php b/app/Support/Import/Configuration/Csv/Initial.php
index 096d997f5e..7884a83f6b 100644
--- a/app/Support/Import/Configuration/Csv/Initial.php
+++ b/app/Support/Import/Configuration/Csv/Initial.php
@@ -26,6 +26,7 @@ use Log;
class Initial implements ConfigurationInterface
{
private $job;
+
/**
* @return array
*/
@@ -106,6 +107,21 @@ class Initial implements ConfigurationInterface
Log::error('Could not find anything for csv_import_account.', ['id' => $importId]);
}
+ $config = $this->storeSpecifics($data, $config);
+ $this->job->configuration = $config;
+ $this->job->save();
+
+ return true;
+ }
+
+ /**
+ * @param array $data
+ * @param array $config
+ *
+ * @return array
+ */
+ private function storeSpecifics(array $data, array $config): array
+ {
// loop specifics.
if (isset($data['specifics']) && is_array($data['specifics'])) {
foreach ($data['specifics'] as $name => $enabled) {
@@ -116,9 +132,7 @@ class Initial implements ConfigurationInterface
}
}
}
- $this->job->configuration = $config;
- $this->job->save();
- return true;
+ return $config;
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/Import/Configuration/Csv/Map.php b/app/Support/Import/Configuration/Csv/Map.php
index f4cb26670b..bac403e94b 100644
--- a/app/Support/Import/Configuration/Csv/Map.php
+++ b/app/Support/Import/Configuration/Csv/Map.php
@@ -266,4 +266,4 @@ class Map implements ConfigurationInterface
return $column;
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/Import/Configuration/Csv/Roles.php b/app/Support/Import/Configuration/Csv/Roles.php
index adb0707beb..445628aeab 100644
--- a/app/Support/Import/Configuration/Csv/Roles.php
+++ b/app/Support/Import/Configuration/Csv/Roles.php
@@ -68,6 +68,18 @@ class Roles implements ConfigurationInterface
return $this->data;
}
+ /**
+ * @param ImportJob $job
+ *
+ * @return ConfigurationInterface
+ */
+ public function setJob(ImportJob $job): ConfigurationInterface
+ {
+ $this->job = $job;
+
+ return $this;
+ }
+
/**
* Store the result.
*
@@ -217,16 +229,20 @@ class Roles implements ConfigurationInterface
*/
private function setRolesComplete(): bool
{
- $config = $this->job->configuration;
- $count = $config['column-count'];
- $assigned = 0;
+ $config = $this->job->configuration;
+ $count = $config['column-count'];
+ $assigned = 0;
+ $hasAmount = false;
for ($i = 0; $i < $count; $i++) {
$role = $config['column-roles'][$i] ?? '_ignore';
if ($role !== '_ignore') {
$assigned++;
}
+ if ($role === 'amount') {
+ $hasAmount = true;
+ }
}
- if ($assigned > 0) {
+ if ($assigned > 0 && $hasAmount) {
$config['column-roles-complete'] = true;
$this->job->configuration = $config;
$this->job->save();
@@ -248,16 +264,4 @@ class Roles implements ConfigurationInterface
return true;
}
-
- /**
- * @param ImportJob $job
- *
- * @return ConfigurationInterface
- */
- public function setJob(ImportJob $job): ConfigurationInterface
- {
- $this->job = $job;
-
- return $this;
- }
-}
\ No newline at end of file
+}
diff --git a/app/Support/Search/Modifier.php b/app/Support/Search/Modifier.php
index 18e94d3aff..4422cf2e56 100644
--- a/app/Support/Search/Modifier.php
+++ b/app/Support/Search/Modifier.php
@@ -208,4 +208,4 @@ class Modifier
return self::stringCompare($journalCategory, $search) || self::stringCompare($transactionCategory, $search);
}
-}
\ No newline at end of file
+}
diff --git a/app/Support/Search/Search.php b/app/Support/Search/Search.php
index ebceaf59f9..490e24708a 100644
--- a/app/Support/Search/Search.php
+++ b/app/Support/Search/Search.php
@@ -53,7 +53,7 @@ class Search implements SearchInterface
public function __construct()
{
$this->modifiers = new Collection;
- $this->validModifiers = (array) config('firefly.search_modifiers');
+ $this->validModifiers = (array)config('firefly.search_modifiers');
}
/**
diff --git a/app/Support/Steam.php b/app/Support/Steam.php
index 32e07f08dc..8a3ca9c885 100644
--- a/app/Support/Steam.php
+++ b/app/Support/Steam.php
@@ -13,7 +13,7 @@ declare(strict_types=1);
namespace FireflyIII\Support;
-use \Amount as GlobalAmount;
+use Amount as GlobalAmount;
use Carbon\Carbon;
use Crypt;
use DB;
diff --git a/app/Support/Twig/AmountFormat.php b/app/Support/Twig/AmountFormat.php
index db267e4401..55e5c28942 100644
--- a/app/Support/Twig/AmountFormat.php
+++ b/app/Support/Twig/AmountFormat.php
@@ -265,4 +265,4 @@ class AmountFormat extends Twig_Extension
);
}
-}
\ No newline at end of file
+}
diff --git a/composer.lock b/composer.lock
index e198cc94d4..1118947c51 100644
--- a/composer.lock
+++ b/composer.lock
@@ -622,16 +622,16 @@
},
{
"name": "erusev/parsedown",
- "version": "1.6.2",
+ "version": "1.6.3",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
- "reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01"
+ "reference": "728952b90a333b5c6f77f06ea9422b94b585878d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/erusev/parsedown/zipball/1bf24f7334fe16c88bf9d467863309ceaf285b01",
- "reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01",
+ "url": "https://api.github.com/repos/erusev/parsedown/zipball/728952b90a333b5c6f77f06ea9422b94b585878d",
+ "reference": "728952b90a333b5c6f77f06ea9422b94b585878d",
"shasum": ""
},
"require": {
@@ -660,7 +660,7 @@
"markdown",
"parser"
],
- "time": "2017-03-29T16:04:15+00:00"
+ "time": "2017-05-14T14:47:48+00:00"
},
{
"name": "laravel/framework",
@@ -1636,16 +1636,16 @@
},
{
"name": "symfony/console",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "70d2a29b2911cbdc91a7e268046c395278238b2e"
+ "reference": "a97e45d98c59510f085fa05225a1acb74dfe0546"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/70d2a29b2911cbdc91a7e268046c395278238b2e",
- "reference": "70d2a29b2911cbdc91a7e268046c395278238b2e",
+ "url": "https://api.github.com/repos/symfony/console/zipball/a97e45d98c59510f085fa05225a1acb74dfe0546",
+ "reference": "a97e45d98c59510f085fa05225a1acb74dfe0546",
"shasum": ""
},
"require": {
@@ -1701,7 +1701,7 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2017-06-02T19:24:58+00:00"
+ "time": "2017-07-03T13:19:36+00:00"
},
{
"name": "symfony/css-selector",
@@ -1758,16 +1758,16 @@
},
{
"name": "symfony/debug",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "e9c50482841ef696e8fa1470d950a79c8921f45d"
+ "reference": "63b85a968486d95ff9542228dc2e4247f16f9743"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/e9c50482841ef696e8fa1470d950a79c8921f45d",
- "reference": "e9c50482841ef696e8fa1470d950a79c8921f45d",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/63b85a968486d95ff9542228dc2e4247f16f9743",
+ "reference": "63b85a968486d95ff9542228dc2e4247f16f9743",
"shasum": ""
},
"require": {
@@ -1810,11 +1810,11 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2017-06-01T21:01:25+00:00"
+ "time": "2017-07-05T13:02:37+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.8.22",
+ "version": "v2.8.24",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
@@ -1874,7 +1874,7 @@
},
{
"name": "symfony/finder",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
@@ -1923,16 +1923,16 @@
},
{
"name": "symfony/http-foundation",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "80eb5a1f968448b77da9e8b2c0827f6e8d767846"
+ "reference": "f347a5f561b03db95ed666959db42bbbf429b7e5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/80eb5a1f968448b77da9e8b2c0827f6e8d767846",
- "reference": "80eb5a1f968448b77da9e8b2c0827f6e8d767846",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/f347a5f561b03db95ed666959db42bbbf429b7e5",
+ "reference": "f347a5f561b03db95ed666959db42bbbf429b7e5",
"shasum": ""
},
"require": {
@@ -1972,7 +1972,7 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
- "time": "2017-06-05T13:06:51+00:00"
+ "time": "2017-06-24T09:29:48+00:00"
},
{
"name": "symfony/http-kernel",
@@ -2228,16 +2228,16 @@
},
{
"name": "symfony/process",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf"
+ "reference": "5ab8949b682b1bf9d4511a228b5e045c96758c30"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/8e30690c67aafb6c7992d6d8eb0d707807dd3eaf",
- "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf",
+ "url": "https://api.github.com/repos/symfony/process/zipball/5ab8949b682b1bf9d4511a228b5e045c96758c30",
+ "reference": "5ab8949b682b1bf9d4511a228b5e045c96758c30",
"shasum": ""
},
"require": {
@@ -2273,20 +2273,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2017-05-22T12:32:03+00:00"
+ "time": "2017-07-03T08:12:02+00:00"
},
{
"name": "symfony/routing",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "39804eeafea5cca851946e1eed122eb94459fdb4"
+ "reference": "dc70bbd0ca7b19259f63cdacc8af370bc32a4728"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/39804eeafea5cca851946e1eed122eb94459fdb4",
- "reference": "39804eeafea5cca851946e1eed122eb94459fdb4",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/dc70bbd0ca7b19259f63cdacc8af370bc32a4728",
+ "reference": "dc70bbd0ca7b19259f63cdacc8af370bc32a4728",
"shasum": ""
},
"require": {
@@ -2351,20 +2351,20 @@
"uri",
"url"
],
- "time": "2017-06-02T09:51:43+00:00"
+ "time": "2017-06-24T09:29:48+00:00"
},
{
"name": "symfony/translation",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543"
+ "reference": "35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/dc3b2a0c6cfff60327ba1c043a82092735397543",
- "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3",
+ "reference": "35dd5fb003c90e8bd4d8cabdf94bf9c96d06fdc3",
"shasum": ""
},
"require": {
@@ -2416,20 +2416,20 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
- "time": "2017-05-22T07:42:36+00:00"
+ "time": "2017-06-24T16:45:30+00:00"
},
{
"name": "symfony/var-dumper",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "347c4247a3e40018810b476fcd5dec36d46d08dc"
+ "reference": "9ee920bba1d2ce877496dcafca7cbffff4dbe08a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/347c4247a3e40018810b476fcd5dec36d46d08dc",
- "reference": "347c4247a3e40018810b476fcd5dec36d46d08dc",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/9ee920bba1d2ce877496dcafca7cbffff4dbe08a",
+ "reference": "9ee920bba1d2ce877496dcafca7cbffff4dbe08a",
"shasum": ""
},
"require": {
@@ -2484,7 +2484,7 @@
"debug",
"dump"
],
- "time": "2017-06-02T09:10:29+00:00"
+ "time": "2017-07-05T13:02:37+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
@@ -3833,16 +3833,16 @@
},
{
"name": "phpunit/phpunit-mock-objects",
- "version": "3.4.3",
+ "version": "3.4.4",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24"
+ "reference": "a23b761686d50a560cc56233b9ecf49597cc9118"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
- "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118",
+ "reference": "a23b761686d50a560cc56233b9ecf49597cc9118",
"shasum": ""
},
"require": {
@@ -3888,7 +3888,7 @@
"mock",
"xunit"
],
- "time": "2016-12-08T20:27:08+00:00"
+ "time": "2017-06-30T09:13:00+00:00"
},
{
"name": "satooshi/php-coveralls",
@@ -4463,7 +4463,7 @@
},
{
"name": "symfony/class-loader",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/class-loader.git",
@@ -4519,16 +4519,16 @@
},
{
"name": "symfony/config",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
- "reference": "35716d4904e0506a7a5a9bcf23f854aeb5719bca"
+ "reference": "a094618deb9a3fe1c3cf500a796e167d0495a274"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/config/zipball/35716d4904e0506a7a5a9bcf23f854aeb5719bca",
- "reference": "35716d4904e0506a7a5a9bcf23f854aeb5719bca",
+ "url": "https://api.github.com/repos/symfony/config/zipball/a094618deb9a3fe1c3cf500a796e167d0495a274",
+ "reference": "a094618deb9a3fe1c3cf500a796e167d0495a274",
"shasum": ""
},
"require": {
@@ -4536,10 +4536,12 @@
"symfony/filesystem": "~2.8|~3.0"
},
"conflict": {
- "symfony/dependency-injection": "<3.3"
+ "symfony/dependency-injection": "<3.3",
+ "symfony/finder": "<3.3"
},
"require-dev": {
"symfony/dependency-injection": "~3.3",
+ "symfony/finder": "~3.3",
"symfony/yaml": "~3.0"
},
"suggest": {
@@ -4575,7 +4577,7 @@
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
- "time": "2017-06-02T18:07:20+00:00"
+ "time": "2017-06-16T12:40:34+00:00"
},
{
"name": "symfony/dom-crawler",
@@ -4635,16 +4637,16 @@
},
{
"name": "symfony/filesystem",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
- "reference": "c709670bf64721202ddbe4162846f250735842c0"
+ "reference": "311fa718389efbd8b627c272b9324a62437018cc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/filesystem/zipball/c709670bf64721202ddbe4162846f250735842c0",
- "reference": "c709670bf64721202ddbe4162846f250735842c0",
+ "url": "https://api.github.com/repos/symfony/filesystem/zipball/311fa718389efbd8b627c272b9324a62437018cc",
+ "reference": "311fa718389efbd8b627c272b9324a62437018cc",
"shasum": ""
},
"require": {
@@ -4680,11 +4682,11 @@
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
- "time": "2017-05-28T14:08:56+00:00"
+ "time": "2017-06-24T09:29:48+00:00"
},
{
"name": "symfony/stopwatch",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
@@ -4733,16 +4735,16 @@
},
{
"name": "symfony/yaml",
- "version": "v3.3.2",
+ "version": "v3.3.4",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063"
+ "reference": "1f93a8d19b8241617f5074a123e282575b821df8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/9752a30000a8ca9f4b34b5227d15d0101b96b063",
- "reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/1f93a8d19b8241617f5074a123e282575b821df8",
+ "reference": "1f93a8d19b8241617f5074a123e282575b821df8",
"shasum": ""
},
"require": {
@@ -4784,7 +4786,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2017-06-02T22:05:06+00:00"
+ "time": "2017-06-15T12:58:50+00:00"
},
{
"name": "webmozart/assert",
diff --git a/config/firefly.php b/config/firefly.php
index 2367710d24..5fffbbf7a8 100644
--- a/config/firefly.php
+++ b/config/firefly.php
@@ -23,7 +23,7 @@ return [
'is_demo_site' => false,
],
'encryption' => (is_null(env('USE_ENCRYPTION')) || env('USE_ENCRYPTION') === true),
- 'version' => '4.6.1',
+ 'version' => '4.6.2',
'maxUploadSize' => 15242880,
'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf'],
'list_length' => 10,
diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php
index 2727d4d86c..c014cb7078 100644
--- a/database/factories/ModelFactory.php
+++ b/database/factories/ModelFactory.php
@@ -244,4 +244,4 @@ $factory->define(
'foreign_currency_symbol' => null,
];
}
-);
\ No newline at end of file
+);
diff --git a/public/browserconfig.xml b/public/browserconfig.xml
index 74bb89ac30..b3930d0f04 100644
--- a/public/browserconfig.xml
+++ b/public/browserconfig.xml
@@ -1,9 +1,9 @@