From fb3230845dab370e9098baaab5f77d02ebeeb6f1 Mon Sep 17 00:00:00 2001 From: Marcin Szymanski Date: Sun, 17 Sep 2017 14:42:29 +0100 Subject: [PATCH 1/6] Enable mod_ssl by default --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1d150bcdf3..a77bb0928c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,9 @@ COPY ./docker/apache2.conf /etc/apache2/apache2.conf # Enable apache mod rewrite.. RUN a2enmod rewrite +# Enable apache mod ssl.. +RUN a2enmod ssl + # Setup the Composer installer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer From 3f93941dd9ea125c32db03017badcb47af61392c Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 17 Sep 2017 19:21:03 +0200 Subject: [PATCH 2/6] Fix #854 --- app/Import/Storage/ImportStorage.php | 2 +- app/Import/Storage/ImportSupport.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Import/Storage/ImportStorage.php b/app/Import/Storage/ImportStorage.php index 75332a6d47..ee3f086790 100644 --- a/app/Import/Storage/ImportStorage.php +++ b/app/Import/Storage/ImportStorage.php @@ -43,7 +43,7 @@ class ImportStorage /** @var Collection */ private $objects; /** @var Collection */ - private $rules; + protected $rules; /** @var array */ private $transfers = []; diff --git a/app/Import/Storage/ImportSupport.php b/app/Import/Storage/ImportSupport.php index fbae32575e..80bb804ec1 100644 --- a/app/Import/Storage/ImportSupport.php +++ b/app/Import/Storage/ImportSupport.php @@ -35,6 +35,11 @@ use Illuminate\Database\Query\JoinClause; use Illuminate\Support\Collection; use Log; +/** + * Trait ImportSupport + * + * @package FireflyIII\Import\Storage + */ trait ImportSupport { /** @var int */ From db9c0600a8dd7e159052c70023595abc6790bb00 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 19 Sep 2017 07:51:16 +0200 Subject: [PATCH 3/6] Update ImportStorage.php Fix for #854 --- app/Import/Storage/ImportStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Import/Storage/ImportStorage.php b/app/Import/Storage/ImportStorage.php index ee3f086790..f0d9e3f9f4 100644 --- a/app/Import/Storage/ImportStorage.php +++ b/app/Import/Storage/ImportStorage.php @@ -39,7 +39,7 @@ class ImportStorage /** @var string */ private $dateFormat = 'Ymd'; // yes, hard coded /** @var ImportJob */ - private $job; + protected $job; /** @var Collection */ private $objects; /** @var Collection */ From e442eb6ce28051947c02d9ff2d3830c7a9ed3321 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 20 Sep 2017 08:31:00 +0200 Subject: [PATCH 4/6] Update Amount.php Fix null pointer #854 --- app/Import/Converter/Amount.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Import/Converter/Amount.php b/app/Import/Converter/Amount.php index 1177b86a2e..bf1f23fdf9 100644 --- a/app/Import/Converter/Amount.php +++ b/app/Import/Converter/Amount.php @@ -36,6 +36,10 @@ class Amount implements ConverterInterface */ public function convert($value): string { + if(is_null($value)) { + return '0'; + } + $value = strval($value); Log::debug(sprintf('Start with amount "%s"', $value)); $len = strlen($value); $decimalPosition = $len - 3; From ec73607974efcb53c186d1af93089e80e6d11ccd Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 20 Sep 2017 08:35:20 +0200 Subject: [PATCH 5/6] Update JournalRepository.php Fix #860 --- app/Repositories/Journal/JournalRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index 58bde274d0..84e964735c 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -196,7 +196,7 @@ class JournalRepository implements JournalRepositoryInterface $journal->save(); // store stuff: - $this->storeCategoryWithJournal($journal, $data['category']); + $this->storeCategoryWithJournal($journal, strval($data['category'])); $this->storeBudgetWithJournal($journal, $data['budget_id']); // store two transactions: @@ -271,7 +271,7 @@ class JournalRepository implements JournalRepositoryInterface $journal->categories()->detach(); $journal->budgets()->detach(); - $this->storeCategoryWithJournal($journal, $data['category']); + $this->storeCategoryWithJournal($journal, strval($data['category'])); $this->storeBudgetWithJournal($journal, $data['budget_id']); // negative because source loses money. From 9c5b6399867efd976fbfbcf078f629cdd0faa2c3 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 21 Sep 2017 06:50:58 +0200 Subject: [PATCH 6/6] New translation strings. --- resources/lang/en_US/firefly.php | 2 +- resources/lang/en_US/form.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 35cf398ba9..c87f957412 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -473,7 +473,7 @@ return [ 'converted_to_Withdrawal' => 'The transaction has been converted to a withdrawal', 'converted_to_Deposit' => 'The transaction has been converted to a deposit', 'converted_to_Transfer' => 'The transaction has been converted to a transfer', - + 'invalid_convert_selection' => 'The account you have selected is already used in this transaction or does not exist.', // create new stuff: 'create_new_withdrawal' => 'Create new withdrawal', diff --git a/resources/lang/en_US/form.php b/resources/lang/en_US/form.php index f4bc60d059..8ca2fd2d9f 100644 --- a/resources/lang/en_US/form.php +++ b/resources/lang/en_US/form.php @@ -186,7 +186,7 @@ return [ 'payment_date' => 'Payment date', 'invoice_date' => 'Invoice date', 'internal_reference' => 'Internal reference', - - 'inward' => 'Inward description', - 'outward' => 'Outward description', + 'inward' => 'Inward description', + 'outward' => 'Outward description', + 'rule_group_id' => 'Rule group', ];