From 8cdbc96aa5346452f3c074d93df35ff21c9aeaea Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 18:55:56 +0100 Subject: [PATCH 001/110] Add BIC support. This fixes #430 --- app/Http/Controllers/AccountController.php | 1 + app/Http/Requests/AccountFormRequest.php | 4 +++- .../Account/AccountRepository.php | 6 ++--- .../Account/AccountRepositoryInterface.php | 2 +- app/Validation/FireflyValidator.php | 23 +++++++++++++++++-- resources/lang/en_US/form.php | 1 + resources/lang/en_US/validation.php | 1 + resources/views/accounts/create.twig | 1 + resources/views/accounts/edit.twig | 1 + 9 files changed, 33 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index e750801963..e129fc9128 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -171,6 +171,7 @@ class AccountController extends Controller 'accountRole' => $account->getMeta('accountRole'), 'ccType' => $account->getMeta('ccType'), 'ccMonthlyPaymentDate' => $account->getMeta('ccMonthlyPaymentDate'), + 'BIC' => $account->getMeta('BIC'), 'openingBalanceDate' => $openingBalanceDate, 'openingBalance' => $openingBalanceAmount, 'virtualBalance' => $account->virtual_balance, diff --git a/app/Http/Requests/AccountFormRequest.php b/app/Http/Requests/AccountFormRequest.php index 95cf746044..faac1971d8 100644 --- a/app/Http/Requests/AccountFormRequest.php +++ b/app/Http/Requests/AccountFormRequest.php @@ -42,10 +42,11 @@ class AccountFormRequest extends Request 'name' => trim($this->input('name')), 'active' => intval($this->input('active')) === 1, 'accountType' => $this->input('what'), - 'currency_id' => intval($this->input('currency_id')), + 'currency_id' => intval($this->input('currency_id')), 'virtualBalance' => round($this->input('virtualBalance'), 2), 'virtualBalanceCurrency' => intval($this->input('amount_currency_id_virtualBalance')), 'iban' => trim($this->input('iban')), + 'BIC' => trim($this->input('BIC')), 'accountNumber' => trim($this->input('accountNumber')), 'accountRole' => $this->input('accountRole'), 'openingBalance' => round($this->input('openingBalance'), 2), @@ -79,6 +80,7 @@ class AccountFormRequest extends Request 'name' => $nameRule, 'openingBalance' => 'numeric', 'iban' => 'iban', + 'BIC' => 'bic', 'virtualBalance' => 'numeric', 'openingBalanceDate' => 'date', 'currency_id' => 'exists:transaction_currencies,id', diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index aeb1535a31..65f21055b2 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -41,7 +41,7 @@ class AccountRepository implements AccountRepositoryInterface /** @var User */ private $user; /** @var array */ - private $validFields = ['accountRole', 'ccMonthlyPaymentDate', 'ccType', 'accountNumber','currency_id']; + private $validFields = ['accountRole', 'ccMonthlyPaymentDate', 'ccType', 'accountNumber', 'currency_id', 'BIC']; /** * AttachmentRepository constructor. @@ -60,7 +60,7 @@ class AccountRepository implements AccountRepositoryInterface * * @return int */ - public function count(array $types):int + public function count(array $types): int { $count = $this->user->accounts()->accountTypeIn($types)->count(); @@ -482,7 +482,7 @@ class AccountRepository implements AccountRepositoryInterface * * @return Account */ - protected function storeOpposingAccount(float $amount, string $name):Account + protected function storeOpposingAccount(float $amount, string $name): Account { $type = $amount < 0 ? 'expense' : 'revenue'; $opposingData = [ diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index d306e433de..6aca02047e 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -119,6 +119,6 @@ interface AccountRepositoryInterface * * @return Account */ - public function store(array $data) : Account; + public function store(array $data): Account; } diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php index 8a272dd397..d20fb5dc5f 100644 --- a/app/Validation/FireflyValidator.php +++ b/app/Validation/FireflyValidator.php @@ -57,8 +57,6 @@ class FireflyValidator extends Validator * @param $value * * @return bool - * @internal param $parameters - * * */ public function validate2faCode($attribute, $value): bool @@ -95,6 +93,27 @@ class FireflyValidator extends Validator } + /** + * @param $attribute + * @param $value + * + * @return bool + * + */ + public function validateBic($attribute, $value): bool + { + $regex = '/^[a-z]{6}[0-9a-z]{2}([0-9a-z]{3})?\z/i'; + $result = preg_match($regex, $value); + if ($result === false) { + return false; + } + if ($result === 0) { + return false; + } + + return true; + } + /** * @param $attribute * @param $value diff --git a/resources/lang/en_US/form.php b/resources/lang/en_US/form.php index 5418b22d8b..a417f504a9 100644 --- a/resources/lang/en_US/form.php +++ b/resources/lang/en_US/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => 'Asset account (source)', 'journal_source_account_name' => 'Revenue account (source)', 'journal_source_account_id' => 'Asset account (source)', + 'BIC' => 'BIC', 'account_from_id' => 'From account', 'account_to_id' => 'To account', 'source_account' => 'Source account', diff --git a/resources/lang/en_US/validation.php b/resources/lang/en_US/validation.php index 030e6a72c5..fd25fbd685 100644 --- a/resources/lang/en_US/validation.php +++ b/resources/lang/en_US/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'File ":name" is too large.', 'belongs_to_user' => 'The value of :attribute is unknown', 'accepted' => 'The :attribute must be accepted.', + 'bic' => 'This is not a valid BIC.', 'active_url' => 'The :attribute is not a valid URL.', 'after' => 'The :attribute must be a date after :date.', 'alpha' => 'The :attribute may only contain letters.', diff --git a/resources/views/accounts/create.twig b/resources/views/accounts/create.twig index f4f560fd5b..e1ccc79fd7 100644 --- a/resources/views/accounts/create.twig +++ b/resources/views/accounts/create.twig @@ -34,6 +34,7 @@
{{ ExpandedForm.text('iban') }} + {{ ExpandedForm.text('BIC', null, {maxlength: 11}) }} {{ ExpandedForm.text('accountNumber') }} {% if what == 'asset' %} diff --git a/resources/views/accounts/edit.twig b/resources/views/accounts/edit.twig index 4ebee7dc6e..d849fa50d4 100644 --- a/resources/views/accounts/edit.twig +++ b/resources/views/accounts/edit.twig @@ -32,6 +32,7 @@
{{ ExpandedForm.text('iban') }} + {{ ExpandedForm.text('BIC', null, {maxlength: 11}) }} {{ ExpandedForm.text('accountNumber') }} {% if account.accounttype.type == 'Default account' or account.accounttype.type == 'Asset account' %} From 2e6ad0ce5d444c8c757c7d2d9b14cc34055b2373 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:01:48 +0100 Subject: [PATCH 002/110] New translations --- resources/lang/pt_BR/form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/pt_BR/form.php b/resources/lang/pt_BR/form.php index 591903e4ba..71c8c5ab2f 100644 --- a/resources/lang/pt_BR/form.php +++ b/resources/lang/pt_BR/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => 'Conta de ativo (fonte)', 'journal_source_account_name' => 'Conta de receita (fonte)', 'journal_source_account_id' => 'Conta de ativo (fonte)', + 'BIC' => 'BIC', 'account_from_id' => 'da conta', 'account_to_id' => 'para conta', 'source_account' => 'Source account', From b14a15ce49758375b974425a6d10d40ae75e4774 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:01:50 +0100 Subject: [PATCH 003/110] New translations --- resources/lang/pt_BR/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/pt_BR/validation.php b/resources/lang/pt_BR/validation.php index 97aebcc28b..da9b901c78 100644 --- a/resources/lang/pt_BR/validation.php +++ b/resources/lang/pt_BR/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'Arquivo ":name" é muito grande.', 'belongs_to_user' => 'O valor de :attribute é desconhecido', 'accepted' => 'O campo :attribute deve ser aceito.', + 'bic' => 'This is not a valid BIC.', 'active_url' => 'O campo :attribute não contém um URL válido.', 'after' => 'O campo :attribute deverá conter uma data posterior a :date.', 'alpha' => 'O campo :attribute deverá conter apenas letras.', From 7afd8f99cb3b00498941934fa7ebfc26507577a3 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:01:53 +0100 Subject: [PATCH 004/110] Translated --- resources/lang/de_DE/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/de_DE/validation.php b/resources/lang/de_DE/validation.php index f67ac3cbd7..4f939859ba 100644 --- a/resources/lang/de_DE/validation.php +++ b/resources/lang/de_DE/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'Die Datei ":name" ist zu groß.', 'belongs_to_user' => 'Der Wert von :attribute ist nicht bekannt', 'accepted' => ':attribute muss akzeptiert werden.', + 'bic' => 'This is not a valid BIC.', 'active_url' => ':attribute ist keine gültige URL.', 'after' => ':attribute muss ein Datum nach :date sein.', 'alpha' => ':attribute darf nur Buchstaben enthalten.', From 807947fcd8dedf2410d7fabfe456bd2ac2944fcf Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:01:58 +0100 Subject: [PATCH 005/110] Approved. Step name: Proofread --- resources/lang/nl_NL/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/nl_NL/validation.php b/resources/lang/nl_NL/validation.php index 813d2c6ca4..cce07d3a76 100644 --- a/resources/lang/nl_NL/validation.php +++ b/resources/lang/nl_NL/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'Bestand ":name" is te groot.', 'belongs_to_user' => 'De waarde van :attribute is onbekend', 'accepted' => ':attribute moet geaccepteerd zijn.', + 'bic' => 'This is not a valid BIC.', 'active_url' => ':attribute is geen geldige URL.', 'after' => ':attribute moet een datum na :date zijn.', 'alpha' => ':attribute mag alleen letters bevatten.', From 1112a0761ff8277a9df94a7f47785624f38c17df Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:02:04 +0100 Subject: [PATCH 006/110] Approved. Step name: Proofread --- resources/lang/nl_NL/form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/nl_NL/form.php b/resources/lang/nl_NL/form.php index 6898005c12..f2ec1de019 100644 --- a/resources/lang/nl_NL/form.php +++ b/resources/lang/nl_NL/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => 'Betaalrekening (bron)', 'journal_source_account_name' => 'Debiteur (bron)', 'journal_source_account_id' => 'Betaalrekening (bron)', + 'BIC' => 'BIC', 'account_from_id' => 'Van account', 'account_to_id' => 'Naar account', 'source_account' => 'Bronrekening', From 6b1884a9e0aaa99478818d54a50a3503f2e5ab1d Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:02:10 +0100 Subject: [PATCH 007/110] New translations --- resources/lang/zh_HK/form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/zh_HK/form.php b/resources/lang/zh_HK/form.php index 914cc98944..9e644c52f6 100644 --- a/resources/lang/zh_HK/form.php +++ b/resources/lang/zh_HK/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => 'Asset account (source)', 'journal_source_account_name' => 'Revenue account (source)', 'journal_source_account_id' => 'Asset account (source)', + 'BIC' => 'BIC', 'account_from_id' => 'From account', 'account_to_id' => 'To account', 'source_account' => 'Source account', From 11007f0476ae7d95c75a95146fc5246789e9dc2f Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:02:13 +0100 Subject: [PATCH 008/110] New translations --- resources/lang/zh_HK/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/zh_HK/validation.php b/resources/lang/zh_HK/validation.php index b7dfc41906..39d9ae5ed9 100644 --- a/resources/lang/zh_HK/validation.php +++ b/resources/lang/zh_HK/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'File ":name" is too large.', 'belongs_to_user' => 'The value of :attribute is unknown', 'accepted' => 'The :attribute must be accepted.', + 'bic' => 'This is not a valid BIC.', 'active_url' => 'The :attribute is not a valid URL.', 'after' => 'The :attribute must be a date after :date.', 'alpha' => 'The :attribute may only contain letters.', From ab7803f21046a2eee4f53359cee6dd37706635f2 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:02:18 +0100 Subject: [PATCH 009/110] New translations --- resources/lang/zh_TW/form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/zh_TW/form.php b/resources/lang/zh_TW/form.php index bea7ff864f..7c3b46d8db 100644 --- a/resources/lang/zh_TW/form.php +++ b/resources/lang/zh_TW/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => '資產帳戶 (源頭)', 'journal_source_account_name' => '收入帳戶 (源頭)', 'journal_source_account_id' => '資產帳戶 (源頭)', + 'BIC' => 'BIC', 'account_from_id' => '從帳戶', 'account_to_id' => '到帳戶', 'source_account' => '來源帳戶', From d4d812c1955c712ec80132580f8b9e34017d0cbb Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:02:23 +0100 Subject: [PATCH 010/110] New translations --- resources/lang/zh_TW/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/zh_TW/validation.php b/resources/lang/zh_TW/validation.php index 29b136f7a7..dbf37d12b2 100644 --- a/resources/lang/zh_TW/validation.php +++ b/resources/lang/zh_TW/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => '檔案 ":name" 過大。', 'belongs_to_user' => ':attribute 的值是未知的。', 'accepted' => ':attribute 必須被接受。', + 'bic' => 'This is not a valid BIC.', 'active_url' => ':attribute 不是有效的URL。', 'after' => ':attribute 必須是一個在 :date 之後的日期。', 'alpha' => ':attribute 只允許包含字母。', From 1c61afca07c01c4ee6ca9f259ea6fa11f3a24d83 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:02:27 +0100 Subject: [PATCH 011/110] New translations --- resources/lang/fr_FR/form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/fr_FR/form.php b/resources/lang/fr_FR/form.php index 979a26a180..b0d37f901b 100644 --- a/resources/lang/fr_FR/form.php +++ b/resources/lang/fr_FR/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => 'Compte d’actif (source)', 'journal_source_account_name' => 'Compte de recettes (source)', 'journal_source_account_id' => 'Compte d’actif (source)', + 'BIC' => 'BIC', 'account_from_id' => 'Compte d\'origine', 'account_to_id' => 'Compte de destination', 'source_account' => 'Source account', From 1b7b6a676d6c5a001ec43d94ce750a27217327bd Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:02:34 +0100 Subject: [PATCH 012/110] New translations --- resources/lang/de_DE/form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/de_DE/form.php b/resources/lang/de_DE/form.php index de51dbcb88..133d3c562c 100644 --- a/resources/lang/de_DE/form.php +++ b/resources/lang/de_DE/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => 'Girokonto (Quelle)', 'journal_source_account_name' => 'Kreditor (Quelle)', 'journal_source_account_id' => 'Girokonto (Quelle)', + 'BIC' => 'BIC', 'account_from_id' => 'Vom Konto', 'account_to_id' => 'Auf Konto', 'source_account' => 'Quellkonto', From cd80d82ad495c5ee9c4628e52389b1c8b9a2edac Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:02:37 +0100 Subject: [PATCH 013/110] New translations --- resources/lang/fr_FR/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/fr_FR/validation.php b/resources/lang/fr_FR/validation.php index e7b21f8947..9a671c5a01 100644 --- a/resources/lang/fr_FR/validation.php +++ b/resources/lang/fr_FR/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'Le fichier ":name" est trop grand.', 'belongs_to_user' => 'La valeur de :attribute est inconnue', 'accepted' => 'Le champ :attribute doit être accepté.', + 'bic' => 'This is not a valid BIC.', 'active_url' => 'Le champ :attribute n\'est pas une URL valide.', 'after' => 'Le champ :attribute doit être une date postérieure à :date.', 'alpha' => 'Le champ :attribute doit seulement contenir des lettres.', From 92bf9c92147bb65e390fd3e25169070dbce73165 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:02:40 +0100 Subject: [PATCH 014/110] New translations --- resources/lang/hr_HR/form.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/hr_HR/form.php b/resources/lang/hr_HR/form.php index 914cc98944..9e644c52f6 100644 --- a/resources/lang/hr_HR/form.php +++ b/resources/lang/hr_HR/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => 'Asset account (source)', 'journal_source_account_name' => 'Revenue account (source)', 'journal_source_account_id' => 'Asset account (source)', + 'BIC' => 'BIC', 'account_from_id' => 'From account', 'account_to_id' => 'To account', 'source_account' => 'Source account', From 4743cc40a2b6430cf7c626dbdcc0670bd3a9e93c Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:02:46 +0100 Subject: [PATCH 015/110] New translations --- resources/lang/hr_HR/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/hr_HR/validation.php b/resources/lang/hr_HR/validation.php index b7dfc41906..39d9ae5ed9 100644 --- a/resources/lang/hr_HR/validation.php +++ b/resources/lang/hr_HR/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'File ":name" is too large.', 'belongs_to_user' => 'The value of :attribute is unknown', 'accepted' => 'The :attribute must be accepted.', + 'bic' => 'This is not a valid BIC.', 'active_url' => 'The :attribute is not a valid URL.', 'after' => 'The :attribute must be a date after :date.', 'alpha' => 'The :attribute may only contain letters.', From 253466c5332ce7de54d5aa24724d80a60144d320 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:41:15 +0100 Subject: [PATCH 016/110] Translated --- resources/lang/de_DE/validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/de_DE/validation.php b/resources/lang/de_DE/validation.php index 4f939859ba..aa045fd645 100644 --- a/resources/lang/de_DE/validation.php +++ b/resources/lang/de_DE/validation.php @@ -21,7 +21,7 @@ return [ 'file_too_large' => 'Die Datei ":name" ist zu groß.', 'belongs_to_user' => 'Der Wert von :attribute ist nicht bekannt', 'accepted' => ':attribute muss akzeptiert werden.', - 'bic' => 'This is not a valid BIC.', + 'bic' => 'Dies ist kein gültiger BIC.', 'active_url' => ':attribute ist keine gültige URL.', 'after' => ':attribute muss ein Datum nach :date sein.', 'alpha' => ':attribute darf nur Buchstaben enthalten.', From addebad8105b75383d9d1eed599ca858b1c8943b Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:41:17 +0100 Subject: [PATCH 017/110] Approved. Step name: Proofread --- resources/lang/nl_NL/validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/nl_NL/validation.php b/resources/lang/nl_NL/validation.php index cce07d3a76..902c6ccf2f 100644 --- a/resources/lang/nl_NL/validation.php +++ b/resources/lang/nl_NL/validation.php @@ -21,7 +21,7 @@ return [ 'file_too_large' => 'Bestand ":name" is te groot.', 'belongs_to_user' => 'De waarde van :attribute is onbekend', 'accepted' => ':attribute moet geaccepteerd zijn.', - 'bic' => 'This is not a valid BIC.', + 'bic' => 'Dit is geen geldige BIC.', 'active_url' => ':attribute is geen geldige URL.', 'after' => ':attribute moet een datum na :date zijn.', 'alpha' => ':attribute mag alleen letters bevatten.', From f0fd5324eab7a62c76a40e7fb4121764d1c7df30 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:45:36 +0100 Subject: [PATCH 018/110] Fixes #417 --- app/Http/Controllers/ReportController.php | 6 ++++++ resources/lang/en_US/firefly.php | 1 + 2 files changed, 7 insertions(+) diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 4326b8c2af..71089f6b81 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -227,6 +227,12 @@ class ReportController extends Controller return redirect(route('reports.index')); } + if ($request->getCategoryList()->count() === 0 && $reportType === 'category') { + Session::flash('error', trans('firefly.select_more_than_one_category')); + + return redirect(route('reports.index')); + } + if ($end < $start) { return view('error')->with('message', trans('firefly.end_after_start_date')); } diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index f40af9d8d3..47f30e970e 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'New category', From 70473b76355296546dc135c6f25ce5d66b474bef Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:51:40 +0100 Subject: [PATCH 019/110] New translations --- resources/lang/pt_BR/firefly.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.php index 1237122e05..92ae96e895 100644 --- a/resources/lang/pt_BR/firefly.php +++ b/resources/lang/pt_BR/firefly.php @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'Nova categoria', From b2b4732657dab23410f8a114446787c19c27c542 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:51:57 +0100 Subject: [PATCH 020/110] Approved. Step name: Proofread --- resources/lang/nl_NL/firefly.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.php index 377b866e0d..cfd80a7699 100644 --- a/resources/lang/nl_NL/firefly.php +++ b/resources/lang/nl_NL/firefly.php @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'Betaalrekening ":name" heeft geen geen transacties (in deze periode).', 'no_data_for_chart' => 'Er is (nog) niet genoeg informatie om deze grafiek te tekenen.', 'select_more_than_one_account' => 'Selecteer meer dan één rekening', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'Nieuwe categorie', From 7eaf8e3eebe08e447cada534e7313fd0a3443528 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:52:11 +0100 Subject: [PATCH 021/110] New translations --- resources/lang/zh_HK/firefly.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/zh_HK/firefly.php b/resources/lang/zh_HK/firefly.php index 4dad596d1f..96d876df40 100644 --- a/resources/lang/zh_HK/firefly.php +++ b/resources/lang/zh_HK/firefly.php @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'New category', From 03bc74cae960396f178e1f964c5404551abea948 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:52:16 +0100 Subject: [PATCH 022/110] New translations --- resources/lang/zh_TW/firefly.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/zh_TW/firefly.php b/resources/lang/zh_TW/firefly.php index 0084a811db..111ff06b35 100644 --- a/resources/lang/zh_TW/firefly.php +++ b/resources/lang/zh_TW/firefly.php @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'New category', From f72aba69393af504bde171ec2b19509f6680b0c2 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:52:24 +0100 Subject: [PATCH 023/110] New translations --- resources/lang/fr_FR/firefly.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/fr_FR/firefly.php b/resources/lang/fr_FR/firefly.php index 84455320f0..a9eef1e64d 100644 --- a/resources/lang/fr_FR/firefly.php +++ b/resources/lang/fr_FR/firefly.php @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'Nouvelle catégorie', From 560fc8b01c438713956a65c51e3e47dad44ad628 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:52:30 +0100 Subject: [PATCH 024/110] New translations --- resources/lang/de_DE/firefly.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/resources/lang/de_DE/firefly.php b/resources/lang/de_DE/firefly.php index 92cdaa539c..c1997f2fb1 100644 --- a/resources/lang/de_DE/firefly.php +++ b/resources/lang/de_DE/firefly.php @@ -76,9 +76,9 @@ return [ 'tagbalancingAct' => 'Balancing act', 'tagadvancePayment' => 'Advance payment', 'tagnothing' => '', - 'Default asset account' => 'Default asset account', + 'Default asset account' => 'Standard-Anlagekonto', 'no_budget_pointer' => 'Sie scheinen keine Budgets festgelegt zu haben. Sie sollten welche auf der Budget-Seite erstellen. Budgets können Ihnen helfen ihre Ausgaben zu verfolgen.', - 'Savings account' => 'Savings account', + 'Savings account' => 'Sparkonto', 'Credit card' => 'Kreditkarte', 'source_accounts' => 'Herkunftskonto', 'destination_accounts' => 'Zielkonto', @@ -87,9 +87,9 @@ return [ 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', - 'expenses_by_category' => 'Expenses by category', + 'expenses_by_category' => 'Ausgaben nach Kategorie', 'expenses_by_budget' => 'Expenses by budget', - 'income_by_category' => 'Income by category', + 'income_by_category' => 'Einkommen nach Kategorie', 'cannot_redirect_to_account' => 'Firefly III cannot redirect you to the correct page. Apologies.', // repeat frequencies: 'repeat_freq_yearly' => 'Jährlich', @@ -243,7 +243,7 @@ return [ 'rule_action_clear_budget' => 'Clear budget', 'rule_action_add_tag' => 'Add tag ":action_value"', 'rule_action_remove_tag' => 'Remove tag ":action_value"', - 'rule_action_remove_all_tags' => 'Remove all tags', + 'rule_action_remove_all_tags' => 'Alle Tags entfernen', 'rule_action_set_description' => 'Set description to ":action_value"', 'rule_action_append_description' => 'Append description with ":action_value"', 'rule_action_prepend_description' => 'Prepend description with ":action_value"', @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'Neue Kategorie', From dd9ce3e06d1dd726d6182ca8577b6b2396b667d6 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 19:52:36 +0100 Subject: [PATCH 025/110] New translations --- resources/lang/hr_HR/firefly.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/hr_HR/firefly.php b/resources/lang/hr_HR/firefly.php index 4dad596d1f..96d876df40 100644 --- a/resources/lang/hr_HR/firefly.php +++ b/resources/lang/hr_HR/firefly.php @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'New category', From 3097ab84fa8c21c3fdf6117b4f513526ba1d37af Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 20:31:24 +0100 Subject: [PATCH 026/110] Approved. Step name: Proofread --- resources/lang/nl_NL/firefly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.php index cfd80a7699..92134a0c73 100644 --- a/resources/lang/nl_NL/firefly.php +++ b/resources/lang/nl_NL/firefly.php @@ -524,7 +524,7 @@ return [ 'no_transactions_account' => 'Betaalrekening ":name" heeft geen geen transacties (in deze periode).', 'no_data_for_chart' => 'Er is (nog) niet genoeg informatie om deze grafiek te tekenen.', 'select_more_than_one_account' => 'Selecteer meer dan één rekening', - 'select_more_than_one_category' => 'Please select more than one category', + 'select_more_than_one_category' => 'Selecteer meer dan één categorie', // categories: 'new_category' => 'Nieuwe categorie', From a6a2c0c18239b9157f36f554e7eab9199ee8d13f Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 20:35:12 +0100 Subject: [PATCH 027/110] Remove unused language files. --- resources/lang/zh-HK/auth.php | 28 - resources/lang/zh-HK/breadcrumbs.php | 41 -- resources/lang/zh-HK/config.php | 23 - resources/lang/zh-HK/csv.php | 81 --- resources/lang/zh-HK/firefly.php | 833 --------------------------- resources/lang/zh-HK/form.php | 157 ----- resources/lang/zh-HK/help.php | 33 -- resources/lang/zh-HK/list.php | 88 --- resources/lang/zh-HK/pagination.php | 17 - resources/lang/zh-HK/passwords.php | 19 - resources/lang/zh-HK/validation.php | 87 --- resources/lang/zh-TW/auth.php | 28 - resources/lang/zh-TW/breadcrumbs.php | 41 -- resources/lang/zh-TW/config.php | 23 - resources/lang/zh-TW/csv.php | 81 --- resources/lang/zh-TW/firefly.php | 833 --------------------------- resources/lang/zh-TW/form.php | 157 ----- resources/lang/zh-TW/help.php | 33 -- resources/lang/zh-TW/list.php | 88 --- resources/lang/zh-TW/pagination.php | 17 - resources/lang/zh-TW/passwords.php | 19 - resources/lang/zh-TW/validation.php | 87 --- 22 files changed, 2814 deletions(-) delete mode 100644 resources/lang/zh-HK/auth.php delete mode 100644 resources/lang/zh-HK/breadcrumbs.php delete mode 100644 resources/lang/zh-HK/config.php delete mode 100644 resources/lang/zh-HK/csv.php delete mode 100644 resources/lang/zh-HK/firefly.php delete mode 100644 resources/lang/zh-HK/form.php delete mode 100644 resources/lang/zh-HK/help.php delete mode 100644 resources/lang/zh-HK/list.php delete mode 100644 resources/lang/zh-HK/pagination.php delete mode 100644 resources/lang/zh-HK/passwords.php delete mode 100644 resources/lang/zh-HK/validation.php delete mode 100644 resources/lang/zh-TW/auth.php delete mode 100644 resources/lang/zh-TW/breadcrumbs.php delete mode 100644 resources/lang/zh-TW/config.php delete mode 100644 resources/lang/zh-TW/csv.php delete mode 100644 resources/lang/zh-TW/firefly.php delete mode 100644 resources/lang/zh-TW/form.php delete mode 100644 resources/lang/zh-TW/help.php delete mode 100644 resources/lang/zh-TW/list.php delete mode 100644 resources/lang/zh-TW/pagination.php delete mode 100644 resources/lang/zh-TW/passwords.php delete mode 100644 resources/lang/zh-TW/validation.php diff --git a/resources/lang/zh-HK/auth.php b/resources/lang/zh-HK/auth.php deleted file mode 100644 index 7319a9d7b8..0000000000 --- a/resources/lang/zh-HK/auth.php +++ /dev/null @@ -1,28 +0,0 @@ - 'These credentials do not match our records.', - 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', - -]; diff --git a/resources/lang/zh-HK/breadcrumbs.php b/resources/lang/zh-HK/breadcrumbs.php deleted file mode 100644 index 54cb260179..0000000000 --- a/resources/lang/zh-HK/breadcrumbs.php +++ /dev/null @@ -1,41 +0,0 @@ - 'Home', - 'edit_currency' => 'Edit currency ":name"', - 'delete_currency' => 'Delete currency ":name"', - 'newPiggyBank' => 'Create a new piggy bank', - 'edit_piggyBank' => 'Edit piggy bank ":name"', - 'preferences' => 'Preferences', - 'profile' => 'Profile', - 'changePassword' => 'Change your password', - 'bills' => 'Bills', - 'newBill' => 'New bill', - 'edit_bill' => 'Edit bill ":name"', - 'delete_bill' => 'Delete bill ":name"', - 'reports' => 'Reports', - 'searchResult' => 'Search for ":query"', - 'withdrawal_list' => 'Expenses', - 'deposit_list' => 'Revenue, income and deposits', - 'transfer_list' => 'Transfers', - 'transfers_list' => 'Transfers', - 'create_withdrawal' => 'Create new withdrawal', - 'create_deposit' => 'Create new deposit', - 'create_transfer' => 'Create new transfer', - 'edit_journal' => 'Edit transaction ":description"', - 'delete_journal' => 'Delete transaction ":description"', - 'tags' => 'Tags', - 'createTag' => 'Create new tag', - 'edit_tag' => 'Edit tag ":tag"', - 'delete_tag' => 'Delete tag ":tag"', -]; diff --git a/resources/lang/zh-HK/config.php b/resources/lang/zh-HK/config.php deleted file mode 100644 index 0c23d3f6cd..0000000000 --- a/resources/lang/zh-HK/config.php +++ /dev/null @@ -1,23 +0,0 @@ - 'en, English, en_US, en_US.utf8', - 'month' => '%B %Y', - 'month_and_day' => '%B %e, %Y', - 'date_time' => '%B %e, %Y, @ %T', - 'specific_day' => '%e %B %Y', - 'week_in_year' => 'Week %W, %Y', - 'quarter_of_year' => '%B %Y', - 'year' => '%Y', - 'half_year' => '%B %Y', - -]; diff --git a/resources/lang/zh-HK/csv.php b/resources/lang/zh-HK/csv.php deleted file mode 100644 index fe83034aa2..0000000000 --- a/resources/lang/zh-HK/csv.php +++ /dev/null @@ -1,81 +0,0 @@ - 'Configure your import', - 'import_configure_intro' => 'There are some options for your CSV import. Please indicate if your CSV file contains headers on the first column, and what the date format of your date-fields is. That might require some experimentation. The field delimiter is usually a ",", but could also be a ";". Check this carefully.', - 'import_configure_form' => 'Form', - 'header_help' => 'Check this if the first row of your CSV file are the column titles', - 'date_help' => 'Date time format in your CSV. Follow the format like this page indicates. The default value will parse dates that look like this: :dateExample.', - 'delimiter_help' => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', - 'import_account_help' => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which account the transactions in the CSV belong to.', - 'upload_not_writeable' => 'The grey box contains a file path. It should be writeable. Please make sure it is.', - - // roles - 'column_roles_title' => 'Define column roles', - 'column_roles_text' => '

Firefly III cannot guess what data each column contains. You must tell Firefly which kinds of data to expect. The example data can guide you into picking the correct type from the dropdown. If a column cannot be matched to a useful data type, please let me know by creating an issue.

Some values in your CSV file, such as account names or categories, may already exist in your Firefly III database. If you select "map these values" Firefly will not attempt to search for matching values itself but allow you to match the CSV values against the values in your database. This allows you to fine-tune the import.

', - 'column_roles_table' => 'Table', - 'column_name' => 'Name of column', - 'column_example' => 'Column example data', - 'column_role' => 'Column data meaning', - 'do_map_value' => 'Map these values', - 'column' => 'Column', - 'no_example_data' => 'No example data available', - 'store_column_roles' => 'Continue import', - 'do_not_map' => '(do not map)', - 'map_title' => 'Connect import data to Firefly III data', - 'map_text' => 'In the following tables, the left value shows you information found in your uploaded CSV file. It is your task to map this value, if possible, to a value already present in your database. Firefly will stick to this mapping. If there is no value to map to, or you do not wish to map the specific value, select nothing.', - - 'field_value' => 'Field value', - 'field_mapped_to' => 'Mapped to', - 'store_column_mapping' => 'Store mapping', - - // map things. - - - 'column__ignore' => '(ignore this column)', - 'column_account-iban' => 'Asset account (IBAN)', - 'column_account-id' => 'Asset account ID (matching Firefly)', - 'column_account-name' => 'Asset account (name)', - 'column_amount' => 'Amount', - 'column_amount-comma-separated' => 'Amount (comma as decimal separator)', - 'column_bill-id' => 'Bill ID (matching Firefly)', - 'column_bill-name' => 'Bill name', - 'column_budget-id' => 'Budget ID (matching Firefly)', - 'column_budget-name' => 'Budget name', - 'column_category-id' => 'Category ID (matching Firefly)', - 'column_category-name' => 'Category name', - 'column_currency-code' => 'Currency code (ISO 4217)', - 'column_currency-id' => 'Currency ID (matching Firefly)', - 'column_currency-name' => 'Currency name (matching Firefly)', - 'column_currency-symbol' => 'Currency symbol (matching Firefly)', - 'column_date-interest' => 'Interest calculation date', - 'column_date-book' => 'Transaction booking date', - 'column_date-process' => 'Transaction process date', - 'column_date-transaction' => 'Date', - 'column_description' => 'Description', - 'column_opposing-iban' => 'Opposing account (IBAN)', - 'column_opposing-id' => 'Opposing account ID (matching Firefly)', - 'column_external-id' => 'External ID', - 'column_opposing-name' => 'Opposing account (name)', - 'column_rabo-debet-credit' => 'Rabobank specific debet/credit indicator', - 'column_ing-debet-credit' => 'ING specific debet/credit indicator', - 'column_sepa-ct-id' => 'SEPA Credit Transfer end-to-end ID', - 'column_sepa-ct-op' => 'SEPA Credit Transfer opposing account', - 'column_sepa-db' => 'SEPA Direct Debet', - 'column_tags-comma' => 'Tags (comma separated)', - 'column_tags-space' => 'Tags (space separated)', - 'column_account-number' => 'Asset account (account number)', - 'column_opposing-number' => 'Opposing account (account number)', -]; diff --git a/resources/lang/zh-HK/firefly.php b/resources/lang/zh-HK/firefly.php deleted file mode 100644 index 768413e3fd..0000000000 --- a/resources/lang/zh-HK/firefly.php +++ /dev/null @@ -1,833 +0,0 @@ - 'incomplete translation', - 'close' => 'Close', - 'actions' => 'Actions', - 'edit' => 'Edit', - 'delete' => 'Delete', - 'welcomeBack' => 'What\'s playing?', - 'everything' => 'Everything', - 'customRange' => 'Custom range', - 'apply' => 'Apply', - 'cancel' => 'Cancel', - 'from' => 'From', - 'to' => 'To', - 'showEverything' => 'Show everything', - 'never' => 'Never', - 'search_results_for' => 'Search results for ":query"', - 'bounced_error' => 'The message sent to :email bounced, so no access for you.', - 'deleted_error' => 'These credentials do not match our records.', - 'general_blocked_error' => 'Your account has been disabled, so you cannot login.', - 'expired_error' => 'Your account has expired, and can no longer be used.', - 'removed_amount' => 'Removed :amount', - 'added_amount' => 'Added :amount', - 'asset_account_role_help' => 'Any extra options resulting from your choice can be set later.', - 'Opening balance' => 'Opening balance', - 'create_new_stuff' => 'Create new stuff', - 'new_withdrawal' => 'New withdrawal', - 'new_deposit' => 'New deposit', - 'new_transfer' => 'New transfer', - 'new_asset_account' => 'New asset account', - 'new_expense_account' => 'New expense account', - 'new_revenue_account' => 'New revenue account', - 'new_budget' => 'New budget', - 'new_bill' => 'New bill', - 'block_account_logout' => 'You have been logged out. Blocked accounts cannot use this site. Did you register with a valid email address?', - 'flash_success' => 'Success!', - 'flash_info' => 'Message', - 'flash_warning' => 'Warning!', - 'flash_error' => 'Error!', - 'flash_info_multiple' => 'There is one message|There are :count messages', - 'flash_error_multiple' => 'There is one error|There are :count errors', - 'net_worth' => 'Net worth', - 'route_has_no_help' => 'There is no help for this route, or there is no help available in your language.', - 'two_factor_welcome' => 'Hello, :user!', - 'two_factor_enter_code' => 'To continue, please enter your two factor authentication code. Your application can generate it for you.', - 'two_factor_code_here' => 'Enter code here', - 'two_factor_title' => 'Two factor authentication', - 'authenticate' => 'Authenticate', - 'two_factor_forgot_title' => 'Lost two factor authentication', - 'two_factor_forgot' => 'I forgot my two-factor thing.', - 'two_factor_lost_header' => 'Lost your two factor authentication?', - 'two_factor_lost_intro' => 'Unfortunately, this is not something you can reset from the web interface. You have two choices.', - 'two_factor_lost_fix_self' => 'If you run your own instance of Firefly III, check the logs in storage/logs for instructions.', - 'two_factor_lost_fix_owner' => 'Otherwise, email the site owner, :site_owner and ask them to reset your two factor authentication.', - 'warning_much_data' => ':days days of data may take a while to load.', - 'registered' => 'You have registered successfully!', - 'search' => 'Search', - 'no_budget_pointer' => 'You seem to have no budgets yet. You should create some on the budgets-page. Budgets can help you keep track of expenses.', - 'source_accounts' => 'Source account(s)', - 'destination_accounts' => 'Destination account(s)', - 'user_id_is' => 'Your user id is :user', - 'field_supports_markdown' => 'This field supports Markdown.', - - // repeat frequencies: - 'repeat_freq_monthly' => 'monthly', - 'weekly' => 'weekly', - 'quarterly' => 'quarterly', - 'half-year' => 'every half year', - 'yearly' => 'yearly', - // account confirmation: - 'confirm_account_header' => 'Please confirm your account', - 'confirm_account_intro' => 'An email has been sent to the address you used during your registration. Please check it out for further instructions. If you did not get this message, you can have Firefly send it again.', - 'confirm_account_resend_email' => 'Send me the confirmation message I need to activate my account.', - 'account_is_confirmed' => 'Your account has been confirmed!', - 'invalid_activation_code' => 'It seems the code you are using is not valid, or has expired.', - 'confirm_account_is_resent_header' => 'The confirmation has been resent', - 'confirm_account_is_resent_text' => 'The confirmation message has been resent. If you still did not receive the confirmation message, please contact the site owner at :owner or check the log files to see what went wrong.', - 'confirm_account_is_resent_go_home' => 'Go to the index page of Firefly', - 'confirm_account_not_resent_header' => 'Something went wrong :(', - 'confirm_account_not_resent_intro' => 'The confirmation message has been not resent. If you still did not receive the confirmation message, please contact the site owner at :owner instead. Possibly, you have tried to resend the activation message too often. You can have Firefly III try to resend the confirmation message every hour.', - 'confirm_account_not_resent_go_home' => 'Go to the index page of Firefly', - - // export data: - 'import_and_export' => 'Import and export', - 'export_data' => 'Export data', - 'export_data_intro' => 'For backup purposes, when migrating to another system or when migrating to another Firefly III installation.', - 'export_format' => 'Export format', - 'export_format_csv' => 'Comma separated values (CSV file)', - 'export_format_mt940' => 'MT940 compatible format', - 'export_included_accounts' => 'Export transactions from these accounts', - 'include_config_help' => 'For easy re-import into Firefly III', - 'include_old_uploads_help' => 'Firefly III does not throw away the original CSV files you have imported in the past. You can include them in your export.', - 'do_export' => 'Export', - 'export_status_never_started' => 'The export has not started yet', - 'export_status_make_exporter' => 'Creating exporter thing...', - 'export_status_collecting_journals' => 'Collecting your transactions...', - 'export_status_collected_journals' => 'Collected your transactions!', - 'export_status_converting_to_export_format' => 'Converting your transactions...', - 'export_status_converted_to_export_format' => 'Converted your transactions!', - 'export_status_creating_journal_file' => 'Creating the export file...', - 'export_status_created_journal_file' => 'Created the export file!', - 'export_status_collecting_attachments' => 'Collecting all your attachments...', - 'export_status_collected_attachments' => 'Collected all your attachments!', - 'export_status_collecting_old_uploads' => 'Collecting all your previous uploads...', - 'export_status_collected_old_uploads' => 'Collected all your previous uploads!', - 'export_status_creating_config_file' => 'Creating a configuration file...', - 'export_status_created_config_file' => 'Created a configuration file!', - 'export_status_creating_zip_file' => 'Creating a zip file...', - 'export_status_created_zip_file' => 'Created a zip file!', - 'export_status_finished' => 'Export has succesfully finished! Yay!', - 'export_data_please_wait' => 'Please wait...', - 'attachment_explanation' => 'The file called \':attachment_name\' (#:attachment_id) was originally uploaded to :type \':description\' (#:journal_id) dated :date for the amount of :amount.', - - // rules - 'rules' => 'Rules', - 'rules_explanation' => 'Here you can manage rules. Rules are triggered when a transaction is created or updated. Then, if the transaction has certain properties (called "triggers") Firefly will execute the "actions". Combined, you can make Firefly respond in a certain way to new transactions.', - 'rule_name' => 'Name of rule', - 'rule_triggers' => 'Rule triggers when', - 'rule_actions' => 'Rule will', - 'new_rule' => 'New rule', - 'new_rule_group' => 'New rule group', - 'rule_priority_up' => 'Give rule more priority', - 'rule_priority_down' => 'Give rule less priority', - 'make_new_rule_group' => 'Make new rule group', - 'store_new_rule_group' => 'Store new rule group', - 'created_new_rule_group' => 'New rule group ":title" stored!', - 'updated_rule_group' => 'Successfully updated rule group ":title".', - 'edit_rule_group' => 'Edit rule group ":title"', - 'delete_rule_group' => 'Delete rule group ":title"', - 'deleted_rule_group' => 'Deleted rule group ":title"', - 'update_rule_group' => 'Update rule group', - 'no_rules_in_group' => 'There are no rules in this group', - 'move_rule_group_up' => 'Move rule group up', - 'move_rule_group_down' => 'Move rule group down', - 'save_rules_by_moving' => 'Save these rule(s) by moving them to another rule group:', - 'make_new_rule' => 'Make new rule in rule group ":title"', - 'rule_help_stop_processing' => 'When you check this box, later rules in this group will not be executed.', - 'rule_help_active' => 'Inactive rules will never fire.', - 'stored_new_rule' => 'Stored new rule with title ":title"', - 'deleted_rule' => 'Deleted rule with title ":title"', - 'store_new_rule' => 'Store new rule', - 'updated_rule' => 'Updated rule with title ":title"', - 'default_rule_group_name' => 'Default rules', - 'default_rule_group_description' => 'All your rules not in a particular group.', - 'default_rule_name' => 'Your first default rule', - 'default_rule_description' => 'This rule is an example. You can safely delete it.', - 'default_rule_trigger_description' => 'The Man Who Sold the World', - 'default_rule_trigger_from_account' => 'David Bowie', - 'default_rule_action_prepend' => 'Bought the world from ', - 'default_rule_action_set_category' => 'Large expenses', - 'trigger' => 'Trigger', - 'trigger_value' => 'Trigger on value', - 'stop_processing_other_triggers' => 'Stop processing other triggers', - 'add_rule_trigger' => 'Add new trigger', - 'action' => 'Action', - 'action_value' => 'Action value', - 'stop_executing_other_actions' => 'Stop executing other actions', - 'add_rule_action' => 'Add new action', - 'edit_rule' => 'Edit rule ":title"', - 'delete_rule' => 'Delete rule ":title"', - 'update_rule' => 'Update rule', - 'test_rule_triggers' => 'See matching transactions', - 'warning_transaction_subset' => 'For performance reasons this list is limited to :max_num_transactions and may only show a subset of matching transactions', - 'warning_no_matching_transactions' => 'No matching transactions found. Please note that for performance reasons, only the last :num_transactions transactions have been checked.', - 'warning_no_valid_triggers' => 'No valid triggers provided.', - 'execute_on_existing_transactions' => 'Execute for existing transactions', - 'execute_on_existing_transactions_intro' => 'When a rule or group has been changed or added, you can execute it for existing transactions', - 'execute_on_existing_transactions_short' => 'Existing transactions', - 'executed_group_on_existing_transactions' => 'Executed group ":title" for existing transactions', - 'execute_group_on_existing_transactions' => 'Execute group ":title" for existing transactions', - 'include_transactions_from_accounts' => 'Include transactions from these accounts', - 'execute' => 'Execute', - - // actions and triggers - 'rule_trigger_user_action' => 'User action is ":trigger_value"', - 'rule_trigger_from_account_starts' => 'Source account starts with ":trigger_value"', - 'rule_trigger_from_account_ends' => 'Source account ends with ":trigger_value"', - 'rule_trigger_from_account_is' => 'Source account is ":trigger_value"', - 'rule_trigger_from_account_contains' => 'Source account contains ":trigger_value"', - 'rule_trigger_to_account_starts' => 'Destination account starts with ":trigger_value"', - 'rule_trigger_to_account_ends' => 'Destination account ends with ":trigger_value"', - 'rule_trigger_to_account_is' => 'Destination account is ":trigger_value"', - 'rule_trigger_to_account_contains' => 'Destination account contains ":trigger_value"', - 'rule_trigger_transaction_type' => 'Transaction is of type ":trigger_value"', - 'rule_trigger_amount_less' => 'Amount is less than :trigger_value', - 'rule_trigger_amount_exactly' => 'Amount is :trigger_value', - 'rule_trigger_amount_more' => 'Amount is more than :trigger_value', - 'rule_trigger_description_starts' => 'Description starts with ":trigger_value"', - 'rule_trigger_description_ends' => 'Description ends with ":trigger_value"', - 'rule_trigger_description_contains' => 'Description contains ":trigger_value"', - 'rule_trigger_description_is' => 'Description is ":trigger_value"', - 'rule_trigger_from_account_starts_choice' => 'Source account starts with..', - 'rule_trigger_from_account_ends_choice' => 'Source account ends with..', - 'rule_trigger_from_account_is_choice' => 'Source account is..', - 'rule_trigger_from_account_contains_choice' => 'Source account contains..', - 'rule_trigger_to_account_starts_choice' => 'Destination account starts with..', - 'rule_trigger_to_account_ends_choice' => 'Destination account ends with..', - 'rule_trigger_to_account_is_choice' => 'Destination account is..', - 'rule_trigger_to_account_contains_choice' => 'Destination account contains..', - 'rule_trigger_transaction_type_choice' => 'Transaction is of type..', - 'rule_trigger_amount_less_choice' => 'Amount is less than..', - 'rule_trigger_amount_exactly_choice' => 'Amount is..', - 'rule_trigger_amount_more_choice' => 'Amount is more than..', - 'rule_trigger_description_starts_choice' => 'Description starts with..', - 'rule_trigger_description_ends_choice' => 'Description ends with..', - 'rule_trigger_description_contains_choice' => 'Description contains..', - 'rule_trigger_description_is_choice' => 'Description is..', - 'rule_trigger_store_journal' => 'When a journal is created', - 'rule_trigger_update_journal' => 'When a journal is updated', - 'rule_action_set_category' => 'Set category to ":action_value"', - 'rule_action_clear_category' => 'Clear category', - 'rule_action_set_budget' => 'Set budget to ":action_value"', - 'rule_action_clear_budget' => 'Clear budget', - 'rule_action_add_tag' => 'Add tag ":action_value"', - 'rule_action_remove_tag' => 'Remove tag ":action_value"', - 'rule_action_remove_all_tags' => 'Remove all tags', - 'rule_action_set_description' => 'Set description to ":action_value"', - 'rule_action_append_description' => 'Append description with ":action_value"', - 'rule_action_prepend_description' => 'Prepend description with ":action_value"', - 'rule_action_set_category_choice' => 'Set category to..', - 'rule_action_clear_category_choice' => 'Clear any category', - 'rule_action_set_budget_choice' => 'Set budget to..', - 'rule_action_clear_budget_choice' => 'Clear any budget', - 'rule_action_add_tag_choice' => 'Add tag..', - 'rule_action_remove_tag_choice' => 'Remove tag..', - 'rule_action_remove_all_tags_choice' => 'Remove all tags', - 'rule_action_set_description_choice' => 'Set description to..', - 'rule_action_append_description_choice' => 'Append description with..', - 'rule_action_prepend_description_choice' => 'Prepend description with..', - - // tags - 'store_new_tag' => 'Store new tag', - 'update_tag' => 'Update tag', - 'no_location_set' => 'No location set.', - 'meta_data' => 'Meta data', - 'location' => 'Location', - - // preferences - 'pref_home_screen_accounts' => 'Home screen accounts', - 'pref_home_screen_accounts_help' => 'Which accounts should be displayed on the home page?', - 'pref_view_range' => 'View range', - 'pref_view_range_help' => 'Some charts are automatically grouped in periods. What period would you prefer?', - 'pref_1D' => 'One day', - 'pref_1W' => 'One week', - 'pref_1M' => 'One month', - 'pref_3M' => 'Three months (quarter)', - 'pref_6M' => 'Six months', - 'pref_1Y' => 'One year', - 'pref_languages' => 'Languages', - 'pref_languages_help' => 'Firefly III supports several languages. Which one do you prefer?', - 'pref_custom_fiscal_year' => 'Fiscal year settings', - 'pref_custom_fiscal_year_label' => 'Enabled', - 'pref_custom_fiscal_year_help' => 'In countries that use a financial year other than January 1 to December 31, you can switch this on and specify start / end days of the fiscal year', - 'pref_fiscal_year_start_label' => 'Fiscal year start date', - 'pref_two_factor_auth' => '2-step verification', - 'pref_two_factor_auth_help' => 'When you enable 2-step verification (also known as two-factor authentication), you add an extra layer of security to your account. You sign in with something you know (your password) and something you have (a verification code). Verification codes are generated by an application on your phone, such as Authy or Google Authenticator.', - 'pref_enable_two_factor_auth' => 'Enable 2-step verification', - 'pref_two_factor_auth_disabled' => '2-step verification code removed and disabled', - 'pref_two_factor_auth_remove_it' => 'Don\'t forget to remove the account from your authentication app!', - 'pref_two_factor_auth_code' => 'Verify code', - 'pref_two_factor_auth_code_help' => 'Scan the QR code with an application on your phone such as Authy or Google Authenticator and enter the generated code.', - 'pref_two_factor_auth_reset_code' => 'Reset verification code', - 'pref_two_factor_auth_remove_code' => 'Remove verification code', - 'pref_two_factor_auth_remove_will_disable' => '(this will also disable two-factor authentication)', - 'pref_save_settings' => 'Save settings', - 'saved_preferences' => 'Preferences saved!', - 'preferences_general' => 'General', - 'preferences_frontpage' => 'Home screen', - 'preferences_security' => 'Security', - 'preferences_layout' => 'Layout', - 'pref_home_show_deposits' => 'Show deposits on the home screen', - 'pref_home_show_deposits_info' => 'The home screen already shows your expense accounts. Should it also show your revenue accounts?', - 'pref_home_do_show_deposits' => 'Yes, show them', - 'successful_count' => 'of which :count successful', - 'transaction_page_size_title' => 'Page size', - 'transaction_page_size_help' => 'Any list of transactions shows at most this many transactions', - 'transaction_page_size_label' => 'Page size', - 'between_dates' => '(:start and :end)', - 'pref_optional_fields_transaction' => 'Optional fields for transactions', - 'pref_optional_fields_transaction_help' => 'By default not all fields are enabled when creating a new transaction (because of the clutter). Below, you can enable these fields if you think they could be useful for you. Of course, any field that is disabled, but already filled in, will be visible regardless of the setting.', - 'optional_tj_date_fields' => 'Date fields', - 'optional_tj_business_fields' => 'Business fields', - 'optional_tj_attachment_fields' => 'Attachment fields', - 'pref_optional_tj_interest_date' => 'Interest date', - 'pref_optional_tj_book_date' => 'Book date', - 'pref_optional_tj_process_date' => 'Processing date', - 'pref_optional_tj_due_date' => 'Due date', - 'pref_optional_tj_payment_date' => 'Payment date', - 'pref_optional_tj_invoice_date' => 'Invoice date', - 'pref_optional_tj_internal_reference' => 'Internal reference', - 'pref_optional_tj_notes' => 'Notes', - 'pref_optional_tj_attachments' => 'Attachments', - 'optional_field_meta_dates' => 'Dates', - 'optional_field_meta_business' => 'Business', - 'optional_field_attachments' => 'Attachments', - 'optional_field_meta_data' => 'Optional meta data', - - - // profile: - 'change_your_password' => 'Change your password', - 'delete_account' => 'Delete account', - 'current_password' => 'Current password', - 'new_password' => 'New password', - 'new_password_again' => 'New password (again)', - 'delete_your_account' => 'Delete your account', - 'delete_your_account_help' => 'Deleting your account will also delete any accounts, transactions, anything you might have saved into Firefly III. It\'ll be GONE.', - 'delete_your_account_password' => 'Enter your password to continue.', - 'password' => 'Password', - 'are_you_sure' => 'Are you sure? You cannot undo this.', - 'delete_account_button' => 'DELETE your account', - 'invalid_current_password' => 'Invalid current password!', - 'password_changed' => 'Password changed!', - 'should_change' => 'The idea is to change your password.', - 'invalid_password' => 'Invalid password!', - - - // attachments - 'nr_of_attachments' => 'One attachment|:count attachments', - 'attachments' => 'Attachments', - 'edit_attachment' => 'Edit attachment ":name"', - 'update_attachment' => 'Update attachment', - 'delete_attachment' => 'Delete attachment ":name"', - 'attachment_deleted' => 'Deleted attachment ":name"', - 'attachment_updated' => 'Updated attachment ":name"', - 'upload_max_file_size' => 'Maximum file size: :size', - - // tour: - 'prev' => 'Prev', - 'next' => 'Next', - 'end-tour' => 'End tour', - 'pause' => 'Pause', - - // transaction index - 'title_expenses' => 'Expenses', - 'title_withdrawal' => 'Expenses', - 'title_revenue' => 'Revenue / income', - 'title_deposit' => 'Revenue / income', - 'title_transfer' => 'Transfers', - 'title_transfers' => 'Transfers', - - // create new stuff: - 'create_new_withdrawal' => 'Create new withdrawal', - 'create_new_deposit' => 'Create new deposit', - 'create_new_transfer' => 'Create new transfer', - 'create_new_asset' => 'Create new asset account', - 'create_new_expense' => 'Create new expense account', - 'create_new_revenue' => 'Create new revenue account', - 'create_new_piggy_bank' => 'Create new piggy bank', - 'create_new_bill' => 'Create new bill', - - // currencies: - 'create_currency' => 'Create a new currency', - 'store_currency' => 'Store new currency', - 'update_currency' => 'Update currency', - 'new_default_currency' => ':name is now the default currency.', - 'cannot_delete_currency' => 'Cannot delete :name because it is still in use.', - 'deleted_currency' => 'Currency :name deleted', - 'created_currency' => 'Currency :name created', - 'updated_currency' => 'Currency :name updated', - 'ask_site_owner' => 'Please ask :owner to add, remove or edit currencies.', - 'currencies_intro' => 'Firefly III supports various currencies which you can set and enable here.', - 'make_default_currency' => 'make default', - 'default_currency' => 'default', - - // new user: - 'submit' => 'Submit', - 'getting_started' => 'Getting started', - 'to_get_started' => 'To get started with Firefly, please enter your current bank\'s name, and the balance of your checking account:', - 'savings_balance_text' => 'If you have a savings account, please enter the current balance of your savings account:', - 'cc_balance_text' => 'If you have a credit card, please enter your credit card\'s limit.', - 'stored_new_account_new_user' => 'Yay! Your new account has been stored.', - 'stored_new_accounts_new_user' => 'Yay! Your new accounts have been stored.', - - // forms: - 'mandatoryFields' => 'Mandatory fields', - 'optionalFields' => 'Optional fields', - 'options' => 'Options', - - // budgets: - 'create_new_budget' => 'Create a new budget', - 'store_new_budget' => 'Store new budget', - 'stored_new_budget' => 'Stored new budget ":name"', - 'available_between' => 'Available between :start and :end', - 'transactionsWithoutBudget' => 'Expenses without budget', - 'transactions_no_budget' => 'Expenses without budget between :start and :end', - 'spent_between' => 'Spent between :start and :end', - 'createBudget' => 'New budget', - 'inactiveBudgets' => 'Inactive budgets', - 'without_budget_between' => 'Transactions without a budget between :start and :end', - 'budget_in_month' => ':name in :month', - 'delete_budget' => 'Delete budget ":name"', - 'deleted_budget' => 'Deleted budget ":name"', - 'edit_budget' => 'Edit budget ":name"', - 'updated_budget' => 'Updated budget ":name"', - 'update_amount' => 'Update amount', - 'update_budget' => 'Update budget', - 'update_budget_amount_range' => 'Update (expected) available amount between :start and :end', - - // bills: - 'matching_on' => 'Matching on', - 'between_amounts' => 'between :low and :high.', - 'repeats' => 'Repeats', - 'connected_journals' => 'Connected transactions', - 'auto_match_on' => 'Automatically matched by Firefly', - 'auto_match_off' => 'Not automatically matched by Firefly', - 'next_expected_match' => 'Next expected match', - 'delete_bill' => 'Delete bill ":name"', - 'deleted_bill' => 'Deleted bill ":name"', - 'edit_bill' => 'Edit bill ":name"', - 'more' => 'More', - 'rescan_old' => 'Rescan old transactions', - 'update_bill' => 'Update bill', - 'updated_bill' => 'Updated bill ":name"', - 'store_new_bill' => 'Store new bill', - 'stored_new_bill' => 'Stored new bill ":name"', - 'cannot_scan_inactive_bill' => 'Inactive bills cannot be scanned.', - 'rescanned_bill' => 'Rescanned everything.', - 'bill_date_little_relevance' => 'The only part of this date used by Firefly is the day. It is only useful when your bill arrives at exactly the same date every month. If the payment date of your bills varies, simply use the first of the month.', - 'average_bill_amount_year' => 'Average bill amount (:year)', - 'average_bill_amount_overall' => 'Average bill amount (overall)', - - // accounts: - 'details_for_asset' => 'Details for asset account ":name"', - 'details_for_expense' => 'Details for expense account ":name"', - 'details_for_revenue' => 'Details for revenue account ":name"', - 'details_for_cash' => 'Details for cash account ":name"', - 'store_new_asset_account' => 'Store new asset account', - 'store_new_expense_account' => 'Store new expense account', - 'store_new_revenue_account' => 'Store new revenue account', - 'edit_asset_account' => 'Edit asset account ":name"', - 'edit_expense_account' => 'Edit expense account ":name"', - 'edit_revenue_account' => 'Edit revenue account ":name"', - 'delete_asset_account' => 'Delete asset account ":name"', - 'delete_expense_account' => 'Delete expense account ":name"', - 'delete_revenue_account' => 'Delete revenue account ":name"', - 'asset_deleted' => 'Successfully deleted asset account ":name"', - 'expense_deleted' => 'Successfully deleted expense account ":name"', - 'revenue_deleted' => 'Successfully deleted revenue account ":name"', - 'update_asset_account' => 'Update asset account', - 'update_expense_account' => 'Update expense account', - 'update_revenue_account' => 'Update revenue account', - 'make_new_asset_account' => 'Create a new asset account', - 'make_new_expense_account' => 'Create a new expense account', - 'make_new_revenue_account' => 'Create a new revenue account', - 'asset_accounts' => 'Asset accounts', - 'expense_accounts' => 'Expense accounts', - 'revenue_accounts' => 'Revenue accounts', - 'cash_accounts' => 'Cash accounts', - 'Cash account' => 'Cash account', - 'account_type' => 'Account type', - 'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:', - 'stored_new_account' => 'New account ":name" stored!', - 'updated_account' => 'Updated account ":name"', - 'credit_card_options' => 'Credit card options', - - // categories: - 'new_category' => 'New category', - 'create_new_category' => 'Create a new category', - 'without_category' => 'Without a category', - 'update_category' => 'Update category', - 'updated_category' => 'Updated category ":name"', - 'categories' => 'Categories', - 'edit_category' => 'Edit category ":name"', - 'no_category' => '(no category)', - 'category' => 'Category', - 'delete_category' => 'Delete category ":name"', - 'deleted_category' => 'Deleted category ":name"', - 'store_category' => 'Store new category', - 'stored_category' => 'Stored new category ":name"', - 'without_category_between' => 'Without category between :start and :end', - - // transactions: - 'update_withdrawal' => 'Update withdrawal', - 'update_deposit' => 'Update deposit', - 'update_transfer' => 'Update transfer', - 'updated_withdrawal' => 'Updated withdrawal ":description"', - 'updated_deposit' => 'Updated deposit ":description"', - 'updated_transfer' => 'Updated transfer ":description"', - 'delete_withdrawal' => 'Delete withdrawal ":description"', - 'delete_deposit' => 'Delete deposit ":description"', - 'delete_transfer' => 'Delete transfer ":description"', - 'deleted_withdrawal' => 'Successfully deleted withdrawal ":description"', - 'deleted_deposit' => 'Successfully deleted deposit ":description"', - 'deleted_transfer' => 'Successfully deleted transfer ":description"', - 'stored_journal' => 'Successfully created new transaction ":description"', - 'select_transactions' => 'Select transactions', - 'stop_selection' => 'Stop selecting transactions', - 'edit_selected' => 'Edit selected', - 'delete_selected' => 'Delete selected', - 'mass_delete_journals' => 'Delete a number of transactions', - 'mass_edit_journals' => 'Edit a number of transactions', - 'cannot_edit_other_fields' => 'You cannot mass-edit other fields than the ones here, because there is no room to show them. Please follow the link and edit them by one-by-one, if you need to edit these fields.', - 'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.', - 'mass_deleted_transactions_success' => 'Deleted :amount transaction(s).', - 'mass_edited_transactions_success' => 'Updated :amount transaction(s)', - - - // new user: - 'welcome' => 'Welcome to Firefly!', - - // home page: - 'yourAccounts' => 'Your accounts', - 'budgetsAndSpending' => 'Budgets and spending', - 'savings' => 'Savings', - 'markAsSavingsToContinue' => 'Mark your asset accounts as "Savings account" to fill this panel', - 'createPiggyToContinue' => 'Create piggy banks to fill this panel.', - 'newWithdrawal' => 'New expense', - 'newDeposit' => 'New deposit', - 'newTransfer' => 'New transfer', - 'moneyIn' => 'Money in', - 'moneyOut' => 'Money out', - 'billsToPay' => 'Bills to pay', - 'billsPaid' => 'Bills paid', - 'divided' => 'divided', - 'toDivide' => 'left to divide', - - // menu and titles, should be recycled as often as possible: - 'currency' => 'Currency', - 'preferences' => 'Preferences', - 'logout' => 'Logout', - 'searchPlaceholder' => 'Search...', - 'dashboard' => 'Dashboard', - 'currencies' => 'Currencies', - 'accounts' => 'Accounts', - 'Asset account' => 'Asset account', - 'Default account' => 'Asset account', - 'Expense account' => 'Expense account', - 'Revenue account' => 'Revenue account', - 'Initial balance account' => 'Initial balance account', - 'budgets' => 'Budgets', - 'tags' => 'Tags', - 'reports' => 'Reports', - 'transactions' => 'Transactions', - 'expenses' => 'Expenses', - 'income' => 'Revenue / income', - 'transfers' => 'Transfers', - 'moneyManagement' => 'Money management', - 'piggyBanks' => 'Piggy banks', - 'bills' => 'Bills', - 'withdrawal' => 'Withdrawal', - 'deposit' => 'Deposit', - 'account' => 'Account', - 'transfer' => 'Transfer', - 'Withdrawal' => 'Withdrawal', - 'Deposit' => 'Deposit', - 'Transfer' => 'Transfer', - 'bill' => 'Bill', - 'yes' => 'Yes', - 'no' => 'No', - 'amount' => 'Amount', - 'overview' => 'Overview', - 'saveOnAccount' => 'Save on account', - 'unknown' => 'Unknown', - 'daily' => 'Daily', - 'monthly' => 'Monthly', - 'profile' => 'Profile', - 'errors' => 'Errors', - - // reports: - 'report_default' => 'Default financial report for :start until :end', - 'report_audit' => 'Transaction history overview for :start until :end', - 'quick_link_reports' => 'Quick links', - 'quick_link_default_report' => 'Default financial report', - 'quick_link_audit_report' => 'Transaction history overview', - 'report_this_month_quick' => 'Current month, all accounts', - 'report_this_year_quick' => 'Current year, all accounts', - 'report_this_fiscal_year_quick' => 'Current fiscal year, all accounts', - 'report_all_time_quick' => 'All-time, all accounts', - 'reports_can_bookmark' => 'Remember that reports can be bookmarked.', - 'incomeVsExpenses' => 'Income vs. expenses', - 'accountBalances' => 'Account balances', - 'balanceStartOfYear' => 'Balance at start of year', - 'balanceEndOfYear' => 'Balance at end of year', - 'balanceStartOfMonth' => 'Balance at start of month', - 'balanceEndOfMonth' => 'Balance at end of month', - 'balanceStart' => 'Balance at start of period', - 'balanceEnd' => 'Balance at end of period', - 'reportsOwnAccounts' => 'Reports for your own accounts', - 'reportsOwnAccountsAndShared' => 'Reports for your own accounts and shared accounts', - 'splitByAccount' => 'Split by account', - 'balancedByTransfersAndTags' => 'Balanced by transfers and tags', - 'coveredWithTags' => 'Covered with tags', - 'leftUnbalanced' => 'Left unbalanced', - 'expectedBalance' => 'Expected balance', - 'outsideOfBudgets' => 'Outside of budgets', - 'leftInBudget' => 'Left in budget', - 'sumOfSums' => 'Sum of sums', - 'noCategory' => '(no category)', - 'notCharged' => 'Not charged (yet)', - 'inactive' => 'Inactive', - 'active' => 'Active', - 'difference' => 'Difference', - 'in' => 'In', - 'out' => 'Out', - 'topX' => 'top :number', - 'showTheRest' => 'Show everything', - 'hideTheRest' => 'Show only the top :number', - 'sum_of_year' => 'Sum of year', - 'sum_of_years' => 'Sum of years', - 'average_of_year' => 'Average of year', - 'average_of_years' => 'Average of years', - 'categories_earned_in_year' => 'Categories (by earnings)', - 'categories_spent_in_year' => 'Categories (by spendings)', - 'report_type' => 'Report type', - 'report_type_default' => 'Default financial report', - 'report_type_audit' => 'Transaction history overview (audit)', - 'report_type_meta-history' => 'Categories, budgets and bills overview', - 'more_info_help' => 'More information about these types of reports can be found in the help pages. Press the (?) icon in the top right corner.', - 'report_included_accounts' => 'Included accounts', - 'report_date_range' => 'Date range', - 'report_include_help' => 'In all cases, transfers to shared accounts count as expenses, and transfers from shared accounts count as income.', - 'report_preset_ranges' => 'Pre-set ranges', - 'shared' => 'Shared', - 'fiscal_year' => 'Fiscal year', - 'income_entry' => 'Income from account ":name" between :start and :end', - 'expense_entry' => 'Expenses to account ":name" between :start and :end', - 'category_entry' => 'Expenses in category ":name" between :start and :end', - 'budget_spent_amount' => 'Expenses in budget ":budget" between :start and :end', - 'balance_amount' => 'Expenses in budget ":budget" paid from account ":account" between :start and :end', - 'no_audit_activity' => 'No activity was recorded on account :account_name between :start and :end.', - 'audit_end_balance' => 'Account balance of :account_name at the end of :end was: :balance', - - // charts: - 'chart' => 'Chart', - 'dayOfMonth' => 'Day of the month', - 'month' => 'Month', - 'budget' => 'Budget', - 'spent' => 'Spent', - 'earned' => 'Earned', - 'overspent' => 'Overspent', - 'left' => 'Left', - 'no_budget' => '(no budget)', - 'maxAmount' => 'Maximum amount', - 'minAmount' => 'Minumum amount', - 'billEntry' => 'Current bill entry', - 'name' => 'Name', - 'date' => 'Date', - 'paid' => 'Paid', - 'unpaid' => 'Unpaid', - 'day' => 'Day', - 'budgeted' => 'Budgeted', - 'period' => 'Period', - 'balance' => 'Balance', - 'summary' => 'Summary', - 'sum' => 'Sum', - 'average' => 'Average', - 'balanceFor' => 'Balance for :name', - - // piggy banks: - 'add_money_to_piggy' => 'Add money to piggy bank ":name"', - 'piggy_bank' => 'Piggy bank', - 'new_piggy_bank' => 'Create new piggy bank', - 'store_piggy_bank' => 'Store new piggy bank', - 'stored_piggy_bank' => 'Store new piggy bank ":name"', - 'account_status' => 'Account status', - 'left_for_piggy_banks' => 'Left for piggy banks', - 'sum_of_piggy_banks' => 'Sum of piggy banks', - 'saved_so_far' => 'Saved so far', - 'left_to_save' => 'Left to save', - 'add_money_to_piggy_title' => 'Add money to piggy bank ":name"', - 'remove_money_from_piggy_title' => 'Remove money from piggy bank ":name"', - 'add' => 'Add', - - 'remove' => 'Remove', - 'max_amount_add' => 'The maximum amount you can add is', - 'max_amount_remove' => 'The maximum amount you can remove is', - 'update_piggy_button' => 'Update piggy bank', - 'update_piggy_title' => 'Update piggy bank ":name"', - 'updated_piggy_bank' => 'Updated piggy bank ":name"', - 'details' => 'Details', - 'events' => 'Events', - 'target_amount' => 'Target amount', - 'start_date' => 'Start date', - 'target_date' => 'Target date', - 'no_target_date' => 'No target date', - 'todo' => 'to do', - 'table' => 'Table', - 'piggy_bank_not_exists' => 'Piggy bank no longer exists.', - 'add_any_amount_to_piggy' => 'Add money to this piggy bank to reach your target of :amount.', - 'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date', - 'delete_piggy_bank' => 'Delete piggy bank ":name"', - 'cannot_add_amount_piggy' => 'Could not add :amount to ":name".', - 'deleted_piggy_bank' => 'Deleted piggy bank ":name"', - 'added_amount_to_piggy' => 'Added :amount to ":name"', - 'removed_amount_from_piggy' => 'Removed :amount from ":name"', - 'cannot_remove_amount_piggy' => 'Could not remove :amount from ":name".', - - // tags - 'regular_tag' => 'Just a regular tag.', - 'balancing_act' => 'The tag takes at most two transactions; an expense and a transfer. They\'ll balance each other out.', - 'advance_payment' => 'The tag accepts one expense and any number of deposits aimed to repay the original expense.', - 'delete_tag' => 'Delete tag ":tag"', - 'deleted_tag' => 'Deleted tag ":tag"', - 'new_tag' => 'Make new tag', - 'edit_tag' => 'Edit tag ":tag"', - 'updated_tag' => 'Updated tag ":tag"', - 'created_tag' => 'Tag ":tag" has been created!', - 'no_year' => 'No year set', - 'no_month' => 'No month set', - 'tag_title_nothing' => 'Default tags', - 'tag_title_balancingAct' => 'Balancing act tags', - 'tag_title_advancePayment' => 'Advance payment tags', - 'tags_introduction' => 'Usually tags are singular words, designed to quickly band items together using things like expensive, bill or for-party. In Firefly III, tags can have more properties such as a date, description and location. This allows you to join transactions together in a more meaningful way. For example, you could make a tag called Christmas dinner with friends and add information about the restaurant. Such tags are "singular", you would only use them for a single occasion, perhaps with multiple transactions.', - 'tags_group' => 'Tags group transactions together, which makes it possible to store reimbursements (in case you front money for others) and other "balancing acts" where expenses are summed up (the payments on your new TV) or where expenses and deposits are cancelling each other out (buying something with saved money). It\'s all up to you. Using tags the old-fashioned way is of course always possible.', - 'tags_start' => 'Create a tag to get started or enter tags when creating new transactions.', - - 'transaction_journal_information' => 'Transaction information', - 'transaction_journal_meta' => 'Meta information', - 'total_amount' => 'Total amount', - - // administration - 'administration' => 'Administration', - 'user_administration' => 'User administration', - 'list_all_users' => 'All users', - 'all_users' => 'All users', - 'all_blocked_domains' => 'All blocked domains', - 'blocked_domains' => 'Blocked domains', - 'no_domains_banned' => 'No domains blocked', - 'all_user_domains' => 'All user email address domains', - 'all_domains_is_filtered' => 'This list does not include already blocked domains.', - 'domain_now_blocked' => 'Domain :domain is now blocked', - 'domain_now_unblocked' => 'Domain :domain is now unblocked', - 'manual_block_domain' => 'Block a domain by hand', - 'block_domain' => 'Block domain', - 'no_domain_filled_in' => 'No domain filled in', - 'domain_already_blocked' => 'Domain :domain is already blocked', - 'domain_is_now_blocked' => 'Domain :domain is now blocked', - 'instance_configuration' => 'Configuration', - 'firefly_instance_configuration' => 'Configuration options for Firefly III', - 'setting_single_user_mode' => 'Single user mode', - 'setting_single_user_mode_explain' => 'By default, Firefly III only accepts one (1) registration: you. This is a security measure, preventing others from using your instance unless you allow them to. Future registrations are blocked. When you uncheck this box, others can use your instance as wel, assuming they can reach it (when it is connected to the internet).', - 'store_configuration' => 'Store configuration', - 'single_user_administration' => 'User administration for :email', - 'hidden_fields_preferences' => 'Not all fields are visible right now. You must enable them in your settings.', - 'user_data_information' => 'User data', - 'user_information' => 'User information', - 'total_size' => 'total size', - 'budget_or_budgets' => 'budget(s)', - 'budgets_with_limits' => 'budget(s) with configured amount', - 'rule_or_rules' => 'rule(s)', - 'rulegroup_or_groups' => 'rule group(s)', - - // split a transaction: - 'transaction_meta_data' => 'Transaction meta-data', - 'transaction_dates' => 'Transaction dates', - 'splits' => 'Splits', - 'split_title_withdrawal' => 'Split your new withdrawal', - 'split_intro_one_withdrawal' => 'Firefly supports the "splitting" of a withdrawal.', - 'split_intro_two_withdrawal' => 'It means that the amount of money you\'ve spent is divided between several destination expense accounts, budgets or categories.', - 'split_intro_three_withdrawal' => 'For example: you could split your :total groceries so you pay :split_one from your "daily groceries" budget and :split_two from your "cigarettes" budget.', - 'split_table_intro_withdrawal' => 'Split your withdrawal in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', - 'store_splitted_withdrawal' => 'Store splitted withdrawal', - 'update_splitted_withdrawal' => 'Update splitted withdrawal', - 'split_title_deposit' => 'Split your new deposit', - 'split_intro_one_deposit' => 'Firefly supports the "splitting" of a deposit.', - 'split_intro_two_deposit' => 'It means that the amount of money you\'ve earned is divided between several source revenue accounts or categories.', - 'split_intro_three_deposit' => 'For example: you could split your :total salary so you get :split_one as your base salary and :split_two as a reimbursment for expenses made.', - 'split_table_intro_deposit' => 'Split your deposit in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', - 'store_splitted_deposit' => 'Store splitted deposit', - 'split_title_transfer' => 'Split your new transfer', - 'split_intro_one_transfer' => 'Firefly supports the "splitting" of a transfer.', - 'split_intro_two_transfer' => 'It means that the amount of money you\'re moving is divided between several categories or piggy banks.', - 'split_intro_three_transfer' => 'For example: you could split your :total move so you get :split_one in one piggy bank and :split_two in another.', - 'split_table_intro_transfer' => 'Split your transfer in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', - 'store_splitted_transfer' => 'Store splitted transfer', - 'add_another_split' => 'Add another split', - 'split-transactions' => 'Split transactions', - 'split-new-transaction' => 'Split a new transaction', - 'do_split' => 'Do a split', - 'split_this_withdrawal' => 'Split this withdrawal', - 'split_this_deposit' => 'Split this deposit', - 'split_this_transfer' => 'Split this transfer', - 'cannot_edit_multiple_source' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple source accounts.', - 'cannot_edit_multiple_dest' => 'You cannot edit splitted transaction #:id with description ":description" because it contains multiple destination accounts.', - 'no_edit_multiple_left' => 'You have selected no valid transactions to edit.', - - // import - 'configuration_file_help' => 'If you have previously imported data into Firefly III, you may have a configuration file, which will pre-set configuration values for you. For some banks, other users have kindly provided their configuration file.', - 'import_data_index' => 'Index', - 'import_file_type_csv' => 'CSV (comma separated values)', - 'import_file_type_help' => 'Select the type of file you will upload', - 'import_start' => 'Start the import', - 'configure_import' => 'Further configure your import', - 'import_finish_configuration' => 'Finish configuration', - 'settings_for_import' => 'Settings', - 'import_status' => 'Import status', - 'import_status_text' => 'The import is currently running, or will start momentarily.', - 'import_complete' => 'Import configuration complete!', - 'import_complete_text' => 'The import is ready to start. All the configuration you needed to do has been done. Please download the configuration file. It will help you with the import should it not go as planned. To actually run the import, you can either execute the following command in your console, or run the web-based import. Depending on your configuration, the console import will give you more feedback.', - 'import_download_config' => 'Download configuration', - 'import_start_import' => 'Start import', - 'import_intro_beta' => 'The import function of Firefly III is in beta. Many users of Firefly III have tried many different files. Although each individual compontent of this import routine works (really), the combination might break. If your file cannot be imported by Firefly, please read this wiki page so I can fix the problem you have run into.', - 'import_data' => 'Import data', - 'import_data_full' => 'Import data into Firefly III', - 'import' => 'Import', - 'import_intro_what_it_does' => 'This page allows you to import data into Firefly III. To do so, export data from your bank, or from another financial management system. Upload that file here. Firefly III will convert the data. You need to give it some directions. Please select a file and follow the instructions.', - 'import_intro_import_conf_title' => 'Import "configuration"', - 'import_intro_beta_warning' => 'Warning', - 'import_intro_import_conf_text' => 'As you will discover over the next few pages, this import routine has a lot of settings. These settings are mainly dependent on the bank (or financial management software) your file comes from. There is a good chance somebody else already imported such a file and has shared their configuration file. Please visit the import configuration center to see if there already is a configuration available for your bank or system. If there is, you should download this configuration file and upload it here as well. It will save you a lot of time!', - 'import_file_help' => 'Select your file', - 'import_status_settings_complete' => 'The import is ready to start.', - 'import_status_import_complete' => 'The import has completed.', - 'import_status_import_running' => 'The import is currently running. Please be patient.', - 'import_status_header' => 'Import status and progress', - 'import_status_errors' => 'Import errors', - 'import_status_report' => 'Import report', - 'import_finished' => 'Import has finished', - 'import_error_single' => 'An error has occured during the import.', - 'import_error_multi' => 'Some errors occured during the import.', - 'import_error_fatal' => 'There was an error during the import routine. Please check the log files. The error seems to be:', - 'import_error_timeout' => 'The import seems to have timed out. If this error persists, please import your data using the console command.', - 'import_double' => 'Row #:row: This row has been imported before, and is stored in :description.', - 'import_finished_all' => 'The import has finished. Please check out the results below.', - 'import_with_key' => 'Import with key \':key\'', - - 'import_share_configuration' => 'Please consider downloading your configuration and sharing it at the import configuration center. This will allow other users of Firefly III to import their files more easily.', - - 'import_finished_report' => 'The import has finished. Please note any errors in the block above this line. All transactions imported during this particular session have been tagged, and you can check them out below. ', - 'import_finished_link' => 'The transactions imported can be found in tag :tag.', - - -]; diff --git a/resources/lang/zh-HK/form.php b/resources/lang/zh-HK/form.php deleted file mode 100644 index e79b610a04..0000000000 --- a/resources/lang/zh-HK/form.php +++ /dev/null @@ -1,157 +0,0 @@ - 'Bank name', - 'bank_balance' => 'Balance', - 'savings_balance' => 'Savings balance', - 'credit_card_limit' => 'Credit card limit', - 'automatch' => 'Match automatically', - 'skip' => 'Skip', - 'name' => 'Name', - 'active' => 'Active', - 'amount_min' => 'Minimum amount', - 'amount_max' => 'Maximum amount', - 'match' => 'Matches on', - 'repeat_freq' => 'Repeats', - 'journal_currency_id' => 'Currency', - 'journal_amount' => 'Amount', - 'journal_asset_source_account' => 'Asset account (source)', - 'journal_source_account_name' => 'Revenue account (source)', - 'journal_source_account_id' => 'Asset account (source)', - 'account_from_id' => 'From account', - 'account_to_id' => 'To account', - 'journal_destination_account_id' => 'Asset account (destination)', - 'asset_destination_account' => 'Asset account (destination)', - 'asset_source_account' => 'Asset account (source)', - 'journal_description' => 'Description', - 'note' => 'Notes', - 'split_journal' => 'Split this transaction', - 'split_journal_explanation' => 'Split this transaction in multiple parts', - 'currency' => 'Currency', - 'account_id' => 'Asset account', - 'budget_id' => 'Budget', - 'openingBalance' => 'Opening balance', - 'tagMode' => 'Tag mode', - 'tagPosition' => 'Tag location', - 'virtualBalance' => 'Virtual balance', - 'longitude_latitude' => 'Location', - 'targetamount' => 'Target amount', - 'accountRole' => 'Account role', - 'openingBalanceDate' => 'Opening balance date', - 'ccType' => 'Credit card payment plan', - 'ccMonthlyPaymentDate' => 'Credit card monthly payment date', - 'piggy_bank_id' => 'Piggy bank', - 'returnHere' => 'Return here', - 'returnHereExplanation' => 'After storing, return here to create another one.', - 'returnHereUpdateExplanation' => 'After updating, return here.', - 'description' => 'Description', - 'expense_account' => 'Expense account', - 'revenue_account' => 'Revenue account', - 'amount' => 'Amount', - 'date' => 'Date', - 'interest_date' => 'Interest date', - 'book_date' => 'Book date', - 'process_date' => 'Processing date', - 'category' => 'Category', - 'tags' => 'Tags', - 'deletePermanently' => 'Delete permanently', - 'cancel' => 'Cancel', - 'targetdate' => 'Target date', - 'tag' => 'Tag', - 'under' => 'Under', - 'symbol' => 'Symbol', - 'code' => 'Code', - 'iban' => 'IBAN', - 'accountNumber' => 'Account number', - 'has_headers' => 'Headers', - 'date_format' => 'Date format', - 'specifix' => 'Bank- or file specific fixes', - 'attachments[]' => 'Attachments', - 'store_new_withdrawal' => 'Store new withdrawal', - 'store_new_deposit' => 'Store new deposit', - 'store_new_transfer' => 'Store new transfer', - 'add_new_withdrawal' => 'Add a new withdrawal', - 'add_new_deposit' => 'Add a new deposit', - 'add_new_transfer' => 'Add a new transfer', - 'noPiggybank' => '(no piggy bank)', - 'title' => 'Title', - 'notes' => 'Notes', - 'filename' => 'File name', - 'mime' => 'Mime type', - 'size' => 'Size', - 'trigger' => 'Trigger', - 'stop_processing' => 'Stop processing', - 'start_date' => 'Start of range', - 'end_date' => 'End of range', - 'export_start_range' => 'Start of export range', - 'export_end_range' => 'End of export range', - 'export_format' => 'File format', - 'include_attachments' => 'Include uploaded attachments', - 'include_config' => 'Include configuration file', - 'include_old_uploads' => 'Include imported data', - 'accounts' => 'Export transactions from these accounts', - 'delete_account' => 'Delete account ":name"', - 'delete_bill' => 'Delete bill ":name"', - 'delete_budget' => 'Delete budget ":name"', - 'delete_category' => 'Delete category ":name"', - 'delete_currency' => 'Delete currency ":name"', - 'delete_journal' => 'Delete transaction with description ":description"', - 'delete_attachment' => 'Delete attachment ":name"', - 'delete_rule' => 'Delete rule ":title"', - 'delete_rule_group' => 'Delete rule group ":title"', - 'attachment_areYouSure' => 'Are you sure you want to delete the attachment named ":name"?', - 'account_areYouSure' => 'Are you sure you want to delete the account named ":name"?', - 'bill_areYouSure' => 'Are you sure you want to delete the bill named ":name"?', - 'rule_areYouSure' => 'Are you sure you want to delete the rule titled ":title"?', - 'ruleGroup_areYouSure' => 'Are you sure you want to delete the rule group titled ":title"?', - 'budget_areYouSure' => 'Are you sure you want to delete the budget named ":name"?', - 'category_areYouSure' => 'Are you sure you want to delete the category named ":name"?', - 'currency_areYouSure' => 'Are you sure you want to delete the currency named ":name"?', - 'piggyBank_areYouSure' => 'Are you sure you want to delete the piggy bank named ":name"?', - 'journal_areYouSure' => 'Are you sure you want to delete the transaction described ":description"?', - 'mass_journal_are_you_sure' => 'Are you sure you want to delete these transactions?', - 'tag_areYouSure' => 'Are you sure you want to delete the tag ":tag"?', - 'permDeleteWarning' => 'Deleting stuff from Firely is permanent and cannot be undone.', - 'mass_make_selection' => 'You can still prevent items from being deleted by removing the checkbox.', - 'delete_all_permanently' => 'Delete selected permanently', - 'update_all_journals' => 'Update these transactions', - 'also_delete_transactions' => 'The only transaction connected to this account will be deleted as well.|All :count transactions connected to this account will be deleted as well.', - 'also_delete_rules' => 'The only rule connected to this rule group will be deleted as well.|All :count rules connected to this rule group will be deleted as well.', - 'also_delete_piggyBanks' => 'The only piggy bank connected to this account will be deleted as well.|All :count piggy bank connected to this account will be deleted as well.', - 'bill_keep_transactions' => 'The only transaction connected to this bill will not be deleted.|All :count transactions connected to this bill will spared deletion.', - 'budget_keep_transactions' => 'The only transaction connected to this budget will not be deleted.|All :count transactions connected to this budget will spared deletion.', - 'category_keep_transactions' => 'The only transaction connected to this category will not be deleted.|All :count transactions connected to this category will spared deletion.', - 'tag_keep_transactions' => 'The only transaction connected to this tag will not be deleted.|All :count transactions connected to this tag will spared deletion.', - - // admin - 'domain' => 'Domain', - 'single_user_mode' => 'Single user mode', - - // import - 'import_file' => 'Import file', - 'configuration_file' => 'Configuration file', - 'import_file_type' => 'Import file type', - 'csv_comma' => 'A comma (,)', - 'csv_semicolon' => 'A semicolon (;)', - 'csv_tab' => 'A tab (invisible)', - 'csv_delimiter' => 'CSV field delimiter', - 'csv_import_account' => 'Default import account', - 'csv_config' => 'CSV import configuration', - - - 'due_date' => 'Due date', - 'payment_date' => 'Payment date', - 'invoice_date' => 'Invoice date', - 'internal_reference' => 'Internal reference', -]; diff --git a/resources/lang/zh-HK/help.php b/resources/lang/zh-HK/help.php deleted file mode 100644 index 5198e5510f..0000000000 --- a/resources/lang/zh-HK/help.php +++ /dev/null @@ -1,33 +0,0 @@ - 'Welcome to Firefly III', - 'main-content-text' => 'Do yourself a favor and follow this short guide to make sure you know your way around.', - 'sidebar-toggle-title' => 'Sidebar to create stuff', - 'sidebar-toggle-text' => 'Hidden under the plus icon are all the buttons to create new stuff. Accounts, transactions, everything!', - 'account-menu-title' => 'All your accounts', - 'account-menu-text' => 'Here you can find all the accounts you\'ve made.', - 'budget-menu-title' => 'Budgets', - 'budget-menu-text' => 'Use this page to organise your finances and limit spending.', - 'report-menu-title' => 'Reports', - 'report-menu-text' => 'Check this out when you want a solid overview of your finances.', - 'transaction-menu-title' => 'Transactions', - 'transaction-menu-text' => 'All transactions you\'ve created can be found here.', - 'option-menu-title' => 'Options', - 'option-menu-text' => 'This is pretty self-explanatory.', - 'main-content-end-title' => 'The end!', - 'main-content-end-text' => 'Remember that every page has a small question mark at the right top. Click it to get help about the page you\'re on.', - 'index' => 'index', - 'home' => 'home', -]; diff --git a/resources/lang/zh-HK/list.php b/resources/lang/zh-HK/list.php deleted file mode 100644 index ba44232dd4..0000000000 --- a/resources/lang/zh-HK/list.php +++ /dev/null @@ -1,88 +0,0 @@ - 'Buttons', - 'icon' => 'Icon', - 'create_date' => 'Created at', - 'update_date' => 'Updated at', - 'balance_before' => 'Balance before', - 'balance_after' => 'Balance after', - 'name' => 'Name', - 'role' => 'Role', - 'currentBalance' => 'Current balance', - 'active' => 'Is active?', - 'lastActivity' => 'Last activity', - 'balanceDiff' => 'Balance difference between :start and :end', - 'matchedOn' => 'Matched on', - 'matchesOn' => 'Matched on', - 'account_type' => 'Account type', - 'created_at' => 'Created at', - 'new_balance' => 'New balance', - 'account' => 'Account', - 'matchingAmount' => 'Amount', - 'lastMatch' => 'Last match', - 'split_number' => 'Split #', - 'destination' => 'Destination', - 'source' => 'Source', - 'expectedMatch' => 'Expected match', - 'automatch' => 'Auto match?', - 'repeat_freq' => 'Repeats', - 'description' => 'Description', - 'amount' => 'Amount', - 'internal_reference' => 'Internal reference', - 'date' => 'Date', - 'interest_date' => 'Interest date', - 'book_date' => 'Book date', - 'process_date' => 'Processing date', - 'due_date' => 'Due date', - 'payment_date' => 'Payment date', - 'invoice_date' => 'Invoice date', - 'interal_reference' => 'Internal reference', - 'notes' => 'Notes', - 'from' => 'From', - 'piggy_bank' => 'Piggy bank', - 'to' => 'To', - 'budget' => 'Budget', - 'category' => 'Category', - 'bill' => 'Bill', - 'withdrawal' => 'Withdrawal', - 'deposit' => 'Deposit', - 'transfer' => 'Transfer', - 'type' => 'Type', - 'completed' => 'Completed', - 'iban' => 'IBAN', - 'paid_current_period' => 'Paid this period', - 'email' => 'Email', - 'registered_at' => 'Registered at', - 'is_activated' => 'Is activated', - 'is_blocked' => 'Is blocked', - 'is_admin' => 'Is admin', - 'has_two_factor' => 'Has 2FA', - 'confirmed_from' => 'Confirmed from', - 'registered_from' => 'Registered from', - 'blocked_code' => 'Block code', - 'domain' => 'Domain', - 'registration_attempts' => 'Registration attempts', - 'source_account' => 'Source account', - 'destination_account' => 'Destination account', - - 'accounts_count' => 'Number of accounts', - 'journals_count' => 'Number of journals', - 'attachments_count' => 'Number of attachments', - 'bills_count' => 'Number of bills', - 'categories_count' => 'Number of categories', - 'export_jobs_count' => 'Number of export jobs', - 'import_jobs_count' => 'Number of import jobs', - 'budget_count' => 'Number of budgets', - 'rule_and_groups_count' => 'Number of rules and rule groups', - 'tags_count' => 'Number of tags', -]; diff --git a/resources/lang/zh-HK/pagination.php b/resources/lang/zh-HK/pagination.php deleted file mode 100644 index 9e61a6cfcc..0000000000 --- a/resources/lang/zh-HK/pagination.php +++ /dev/null @@ -1,17 +0,0 @@ - '« Previous', - 'next' => 'Next »', - -]; diff --git a/resources/lang/zh-HK/passwords.php b/resources/lang/zh-HK/passwords.php deleted file mode 100644 index 8e1b72506b..0000000000 --- a/resources/lang/zh-HK/passwords.php +++ /dev/null @@ -1,19 +0,0 @@ - 'Passwords must be at least six characters and match the confirmation.', - 'user' => 'We can\'t find a user with that e-mail address.', - 'token' => 'This password reset token is invalid.', - 'sent' => 'We have e-mailed your password reset link!', - 'reset' => 'Your password has been reset!', - 'blocked' => 'Nice try though.', -]; diff --git a/resources/lang/zh-HK/validation.php b/resources/lang/zh-HK/validation.php deleted file mode 100644 index 030e6a72c5..0000000000 --- a/resources/lang/zh-HK/validation.php +++ /dev/null @@ -1,87 +0,0 @@ - 'This is not a valid IBAN.', - 'unique_account_number_for_user' => 'It looks like this account number is already in use.', - 'rule_trigger_value' => 'This value is invalid for the selected trigger.', - 'rule_action_value' => 'This value is invalid for the selected action.', - 'invalid_domain' => 'Due to security constraints, you cannot register from this domain.', - 'file_already_attached' => 'Uploaded file ":name" is already attached to this object.', - 'file_attached' => 'Succesfully uploaded file ":name".', - 'file_invalid_mime' => 'File ":name" is of type ":mime" which is not accepted as a new upload.', - 'file_too_large' => 'File ":name" is too large.', - 'belongs_to_user' => 'The value of :attribute is unknown', - 'accepted' => 'The :attribute must be accepted.', - 'active_url' => 'The :attribute is not a valid URL.', - 'after' => 'The :attribute must be a date after :date.', - 'alpha' => 'The :attribute may only contain letters.', - 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', - 'alpha_num' => 'The :attribute may only contain letters and numbers.', - 'array' => 'The :attribute must be an array.', - 'unique_for_user' => 'There already is an entry with this :attribute.', - 'before' => 'The :attribute must be a date before :date.', - 'unique_object_for_user' => 'This name is already in use', - 'unique_account_for_user' => 'This account name is already in use', - 'between.numeric' => 'The :attribute must be between :min and :max.', - 'between.file' => 'The :attribute must be between :min and :max kilobytes.', - 'between.string' => 'The :attribute must be between :min and :max characters.', - 'between.array' => 'The :attribute must have between :min and :max items.', - 'boolean' => 'The :attribute field must be true or false.', - 'confirmed' => 'The :attribute confirmation does not match.', - 'date' => 'The :attribute is not a valid date.', - 'date_format' => 'The :attribute does not match the format :format.', - 'different' => 'The :attribute and :other must be different.', - 'digits' => 'The :attribute must be :digits digits.', - 'digits_between' => 'The :attribute must be between :min and :max digits.', - 'email' => 'The :attribute must be a valid email address.', - 'filled' => 'The :attribute field is required.', - 'exists' => 'The selected :attribute is invalid.', - 'image' => 'The :attribute must be an image.', - 'in' => 'The selected :attribute is invalid.', - 'integer' => 'The :attribute must be an integer.', - 'ip' => 'The :attribute must be a valid IP address.', - 'json' => 'The :attribute must be a valid JSON string.', - 'max.numeric' => 'The :attribute may not be greater than :max.', - 'max.file' => 'The :attribute may not be greater than :max kilobytes.', - 'max.string' => 'The :attribute may not be greater than :max characters.', - 'max.array' => 'The :attribute may not have more than :max items.', - 'mimes' => 'The :attribute must be a file of type: :values.', - 'min.numeric' => 'The :attribute must be at least :min.', - 'min.file' => 'The :attribute must be at least :min kilobytes.', - 'min.string' => 'The :attribute must be at least :min characters.', - 'min.array' => 'The :attribute must have at least :min items.', - 'not_in' => 'The selected :attribute is invalid.', - 'numeric' => 'The :attribute must be a number.', - 'regex' => 'The :attribute format is invalid.', - 'required' => 'The :attribute field is required.', - 'required_if' => 'The :attribute field is required when :other is :value.', - 'required_unless' => 'The :attribute field is required unless :other is in :values.', - 'required_with' => 'The :attribute field is required when :values is present.', - 'required_with_all' => 'The :attribute field is required when :values is present.', - 'required_without' => 'The :attribute field is required when :values is not present.', - 'required_without_all' => 'The :attribute field is required when none of :values are present.', - 'same' => 'The :attribute and :other must match.', - 'size.numeric' => 'The :attribute must be :size.', - 'size.file' => 'The :attribute must be :size kilobytes.', - 'size.string' => 'The :attribute must be :size characters.', - 'size.array' => 'The :attribute must contain :size items.', - 'unique' => 'The :attribute has already been taken.', - 'string' => 'The :attribute must be a string.', - 'url' => 'The :attribute format is invalid.', - 'timezone' => 'The :attribute must be a valid zone.', - '2fa_code' => 'The :attribute field is invalid.', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'file' => 'The :attribute must be a file.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'present' => 'The :attribute field must be present.', -]; diff --git a/resources/lang/zh-TW/auth.php b/resources/lang/zh-TW/auth.php deleted file mode 100644 index 7319a9d7b8..0000000000 --- a/resources/lang/zh-TW/auth.php +++ /dev/null @@ -1,28 +0,0 @@ - 'These credentials do not match our records.', - 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', - -]; diff --git a/resources/lang/zh-TW/breadcrumbs.php b/resources/lang/zh-TW/breadcrumbs.php deleted file mode 100644 index a5fe3d1755..0000000000 --- a/resources/lang/zh-TW/breadcrumbs.php +++ /dev/null @@ -1,41 +0,0 @@ - '首頁', - 'edit_currency' => '編輯貨幣 ":name"', - 'delete_currency' => '刪除貨幣 ":name"', - 'newPiggyBank' => '創建一個新的存錢筒', - 'edit_piggyBank' => '編輯存錢筒 ":name"', - 'preferences' => '設定', - 'profile' => '個人設定', - 'changePassword' => '更改密碼', - 'bills' => '賬單', - 'newBill' => '新增賬單', - 'edit_bill' => '編輯賬單 ":name"', - 'delete_bill' => '刪除賬單 ":name"', - 'reports' => '報表', - 'searchResult' => '搜尋 ":query"', - 'withdrawal_list' => '支出', - 'deposit_list' => '收入、薪金與存款', - 'transfer_list' => '轉帳', - 'transfers_list' => '轉帳', - 'create_withdrawal' => '新增提款', - 'create_deposit' => '新增存款', - 'create_transfer' => '新增轉帳', - 'edit_journal' => '編緝交易 ":description"', - 'delete_journal' => '刪除交易 ":description"', - 'tags' => '標籤', - 'createTag' => '建立新標籤', - 'edit_tag' => '編輯標籤 ":tag"', - 'delete_tag' => '刪除標籤 ":tag"', -]; diff --git a/resources/lang/zh-TW/config.php b/resources/lang/zh-TW/config.php deleted file mode 100644 index 0c23d3f6cd..0000000000 --- a/resources/lang/zh-TW/config.php +++ /dev/null @@ -1,23 +0,0 @@ - 'en, English, en_US, en_US.utf8', - 'month' => '%B %Y', - 'month_and_day' => '%B %e, %Y', - 'date_time' => '%B %e, %Y, @ %T', - 'specific_day' => '%e %B %Y', - 'week_in_year' => 'Week %W, %Y', - 'quarter_of_year' => '%B %Y', - 'year' => '%Y', - 'half_year' => '%B %Y', - -]; diff --git a/resources/lang/zh-TW/csv.php b/resources/lang/zh-TW/csv.php deleted file mode 100644 index d9c355fddc..0000000000 --- a/resources/lang/zh-TW/csv.php +++ /dev/null @@ -1,81 +0,0 @@ - '匯入設定', - 'import_configure_intro' => '這裡有一些 CSV 匯入選項。請檢查你的 CSV 檔的第一列是否包含欄位名稱,和你的日期格式是什麼。你可能需要嘗試幾次來調整正確。欄位分隔符號是通常 ",",但也可能是";";仔細檢查這一點。', - 'import_configure_form' => '表單', - 'header_help' => 'CSV 檔的第一行是標題', - 'date_help' => 'CSV 內的日期格式。請跟從這頁內的格式來填寫。 系統預設能夠解析像這樣的日期: :dateExample 。', - 'delimiter_help' => '請選擇你的檔案中所使用的欄位分隔符號。如果不肯定的話,逗號是最安全的選項。', - 'import_account_help' => '如果你的 CSV 檔中沒有包含資產帳戶的資料,請選擇相關聯的帳戶。', - 'upload_not_writeable' => '不能寫入檔案。灰色框內包含檔案的路徑,伺服器需要寫入該檔案的權限。請調整伺服器權限設定後再試。', - - // roles - 'column_roles_title' => '定義欄的內容', - 'column_roles_text' => '

Firefly III 猜不出每一欄中儲存了什麼資料。你必須告訴 Firefly 每一欄中有什麼資料。 下列的示範資料可以幫助你從列表中選擇正確類型。如果有欄位不能配對到有用的類型,請告訴我 (只有英語版本)

你的 CSV 檔中某些欄位可能已經存在於 Firefly III 的資料庫內,例如帳號名稱,或類別。如果你選擇「配對這些資料」, Firefly 會請你手動配對 CSV 檔和資料庫內的資料。這容許你微調你的匯入設定。

', - 'column_roles_table' => '表格', - 'column_name' => '欄位名稱', - 'column_example' => '欄的示例資料', - 'column_role' => '欄內資料的含義', - 'do_map_value' => '配對這些資料', - 'column' => '欄', - 'no_example_data' => '沒有可用的示例資料', - 'store_column_roles' => '繼續匯入', - 'do_not_map' => '(不要配對)', - 'map_title' => '配對匯入了的資料到 Firefly III 的資料', - 'map_text' => '在下表中,左邊的是在你的CSV 檔中的資料。而你現在要把這些資料配對到資料庫中的資料(如有的話)。如果沒有資料能夠進行配對,或者你不想進行配對,請選擇不進行配對。', - - 'field_value' => '欄位值', - 'field_mapped_to' => '配對到', - 'store_column_mapping' => '存儲配對', - - // map things. - - - 'column__ignore' => '(忽略此欄)', - 'column_account-iban' => '資產帳戶 (IBAN)', - 'column_account-id' => '資產帳戶 ID (與 Firefly 匹配)', - 'column_account-name' => '資產帳戶 (名稱)', - 'column_amount' => '金額', - 'column_amount-comma-separated' => '金額 (逗號作為小數分隔符號)', - 'column_bill-id' => '帳單 ID (與 Firefly 匹配)', - 'column_bill-name' => '帳單名稱', - 'column_budget-id' => '預算 ID (與 Firefly 匹配)', - 'column_budget-name' => '預算名稱', - 'column_category-id' => '類別 ID (與 Firefly 匹配)', - 'column_category-name' => '類別名稱', - 'column_currency-code' => '貨幣代碼 (ISO 4217)', - 'column_currency-id' => '貨幣 ID (與 Firefly 匹配)', - 'column_currency-name' => '貨幣名稱(與 Firefly 匹配)', - 'column_currency-symbol' => '貨幣符號 (與 Firefly 匹配)', - 'column_date-interest' => '利息計算日', - 'column_date-book' => 'Transaction booking date', - 'column_date-process' => '交易處理日期', - 'column_date-transaction' => '日期', - 'column_description' => '描述', - 'column_opposing-iban' => '抵銷的帳戶 (IBAN)', - 'column_opposing-id' => '抵銷的帳戶 ID (與 Firefly 匹配)', - 'column_external-id' => '外部 ID', - 'column_opposing-name' => '抵銷的帳戶 (名稱)', - 'column_rabo-debet-credit' => '荷蘭合作銀行獨有的借記/貸記指標', - 'column_ing-debet-credit' => 'ING 集團獨有的借記/貸記指標', - 'column_sepa-ct-id' => 'SEPA Credit Transfer end-to-end ID', - 'column_sepa-ct-op' => 'SEPA 貸記劃撥抵銷的帳戶', - 'column_sepa-db' => 'SEPA 直接付款', - 'column_tags-comma' => '標籤 (逗號分隔)', - 'column_tags-space' => '標籤 (空格分隔)', - 'column_account-number' => '資產帳戶 (帳號號碼)', - 'column_opposing-number' => '抵銷的帳戶 (帳號號碼)', -]; diff --git a/resources/lang/zh-TW/firefly.php b/resources/lang/zh-TW/firefly.php deleted file mode 100644 index 66788da50c..0000000000 --- a/resources/lang/zh-TW/firefly.php +++ /dev/null @@ -1,833 +0,0 @@ - '翻譯不完整', - 'close' => '關閉', - 'actions' => '操作', - 'edit' => '編輯', - 'delete' => '刪除', - 'welcomeBack' => '情況如何?', - 'everything' => '顯示所有', - 'customRange' => '自訂範圍', - 'apply' => '套用', - 'cancel' => '取消', - 'from' => '從', - 'to' => '到', - 'showEverything' => '全部顯示', - 'never' => '從來沒有', - 'search_results_for' => '":query" 的搜尋結果', - 'bounced_error' => '無法傳送電郵至 :email ,因此無法訪問。', - 'deleted_error' => '帳號或密碼錯誤。', - 'general_blocked_error' => '您的帳戶已被禁用,所以您不能登錄。', - 'expired_error' => '你的帳戶已過期,不能使用。', - 'removed_amount' => '移除了 :amount', - 'added_amount' => '添加了 :amount', - 'asset_account_role_help' => '你可以稍後再設置其他選項。', - 'Opening balance' => '開戶金額', - 'create_new_stuff' => '創建新的東西', - 'new_withdrawal' => '新提款', - 'new_deposit' => '新存款', - 'new_transfer' => '新的轉帳', - 'new_asset_account' => '新增資產帳戶', - 'new_expense_account' => '新的支出帳戶', - 'new_revenue_account' => '新的收入帳戶', - 'new_budget' => '新增預算', - 'new_bill' => '新增賬單', - 'block_account_logout' => '你已被登出。被封禁的帳戶不能使用本網站。你沒有以有效的電子郵件地址註冊嗎?', - 'flash_success' => '成功!', - 'flash_info' => '訊息', - 'flash_warning' => '警告!', - 'flash_error' => '錯誤!', - 'flash_info_multiple' => '有一個訊息|有 :count 個訊息', - 'flash_error_multiple' => '出現了一個錯誤|出現了 :count 個錯誤', - 'net_worth' => '淨值', - 'route_has_no_help' => '目前沒有說明,或沒有中文的說明可用。', - 'two_factor_welcome' => '哈囉, :user !', - 'two_factor_enter_code' => '若要繼續,請輸入你的雙重身份驗證 (2FA) 應用程序內顯示的驗證代碼。', - 'two_factor_code_here' => '在此輸入代碼', - 'two_factor_title' => '雙重身份驗證', - 'authenticate' => '認證', - 'two_factor_forgot_title' => '丟失雙重身份驗證', - 'two_factor_forgot' => '我忘記了我的雙重身份驗證 (2FA) 。', - 'two_factor_lost_header' => '丟失了雙重身份驗證 (2FA) 嗎?', - 'two_factor_lost_intro' => '很不幸,這不可以從 web 介面中重置。你有兩個選擇。', - 'two_factor_lost_fix_self' => '如果你在自己的伺服器上運行 Firefly III,請檢查 storage/logs 中的日誌。', - 'two_factor_lost_fix_owner' => '否則,請電郵網站擁有者,:site_owner 並要求他們重置你的雙重身份驗證。', - 'warning_much_data' => ':days 天的資料需要一點時間載入。', - 'registered' => '您已成功註冊 !', - 'search' => '搜尋', - 'no_budget_pointer' => '你還沒有預算。你可以在預算頁來建立預算。預算可以幫助你跟蹤支出情況。', - 'source_accounts' => '來源帳戶', - 'destination_accounts' => '目標帳戶', - 'user_id_is' => 'Your user id is :user', - 'field_supports_markdown' => 'This field supports Markdown.', - - // repeat frequencies: - 'repeat_freq_monthly' => '每月', - 'weekly' => '每週', - 'quarterly' => '每季', - 'half-year' => '每半年', - 'yearly' => '每年', - // account confirmation: - 'confirm_account_header' => '請確認你的帳戶', - 'confirm_account_intro' => 'An email has been sent to the address you used during your registration. Please check it out for further instructions. If you did not get this message, you can have Firefly send it again.', - 'confirm_account_resend_email' => 'Send me the confirmation message I need to activate my account.', - 'account_is_confirmed' => '你的帳戶已通過驗證。', - 'invalid_activation_code' => 'It seems the code you are using is not valid, or has expired.', - 'confirm_account_is_resent_header' => '已重新發送確認郵件', - 'confirm_account_is_resent_text' => 'The confirmation message has been resent. If you still did not receive the confirmation message, please contact the site owner at :owner or check the log files to see what went wrong.', - 'confirm_account_is_resent_go_home' => '轉到 Firefly 的首頁', - 'confirm_account_not_resent_header' => '有些事不對勁 :(', - 'confirm_account_not_resent_intro' => 'The confirmation message has been not resent. If you still did not receive the confirmation message, please contact the site owner at :owner instead. Possibly, you have tried to resend the activation message too often. You can have Firefly III try to resend the confirmation message every hour.', - 'confirm_account_not_resent_go_home' => '轉到 Firefly 的首頁', - - // export data: - 'import_and_export' => '匯入與匯出', - 'export_data' => 'Export data', - 'export_data_intro' => 'For backup purposes, when migrating to another system or when migrating to another Firefly III installation.', - 'export_format' => 'Export format', - 'export_format_csv' => 'Comma separated values (CSV file)', - 'export_format_mt940' => 'MT940 相容格式', - 'export_included_accounts' => '從這些帳戶匯出交易記錄', - 'include_config_help' => '為方便重新導入到 Firefly III', - 'include_old_uploads_help' => 'Firefly III 不會扔掉過去已導入的原始 CSV 檔。你可以將它們包含在匯出的檔案中。', - 'do_export' => '匯出', - 'export_status_never_started' => '匯出尚未開始', - 'export_status_make_exporter' => 'Creating exporter thing...', - 'export_status_collecting_journals' => '正在收集你的交易資料...', - 'export_status_collected_journals' => '你的交易資料已經收集成功!', - 'export_status_converting_to_export_format' => '正在轉換您的交易資料...', - 'export_status_converted_to_export_format' => 'Converted your transactions!', - 'export_status_creating_journal_file' => 'Creating the export file...', - 'export_status_created_journal_file' => 'Created the export file!', - 'export_status_collecting_attachments' => 'Collecting all your attachments...', - 'export_status_collected_attachments' => 'Collected all your attachments!', - 'export_status_collecting_old_uploads' => 'Collecting all your previous uploads...', - 'export_status_collected_old_uploads' => 'Collected all your previous uploads!', - 'export_status_creating_config_file' => 'Creating a configuration file...', - 'export_status_created_config_file' => 'Created a configuration file!', - 'export_status_creating_zip_file' => 'Creating a zip file...', - 'export_status_created_zip_file' => 'Created a zip file!', - 'export_status_finished' => 'Export has succesfully finished! Yay!', - 'export_data_please_wait' => 'Please wait...', - 'attachment_explanation' => '檔案 \':attachment_name\' (#:attachment_id) 本來於 :date 上傳到 :type \':description\' (#:journal_id) ,而其金額為 :amount 。', - - // rules - 'rules' => 'Rules', - 'rules_explanation' => 'Here you can manage rules. Rules are triggered when a transaction is created or updated. Then, if the transaction has certain properties (called "triggers") Firefly will execute the "actions". Combined, you can make Firefly respond in a certain way to new transactions.', - 'rule_name' => 'Name of rule', - 'rule_triggers' => 'Rule triggers when', - 'rule_actions' => 'Rule will', - 'new_rule' => 'New rule', - 'new_rule_group' => 'New rule group', - 'rule_priority_up' => 'Give rule more priority', - 'rule_priority_down' => 'Give rule less priority', - 'make_new_rule_group' => 'Make new rule group', - 'store_new_rule_group' => 'Store new rule group', - 'created_new_rule_group' => 'New rule group ":title" stored!', - 'updated_rule_group' => 'Successfully updated rule group ":title".', - 'edit_rule_group' => 'Edit rule group ":title"', - 'delete_rule_group' => 'Delete rule group ":title"', - 'deleted_rule_group' => 'Deleted rule group ":title"', - 'update_rule_group' => 'Update rule group', - 'no_rules_in_group' => 'There are no rules in this group', - 'move_rule_group_up' => 'Move rule group up', - 'move_rule_group_down' => 'Move rule group down', - 'save_rules_by_moving' => 'Save these rule(s) by moving them to another rule group:', - 'make_new_rule' => 'Make new rule in rule group ":title"', - 'rule_help_stop_processing' => 'When you check this box, later rules in this group will not be executed.', - 'rule_help_active' => 'Inactive rules will never fire.', - 'stored_new_rule' => 'Stored new rule with title ":title"', - 'deleted_rule' => 'Deleted rule with title ":title"', - 'store_new_rule' => 'Store new rule', - 'updated_rule' => 'Updated rule with title ":title"', - 'default_rule_group_name' => 'Default rules', - 'default_rule_group_description' => '所有不屬於任何組別的規則', - 'default_rule_name' => 'Your first default rule', - 'default_rule_description' => '這是一個例子。你可以把這個規則刪除。', - 'default_rule_trigger_description' => '賣世界的小男孩', - 'default_rule_trigger_from_account' => 'David Bowie', - 'default_rule_action_prepend' => '買下了整個世界。錢給了', - 'default_rule_action_set_category' => 'Large expenses', - 'trigger' => 'Trigger', - 'trigger_value' => 'Trigger on value', - 'stop_processing_other_triggers' => 'Stop processing other triggers', - 'add_rule_trigger' => 'Add new trigger', - 'action' => 'Action', - 'action_value' => 'Action value', - 'stop_executing_other_actions' => 'Stop executing other actions', - 'add_rule_action' => 'Add new action', - 'edit_rule' => 'Edit rule ":title"', - 'delete_rule' => 'Delete rule ":title"', - 'update_rule' => 'Update rule', - 'test_rule_triggers' => 'See matching transactions', - 'warning_transaction_subset' => 'For performance reasons this list is limited to :max_num_transactions and may only show a subset of matching transactions', - 'warning_no_matching_transactions' => 'No matching transactions found. Please note that for performance reasons, only the last :num_transactions transactions have been checked.', - 'warning_no_valid_triggers' => 'No valid triggers provided.', - 'execute_on_existing_transactions' => 'Execute for existing transactions', - 'execute_on_existing_transactions_intro' => 'When a rule or group has been changed or added, you can execute it for existing transactions', - 'execute_on_existing_transactions_short' => 'Existing transactions', - 'executed_group_on_existing_transactions' => 'Executed group ":title" for existing transactions', - 'execute_group_on_existing_transactions' => 'Execute group ":title" for existing transactions', - 'include_transactions_from_accounts' => 'Include transactions from these accounts', - 'execute' => 'Execute', - - // actions and triggers - 'rule_trigger_user_action' => 'User action is ":trigger_value"', - 'rule_trigger_from_account_starts' => '以 ":trigger_value" 開頭的來源帳戶', - 'rule_trigger_from_account_ends' => '以 ":trigger_value" 為結尾的來源帳戶', - 'rule_trigger_from_account_is' => '來源帳戶是 ":trigger_value"', - 'rule_trigger_from_account_contains' => '含 ":trigger_value" 的來源帳戶', - 'rule_trigger_to_account_starts' => 'Destination account starts with ":trigger_value"', - 'rule_trigger_to_account_ends' => 'Destination account ends with ":trigger_value"', - 'rule_trigger_to_account_is' => 'Destination account is ":trigger_value"', - 'rule_trigger_to_account_contains' => 'Destination account contains ":trigger_value"', - 'rule_trigger_transaction_type' => 'Transaction is of type ":trigger_value"', - 'rule_trigger_amount_less' => 'Amount is less than :trigger_value', - 'rule_trigger_amount_exactly' => 'Amount is :trigger_value', - 'rule_trigger_amount_more' => 'Amount is more than :trigger_value', - 'rule_trigger_description_starts' => '以 ":trigger_value" 開頭的描述', - 'rule_trigger_description_ends' => '以 ":trigger_value" 為結尾的描述', - 'rule_trigger_description_contains' => '含 ":trigger_value" 的描述', - 'rule_trigger_description_is' => '描述是 ":trigger_value"', - 'rule_trigger_from_account_starts_choice' => '來源帳戶以…開頭', - 'rule_trigger_from_account_ends_choice' => '來源帳戶以…結尾', - 'rule_trigger_from_account_is_choice' => '來源帳戶是…', - 'rule_trigger_from_account_contains_choice' => '來源帳戶含有…', - 'rule_trigger_to_account_starts_choice' => 'Destination account starts with..', - 'rule_trigger_to_account_ends_choice' => 'Destination account ends with..', - 'rule_trigger_to_account_is_choice' => 'Destination account is..', - 'rule_trigger_to_account_contains_choice' => 'Destination account contains..', - 'rule_trigger_transaction_type_choice' => 'Transaction is of type..', - 'rule_trigger_amount_less_choice' => 'Amount is less than..', - 'rule_trigger_amount_exactly_choice' => 'Amount is..', - 'rule_trigger_amount_more_choice' => 'Amount is more than..', - 'rule_trigger_description_starts_choice' => '描述以…開頭', - 'rule_trigger_description_ends_choice' => '描述以…結尾', - 'rule_trigger_description_contains_choice' => '描述包含…', - 'rule_trigger_description_is_choice' => '描述是…', - 'rule_trigger_store_journal' => 'When a journal is created', - 'rule_trigger_update_journal' => 'When a journal is updated', - 'rule_action_set_category' => 'Set category to ":action_value"', - 'rule_action_clear_category' => 'Clear category', - 'rule_action_set_budget' => 'Set budget to ":action_value"', - 'rule_action_clear_budget' => 'Clear budget', - 'rule_action_add_tag' => '新增標籤 ":action_value"', - 'rule_action_remove_tag' => '刪除標籤 ":action_value"', - 'rule_action_remove_all_tags' => '移除所有標籤', - 'rule_action_set_description' => '設置描述為 ":action_value"', - 'rule_action_append_description' => '描述後加上 ":action_value"', - 'rule_action_prepend_description' => '描述前加上 ":action_value"', - 'rule_action_set_category_choice' => 'Set category to..', - 'rule_action_clear_category_choice' => 'Clear any category', - 'rule_action_set_budget_choice' => 'Set budget to..', - 'rule_action_clear_budget_choice' => 'Clear any budget', - 'rule_action_add_tag_choice' => '新增標籤…', - 'rule_action_remove_tag_choice' => '移除標籤…', - 'rule_action_remove_all_tags_choice' => '移除所有標籤', - 'rule_action_set_description_choice' => '把描述設置為…', - 'rule_action_append_description_choice' => '描述後加上…', - 'rule_action_prepend_description_choice' => '描述前加上…', - - // tags - 'store_new_tag' => '儲存新的標籤', - 'update_tag' => '更新標籤', - 'no_location_set' => 'No location set.', - 'meta_data' => 'Meta data', - 'location' => 'Location', - - // preferences - 'pref_home_screen_accounts' => 'Home screen accounts', - 'pref_home_screen_accounts_help' => 'Which accounts should be displayed on the home page?', - 'pref_view_range' => 'View range', - 'pref_view_range_help' => 'Some charts are automatically grouped in periods. What period would you prefer?', - 'pref_1D' => 'One day', - 'pref_1W' => 'One week', - 'pref_1M' => 'One month', - 'pref_3M' => 'Three months (quarter)', - 'pref_6M' => 'Six months', - 'pref_1Y' => 'One year', - 'pref_languages' => 'Languages', - 'pref_languages_help' => 'Firefly III supports several languages. Which one do you prefer?', - 'pref_custom_fiscal_year' => 'Fiscal year settings', - 'pref_custom_fiscal_year_label' => 'Enabled', - 'pref_custom_fiscal_year_help' => 'In countries that use a financial year other than January 1 to December 31, you can switch this on and specify start / end days of the fiscal year', - 'pref_fiscal_year_start_label' => 'Fiscal year start date', - 'pref_two_factor_auth' => '雙重身份驗證', - 'pref_two_factor_auth_help' => '當您啟用二步驗證 (也稱為雙重身份驗證) 時,你的帳戶安全性將會更上一層樓。你需要以您知道的東西(密碼)和你擁有的東西(驗證碼)來進行登錄。驗證碼是由您的手機上的應用程式生成的,如 Authy 或 Google Authenticator 。', - 'pref_enable_two_factor_auth' => '啟用雙重身份驗證', - 'pref_two_factor_auth_disabled' => '成功刪除和禁用雙重身份驗證', - 'pref_two_factor_auth_remove_it' => '別忘了從你的身份驗證程式(例如 Authy 或 Google Authenticator)中刪除帳戶 !', - 'pref_two_factor_auth_code' => '驗證代碼', - 'pref_two_factor_auth_code_help' => '請以你的手機上的身份驗證應用程式(例如 Authy 或 Google Authenticator)掃描 QR 代碼,然後輸入其所生成的代碼。', - 'pref_two_factor_auth_reset_code' => '重置驗證代碼', - 'pref_two_factor_auth_remove_code' => '刪除驗證代碼', - 'pref_two_factor_auth_remove_will_disable' => '(這也會禁用雙重身份驗證)', - 'pref_save_settings' => 'Save settings', - 'saved_preferences' => 'Preferences saved!', - 'preferences_general' => 'General', - 'preferences_frontpage' => 'Home screen', - 'preferences_security' => 'Security', - 'preferences_layout' => 'Layout', - 'pref_home_show_deposits' => 'Show deposits on the home screen', - 'pref_home_show_deposits_info' => 'The home screen already shows your expense accounts. Should it also show your revenue accounts?', - 'pref_home_do_show_deposits' => 'Yes, show them', - 'successful_count' => 'of which :count successful', - 'transaction_page_size_title' => 'Page size', - 'transaction_page_size_help' => 'Any list of transactions shows at most this many transactions', - 'transaction_page_size_label' => 'Page size', - 'between_dates' => '(:start and :end)', - 'pref_optional_fields_transaction' => 'Optional fields for transactions', - 'pref_optional_fields_transaction_help' => 'By default not all fields are enabled when creating a new transaction (because of the clutter). Below, you can enable these fields if you think they could be useful for you. Of course, any field that is disabled, but already filled in, will be visible regardless of the setting.', - 'optional_tj_date_fields' => 'Date fields', - 'optional_tj_business_fields' => 'Business fields', - 'optional_tj_attachment_fields' => 'Attachment fields', - 'pref_optional_tj_interest_date' => 'Interest date', - 'pref_optional_tj_book_date' => 'Book date', - 'pref_optional_tj_process_date' => 'Processing date', - 'pref_optional_tj_due_date' => '到期日', - 'pref_optional_tj_payment_date' => 'Payment date', - 'pref_optional_tj_invoice_date' => 'Invoice date', - 'pref_optional_tj_internal_reference' => 'Internal reference', - 'pref_optional_tj_notes' => 'Notes', - 'pref_optional_tj_attachments' => 'Attachments', - 'optional_field_meta_dates' => 'Dates', - 'optional_field_meta_business' => 'Business', - 'optional_field_attachments' => 'Attachments', - 'optional_field_meta_data' => 'Optional meta data', - - - // profile: - 'change_your_password' => 'Change your password', - 'delete_account' => 'Delete account', - 'current_password' => 'Current password', - 'new_password' => 'New password', - 'new_password_again' => 'New password (again)', - 'delete_your_account' => 'Delete your account', - 'delete_your_account_help' => 'Deleting your account will also delete any accounts, transactions, anything you might have saved into Firefly III. It\'ll be GONE.', - 'delete_your_account_password' => 'Enter your password to continue.', - 'password' => 'Password', - 'are_you_sure' => 'Are you sure? You cannot undo this.', - 'delete_account_button' => 'DELETE your account', - 'invalid_current_password' => 'Invalid current password!', - 'password_changed' => 'Password changed!', - 'should_change' => 'The idea is to change your password.', - 'invalid_password' => 'Invalid password!', - - - // attachments - 'nr_of_attachments' => 'One attachment|:count attachments', - 'attachments' => 'Attachments', - 'edit_attachment' => 'Edit attachment ":name"', - 'update_attachment' => 'Update attachment', - 'delete_attachment' => 'Delete attachment ":name"', - 'attachment_deleted' => 'Deleted attachment ":name"', - 'attachment_updated' => 'Updated attachment ":name"', - 'upload_max_file_size' => 'Maximum file size: :size', - - // tour: - 'prev' => 'Prev', - 'next' => 'Next', - 'end-tour' => 'End tour', - 'pause' => 'Pause', - - // transaction index - 'title_expenses' => 'Expenses', - 'title_withdrawal' => 'Expenses', - 'title_revenue' => 'Revenue / income', - 'title_deposit' => 'Revenue / income', - 'title_transfer' => 'Transfers', - 'title_transfers' => 'Transfers', - - // create new stuff: - 'create_new_withdrawal' => 'Create new withdrawal', - 'create_new_deposit' => 'Create new deposit', - 'create_new_transfer' => 'Create new transfer', - 'create_new_asset' => '建立新的資產帳戶', - 'create_new_expense' => 'Create new expense account', - 'create_new_revenue' => 'Create new revenue account', - 'create_new_piggy_bank' => 'Create new piggy bank', - 'create_new_bill' => '建立新賬單', - - // currencies: - 'create_currency' => 'Create a new currency', - 'store_currency' => 'Store new currency', - 'update_currency' => 'Update currency', - 'new_default_currency' => ':name is now the default currency.', - 'cannot_delete_currency' => 'Cannot delete :name because it is still in use.', - 'deleted_currency' => 'Currency :name deleted', - 'created_currency' => 'Currency :name created', - 'updated_currency' => 'Currency :name updated', - 'ask_site_owner' => 'Please ask :owner to add, remove or edit currencies.', - 'currencies_intro' => 'Firefly III supports various currencies which you can set and enable here.', - 'make_default_currency' => 'make default', - 'default_currency' => 'default', - - // new user: - 'submit' => 'Submit', - 'getting_started' => 'Getting started', - 'to_get_started' => '請輸入你的銀行名稱和帳戶餘額,以開始使用 Firefly︰', - 'savings_balance_text' => '如果你有儲蓄帳戶的話,請輸入你的儲蓄帳戶當前的餘額︰', - 'cc_balance_text' => '如果你有信用卡,請輸入你的信用卡限額。', - 'stored_new_account_new_user' => 'Yay! Your new account has been stored.', - 'stored_new_accounts_new_user' => 'Yay! Your new accounts have been stored.', - - // forms: - 'mandatoryFields' => 'Mandatory fields', - 'optionalFields' => 'Optional fields', - 'options' => 'Options', - - // budgets: - 'create_new_budget' => 'Create a new budget', - 'store_new_budget' => 'Store new budget', - 'stored_new_budget' => 'Stored new budget ":name"', - 'available_between' => 'Available between :start and :end', - 'transactionsWithoutBudget' => 'Expenses without budget', - 'transactions_no_budget' => 'Expenses without budget between :start and :end', - 'spent_between' => 'Spent between :start and :end', - 'createBudget' => 'New budget', - 'inactiveBudgets' => 'Inactive budgets', - 'without_budget_between' => 'Transactions without a budget between :start and :end', - 'budget_in_month' => ':name in :month', - 'delete_budget' => 'Delete budget ":name"', - 'deleted_budget' => 'Deleted budget ":name"', - 'edit_budget' => 'Edit budget ":name"', - 'updated_budget' => 'Updated budget ":name"', - 'update_amount' => 'Update amount', - 'update_budget' => 'Update budget', - 'update_budget_amount_range' => 'Update (expected) available amount between :start and :end', - - // bills: - 'matching_on' => 'Matching on', - 'between_amounts' => 'between :low and :high.', - 'repeats' => 'Repeats', - 'connected_journals' => 'Connected transactions', - 'auto_match_on' => 'Automatically matched by Firefly', - 'auto_match_off' => 'Not automatically matched by Firefly', - 'next_expected_match' => 'Next expected match', - 'delete_bill' => '刪除賬單 ":name"', - 'deleted_bill' => '成功刪除賬單 ":name"', - 'edit_bill' => '編輯賬單 ":name"', - 'more' => 'More', - 'rescan_old' => 'Rescan old transactions', - 'update_bill' => '更新賬單', - 'updated_bill' => '更新了帳單 ":name"', - 'store_new_bill' => '儲存新的賬單', - 'stored_new_bill' => '儲存了新的賬單 ":name"', - 'cannot_scan_inactive_bill' => 'Inactive bills cannot be scanned.', - 'rescanned_bill' => 'Rescanned everything.', - 'bill_date_little_relevance' => 'Firefly 只會使用這個日期的日子部分。如果你的賬單的發出日子每月並不固定,輸入當月第一日就可以了。', - 'average_bill_amount_year' => '平均賬單金額 (:year)', - 'average_bill_amount_overall' => '平均賬單金額 (總計)', - - // accounts: - 'details_for_asset' => '資產帳戶的詳細資訊 ":name"', - 'details_for_expense' => 'Details for expense account ":name"', - 'details_for_revenue' => 'Details for revenue account ":name"', - 'details_for_cash' => 'Details for cash account ":name"', - 'store_new_asset_account' => '儲存新的資產帳戶', - 'store_new_expense_account' => 'Store new expense account', - 'store_new_revenue_account' => 'Store new revenue account', - 'edit_asset_account' => '編輯資產帳戶 ":name"', - 'edit_expense_account' => 'Edit expense account ":name"', - 'edit_revenue_account' => 'Edit revenue account ":name"', - 'delete_asset_account' => '刪除資產帳戶 ":name"', - 'delete_expense_account' => 'Delete expense account ":name"', - 'delete_revenue_account' => 'Delete revenue account ":name"', - 'asset_deleted' => '成功刪除資產帳戶 ":name"', - 'expense_deleted' => 'Successfully deleted expense account ":name"', - 'revenue_deleted' => 'Successfully deleted revenue account ":name"', - 'update_asset_account' => '更新資產帳戶資訊', - 'update_expense_account' => 'Update expense account', - 'update_revenue_account' => 'Update revenue account', - 'make_new_asset_account' => '建立新的資產帳戶', - 'make_new_expense_account' => 'Create a new expense account', - 'make_new_revenue_account' => 'Create a new revenue account', - 'asset_accounts' => '資產帳戶', - 'expense_accounts' => 'Expense accounts', - 'revenue_accounts' => 'Revenue accounts', - 'cash_accounts' => 'Cash accounts', - 'Cash account' => 'Cash account', - 'account_type' => 'Account type', - 'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:', - 'stored_new_account' => 'New account ":name" stored!', - 'updated_account' => 'Updated account ":name"', - 'credit_card_options' => 'Credit card options', - - // categories: - 'new_category' => 'New category', - 'create_new_category' => 'Create a new category', - 'without_category' => 'Without a category', - 'update_category' => 'Update category', - 'updated_category' => 'Updated category ":name"', - 'categories' => 'Categories', - 'edit_category' => 'Edit category ":name"', - 'no_category' => '(no category)', - 'category' => 'Category', - 'delete_category' => 'Delete category ":name"', - 'deleted_category' => 'Deleted category ":name"', - 'store_category' => 'Store new category', - 'stored_category' => 'Stored new category ":name"', - 'without_category_between' => 'Without category between :start and :end', - - // transactions: - 'update_withdrawal' => 'Update withdrawal', - 'update_deposit' => 'Update deposit', - 'update_transfer' => 'Update transfer', - 'updated_withdrawal' => '成功更新提款 ":description"', - 'updated_deposit' => '成功更新存款 ":description"', - 'updated_transfer' => '成功更新轉帳 ":description"', - 'delete_withdrawal' => '刪除提款 ":description"', - 'delete_deposit' => '刪除存款 ":description"', - 'delete_transfer' => '刪除轉帳 ":description"', - 'deleted_withdrawal' => '成功刪除提款 ":description"', - 'deleted_deposit' => '成功刪除存款 ":description"', - 'deleted_transfer' => '成功刪除轉帳 ":description"', - 'stored_journal' => '成功建立交易 ":description"', - 'select_transactions' => 'Select transactions', - 'stop_selection' => 'Stop selecting transactions', - 'edit_selected' => 'Edit selected', - 'delete_selected' => 'Delete selected', - 'mass_delete_journals' => 'Delete a number of transactions', - 'mass_edit_journals' => 'Edit a number of transactions', - 'cannot_edit_other_fields' => 'You cannot mass-edit other fields than the ones here, because there is no room to show them. Please follow the link and edit them by one-by-one, if you need to edit these fields.', - 'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.', - 'mass_deleted_transactions_success' => 'Deleted :amount transaction(s).', - 'mass_edited_transactions_success' => 'Updated :amount transaction(s)', - - - // new user: - 'welcome' => 'Welcome to Firefly!', - - // home page: - 'yourAccounts' => 'Your accounts', - 'budgetsAndSpending' => 'Budgets and spending', - 'savings' => 'Savings', - 'markAsSavingsToContinue' => '將你的資產帳戶標記為 「儲蓄帳戶」 即可顯示在這裡', - 'createPiggyToContinue' => 'Create piggy banks to fill this panel.', - 'newWithdrawal' => 'New expense', - 'newDeposit' => 'New deposit', - 'newTransfer' => 'New transfer', - 'moneyIn' => 'Money in', - 'moneyOut' => 'Money out', - 'billsToPay' => '待付賬單', - 'billsPaid' => '已付賬單', - 'divided' => 'divided', - 'toDivide' => 'left to divide', - - // menu and titles, should be recycled as often as possible: - 'currency' => 'Currency', - 'preferences' => 'Preferences', - 'logout' => 'Logout', - 'searchPlaceholder' => 'Search...', - 'dashboard' => 'Dashboard', - 'currencies' => 'Currencies', - 'accounts' => 'Accounts', - 'Asset account' => '資產帳戶', - 'Default account' => '資產帳戶', - 'Expense account' => 'Expense account', - 'Revenue account' => 'Revenue account', - 'Initial balance account' => '初始帳戶', - 'budgets' => 'Budgets', - 'tags' => '標籤', - 'reports' => 'Reports', - 'transactions' => 'Transactions', - 'expenses' => 'Expenses', - 'income' => 'Revenue / income', - 'transfers' => 'Transfers', - 'moneyManagement' => 'Money management', - 'piggyBanks' => 'Piggy banks', - 'bills' => '賬單', - 'withdrawal' => 'Withdrawal', - 'deposit' => 'Deposit', - 'account' => 'Account', - 'transfer' => 'Transfer', - 'Withdrawal' => 'Withdrawal', - 'Deposit' => 'Deposit', - 'Transfer' => 'Transfer', - 'bill' => '賬單', - 'yes' => 'Yes', - 'no' => 'No', - 'amount' => 'Amount', - 'overview' => 'Overview', - 'saveOnAccount' => 'Save on account', - 'unknown' => 'Unknown', - 'daily' => 'Daily', - 'monthly' => 'Monthly', - 'profile' => 'Profile', - 'errors' => 'Errors', - - // reports: - 'report_default' => 'Default financial report for :start until :end', - 'report_audit' => 'Transaction history overview for :start until :end', - 'quick_link_reports' => 'Quick links', - 'quick_link_default_report' => 'Default financial report', - 'quick_link_audit_report' => 'Transaction history overview', - 'report_this_month_quick' => 'Current month, all accounts', - 'report_this_year_quick' => 'Current year, all accounts', - 'report_this_fiscal_year_quick' => 'Current fiscal year, all accounts', - 'report_all_time_quick' => 'All-time, all accounts', - 'reports_can_bookmark' => 'Remember that reports can be bookmarked.', - 'incomeVsExpenses' => 'Income vs. expenses', - 'accountBalances' => '帳戶餘額', - 'balanceStartOfYear' => '年初結餘', - 'balanceEndOfYear' => '年末結餘', - 'balanceStartOfMonth' => '月初結餘', - 'balanceEndOfMonth' => '月未結餘', - 'balanceStart' => '期間之初的結餘', - 'balanceEnd' => '期間之未的結餘', - 'reportsOwnAccounts' => 'Reports for your own accounts', - 'reportsOwnAccountsAndShared' => 'Reports for your own accounts and shared accounts', - 'splitByAccount' => '以帳號來分割', - 'balancedByTransfersAndTags' => 'Balanced by transfers and tags', - 'coveredWithTags' => 'Covered with tags', - 'leftUnbalanced' => 'Left unbalanced', - 'expectedBalance' => '預期餘額', - 'outsideOfBudgets' => 'Outside of budgets', - 'leftInBudget' => 'Left in budget', - 'sumOfSums' => 'Sum of sums', - 'noCategory' => '(no category)', - 'notCharged' => 'Not charged (yet)', - 'inactive' => 'Inactive', - 'active' => 'Active', - 'difference' => 'Difference', - 'in' => 'In', - 'out' => 'Out', - 'topX' => 'top :number', - 'showTheRest' => 'Show everything', - 'hideTheRest' => 'Show only the top :number', - 'sum_of_year' => 'Sum of year', - 'sum_of_years' => 'Sum of years', - 'average_of_year' => 'Average of year', - 'average_of_years' => 'Average of years', - 'categories_earned_in_year' => 'Categories (by earnings)', - 'categories_spent_in_year' => 'Categories (by spendings)', - 'report_type' => 'Report type', - 'report_type_default' => 'Default financial report', - 'report_type_audit' => 'Transaction history overview (audit)', - 'report_type_meta-history' => '類別、 預算與賬單的概覽', - 'more_info_help' => 'More information about these types of reports can be found in the help pages. Press the (?) icon in the top right corner.', - 'report_included_accounts' => 'Included accounts', - 'report_date_range' => 'Date range', - 'report_include_help' => 'In all cases, transfers to shared accounts count as expenses, and transfers from shared accounts count as income.', - 'report_preset_ranges' => 'Pre-set ranges', - 'shared' => 'Shared', - 'fiscal_year' => 'Fiscal year', - 'income_entry' => 'Income from account ":name" between :start and :end', - 'expense_entry' => 'Expenses to account ":name" between :start and :end', - 'category_entry' => 'Expenses in category ":name" between :start and :end', - 'budget_spent_amount' => 'Expenses in budget ":budget" between :start and :end', - 'balance_amount' => '與 :start 和 :end 之間由帳號 ":account" 支付的預算 ":budget" 的支出', - 'no_audit_activity' => 'No activity was recorded on account :account_name between :start and :end.', - 'audit_end_balance' => ':account_name 在 :end 後的餘額是: :balance', - - // charts: - 'chart' => 'Chart', - 'dayOfMonth' => 'Day of the month', - 'month' => 'Month', - 'budget' => 'Budget', - 'spent' => 'Spent', - 'earned' => 'Earned', - 'overspent' => 'Overspent', - 'left' => 'Left', - 'no_budget' => '(no budget)', - 'maxAmount' => 'Maximum amount', - 'minAmount' => 'Minumum amount', - 'billEntry' => 'Current bill entry', - 'name' => 'Name', - 'date' => 'Date', - 'paid' => 'Paid', - 'unpaid' => 'Unpaid', - 'day' => 'Day', - 'budgeted' => 'Budgeted', - 'period' => 'Period', - 'balance' => '餘額', - 'summary' => 'Summary', - 'sum' => 'Sum', - 'average' => 'Average', - 'balanceFor' => ':name 的餘額', - - // piggy banks: - 'add_money_to_piggy' => 'Add money to piggy bank ":name"', - 'piggy_bank' => 'Piggy bank', - 'new_piggy_bank' => 'Create new piggy bank', - 'store_piggy_bank' => 'Store new piggy bank', - 'stored_piggy_bank' => 'Store new piggy bank ":name"', - 'account_status' => 'Account status', - 'left_for_piggy_banks' => 'Left for piggy banks', - 'sum_of_piggy_banks' => 'Sum of piggy banks', - 'saved_so_far' => 'Saved so far', - 'left_to_save' => 'Left to save', - 'add_money_to_piggy_title' => 'Add money to piggy bank ":name"', - 'remove_money_from_piggy_title' => 'Remove money from piggy bank ":name"', - 'add' => 'Add', - - 'remove' => 'Remove', - 'max_amount_add' => 'The maximum amount you can add is', - 'max_amount_remove' => 'The maximum amount you can remove is', - 'update_piggy_button' => 'Update piggy bank', - 'update_piggy_title' => 'Update piggy bank ":name"', - 'updated_piggy_bank' => 'Updated piggy bank ":name"', - 'details' => 'Details', - 'events' => 'Events', - 'target_amount' => 'Target amount', - 'start_date' => 'Start date', - 'target_date' => '儲蓄目標日期', - 'no_target_date' => '沒有儲蓄目標日期', - 'todo' => 'to do', - 'table' => 'Table', - 'piggy_bank_not_exists' => 'Piggy bank no longer exists.', - 'add_any_amount_to_piggy' => 'Add money to this piggy bank to reach your target of :amount.', - 'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date', - 'delete_piggy_bank' => 'Delete piggy bank ":name"', - 'cannot_add_amount_piggy' => 'Could not add :amount to ":name".', - 'deleted_piggy_bank' => 'Deleted piggy bank ":name"', - 'added_amount_to_piggy' => 'Added :amount to ":name"', - 'removed_amount_from_piggy' => 'Removed :amount from ":name"', - 'cannot_remove_amount_piggy' => 'Could not remove :amount from ":name".', - - // tags - 'regular_tag' => '只是一個普通的標籤。', - 'balancing_act' => '這標籤最多會有兩項交易:一個支出和一個轉帳,而他們會互相抵消。', - 'advance_payment' => '這種標籤容許一個支出和多個存款以抵銷原本的支出。', - 'delete_tag' => '刪除標籤 ":tag"', - 'deleted_tag' => '刪除了標籤 ":tag"', - 'new_tag' => '建立新標籤', - 'edit_tag' => '編輯標籤 ":tag"', - 'updated_tag' => '更新了標籤 ":tag"', - 'created_tag' => '成功創建標籤 ":tag" !', - 'no_year' => 'No year set', - 'no_month' => 'No month set', - 'tag_title_nothing' => '預設標籤', - 'tag_title_balancingAct' => '抵銷行為標籤', - 'tag_title_advancePayment' => '預付款標籤', - 'tags_introduction' => '標籤通常是一些方便分類的短語,例如 很貴賬單 或者 派對用品。 在 Firefly III 裡,標籤可以有不同的屬性,例如日期、描述、或位置。這能方便你更有意義地把交易分類。例如,你可以建立一個 與朋友一起吃聖誕大餐的標籤,並加上餐廳的資訊。這類的標籤標籤是 「即棄」 的,你只會在一次事件中使用它,而標籤可能有多個交易。', - 'tags_group' => '標籤可以把交易進行分組,容許你記錄報銷(你為其他人墊支),或者其他「抵銷行為」——例如分期付款(買電視機的時候),或者支出和收入會互相抵銷(以儲蓄買東西)的交易。當然,你也可以建立普通的標籤,隨你喜歡。', - 'tags_start' => '要開始使用,請新增標籤或在建立新交易紀錄時輸入標籤。', - - 'transaction_journal_information' => 'Transaction information', - 'transaction_journal_meta' => 'Meta information', - 'total_amount' => 'Total amount', - - // administration - 'administration' => 'Administration', - 'user_administration' => 'User administration', - 'list_all_users' => 'All users', - 'all_users' => 'All users', - 'all_blocked_domains' => 'All blocked domains', - 'blocked_domains' => 'Blocked domains', - 'no_domains_banned' => 'No domains blocked', - 'all_user_domains' => 'All user email address domains', - 'all_domains_is_filtered' => 'This list does not include already blocked domains.', - 'domain_now_blocked' => 'Domain :domain is now blocked', - 'domain_now_unblocked' => 'Domain :domain is now unblocked', - 'manual_block_domain' => 'Block a domain by hand', - 'block_domain' => 'Block domain', - 'no_domain_filled_in' => 'No domain filled in', - 'domain_already_blocked' => 'Domain :domain is already blocked', - 'domain_is_now_blocked' => 'Domain :domain is now blocked', - 'instance_configuration' => 'Configuration', - 'firefly_instance_configuration' => 'Configuration options for Firefly III', - 'setting_single_user_mode' => 'Single user mode', - 'setting_single_user_mode_explain' => 'By default, Firefly III only accepts one (1) registration: you. This is a security measure, preventing others from using your instance unless you allow them to. Future registrations are blocked. When you uncheck this box, others can use your instance as wel, assuming they can reach it (when it is connected to the internet).', - 'store_configuration' => 'Store configuration', - 'single_user_administration' => 'User administration for :email', - 'hidden_fields_preferences' => 'Not all fields are visible right now. You must enable them in your settings.', - 'user_data_information' => 'User data', - 'user_information' => 'User information', - 'total_size' => 'total size', - 'budget_or_budgets' => 'budget(s)', - 'budgets_with_limits' => 'budget(s) with configured amount', - 'rule_or_rules' => 'rule(s)', - 'rulegroup_or_groups' => 'rule group(s)', - - // split a transaction: - 'transaction_meta_data' => 'Transaction meta-data', - 'transaction_dates' => 'Transaction dates', - 'splits' => '分割', - 'split_title_withdrawal' => '分割你的新提款', - 'split_intro_one_withdrawal' => 'Firefly 容許 "分割" 一個提款。', - 'split_intro_two_withdrawal' => 'It means that the amount of money you\'ve spent is divided between several destination expense accounts, budgets or categories.', - 'split_intro_three_withdrawal' => '例如:你可以分割你一共 :total 的日用品,所以你可以由你的「日用品」預算支付 :split_one 和由你的「香煙」預算中支付 :split_two 。', - 'split_table_intro_withdrawal' => 'Split your withdrawal in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', - 'store_splitted_withdrawal' => 'Store splitted withdrawal', - 'update_splitted_withdrawal' => 'Update splitted withdrawal', - 'split_title_deposit' => 'Split your new deposit', - 'split_intro_one_deposit' => 'Firefly supports the "splitting" of a deposit.', - 'split_intro_two_deposit' => 'It means that the amount of money you\'ve earned is divided between several source revenue accounts or categories.', - 'split_intro_three_deposit' => 'For example: you could split your :total salary so you get :split_one as your base salary and :split_two as a reimbursment for expenses made.', - 'split_table_intro_deposit' => 'Split your deposit in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', - 'store_splitted_deposit' => 'Store splitted deposit', - 'split_title_transfer' => 'Split your new transfer', - 'split_intro_one_transfer' => 'Firefly supports the "splitting" of a transfer.', - 'split_intro_two_transfer' => 'It means that the amount of money you\'re moving is divided between several categories or piggy banks.', - 'split_intro_three_transfer' => 'For example: you could split your :total move so you get :split_one in one piggy bank and :split_two in another.', - 'split_table_intro_transfer' => 'Split your transfer in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', - 'store_splitted_transfer' => 'Store splitted transfer', - 'add_another_split' => 'Add another split', - 'split-transactions' => 'Split transactions', - 'split-new-transaction' => 'Split a new transaction', - 'do_split' => 'Do a split', - 'split_this_withdrawal' => 'Split this withdrawal', - 'split_this_deposit' => 'Split this deposit', - 'split_this_transfer' => 'Split this transfer', - 'cannot_edit_multiple_source' => '你不能修改描述為 ":description" 的分割交易 #:id 因為他有多個來源帳號。', - 'cannot_edit_multiple_dest' => '你不能修改描述為 ":description" 的分割交易 #:id 因為他有多個目標帳號。', - 'no_edit_multiple_left' => 'You have selected no valid transactions to edit.', - - // import - 'configuration_file_help' => 'If you have previously imported data into Firefly III, you may have a configuration file, which will pre-set configuration values for you. For some banks, other users have kindly provided their configuration file.', - 'import_data_index' => 'Index', - 'import_file_type_csv' => 'CSV (comma separated values)', - 'import_file_type_help' => 'Select the type of file you will upload', - 'import_start' => '開始匯入', - 'configure_import' => '進一步調整匯入設定', - 'import_finish_configuration' => 'Finish configuration', - 'settings_for_import' => 'Settings', - 'import_status' => '匯入狀態', - 'import_status_text' => '匯入正在進行中,或即將進行匯入。', - 'import_complete' => '匯入設定完成!', - 'import_complete_text' => '匯入程序已準備妥當。你已完成所有設定。請下載設定檔,當你的匯入出現問題時它將幫上忙。若要執行匯入程序,你可以在您的伺服器上執行以下命令,或運行網頁導入程序。根據您的配置,在伺服器上執行命令或會給你更多的資訊。', - 'import_download_config' => 'Download configuration', - 'import_start_import' => '開始匯入', - 'import_intro_beta' => 'Firefly III 的匯入功能依然在測試階段。很多 Firefly III 的用戶已經成功使用這個功能匯入不同的檔案。儘管這個匯入功能的每個部分都能夠正常運作(我說真的),但是整個功能或者會有點問題。如果你的檔案不能匯入到 Firefly 內,請閱讀這個維基頁面,以方便我修復你所遇到的問題。', - 'import_data' => '匯入資料', - 'import_data_full' => '匯入資料到 Firefly III', - 'import' => '匯入', - 'import_intro_what_it_does' => 'This page allows you to import data into Firefly III. To do so, export data from your bank, or from another financial management system. Upload that file here. Firefly III will convert the data. You need to give it some directions. Please select a file and follow the instructions.', - 'import_intro_import_conf_title' => 'Import "configuration"', - 'import_intro_beta_warning' => 'Warning', - 'import_intro_import_conf_text' => 'As you will discover over the next few pages, this import routine has a lot of settings. These settings are mainly dependent on the bank (or financial management software) your file comes from. There is a good chance somebody else already imported such a file and has shared their configuration file. Please visit the import configuration center to see if there already is a configuration available for your bank or system. If there is, you should download this configuration file and upload it here as well. It will save you a lot of time!', - 'import_file_help' => 'Select your file', - 'import_status_settings_complete' => '匯入已準備妥當,可以開始。', - 'import_status_import_complete' => '匯入已完成。', - 'import_status_import_running' => '匯入正在進行中。請稍候。', - 'import_status_header' => '匯入狀態與進度', - 'import_status_errors' => '匯入錯誤', - 'import_status_report' => '匯入報告', - 'import_finished' => '匯入已完成', - 'import_error_single' => '匯入時發生了一個錯誤。', - 'import_error_multi' => '匯入時發生了一些錯誤。', - 'import_error_fatal' => '匯入時發生了一個錯誤。 請檢查紀錄檔。 錯誤好像是:', - 'import_error_timeout' => '匯入程序似乎已經越時。如果這個錯誤持續,請使用伺服器命令啟動匯入程序。', - 'import_double' => '行 #:row: 這行曾被匯入過,並已儲存在:description。', - 'import_finished_all' => '匯入已完成。請檢查下列的結果。', - 'import_with_key' => '以鍵 \':key\' 作匯入', - - 'import_share_configuration' => 'Please consider downloading your configuration and sharing it at the import configuration center. This will allow other users of Firefly III to import their files more easily.', - - 'import_finished_report' => '匯入已完成。請留意在這行上面的錯誤記錄。這次所匯入的所有交易都已經進行標記,你可以在下面查看。 ', - 'import_finished_link' => '匯入成功的所有交易都可以在標籤 :tag 內找到。', - - -]; diff --git a/resources/lang/zh-TW/form.php b/resources/lang/zh-TW/form.php deleted file mode 100644 index d545b42c72..0000000000 --- a/resources/lang/zh-TW/form.php +++ /dev/null @@ -1,157 +0,0 @@ - '銀行名稱', - 'bank_balance' => '餘額', - 'savings_balance' => '儲蓄帳戶的餘額', - 'credit_card_limit' => '信用卡額度', - 'automatch' => '自動匹配', - 'skip' => '略過', - 'name' => '名稱', - 'active' => '啟用', - 'amount_min' => '最小金額', - 'amount_max' => '最大值', - 'match' => '匹配於', - 'repeat_freq' => '循環週期', - 'journal_currency_id' => '貨幣', - 'journal_amount' => '金額', - 'journal_asset_source_account' => '資產帳戶 (源頭)', - 'journal_source_account_name' => '收入帳戶 (源頭)', - 'journal_source_account_id' => '資產帳戶 (源頭)', - 'account_from_id' => '從帳戶', - 'account_to_id' => '到帳戶', - 'journal_destination_account_id' => '資產帳戶 (目標)', - 'asset_destination_account' => '資產帳戶 (目標)', - 'asset_source_account' => '資產帳戶 (來源)', - 'journal_description' => '描述', - 'note' => 'Notes', - 'split_journal' => '分割此交易', - 'split_journal_explanation' => '分割這個交易為幾個部分', - 'currency' => '貨幣', - 'account_id' => '資產帳戶', - 'budget_id' => '預算', - 'openingBalance' => '開戶金額', - 'tagMode' => '標記模式', - 'tagPosition' => '標籤位置', - 'virtualBalance' => '虛擬金額', - 'longitude_latitude' => '位置', - 'targetamount' => '目標金額', - 'accountRole' => '帳戶角色', - 'openingBalanceDate' => '開戶日期', - 'ccType' => '信用卡付款計畫', - 'ccMonthlyPaymentDate' => '信用卡每月付款日期', - 'piggy_bank_id' => '存錢筒', - 'returnHere' => '回到這裡', - 'returnHereExplanation' => '儲存後,回到這裡創建另一個記錄。', - 'returnHereUpdateExplanation' => '更新後,回到這裡。', - 'description' => '描述', - 'expense_account' => '支出帳戶', - 'revenue_account' => '收入帳戶', - 'amount' => '金額', - 'date' => '日期', - 'interest_date' => '付息日', - 'book_date' => 'Book date', - 'process_date' => '處理日期', - 'category' => '類別', - 'tags' => '標籤', - 'deletePermanently' => '永久刪除', - 'cancel' => '取消', - 'targetdate' => '儲蓄目標日期', - 'tag' => '標籤', - 'under' => '低於', - 'symbol' => 'Symbol', - 'code' => 'Code', - 'iban' => 'IBAN', - 'accountNumber' => '帳戶號碼', - 'has_headers' => '標頭', - 'date_format' => '日期格式', - 'specifix' => 'Bank- or file specific fixes', - 'attachments[]' => '附檔', - 'store_new_withdrawal' => '存儲新提款', - 'store_new_deposit' => '存儲新存款', - 'store_new_transfer' => '存儲新轉帳', - 'add_new_withdrawal' => '新增提款', - 'add_new_deposit' => '新增新存款', - 'add_new_transfer' => 'Add a new transfer', - 'noPiggybank' => '(no piggy bank)', - 'title' => '標題', - 'notes' => '備註', - 'filename' => '檔案名稱', - 'mime' => 'Mime type', - 'size' => 'Size', - 'trigger' => 'Trigger', - 'stop_processing' => 'Stop processing', - 'start_date' => 'Start of range', - 'end_date' => 'End of range', - 'export_start_range' => 'Start of export range', - 'export_end_range' => 'End of export range', - 'export_format' => '檔案格式', - 'include_attachments' => '包括上傳的附件', - 'include_config' => '包括設定檔', - 'include_old_uploads' => '包含導入的資料', - 'accounts' => '從這些帳戶匯出交易記錄', - 'delete_account' => '刪除帳號 ":name"', - 'delete_bill' => '刪除帳單 ":name"', - 'delete_budget' => '刪除預算 ":name"', - 'delete_category' => '刪除類別 ":name"', - 'delete_currency' => '刪除貨幣 ":name"', - 'delete_journal' => '刪除包含描述 ":description" 的交易', - 'delete_attachment' => 'Delete attachment ":name"', - 'delete_rule' => 'Delete rule ":title"', - 'delete_rule_group' => 'Delete rule group ":title"', - 'attachment_areYouSure' => 'Are you sure you want to delete the attachment named ":name"?', - 'account_areYouSure' => 'Are you sure you want to delete the account named ":name"?', - 'bill_areYouSure' => '你確定要刪除賬單 ":name" 嗎?', - 'rule_areYouSure' => 'Are you sure you want to delete the rule titled ":title"?', - 'ruleGroup_areYouSure' => 'Are you sure you want to delete the rule group titled ":title"?', - 'budget_areYouSure' => 'Are you sure you want to delete the budget named ":name"?', - 'category_areYouSure' => 'Are you sure you want to delete the category named ":name"?', - 'currency_areYouSure' => 'Are you sure you want to delete the currency named ":name"?', - 'piggyBank_areYouSure' => 'Are you sure you want to delete the piggy bank named ":name"?', - 'journal_areYouSure' => '你真的要刪除這個描述為 ":description" 的交易嗎?', - 'mass_journal_are_you_sure' => 'Are you sure you want to delete these transactions?', - 'tag_areYouSure' => '你真的要要刪除標籤 ":tag" 嗎?', - 'permDeleteWarning' => 'Deleting stuff from Firely is permanent and cannot be undone.', - 'mass_make_selection' => 'You can still prevent items from being deleted by removing the checkbox.', - 'delete_all_permanently' => 'Delete selected permanently', - 'update_all_journals' => 'Update these transactions', - 'also_delete_transactions' => 'The only transaction connected to this account will be deleted as well.|All :count transactions connected to this account will be deleted as well.', - 'also_delete_rules' => 'The only rule connected to this rule group will be deleted as well.|All :count rules connected to this rule group will be deleted as well.', - 'also_delete_piggyBanks' => 'The only piggy bank connected to this account will be deleted as well.|All :count piggy bank connected to this account will be deleted as well.', - 'bill_keep_transactions' => 'The only transaction connected to this bill will not be deleted.|All :count transactions connected to this bill will spared deletion.', - 'budget_keep_transactions' => 'The only transaction connected to this budget will not be deleted.|All :count transactions connected to this budget will spared deletion.', - 'category_keep_transactions' => 'The only transaction connected to this category will not be deleted.|All :count transactions connected to this category will spared deletion.', - 'tag_keep_transactions' => 'The only transaction connected to this tag will not be deleted.|All :count transactions connected to this tag will spared deletion.', - - // admin - 'domain' => 'Domain', - 'single_user_mode' => 'Single user mode', - - // import - 'import_file' => '匯入檔案', - 'configuration_file' => 'Configuration file', - 'import_file_type' => '匯入檔案類型', - 'csv_comma' => 'A comma (,)', - 'csv_semicolon' => 'A semicolon (;)', - 'csv_tab' => 'A tab (invisible)', - 'csv_delimiter' => 'CSV field delimiter', - 'csv_import_account' => 'Default import account', - 'csv_config' => 'CSV import configuration', - - - 'due_date' => '到期日', - 'payment_date' => 'Payment date', - 'invoice_date' => 'Invoice date', - 'internal_reference' => 'Internal reference', -]; diff --git a/resources/lang/zh-TW/help.php b/resources/lang/zh-TW/help.php deleted file mode 100644 index 8175c162da..0000000000 --- a/resources/lang/zh-TW/help.php +++ /dev/null @@ -1,33 +0,0 @@ - '歡迎來到 Firefly III', - 'main-content-text' => '來看看這個簡單的教學來學習使用 Firefly III 吧!', - 'sidebar-toggle-title' => '按側欄來建立新的東西', - 'sidebar-toggle-text' => '按一下加號圖案來創建新物件。帳號、交易、任何東西都可以!', - 'account-menu-title' => '所有帳戶', - 'account-menu-text' => '你能在這裡找到你所有的帳戶。', - 'budget-menu-title' => '預算', - 'budget-menu-text' => '本頁可以幫助你管理財產及降低支出。', - 'report-menu-title' => '報表', - 'report-menu-text' => '如果你需要一個財務狀況的簡報,來看看這個吧。', - 'transaction-menu-title' => '交易', - 'transaction-menu-text' => '你可以在這裡找到所有交易記錄。', - 'option-menu-title' => '設定', - 'option-menu-text' => '相當不言而喻吧。', - 'main-content-end-title' => '完', - 'main-content-end-text' => '每一頁在右上方有一個小問號。按一下它可以取得與頁面相關説明。', - 'index' => '首頁', - 'home' => '首頁', -]; diff --git a/resources/lang/zh-TW/list.php b/resources/lang/zh-TW/list.php deleted file mode 100644 index cf1a3365bf..0000000000 --- a/resources/lang/zh-TW/list.php +++ /dev/null @@ -1,88 +0,0 @@ - '按鈕', - 'icon' => '圖標', - 'create_date' => '建立於', - 'update_date' => '更新於', - 'balance_before' => '交易前餘額', - 'balance_after' => '交易後餘額', - 'name' => '名稱', - 'role' => '角色', - 'currentBalance' => '目前餘額', - 'active' => '是否有效?', - 'lastActivity' => '最後的活動', - 'balanceDiff' => ':start 和 :end 之間的餘額差', - 'matchedOn' => '匹配於', - 'matchesOn' => '匹配於', - 'account_type' => '帳戶類型', - 'created_at' => 'Created at', - 'new_balance' => '新餘額', - 'account' => '帳戶', - 'matchingAmount' => '金額', - 'lastMatch' => '最後出現', - 'split_number' => '分割編號 #', - 'destination' => '到', - 'source' => '來源', - 'expectedMatch' => 'Expected match', - 'automatch' => '自動匹配?', - 'repeat_freq' => '重複', - 'description' => '描述', - 'amount' => '金額', - 'internal_reference' => 'Internal reference', - 'date' => '日期', - 'interest_date' => '付息日', - 'book_date' => 'Book date', - 'process_date' => '處理日期', - 'due_date' => '到期日', - 'payment_date' => '付款日期', - 'invoice_date' => '發票日期', - 'interal_reference' => '內部參考', - 'notes' => '備註', - 'from' => '從', - 'piggy_bank' => '存錢筒', - 'to' => '至', - 'budget' => '預算', - 'category' => '類別', - 'bill' => '賬單', - 'withdrawal' => '取款', - 'deposit' => '存款', - 'transfer' => '轉帳', - 'type' => '類型', - 'completed' => '已完成', - 'iban' => 'IBAN', - 'paid_current_period' => '在這期間已付', - 'email' => '電子郵件', - 'registered_at' => '註冊於', - 'is_activated' => '已經啟動', - 'is_blocked' => '被阻止', - 'is_admin' => '是管理員', - 'has_two_factor' => '有雙重身份驗證 (2FA)', - 'confirmed_from' => 'Confirmed from', - 'registered_from' => 'Registered from', - 'blocked_code' => 'Block code', - 'domain' => 'Domain', - 'registration_attempts' => 'Registration attempts', - 'source_account' => 'Source account', - 'destination_account' => 'Destination account', - - 'accounts_count' => 'Number of accounts', - 'journals_count' => 'Number of journals', - 'attachments_count' => 'Number of attachments', - 'bills_count' => 'Number of bills', - 'categories_count' => 'Number of categories', - 'export_jobs_count' => 'Number of export jobs', - 'import_jobs_count' => 'Number of import jobs', - 'budget_count' => 'Number of budgets', - 'rule_and_groups_count' => 'Number of rules and rule groups', - 'tags_count' => 'Number of tags', -]; diff --git a/resources/lang/zh-TW/pagination.php b/resources/lang/zh-TW/pagination.php deleted file mode 100644 index d87b6631ad..0000000000 --- a/resources/lang/zh-TW/pagination.php +++ /dev/null @@ -1,17 +0,0 @@ - '« 上一頁', - 'next' => '下一頁 »', - -]; diff --git a/resources/lang/zh-TW/passwords.php b/resources/lang/zh-TW/passwords.php deleted file mode 100644 index 4f28fe3fb0..0000000000 --- a/resources/lang/zh-TW/passwords.php +++ /dev/null @@ -1,19 +0,0 @@ - '密碼至少需要六個字元,並與確認欄中的密碼相同。', - 'user' => '我們找不到使用該電郵地址的用戶。', - 'token' => '該密碼重置碼已經失效。', - 'sent' => '我們已經將密碼重置連結發送至您的電郵!', - 'reset' => '你的密碼已經被重置!', - 'blocked' => '好一個嘗試。', -]; diff --git a/resources/lang/zh-TW/validation.php b/resources/lang/zh-TW/validation.php deleted file mode 100644 index e0fbc90855..0000000000 --- a/resources/lang/zh-TW/validation.php +++ /dev/null @@ -1,87 +0,0 @@ - '這不是有效的 IBAN。', - 'unique_account_number_for_user' => '此帳號號碼已經存在。', - 'rule_trigger_value' => '此值不能用於所選擇的事件。', - 'rule_action_value' => '此值不能用於所選擇的動作。', - 'invalid_domain' => '基於安全理由,你無法使用此域名註冊。', - 'file_already_attached' => '檔案 ":name" 已附加到該物件上。', - 'file_attached' => '已成功上傳檔案 ":name"。', - 'file_invalid_mime' => '檔案 ":name" 的類型為 ":mime",並不容許上載此類型的檔案。', - 'file_too_large' => '檔案 ":name" 過大。', - 'belongs_to_user' => ':attribute 的值是未知的。', - 'accepted' => ':attribute 必須被接受。', - 'active_url' => ':attribute 不是有效的URL。', - 'after' => ':attribute 必須是一個在 :date 之後的日期。', - 'alpha' => ':attribute 只允許包含字母。', - 'alpha_dash' => ':attribute 只允許數字,字母,和下劃線。', - 'alpha_num' => ':attribute 只允許包含數字和字母。', - 'array' => ':attribute 必須是一個陣列。', - 'unique_for_user' => ':attribute 已存在。', - 'before' => ':attribute 必須是一個在 :date 之前的日期。', - 'unique_object_for_user' => '這個名稱已被使用。', - 'unique_account_for_user' => '這個帳號名稱已被使用。', - 'between.numeric' => ':attribute 必須在 :min 和 :max 之間。', - 'between.file' => ':attribute 必須在 :min kB到 :max kB之間。', - 'between.string' => ':attribute 包含的字符數量必須在 :min 到 :max 之間。', - 'between.array' => ':attribute 的數目必須在 :min 到 :max 之間。', - 'boolean' => ':attribute 必須為 true 或 false。', - 'confirmed' => ':attribute 的屬性不相符', - 'date' => ':attribute 不是有效的日期。', - 'date_format' => ':attribute 不符合格式 :format 。', - 'different' => ':attribute 和 :other 不能相同。', - 'digits' => ':attribute 必須是 :digits 位數字。', - 'digits_between' => ':attribute 必須在 :min 位和 :max 位數字之間。', - 'email' => ':attribute 必須是一個有效的電子郵件地址。', - 'filled' => ':attribute 欄位是必填的。', - 'exists' => '所選的 :attribute 無效。', - 'image' => ':attribute 必須是圖片。', - 'in' => '所選的 :attribute 無效。', - 'integer' => ':attribute 必須是整數。', - 'ip' => ':attribute 必須是一個有效的 IP 地址。', - 'json' => ':attribute 必須是一個有效的 JSON 字符串。', - 'max.numeric' => ':attribute 不能大於 :max。', - 'max.file' => ':attribute 不能大於 :max kB。', - 'max.string' => ':attribute 不能大於 :max 字元。', - 'max.array' => ':attribute 的數量不能超過 :max 個。', - 'mimes' => ':attribute 的文件類型必須是 :values 。', - 'min.numeric' => ':attribute 至少需要 :min。', - 'min.file' => ':attribute 大小至少為 :min KB。', - 'min.string' => ':attribute 最少需要有 :min 個字符。', - 'min.array' => ':attribute 至少需要有 :min 項。', - 'not_in' => '所選的 :attribute 無效。', - 'numeric' => ':attribute 必須是數字。', - 'regex' => ':attribute 格式無效。', - 'required' => ':attribute 欄位是必填的。', - 'required_if' => ':attribute 欄位在 :other 是 :value 時是必填的。', - 'required_unless' => '除非 :other 是 :value ,否則 :attribute 是必填的。', - 'required_with' => '當 :values​​ 存在時, :attribute 是必填的。', - 'required_with_all' => '當 :values​​ 存在時, :attribute 是必填的。', - 'required_without' => '當 :values​​ 不存在時, :attribute 是必填的。', - 'required_without_all' => '當沒有任何 :values​​ 存在時, :attribute 為必填項。', - 'same' => ':attribute 和 :other 必須匹配。', - 'size.numeric' => ':attribute 必須是 :size 位。', - 'size.file' => ':attribute 必須為 :size KB。', - 'size.string' => ':attribute 必須包含 :size 個字符。', - 'size.array' => ':attribute 必須包含 :size 個項目。', - 'unique' => ':attribute 已經存在。', - 'string' => ':attribute 必須是一個字符串。', - 'url' => ':attribute 格式無效。', - 'timezone' => ':attribute 必須是有效的區域。', - '2fa_code' => ':attribute 格式無效。', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'file' => 'The :attribute must be a file.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'present' => 'The :attribute field must be present.', -]; From b33aa733c746d86002dd65d364353b0f0c74a573 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 20:38:03 +0100 Subject: [PATCH 028/110] Fix some minor scrutinizer issues. --- app/Console/Commands/UpgradeDatabase.php | 6 ++---- app/Console/Commands/VerifyDatabase.php | 18 ++++++------------ .../Collector/JournalExportCollector.php | 3 +-- app/Helpers/Collector/JournalCollector.php | 3 +-- app/Models/Account.php | 6 ++---- app/Models/TransactionJournal.php | 3 +-- app/Repositories/Account/AccountRepository.php | 3 +-- app/Repositories/Account/AccountTasker.php | 6 ++---- app/Repositories/Budget/BudgetRepository.php | 6 ++---- app/Repositories/Journal/JournalTasker.php | 4 +--- app/Repositories/User/UserRepository.php | 3 +-- app/Support/Twig/Transaction.php | 9 +++------ 12 files changed, 23 insertions(+), 47 deletions(-) diff --git a/app/Console/Commands/UpgradeDatabase.php b/app/Console/Commands/UpgradeDatabase.php index 4d3633289f..2b21ed83fc 100644 --- a/app/Console/Commands/UpgradeDatabase.php +++ b/app/Console/Commands/UpgradeDatabase.php @@ -72,8 +72,7 @@ class UpgradeDatabase extends Command } - $subQuery = TransactionJournal - ::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + $subQuery = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') ->whereNull('transaction_journals.deleted_at') ->whereNull('transactions.deleted_at') ->groupBy(['transaction_journals.id']) @@ -98,8 +97,7 @@ class UpgradeDatabase extends Command try { /** @var Transaction $opposing */ - $opposing = Transaction - ::where('transaction_journal_id', $journalId) + $opposing = Transaction::where('transaction_journal_id', $journalId) ->where('amount', $amount)->where('identifier', '=', 0) ->whereNotIn('id', $processed) ->first(); diff --git a/app/Console/Commands/VerifyDatabase.php b/app/Console/Commands/VerifyDatabase.php index d2ca7a3454..d9c6d7c086 100644 --- a/app/Console/Commands/VerifyDatabase.php +++ b/app/Console/Commands/VerifyDatabase.php @@ -102,8 +102,7 @@ class VerifyDatabase extends Command */ private function reportAccounts() { - $set = Account - ::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id') + $set = Account::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id') ->leftJoin('users', 'accounts.user_id', '=', 'users.id') ->groupBy(['accounts.id', 'accounts.encrypted', 'accounts.name', 'accounts.user_id', 'users.email']) ->whereNull('transactions.account_id') @@ -125,8 +124,7 @@ class VerifyDatabase extends Command */ private function reportBudgetLimits() { - $set = Budget - ::leftJoin('budget_limits', 'budget_limits.budget_id', '=', 'budgets.id') + $set = Budget::leftJoin('budget_limits', 'budget_limits.budget_id', '=', 'budgets.id') ->leftJoin('users', 'budgets.user_id', '=', 'users.id') ->groupBy(['budgets.id', 'budgets.name', 'budgets.user_id', 'users.email']) ->whereNull('budget_limits.id') @@ -148,8 +146,7 @@ class VerifyDatabase extends Command */ private function reportDeletedAccounts() { - $set = Account - ::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id') + $set = Account::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id') ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') ->whereNotNull('accounts.deleted_at') ->whereNotNull('transactions.id') @@ -187,8 +184,7 @@ class VerifyDatabase extends Command TransactionType::TRANSFER => [AccountType::EXPENSE, AccountType::REVENUE], ]; foreach ($configuration as $transactionType => $accountTypes) { - $set = TransactionJournal - ::leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') + $set = TransactionJournal::leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id') ->leftJoin('account_types', 'account_types.id', 'accounts.account_type_id') @@ -218,8 +214,7 @@ class VerifyDatabase extends Command */ private function reportJournals() { - $set = TransactionJournal - ::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + $set = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') ->whereNotNull('transaction_journals.deleted_at')// USE THIS ->whereNull('transactions.deleted_at') ->whereNotNull('transactions.id') @@ -245,8 +240,7 @@ class VerifyDatabase extends Command */ private function reportNoTransactions() { - $set = TransactionJournal - ::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + $set = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') ->groupBy('transaction_journals.id') ->whereNull('transactions.transaction_journal_id') ->get(['transaction_journals.id']); diff --git a/app/Export/Collector/JournalExportCollector.php b/app/Export/Collector/JournalExportCollector.php index b9bd7fe0ed..a3e97c957f 100644 --- a/app/Export/Collector/JournalExportCollector.php +++ b/app/Export/Collector/JournalExportCollector.php @@ -292,8 +292,7 @@ class JournalExportCollector extends BasicCollector implements CollectorInterfac private function getWorkSet() { $accountIds = $this->accounts->pluck('id')->toArray(); - $this->workSet = Transaction - ::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + $this->workSet = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') ->leftJoin( 'transactions AS opposing', function (JoinClause $join) { $join->on('opposing.transaction_journal_id', '=', 'transactions.transaction_journal_id') diff --git a/app/Helpers/Collector/JournalCollector.php b/app/Helpers/Collector/JournalCollector.php index 677a7b4f66..328f4ca53f 100644 --- a/app/Helpers/Collector/JournalCollector.php +++ b/app/Helpers/Collector/JournalCollector.php @@ -621,8 +621,7 @@ class JournalCollector implements JournalCollectorInterface private function startQuery(): EloquentBuilder { - $query = Transaction - ::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + $query = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') ->leftJoin('transaction_currencies', 'transaction_currencies.id', 'transaction_journals.transaction_currency_id') ->leftJoin('transaction_types', 'transaction_types.id', 'transaction_journals.transaction_type_id') ->leftJoin('bills', 'bills.id', 'transaction_journals.bill_id') diff --git a/app/Models/Account.php b/app/Models/Account.php index 43547de497..580ace8509 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -199,8 +199,7 @@ class Account extends Model */ public function getOpeningBalanceAmount(): string { - $journal = TransactionJournal - ::sortCorrectly() + $journal = TransactionJournal::sortCorrectly() ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') ->where('transactions.account_id', $this->id) ->transactionTypes([TransactionType::OPENING_BALANCE]) @@ -230,8 +229,7 @@ class Account extends Model public function getOpeningBalanceDate(): Carbon { $date = new Carbon('1900-01-01'); - $journal = TransactionJournal - ::sortCorrectly() + $journal = TransactionJournal::sortCorrectly() ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') ->where('transactions.account_id', $this->id) ->transactionTypes([TransactionType::OPENING_BALANCE]) diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php index f76f8bcdcf..f9a8c206e9 100644 --- a/app/Models/TransactionJournal.php +++ b/app/Models/TransactionJournal.php @@ -64,8 +64,7 @@ class TransactionJournal extends TransactionJournalSupport public static function routeBinder($value) { if (auth()->check()) { - $object = TransactionJournal - ::where('transaction_journals.id', $value) + $object = TransactionJournal::where('transaction_journals.id', $value) ->with('transactionType') ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') ->where('user_id', auth()->user()->id)->first(['transaction_journals.*']); diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index 65f21055b2..ecdafaf1b8 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -367,8 +367,7 @@ class AccountRepository implements AccountRepositoryInterface */ protected function openingBalanceTransaction(Account $account): TransactionJournal { - $journal = TransactionJournal - ::sortCorrectly() + $journal = TransactionJournal::sortCorrectly() ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') ->where('transactions.account_id', $account->id) ->transactionTypes([TransactionType::OPENING_BALANCE]) diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index f26b61a0d2..efcff148de 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -249,8 +249,7 @@ class AccountTasker implements AccountTaskerInterface $joinModifier = $incoming ? '<' : '>'; $selection = $incoming ? '>' : '<'; - $query = Transaction - ::distinct() + $query = Transaction::distinct() ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') ->leftJoin( 'transactions as other_side', function (JoinClause $join) use ($joinModifier) { @@ -302,8 +301,7 @@ class AccountTasker implements AccountTaskerInterface $collection = new Collection; $joinModifier = $incoming ? '<' : '>'; $selection = $incoming ? '>' : '<'; - $query = Transaction - ::distinct() + $query = Transaction::distinct() ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') ->leftJoin('transaction_types', 'transaction_journals.transaction_type_id', '=', 'transaction_types.id') ->leftJoin( diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index 354c730011..c2db7da39a 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -332,8 +332,7 @@ class BudgetRepository implements BudgetRepositoryInterface Log::debug('spentInPeriod: and these accounts: ', $accountIds); Log::debug(sprintf('spentInPeriod: Start date is "%s", end date is "%s"', $start->format('Y-m-d'), $end->format('Y-m-d'))); - $fromJournalsQuery = TransactionJournal - ::leftJoin('budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id') + $fromJournalsQuery = TransactionJournal::leftJoin('budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id') ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') ->leftJoin( 'transactions', function (JoinClause $join) { @@ -368,8 +367,7 @@ class BudgetRepository implements BudgetRepositoryInterface * and budget_transaction.budget_id in (1,61) * and transactions.account_id in (2) */ - $fromTransactionsQuery = Transaction - ::leftJoin('budget_transaction', 'budget_transaction.transaction_id', '=', 'transactions.id') + $fromTransactionsQuery = Transaction::leftJoin('budget_transaction', 'budget_transaction.transaction_id', '=', 'transactions.id') ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') ->whereNull('transactions.deleted_at') diff --git a/app/Repositories/Journal/JournalTasker.php b/app/Repositories/Journal/JournalTasker.php index d717fdbda5..90e3edbd75 100644 --- a/app/Repositories/Journal/JournalTasker.php +++ b/app/Repositories/Journal/JournalTasker.php @@ -171,9 +171,7 @@ class JournalTasker implements JournalTaskerInterface $identifier = intval($transaction->identifier); // go! - $sum - = Transaction - ::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + $sum = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') ->where('account_id', $transaction->account_id) ->whereNull('transactions.deleted_at') ->whereNull('transaction_journals.deleted_at') diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php index f7b76eb1d9..e3fa94480a 100644 --- a/app/Repositories/User/UserRepository.php +++ b/app/Repositories/User/UserRepository.php @@ -113,8 +113,7 @@ class UserRepository implements UserRepositoryInterface $return['bills'] = $user->bills()->count(); $return['categories'] = $user->categories()->count(); $return['budgets'] = $user->budgets()->count(); - $return['budgets_with_limits'] = BudgetLimit - ::distinct() + $return['budgets_with_limits'] = BudgetLimit::distinct() ->leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id') ->where('amount', '>', 0) ->whereNull('budgets.deleted_at') diff --git a/app/Support/Twig/Transaction.php b/app/Support/Twig/Transaction.php index 37a964e959..ef05c214ad 100644 --- a/app/Support/Twig/Transaction.php +++ b/app/Support/Twig/Transaction.php @@ -109,8 +109,7 @@ class Transaction extends Twig_Extension 'optionalJournalAmount', function (int $journalId, string $transactionAmount, string $code, string $type): string { $amount = strval( - TransactionModel - ::where('transaction_journal_id', $journalId) + TransactionModel::where('transaction_journal_id', $journalId) ->whereNull('deleted_at') ->where('amount', '<', 0) ->sum('amount') @@ -204,8 +203,7 @@ class Transaction extends Twig_Extension // if the amount is negative, find the opposing account and use that one: $journalId = $transaction->journal_id; /** @var TransactionModel $other */ - $other = TransactionModel - ::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id) + $other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id) ->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where('identifier', $transaction->identifier) ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id') ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id') @@ -278,8 +276,7 @@ class Transaction extends Twig_Extension if (bccomp($transaction->transaction_amount, '0') === 1 && is_null($transaction->opposing_account_id)) { $journalId = $transaction->journal_id; /** @var TransactionModel $other */ - $other = TransactionModel - ::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id) + $other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id) ->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where('identifier', $transaction->identifier) ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id') ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id') From f5f17d1f405fb846517a5da3af30cd7b52496a7b Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 20:41:22 +0100 Subject: [PATCH 029/110] New translations --- resources/lang/zh_TW/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/zh_TW/config.php b/resources/lang/zh_TW/config.php index 58220429bf..8e724f5689 100644 --- a/resources/lang/zh_TW/config.php +++ b/resources/lang/zh_TW/config.php @@ -10,7 +10,7 @@ */ return [ - 'locale' => 'en, English, en_US, en_US.utf8', + 'locale' => 'en, English, en_US, en_US.utf8 test', 'month' => '%B %Y', 'month_and_day' => '%B %e, %Y', 'date_time' => '%B %e, %Y, @ %T', From 8f5152e1851dc0149634bcb9be817201be8d789a Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 28 Nov 2016 20:52:56 +0100 Subject: [PATCH 030/110] Small code cleanup [skip ci] --- app/Console/Commands/VerifyDatabase.php | 3 +-- app/Generator/Report/Audit/MonthReportGenerator.php | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/Console/Commands/VerifyDatabase.php b/app/Console/Commands/VerifyDatabase.php index d9c6d7c086..7159976171 100644 --- a/app/Console/Commands/VerifyDatabase.php +++ b/app/Console/Commands/VerifyDatabase.php @@ -329,8 +329,7 @@ class VerifyDatabase extends Command */ private function reportTransfersBudgets() { - $set = TransactionJournal - ::distinct() + $set = TransactionJournal::distinct() ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') ->leftJoin('budget_transaction_journal', 'transaction_journals.id', '=', 'budget_transaction_journal.transaction_journal_id') ->where('transaction_types.type', TransactionType::TRANSFER) diff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.php index b366042329..5b0952ab55 100644 --- a/app/Generator/Report/Audit/MonthReportGenerator.php +++ b/app/Generator/Report/Audit/MonthReportGenerator.php @@ -78,9 +78,8 @@ class MonthReportGenerator implements ReportGeneratorInterface $auditData[$id]['dayBeforeBalance'] = $dayBeforeBalance; } - $reportType = 'audit'; - $accountIds = join(',', $this->accounts->pluck('id')->toArray()); - + $reportType = 'audit'; + $accountIds = join(',', $this->accounts->pluck('id')->toArray()); $hideable = ['buttons', 'icon', 'description', 'balance_before', 'amount', 'balance_after', 'date', 'interest_date', 'book_date', 'process_date', // three new optional fields. From 33a9e80d9dc7d9199d1f954b2ecc571136cbde30 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:11:58 +0100 Subject: [PATCH 031/110] New translations --- resources/lang/pt_BR/list.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/resources/lang/pt_BR/list.php b/resources/lang/pt_BR/list.php index fb332e16d3..85e1879f16 100644 --- a/resources/lang/pt_BR/list.php +++ b/resources/lang/pt_BR/list.php @@ -25,7 +25,7 @@ return [ 'matchedOn' => 'Coincide', 'matchesOn' => 'Correspondido em', 'account_type' => 'Tipo de conta', - 'created_at' => 'Created at', + 'created_at' => 'Criado em', 'new_balance' => 'Novo saldo', 'account' => 'Conta', 'matchingAmount' => 'Total', @@ -33,21 +33,21 @@ return [ 'split_number' => 'Dividir #', 'destination' => 'Destino', 'source' => 'Fonte', - 'next_expected_match' => 'Next expected match', + 'next_expected_match' => 'Próximo correspondente esperado', 'automatch' => 'Auto match?', 'repeat_freq' => 'Repetições', 'description' => 'Descrição', 'amount' => 'Total', - 'internal_reference' => 'Internal reference', + 'internal_reference' => 'Referência interna', 'date' => 'Data', 'interest_date' => 'Data de interesse', 'book_date' => 'Data reserva', 'process_date' => 'Data de processamento', - 'due_date' => 'Due date', - 'payment_date' => 'Payment date', - 'invoice_date' => 'Invoice date', - 'interal_reference' => 'Internal reference', - 'notes' => 'Notes', + 'due_date' => 'Prazo', + 'payment_date' => 'Data de pagamento', + 'invoice_date' => 'Data da Fatura', + 'interal_reference' => 'Referência interna', + 'notes' => 'Notas', 'from' => 'De', 'piggy_bank' => 'Cofrinho', 'to' => 'Até', @@ -72,15 +72,15 @@ return [ 'blocked_code' => 'Bloco de código', 'domain' => 'Domínio', 'registration_attempts' => 'Tentativas de registo', - 'source_account' => 'Source account', - 'destination_account' => 'Destination account', + 'source_account' => 'Conta de origem', + 'destination_account' => 'Conta de destino', - 'accounts_count' => 'Number of accounts', - 'journals_count' => 'Number of journals', - 'attachments_count' => 'Number of attachments', - 'bills_count' => 'Number of bills', - 'categories_count' => 'Number of categories', - 'export_jobs_count' => 'Number of export jobs', + 'accounts_count' => 'Número de Contas', + 'journals_count' => 'Número de período', + 'attachments_count' => 'Número de anexos', + 'bills_count' => 'Número de contas', + 'categories_count' => 'Número de categorias', + 'export_jobs_count' => 'Número de jobs de exportação', 'import_jobs_count' => 'Number of import jobs', 'budget_count' => 'Number of budgets', 'rule_and_groups_count' => 'Number of rules and rule groups', From a70b369aafdaed8afff871b0396831727432144c Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:12:00 +0100 Subject: [PATCH 032/110] Translated --- resources/lang/pt_BR/auth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/pt_BR/auth.php b/resources/lang/pt_BR/auth.php index 5d833b3d68..7cfe62b56c 100644 --- a/resources/lang/pt_BR/auth.php +++ b/resources/lang/pt_BR/auth.php @@ -22,7 +22,7 @@ return [ | */ - 'failed' => 'These credentials do not match our records.', - 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + 'failed' => 'Essas credenciais não correspondem com nossos registros.', + 'throttle' => 'Muitas tentativas de login. Por favor, tente novamente em :seconds segundos.', ]; \ No newline at end of file From 52567116c2e04f490e6e3941469435b5f41bdc33 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:12:02 +0100 Subject: [PATCH 033/110] Translated --- resources/lang/pt_BR/validation.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/lang/pt_BR/validation.php b/resources/lang/pt_BR/validation.php index da9b901c78..f35ca914d2 100644 --- a/resources/lang/pt_BR/validation.php +++ b/resources/lang/pt_BR/validation.php @@ -21,7 +21,7 @@ return [ 'file_too_large' => 'Arquivo ":name" é muito grande.', 'belongs_to_user' => 'O valor de :attribute é desconhecido', 'accepted' => 'O campo :attribute deve ser aceito.', - 'bic' => 'This is not a valid BIC.', + 'bic' => 'Este não é um BIC válido.', 'active_url' => 'O campo :attribute não contém um URL válido.', 'after' => 'O campo :attribute deverá conter uma data posterior a :date.', 'alpha' => 'O campo :attribute deverá conter apenas letras.', @@ -80,9 +80,9 @@ return [ 'url' => 'O formato do URL indicado para o campo :attribute é inválido.', 'timezone' => 'O campo :attribute deverá ter um fuso horário válido.', '2fa_code' => 'O campo :attribute é inválido.', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'file' => 'The :attribute must be a file.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'present' => 'The :attribute field must be present.', + 'dimensions' => 'O campo :attribute tem dimensões de imagem inválido.', + 'distinct' => 'O campo :attribute tem um valor duplicado.', + 'file' => 'O :attribute deve ser um arquivo.', + 'in_array' => 'O campo :attribute não existe em :other.', + 'present' => 'O campo :attribute deve estar presente.', ]; \ No newline at end of file From 747455383284e2a1a34ad22917eedfd8c7ec3fa1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:12:04 +0100 Subject: [PATCH 034/110] Translated --- resources/lang/pt_BR/breadcrumbs.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/pt_BR/breadcrumbs.php b/resources/lang/pt_BR/breadcrumbs.php index 8347541110..31a47f95e6 100644 --- a/resources/lang/pt_BR/breadcrumbs.php +++ b/resources/lang/pt_BR/breadcrumbs.php @@ -12,8 +12,8 @@ return [ 'home' => 'Início', - 'edit_currency' => 'Edit currency ":name"', - 'delete_currency' => 'Delete currency ":name"', + 'edit_currency' => 'Editar moeda ":name"', + 'delete_currency' => 'Excluir moeda ":moeda"', 'newPiggyBank' => 'Criar um novo cofrinho', 'edit_piggyBank' => 'Editar cofrinho ":name"', 'preferences' => 'Preferências', From a19fed59593dddf66d188d51b7bb52f56f536572 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:12:07 +0100 Subject: [PATCH 035/110] New translations --- resources/lang/pt_BR/csv.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/pt_BR/csv.php b/resources/lang/pt_BR/csv.php index fbc8866ea4..18bc2a2c68 100644 --- a/resources/lang/pt_BR/csv.php +++ b/resources/lang/pt_BR/csv.php @@ -15,7 +15,7 @@ return [ 'import_configure_title' => 'Configure sua importação', 'import_configure_intro' => 'There are some options for your CSV import. Please indicate if your CSV file contains headers on the first column, and what the date format of your date-fields is. That might require some experimentation. The field delimiter is usually a ",", but could also be a ";". Check this carefully.', - 'import_configure_form' => 'Basic CSV import options', + 'import_configure_form' => 'Opções básicas de importação CSV', 'header_help' => 'Verifique se a primeira linha do seu arquivo CSV está com os títulos de coluna', 'date_help' => 'Date time format in your CSV. Follow the format like this page indicates. The default value will parse dates that look like this: :dateExample.', 'delimiter_help' => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', From bdf752bf7e7ede67d4d12dbdf14fdf2e8c220d7c Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:21:42 +0100 Subject: [PATCH 036/110] Translated --- resources/lang/pt_BR/list.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/lang/pt_BR/list.php b/resources/lang/pt_BR/list.php index 85e1879f16..5b31acdaaa 100644 --- a/resources/lang/pt_BR/list.php +++ b/resources/lang/pt_BR/list.php @@ -81,8 +81,8 @@ return [ 'bills_count' => 'Número de contas', 'categories_count' => 'Número de categorias', 'export_jobs_count' => 'Número de jobs de exportação', - 'import_jobs_count' => 'Number of import jobs', - 'budget_count' => 'Number of budgets', - 'rule_and_groups_count' => 'Number of rules and rule groups', - 'tags_count' => 'Number of tags', + 'import_jobs_count' => 'Número de jobs de importação', + 'budget_count' => 'Número de orçamentos', + 'rule_and_groups_count' => 'Número de regras e grupos de regras', + 'tags_count' => 'Número de tags', ]; \ No newline at end of file From eae4e988bed741535f0d323fff7c947226e92067 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:21:43 +0100 Subject: [PATCH 037/110] Translated --- resources/lang/pt_BR/form.php | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/resources/lang/pt_BR/form.php b/resources/lang/pt_BR/form.php index 71c8c5ab2f..1b24d4419f 100644 --- a/resources/lang/pt_BR/form.php +++ b/resources/lang/pt_BR/form.php @@ -25,8 +25,8 @@ return [ 'match' => 'Corresponde em', 'repeat_freq' => 'Repetições', 'journal_currency_id' => 'Moeda', - 'currency_id' => 'Currency', - 'attachments' => 'Attachments', + 'currency_id' => 'Moeda', + 'attachments' => 'Anexos', 'journal_amount' => 'Quantia', 'journal_asset_source_account' => 'Conta de ativo (fonte)', 'journal_source_account_name' => 'Conta de receita (fonte)', @@ -34,13 +34,13 @@ return [ 'BIC' => 'BIC', 'account_from_id' => 'da conta', 'account_to_id' => 'para conta', - 'source_account' => 'Source account', - 'destination_account' => 'Destination account', + 'source_account' => 'Conta de origem', + 'destination_account' => 'Conta de destino', 'journal_destination_account_id' => 'Conta de ativo (destino)', 'asset_destination_account' => 'Conta de ativo (destino)', 'asset_source_account' => 'Conta de ativo (fonte)', 'journal_description' => 'Descrição', - 'note' => 'Notes', + 'note' => 'Notas', 'split_journal' => 'Dividir essa transação', 'split_journal_explanation' => 'Dividir essa transação em várias partes', 'currency' => 'Moeda', @@ -64,15 +64,15 @@ return [ 'expense_account' => 'Conta de Despesa', 'revenue_account' => 'Conta de Receita', - 'revenue_account_source' => 'Revenue account (source)', - 'source_account_asset' => 'Source account (asset account)', - 'destination_account_expense' => 'Destination account (expense account)', - 'destination_account_asset' => 'Destination account (asset account)', - 'source_account_revenue' => 'Source account (revenue account)', - 'type' => 'Type', - 'convert_Withdrawal' => 'Convert withdrawal', - 'convert_Deposit' => 'Convert deposit', - 'convert_Transfer' => 'Convert transfer', + 'revenue_account_source' => 'Conta de receita (fonte)', + 'source_account_asset' => 'Conta de origem (conta de ativo)', + 'destination_account_expense' => 'Conta de destino (conta de despesa)', + 'destination_account_asset' => 'Conta de destino (conta de ativo)', + 'source_account_revenue' => 'Conta de origem (conta de receita)', + 'type' => 'Tipo', + 'convert_Withdrawal' => 'Converter a retirada', + 'convert_Deposit' => 'Converter o depósito', + 'convert_Transfer' => 'Converter a transferência', 'amount' => 'Valor', @@ -152,9 +152,9 @@ return [ // admin 'domain' => 'Domínio', - 'single_user_mode' => 'Single user mode', - 'must_confirm_account' => 'New users must activate account', - 'is_demo_site' => 'Is demo site', + 'single_user_mode' => 'Modo de usuário único', + 'must_confirm_account' => 'Novos usuários devem ativar a conta', + 'is_demo_site' => 'É o site de demonstração', // import 'import_file' => 'Importar arquivo', @@ -168,8 +168,8 @@ return [ 'csv_config' => 'Importar CSV de configuração', - 'due_date' => 'Due date', - 'payment_date' => 'Payment date', - 'invoice_date' => 'Invoice date', - 'internal_reference' => 'Internal reference', + 'due_date' => 'Data de vencimento', + 'payment_date' => 'Data de pagamento', + 'invoice_date' => 'Data da Fatura', + 'internal_reference' => 'Referência interna', ]; \ No newline at end of file From 0eea85a88429f4ca80bed749a7df0e11c783a69f Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:21:45 +0100 Subject: [PATCH 038/110] Translated --- resources/lang/de_DE/form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/de_DE/form.php b/resources/lang/de_DE/form.php index 133d3c562c..1c7253ad19 100644 --- a/resources/lang/de_DE/form.php +++ b/resources/lang/de_DE/form.php @@ -25,8 +25,8 @@ return [ 'match' => 'Reagiert auf', 'repeat_freq' => 'Wiederholungen', 'journal_currency_id' => 'Währung', - 'currency_id' => 'Currency', - 'attachments' => 'Attachments', + 'currency_id' => 'Währung', + 'attachments' => 'Anhänge', 'journal_amount' => 'Betrag', 'journal_asset_source_account' => 'Girokonto (Quelle)', 'journal_source_account_name' => 'Kreditor (Quelle)', From ea97b817fcc7f1e598353daa0ef926aadbb7b2ba Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:21:49 +0100 Subject: [PATCH 039/110] New translations --- resources/lang/pt_BR/firefly.php | 86 ++++++++++++++++---------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.php index 92ae96e895..8a96f54949 100644 --- a/resources/lang/pt_BR/firefly.php +++ b/resources/lang/pt_BR/firefly.php @@ -312,17 +312,17 @@ return [ 'between_dates' => '(:start e :end)', 'pref_optional_fields_transaction' => 'Optional fields for transactions', 'pref_optional_fields_transaction_help' => 'By default not all fields are enabled when creating a new transaction (because of the clutter). Below, you can enable these fields if you think they could be useful for you. Of course, any field that is disabled, but already filled in, will be visible regardless of the setting.', - 'optional_tj_date_fields' => 'Date fields', - 'optional_tj_business_fields' => 'Business fields', - 'optional_tj_attachment_fields' => 'Attachment fields', - 'pref_optional_tj_interest_date' => 'Interest date', - 'pref_optional_tj_book_date' => 'Book date', - 'pref_optional_tj_process_date' => 'Processing date', - 'pref_optional_tj_due_date' => 'Due date', - 'pref_optional_tj_payment_date' => 'Payment date', - 'pref_optional_tj_invoice_date' => 'Invoice date', - 'pref_optional_tj_internal_reference' => 'Internal reference', - 'pref_optional_tj_notes' => 'Notes', + 'optional_tj_date_fields' => 'Campos de data', + 'optional_tj_business_fields' => 'Campos de negócios', + 'optional_tj_attachment_fields' => 'Campos de anexo', + 'pref_optional_tj_interest_date' => 'Data de interesse', + 'pref_optional_tj_book_date' => 'Data reserva', + 'pref_optional_tj_process_date' => 'Data de processamento', + 'pref_optional_tj_due_date' => 'Data de vencimento', + 'pref_optional_tj_payment_date' => 'Data de pagamento', + 'pref_optional_tj_invoice_date' => 'Data da Fatura', + 'pref_optional_tj_internal_reference' => 'Referência interna', + 'pref_optional_tj_notes' => 'Notas', 'pref_optional_tj_attachments' => 'Attachments', 'optional_field_meta_dates' => 'Dates', 'optional_field_meta_business' => 'Business', @@ -379,23 +379,23 @@ return [ 'convert_to_Withdrawal' => 'Convert ":description" to a withdrawal', 'convert_to_Deposit' => 'Convert ":description" to a deposit', 'convert_to_Transfer' => 'Convert ":description" to a transfer', - 'convert_options_WithdrawalDeposit' => 'Convert a withdrawal into a deposit', - 'convert_options_WithdrawalTransfer' => 'Convert a withdrawal into a transfer', - 'convert_options_DepositTransfer' => 'Convert a deposit into a transfer', - 'convert_options_DepositWithdrawal' => 'Convert a deposit into a withdrawal', - 'convert_options_TransferWithdrawal' => 'Convert a transfer into a withdrawal', - 'convert_options_TransferDeposit' => 'Convert a transfer into a deposit', - 'transaction_journal_convert_options' => 'Convert this transaction', - 'convert_Withdrawal_to_deposit' => 'Convert this withdrawal to a deposit', - 'convert_Withdrawal_to_transfer' => 'Convert this withdrawal to a transfer', - 'convert_Deposit_to_withdrawal' => 'Convert this deposit to a withdrawal', - 'convert_Deposit_to_transfer' => 'Convert this deposit to a transfer', - 'convert_Transfer_to_deposit' => 'Convert this transfer to a deposit', - 'convert_Transfer_to_withdrawal' => 'Convert this transfer to a withdrawal', - 'convert_please_set_revenue_source' => 'Please pick the revenue account where the money will come from.', - 'convert_please_set_asset_destination' => 'Please pick the asset account where the money will go to.', - 'convert_please_set_expense_destination' => 'Please pick the expense account where the money will go to.', - 'convert_please_set_asset_source' => 'Please pick the asset account where the money will come from.', + 'convert_options_WithdrawalDeposit' => 'Converter uma retirada em um depósito', + 'convert_options_WithdrawalTransfer' => 'Converter uma retirada em uma transferência', + 'convert_options_DepositTransfer' => 'Converter um depósito em uma transferência', + 'convert_options_DepositWithdrawal' => 'Converter um depósito em uma retirada', + 'convert_options_TransferWithdrawal' => 'Converter uma transferência em uma retirada', + 'convert_options_TransferDeposit' => 'Converter uma transferência em um depósito', + 'transaction_journal_convert_options' => 'Converter esta transação', + 'convert_Withdrawal_to_deposit' => 'Converter esta retirada de um depósito', + 'convert_Withdrawal_to_transfer' => 'Converter esta retirada para uma transferência', + 'convert_Deposit_to_withdrawal' => 'Converter este depósito para uma retirada', + 'convert_Deposit_to_transfer' => 'Converter este depósito para uma transferência', + 'convert_Transfer_to_deposit' => 'Converter esta transferência para um depósito', + 'convert_Transfer_to_withdrawal' => 'Converter esta transferência a uma retirada', + 'convert_please_set_revenue_source' => 'Por favor, escolha a conta de receitas de onde virá o dinheiro.', + 'convert_please_set_asset_destination' => 'Por favor, escolha a conta de ativo para onde vai o dinheiro.', + 'convert_please_set_expense_destination' => 'Por favor, escolha a conta de despesas para onde o dinheiro vai.', + 'convert_please_set_asset_source' => 'Por favor, escolha a conta de ativo, de onde virá o dinheiro.', 'convert_explanation_withdrawal_deposit' => 'If you convert this withdrawal into a deposit, :amount will be deposited into :sourceName instead of taken from it.', 'convert_explanation_withdrawal_transfer' => 'If you convert this withdrawal into a transfer, :amount will be transferred from :sourceName to a new asset account, instead of being paid to :destinationName.', 'convert_explanation_deposit_withdrawal' => 'If you convert this deposit into a withdrawal, :amount will be removed from :destinationName instead of added to it.', @@ -486,8 +486,8 @@ return [ 'rescanned_bill' => 'Tudo examinado novamente.', 'average_bill_amount_year' => 'Média de fatura (:ano)', 'average_bill_amount_overall' => 'Média de fatura (geral)', - 'not_or_not_yet' => 'Not (yet)', - 'not_expected_period' => 'Not expected this period', + 'not_or_not_yet' => 'Não (ainda)', + 'not_expected_period' => 'Não esperado neste período', // accounts: 'details_for_asset' => 'Detalhes para a conta de ativo ":name"', 'details_for_expense' => 'Detalhes para a conta de despesas ":name"', @@ -523,8 +523,8 @@ return [ 'credit_card_options' => 'Opções de cartão de crédito', 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', - 'select_more_than_one_account' => 'Please select more than one account', - 'select_more_than_one_category' => 'Please select more than one category', + 'select_more_than_one_account' => 'Por favor, selecione mais de uma conta', + 'select_more_than_one_category' => 'Por favor, selecione mais de uma categoria', // categories: 'new_category' => 'Nova categoria', @@ -667,7 +667,7 @@ return [ 'in' => 'Entrada', 'out' => 'Saída', 'topX' => 'topo :number', - 'show_full_list' => 'Show entire list', + 'show_full_list' => 'Mostrar a lista inteira', 'show_only_top' => 'Show only top :number', 'sum_of_year' => 'Soma do ano', 'sum_of_years' => 'Soma dos anos', @@ -678,7 +678,7 @@ return [ 'report_type' => 'Tipo de relatório', 'report_type_default' => 'Relatório financeiro padrão', 'report_type_audit' => 'Visão geral do histórico de transação (auditoria)', - 'report_type_category' => 'Category report', + 'report_type_category' => 'Relatório por Categorias', 'report_type_meta-history' => 'Visão geral de categorias, orçamentos e faturas', 'more_info_help' => 'Mais informações sobre esses tipos de relatórios podem ser encontradas nas páginas de ajuda. Pressione o ícone (?) no canto superior direito.', 'report_included_accounts' => 'Contas incluídas', @@ -693,15 +693,15 @@ return [ 'balance_amount' => 'Despesas no orçamento ":budget" pagas por conta":account" entre :start e :end', 'no_audit_activity' => 'Nenhuma atividade foi registrada na conta :account_name entre :start e :end.', 'audit_end_balance' => 'Saldo da conta : account_name no final de :end foi :balance', - 'reports_extra_options' => 'Extra options', - 'report_has_no_extra_options' => 'This report has no extra options', - 'reports_submit' => 'View report', - 'end_after_start_date' => 'End date of report must be after start date.', - 'select_category' => 'Select one or more categories.', - 'income_per_category' => 'Income per category', - 'expense_per_category' => 'Expense per category', - 'income_per_account' => 'Income per account', - 'expense_per_account' => 'Expense per account', + 'reports_extra_options' => 'Opções adicionais', + 'report_has_no_extra_options' => 'Este relatório não tem mais opções', + 'reports_submit' => 'Visualizar relatório', + 'end_after_start_date' => 'Data de término do relatório deve ser depois da data de início.', + 'select_category' => 'Selecione uma ou mais categorias.', + 'income_per_category' => 'Receitas por categoria', + 'expense_per_category' => 'Despesa por categoria', + 'income_per_account' => 'Rendimento por conta', + 'expense_per_account' => 'Por conta de despesas', 'include_not_in_category' => 'Include transactions not selected for this report', 'everything_else' => 'Everything else', 'income_and_expenses' => 'Income and expenses', From a95b1857feef1a14d0060326b55441ee0e190684 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:21:56 +0100 Subject: [PATCH 040/110] New translations --- resources/lang/de_DE/firefly.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/lang/de_DE/firefly.php b/resources/lang/de_DE/firefly.php index c1997f2fb1..df1b5e15e2 100644 --- a/resources/lang/de_DE/firefly.php +++ b/resources/lang/de_DE/firefly.php @@ -51,7 +51,7 @@ return [ 'flash_info_multiple' => 'Es gibt eine Nachricht | Es gibt :count Nachrichten', 'flash_error_multiple' => 'Es gibt einen Fehler | Es gibt :count Fehler', 'net_worth' => 'Vermögen', - 'route_has_no_help' => 'There is no help for this route.', + 'route_has_no_help' => 'Es gibt keinen Hilfetext für diese Seite.', 'help_may_not_be_your_language' => 'Dieser Hilfstext ist in Englisch. Er ist noch nicht in Deutsch verfügbar', 'two_factor_welcome' => 'Hallo :user!', 'two_factor_enter_code' => 'Um fortzufahren geben Sie bitte ihren Zwei-Faktor-Authentifizierungscode ein. Ihre Anwendung kann diesen für Sie generieren.', @@ -72,7 +72,7 @@ return [ 'search_found_budgets' => 'Found :count budget(s) for your query.', 'search_found_tags' => 'Found :count tag(s) for your query.', 'search_found_transactions' => 'Found :count transaction(s) for your query.', - 'results_limited' => 'The results are limited to :count entries.', + 'results_limited' => 'Es werden maximal :count Ergebnisse angezeigt.', 'tagbalancingAct' => 'Balancing act', 'tagadvancePayment' => 'Advance payment', 'tagnothing' => '', @@ -117,7 +117,7 @@ return [ 'export_data_intro' => 'Zum Backup, zum Migrieren auf ein anderes System oder zum Migrieren in eine andere Firefly III Installation.', 'export_format' => 'Export-Format', 'export_format_csv' => 'Durch Komma getrennte Werte (CSV-Datei)', - 'export_format_mt940' => 'MT940 compatible format', + 'export_format_mt940' => 'MT940 kompatibeles Format', 'export_included_accounts' => 'Exportiere die Überweisungen von diesem Konto', 'include_old_uploads_help' => 'Firefly III löscht nicht die originalen CSV-Dateien, welche zuvor importiert wurden. Sie können dem Export hinzugefügt werden.', 'do_export' => 'Export', @@ -189,7 +189,7 @@ return [ 'edit_rule' => 'Bearbeite Regel ":title"', 'delete_rule' => 'Lösche Regel ":title"', 'update_rule' => 'Regel bearbeiten', - 'test_rule_triggers' => 'See matching transactions', + 'test_rule_triggers' => 'Zeige übereinstimmende Überweisungen', 'warning_transaction_subset' => 'Aus Kapazitätgründen ist diese Liste auf :max_num_transactions Überweisungen limitiert und zeigt möglicherweise nur einen Teil dieser an', 'warning_no_matching_transactions' => 'Keine übereinstimmenden Überweisungen gefunden. Aus Kapazitätgründen werden nur die letzten :num_transactions Überweisungen überprüft.', 'warning_no_valid_triggers' => 'Keine gültigen Trigger gefunden.', @@ -238,9 +238,9 @@ return [ 'rule_trigger_store_journal' => 'When a journal is created', 'rule_trigger_update_journal' => 'When a journal is updated', 'rule_action_set_category' => 'Set category to ":action_value"', - 'rule_action_clear_category' => 'Clear category', + 'rule_action_clear_category' => 'Bereinige Kategorie', 'rule_action_set_budget' => 'Set budget to ":action_value"', - 'rule_action_clear_budget' => 'Clear budget', + 'rule_action_clear_budget' => 'Lösche Budget', 'rule_action_add_tag' => 'Add tag ":action_value"', 'rule_action_remove_tag' => 'Remove tag ":action_value"', 'rule_action_remove_all_tags' => 'Alle Tags entfernen', From 9fb9c7e3ee4ded0e42e58a2a766fcaa33ad28325 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:31:36 +0100 Subject: [PATCH 041/110] New translations --- resources/lang/pt_BR/firefly.php | 122 +++++++++++++++---------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.php index 8a96f54949..bcca90217f 100644 --- a/resources/lang/pt_BR/firefly.php +++ b/resources/lang/pt_BR/firefly.php @@ -11,7 +11,7 @@ return [ // general stuff: - 'language_incomplete' => 'incomplete translation', + 'language_incomplete' => 'tradução incompleta', 'close' => 'Fechar', 'actions' => 'Ações', 'edit' => 'Editar', @@ -51,8 +51,8 @@ return [ 'flash_info_multiple' => 'Há uma mensagem|Existem :count mensagens', 'flash_error_multiple' => 'Houve um erro|Houve :count erros', 'net_worth' => 'Valor Líquido', - 'route_has_no_help' => 'There is no help for this route.', - 'help_may_not_be_your_language' => 'This help text is in English. It is not yet available in your language', + 'route_has_no_help' => 'Não existe ajuda para esta rota.', + 'help_may_not_be_your_language' => 'Este texto de ajuda é em inglês. Ainda não está disponível em seu idioma', 'two_factor_welcome' => 'Olá, :user!', 'two_factor_enter_code' => 'Para continuar, por favor, digite seu código de autenticação em duas etapas. Seu aplicativo pode gerá-lo para você.', 'two_factor_code_here' => 'Insira o código aqui', @@ -73,26 +73,26 @@ return [ 'search_found_tags' => 'Found :count tag(s) for your query.', 'search_found_transactions' => 'Found :count transaction(s) for your query.', 'results_limited' => 'The results are limited to :count entries.', - 'tagbalancingAct' => 'Balancing act', - 'tagadvancePayment' => 'Advance payment', + 'tagbalancingAct' => 'Saldo', + 'tagadvancePayment' => 'Pagamento antecipado', 'tagnothing' => '', - 'Default asset account' => 'Default asset account', + 'Default asset account' => 'Conta padrão', 'no_budget_pointer' => 'Parece que não há orçamentos ainda. Você deve criar alguns na página orçamentos. Orçamentos podem ajudá-lo a manter o controle de despesas.', - 'Savings account' => 'Savings account', - 'Credit card' => 'Credit card', + 'Savings account' => 'Conta poupança', + 'Credit card' => 'Cartão de crédito', 'source_accounts' => 'Conta(s) de origem', 'destination_accounts' => 'Conta(s) de destino', - 'user_id_is' => 'Your user id is :user', + 'user_id_is' => 'Seu id de usuário é :user', 'field_supports_markdown' => 'This field supports Markdown.', 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', - 'expenses_by_category' => 'Expenses by category', - 'expenses_by_budget' => 'Expenses by budget', - 'income_by_category' => 'Income by category', - 'cannot_redirect_to_account' => 'Firefly III cannot redirect you to the correct page. Apologies.', + 'expenses_by_category' => 'Despesa por categoria', + 'expenses_by_budget' => 'Despesas pelo orçamento', + 'income_by_category' => 'Receitas por categoria', + 'cannot_redirect_to_account' => 'Firefly III não pode redirecioná-lo para a página correta. Minhas desculpas.', // repeat frequencies: - 'repeat_freq_yearly' => 'yearly', + 'repeat_freq_yearly' => 'anual', 'repeat_freq_monthly' => 'mensal', 'weekly' => 'semanal', 'quarterly' => 'trimestral', @@ -257,10 +257,10 @@ return [ 'rule_action_set_description_choice' => 'Definir descrição para..', 'rule_action_append_description_choice' => 'Acrescentar a descrição com..', 'rule_action_prepend_description_choice' => 'Preceder a descrição com..', - 'rule_action_set_source_account_choice' => 'Set source account to...', - 'rule_action_set_source_account' => 'Set source account to :action_value', - 'rule_action_set_destination_account_choice' => 'Set destination account to...', - 'rule_action_set_destination_account' => 'Set destination account to :action_value', + 'rule_action_set_source_account_choice' => 'Definir a conta de origem...', + 'rule_action_set_source_account' => 'Definir a conta de origem para :action_value', + 'rule_action_set_destination_account_choice' => 'Definir a conta de destino...', + 'rule_action_set_destination_account' => 'Definir a conta de destino :action_value', // tags 'store_new_tag' => 'Armazenar nova tag', @@ -298,19 +298,19 @@ return [ 'pref_two_factor_auth_remove_will_disable' => '(isso também irá desativar a autenticação de duas etapas)', 'pref_save_settings' => 'Salvar definições', 'saved_preferences' => 'Preferências salvas!', - 'preferences_general' => 'General', - 'preferences_frontpage' => 'Home screen', - 'preferences_security' => 'Security', + 'preferences_general' => 'Geral', + 'preferences_frontpage' => 'Tela inicial', + 'preferences_security' => 'Segurança', 'preferences_layout' => 'Layout', - 'pref_home_show_deposits' => 'Show deposits on the home screen', + 'pref_home_show_deposits' => 'Depósitos de mostrar na tela inicial', 'pref_home_show_deposits_info' => 'The home screen already shows your expense accounts. Should it also show your revenue accounts?', - 'pref_home_do_show_deposits' => 'Yes, show them', - 'successful_count' => 'of which :count successful', + 'pref_home_do_show_deposits' => 'Sim, mostrar-lhes', + 'successful_count' => 'dos quais :count bem sucedida', 'transaction_page_size_title' => 'Tamanho da página', 'transaction_page_size_help' => 'Qualquer lista de transações mostra, no máximo, muitas transações', 'transaction_page_size_label' => 'Tamanho da página', 'between_dates' => '(:start e :end)', - 'pref_optional_fields_transaction' => 'Optional fields for transactions', + 'pref_optional_fields_transaction' => 'Campos opcionais para transações', 'pref_optional_fields_transaction_help' => 'By default not all fields are enabled when creating a new transaction (because of the clutter). Below, you can enable these fields if you think they could be useful for you. Of course, any field that is disabled, but already filled in, will be visible regardless of the setting.', 'optional_tj_date_fields' => 'Campos de data', 'optional_tj_business_fields' => 'Campos de negócios', @@ -323,11 +323,11 @@ return [ 'pref_optional_tj_invoice_date' => 'Data da Fatura', 'pref_optional_tj_internal_reference' => 'Referência interna', 'pref_optional_tj_notes' => 'Notas', - 'pref_optional_tj_attachments' => 'Attachments', - 'optional_field_meta_dates' => 'Dates', - 'optional_field_meta_business' => 'Business', - 'optional_field_attachments' => 'Attachments', - 'optional_field_meta_data' => 'Optional meta data', + 'pref_optional_tj_attachments' => 'Anexos', + 'optional_field_meta_dates' => 'Datas', + 'optional_field_meta_business' => 'Negócios', + 'optional_field_attachments' => 'Anexos', + 'optional_field_meta_data' => 'Meta dados opcionais', // profile: @@ -373,12 +373,12 @@ return [ 'title_transfers' => 'Transferências', // convert stuff: - 'convert_is_already_type_Withdrawal' => 'This transaction is already a withdrawal', - 'convert_is_already_type_Deposit' => 'This transaction is already a deposit', - 'convert_is_already_type_Transfer' => 'This transaction is already a transfer', - 'convert_to_Withdrawal' => 'Convert ":description" to a withdrawal', - 'convert_to_Deposit' => 'Convert ":description" to a deposit', - 'convert_to_Transfer' => 'Convert ":description" to a transfer', + 'convert_is_already_type_Withdrawal' => 'Esta transação é já uma retirada', + 'convert_is_already_type_Deposit' => 'Esta operação já é um depósito', + 'convert_is_already_type_Transfer' => 'Esta transação é já uma transferência', + 'convert_to_Withdrawal' => 'Converter ":description" a uma retirada', + 'convert_to_Deposit' => 'Converter ":description" de um depósito', + 'convert_to_Transfer' => 'Converter ":description" para uma transferência', 'convert_options_WithdrawalDeposit' => 'Converter uma retirada em um depósito', 'convert_options_WithdrawalTransfer' => 'Converter uma retirada em uma transferência', 'convert_options_DepositTransfer' => 'Converter um depósito em uma transferência', @@ -702,16 +702,16 @@ return [ 'expense_per_category' => 'Despesa por categoria', 'income_per_account' => 'Rendimento por conta', 'expense_per_account' => 'Por conta de despesas', - 'include_not_in_category' => 'Include transactions not selected for this report', - 'everything_else' => 'Everything else', - 'income_and_expenses' => 'Income and expenses', + 'include_not_in_category' => 'Incluir transações não selecionadas para este relatório', + 'everything_else' => 'Todo o resto', + 'income_and_expenses' => 'Receitas e despesas', 'spent_average' => 'Spent (average)', 'income_average' => 'Income (average)', 'transaction_count' => 'Transaction count', 'average_spending_per_account' => 'Average spending per account', 'average_income_per_account' => 'Average income per account', 'total' => 'Total', - 'description' => 'Description', + 'description' => 'Descrição', // charts: @@ -830,13 +830,13 @@ return [ 'user_information' => 'User information', 'total_size' => 'total size', 'budget_or_budgets' => 'budget(s)', - 'budgets_with_limits' => 'budget(s) with configured amount', - 'rule_or_rules' => 'rule(s)', - 'rulegroup_or_groups' => 'rule group(s)', - 'setting_must_confirm_account' => 'Account confirmation', + 'budgets_with_limits' => 'budget(s) com quantidade configurada', + 'rule_or_rules' => 'regra(s)', + 'rulegroup_or_groups' => 'grupo(s) de regra', + 'setting_must_confirm_account' => 'Confirmação de conta', 'setting_must_confirm_account_explain' => 'When this setting is enabled, users must activate their account before it can be used.', - 'configuration_updated' => 'The configuration has been updated', - 'setting_is_demo_site' => 'Demo site', + 'configuration_updated' => 'A configuração foi atualizada', + 'setting_is_demo_site' => 'Site demo', 'setting_is_demo_site_explain' => 'If you check this box, this installation will behave as if it is the demo site, which can have weird side effects.', // split a transaction: @@ -875,14 +875,14 @@ return [ // import 'configuration_file_help' => 'If you have previously imported data into Firefly III, you may have a configuration file, which will pre-set configuration values for you. For some banks, other users have kindly provided their configuration file.', - 'import_data_index' => 'Index', + 'import_data_index' => 'Índice', 'import_file_type_csv' => 'CSV (valores separados por vírgula)', 'import_file_type_help' => 'Selecione o tipo de arquivo que você fará o upload', 'import_start' => 'Iniciar a importação', 'configure_import' => 'Além disso, configure sua importação', 'import_finish_configuration' => 'Terminar configuração', 'settings_for_import' => 'Preferências', - 'import_status' => 'Import status', + 'import_status' => 'Status de importação', 'import_status_text' => 'The import is currently running, or will start momentarily.', 'import_complete' => 'Configuração de importação completa!', 'import_complete_text' => 'The import is ready to start. All the configuration you needed to do has been done. Please download the configuration file. It will help you with the import should it not go as planned. To actually run the import, you can either execute the following command in your console, or run the web-based import. Depending on your configuration, the console import will give you more feedback.', @@ -892,23 +892,23 @@ return [ 'import_data_full' => 'Importar dados para o Firefly III', 'import' => 'Importar', 'import_file_help' => 'Selecione seu arquivo', - 'import_status_settings_complete' => 'The import is ready to start.', - 'import_status_import_complete' => 'The import has completed.', - 'import_status_import_running' => 'The import is currently running. Please be patient.', - 'import_status_header' => 'Import status and progress', - 'import_status_errors' => 'Import errors', - 'import_status_report' => 'Import report', - 'import_finished' => 'Import has finished', - 'import_error_single' => 'An error has occured during the import.', - 'import_error_multi' => 'Some errors occured during the import.', + 'import_status_settings_complete' => 'A importação está pronta para começar.', + 'import_status_import_complete' => 'A importação foi concluída.', + 'import_status_import_running' => 'A importação está atualmente em execução. Por favor, seja paciente.', + 'import_status_header' => 'Importação status e progresso', + 'import_status_errors' => 'Erro de importação', + 'import_status_report' => 'Relatório de importação', + 'import_finished' => 'Importação concluida', + 'import_error_single' => 'Ocorreu um erro durante a importação.', + 'import_error_multi' => 'Ocorreram erros durante a importação do arquivo.', 'import_error_fatal' => 'There was an error during the import routine. Please check the log files. The error seems to be:', 'import_error_timeout' => 'The import seems to have timed out. If this error persists, please import your data using the console command.', 'import_double' => 'Row #:row: This row has been imported before, and is stored in :description.', - 'import_finished_all' => 'The import has finished. Please check out the results below.', - 'import_with_key' => 'Import with key \':key\'', + 'import_finished_all' => 'A importação terminou. Por favor, verifique os resultados abaixo.', + 'import_with_key' => 'Importação com chave \':key\'', 'import_share_configuration' => 'Please consider downloading your configuration and sharing it at the import configuration center. This will allow other users of Firefly III to import their files more easily.', 'import_finished_report' => 'The import has finished. Please note any errors in the block above this line. All transactions imported during this particular session have been tagged, and you can check them out below. ', 'import_finished_link' => 'The transactions imported can be found in tag :tag.', - 'need_at_least_one_account' => 'You need at least one asset account to be able to create piggy banks', - 'see_help_top_right' => 'For more information, please check out the help pages using the icon in the top right corner of the page.', + 'need_at_least_one_account' => 'Você precisa de pelo menos uma conta de ativo para ser capaz de criar cofrinhos', + 'see_help_top_right' => 'Para obter mais informações, por favor, confira as páginas de ajuda usando o ícone no canto superior direito da página.', ]; \ No newline at end of file From 110d7f691c53f86241311fb815f0b2d3dd715d2b Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:31:42 +0100 Subject: [PATCH 042/110] New translations --- resources/lang/de_DE/firefly.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/lang/de_DE/firefly.php b/resources/lang/de_DE/firefly.php index df1b5e15e2..729f01eab1 100644 --- a/resources/lang/de_DE/firefly.php +++ b/resources/lang/de_DE/firefly.php @@ -59,7 +59,7 @@ return [ 'two_factor_title' => 'Zwei-Faktor-Authentifizierung', 'authenticate' => 'Authentifizieren', 'two_factor_forgot_title' => 'Zwei-Faktor-Authentifizierung verloren', - 'two_factor_forgot' => 'I forgot my two-factor thing.', + 'two_factor_forgot' => 'Ich kann keine 2FA-Codes generieren.', 'two_factor_lost_header' => 'Haben Sie ihre Zwei-Faktor-Authentifizierung verloren?', 'two_factor_lost_intro' => 'Leider ist dieses etwas, dass sie nicht über die Weboberfläche zurücksetzen können. Sie haben zwei Möglichkeiten.', 'two_factor_lost_fix_self' => 'Wenn Sie Ihre eigene Instanz von Firefly III betreiben, überprüfen Sie die Logdatei unter storage/logs für weitere Anweisungen.', @@ -74,7 +74,7 @@ return [ 'search_found_transactions' => 'Found :count transaction(s) for your query.', 'results_limited' => 'Es werden maximal :count Ergebnisse angezeigt.', 'tagbalancingAct' => 'Balancing act', - 'tagadvancePayment' => 'Advance payment', + 'tagadvancePayment' => 'Vorauszahlung', 'tagnothing' => '', 'Default asset account' => 'Standard-Anlagekonto', 'no_budget_pointer' => 'Sie scheinen keine Budgets festgelegt zu haben. Sie sollten welche auf der Budget-Seite erstellen. Budgets können Ihnen helfen ihre Ausgaben zu verfolgen.', @@ -304,7 +304,7 @@ return [ 'preferences_layout' => 'Layout', 'pref_home_show_deposits' => 'Show deposits on the home screen', 'pref_home_show_deposits_info' => 'The home screen already shows your expense accounts. Should it also show your revenue accounts?', - 'pref_home_do_show_deposits' => 'Yes, show them', + 'pref_home_do_show_deposits' => 'Ja, zeige sie an', 'successful_count' => 'of which :count successful', 'transaction_page_size_title' => 'Seitengröße', 'transaction_page_size_help' => 'Any list of transactions shows at most this many transactions', @@ -513,10 +513,10 @@ return [ 'make_new_revenue_account' => 'Create a new revenue account', 'asset_accounts' => 'Girokonten', 'expense_accounts' => 'Debitoren (Ausgaben)', - 'revenue_accounts' => 'Revenue accounts', - 'cash_accounts' => 'Cash accounts', - 'Cash account' => 'Cash account', - 'account_type' => 'Account type', + 'revenue_accounts' => 'Schuldner', + 'cash_accounts' => 'Bargeldkonten', + 'Cash account' => 'Bargeldkonto', + 'account_type' => 'Kontotyp', 'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:', 'stored_new_account' => 'New account ":name" stored!', 'updated_account' => 'Updated account ":name"', @@ -641,7 +641,7 @@ return [ 'report_this_fiscal_year_quick' => 'Aktuelles Geschäftsjahr, alle Konten', 'report_all_time_quick' => 'Gesamte Zeit, alle Konten', 'reports_can_bookmark' => 'Berichte können als Lesezeichen gespeichert werden.', - 'incomeVsExpenses' => 'Income vs. expenses', + 'incomeVsExpenses' => 'Einkommen vs Ausgaben', 'accountBalances' => 'Account balances', 'balanceStartOfYear' => 'Bilanz zum Jahresbeginn', 'balanceEndOfYear' => 'Bilanz zum Jahresende', @@ -658,10 +658,10 @@ return [ 'expectedBalance' => 'Expected balance', 'outsideOfBudgets' => 'Outside of budgets', 'leftInBudget' => 'Left in budget', - 'sumOfSums' => 'Sum of sums', + 'sumOfSums' => 'Summe der Summen', 'noCategory' => '(keine Kategorie)', 'notCharged' => 'Not charged (yet)', - 'inactive' => 'Inactive', + 'inactive' => 'Inaktiv', 'active' => 'Aktiv', 'difference' => 'Unterschied', 'in' => 'Rein', From 238ae125b5110e8962a47d74d223256bcee58d47 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:41:20 +0100 Subject: [PATCH 043/110] New translations --- resources/lang/pt_BR/firefly.php | 34 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.php index bcca90217f..6a2fbfb1d3 100644 --- a/resources/lang/pt_BR/firefly.php +++ b/resources/lang/pt_BR/firefly.php @@ -705,11 +705,11 @@ return [ 'include_not_in_category' => 'Incluir transações não selecionadas para este relatório', 'everything_else' => 'Todo o resto', 'income_and_expenses' => 'Receitas e despesas', - 'spent_average' => 'Spent (average)', - 'income_average' => 'Income (average)', - 'transaction_count' => 'Transaction count', - 'average_spending_per_account' => 'Average spending per account', - 'average_income_per_account' => 'Average income per account', + 'spent_average' => 'Gastos (média)', + 'income_average' => 'Renda (média)', + 'transaction_count' => 'Contagem de transações', + 'average_spending_per_account' => 'Média de gastos por conta', + 'average_income_per_account' => 'Rendimento médio por conta', 'total' => 'Total', 'description' => 'Descrição', @@ -798,9 +798,9 @@ return [ 'tags_group' => 'Tags agrupam transações, que torna possível armazenar os reembolsos (no caso você empreste dinheiro para os outros) e outros "balancetes" onde as despesas são somadas (os pagamentos na sua TV nova) ou onde as despesas e depósitos estão anulando uns aos outros (compra algo com dinheiro guardado). Isso é tudo para você. Usando tags à moda antiga claro é sempre possível.', 'tags_start' => 'Crie uma tag para começar ou insira tags ao criar novas transações.', - 'transaction_journal_information' => 'Transaction information', - 'transaction_journal_meta' => 'Meta information', - 'total_amount' => 'Total amount', + 'transaction_journal_information' => 'Informação da transação', + 'transaction_journal_meta' => 'Meta-informação', + 'total_amount' => 'Valor total', // administration 'administration' => 'Administração', @@ -819,17 +819,17 @@ return [ 'no_domain_filled_in' => 'Nenhum domínio preenchido', 'domain_already_blocked' => 'Domínio :domain já está bloqueado', 'domain_is_now_blocked' => 'Domínio :domain está bloqueado', - 'instance_configuration' => 'Configuration', - 'firefly_instance_configuration' => 'Configuration options for Firefly III', - 'setting_single_user_mode' => 'Single user mode', + 'instance_configuration' => 'Configuração', + 'firefly_instance_configuration' => 'Opções de configuração para Firefly III', + 'setting_single_user_mode' => 'Modo de usuário único', 'setting_single_user_mode_explain' => 'By default, Firefly III only accepts one (1) registration: you. This is a security measure, preventing others from using your instance unless you allow them to. Future registrations are blocked. When you uncheck this box, others can use your instance as wel, assuming they can reach it (when it is connected to the internet).', - 'store_configuration' => 'Store configuration', + 'store_configuration' => 'Configuração da Loja', 'single_user_administration' => 'User administration for :email', 'hidden_fields_preferences' => 'Not all fields are visible right now. You must enable them in your settings.', - 'user_data_information' => 'User data', - 'user_information' => 'User information', - 'total_size' => 'total size', - 'budget_or_budgets' => 'budget(s)', + 'user_data_information' => 'Dados de usuário', + 'user_information' => 'Informações do usuário', + 'total_size' => 'tamanho total', + 'budget_or_budgets' => 'orçamento(s)', 'budgets_with_limits' => 'budget(s) com quantidade configurada', 'rule_or_rules' => 'regra(s)', 'rulegroup_or_groups' => 'grupo(s) de regra', @@ -883,7 +883,7 @@ return [ 'import_finish_configuration' => 'Terminar configuração', 'settings_for_import' => 'Preferências', 'import_status' => 'Status de importação', - 'import_status_text' => 'The import is currently running, or will start momentarily.', + 'import_status_text' => 'A importação está atualmente em execução, ou vai começar dentro de momentos.', 'import_complete' => 'Configuração de importação completa!', 'import_complete_text' => 'The import is ready to start. All the configuration you needed to do has been done. Please download the configuration file. It will help you with the import should it not go as planned. To actually run the import, you can either execute the following command in your console, or run the web-based import. Depending on your configuration, the console import will give you more feedback.', 'import_download_config' => 'Download da configuração', From 5fb2db4e2827cc73bab0f058f15dd01f6c22d84f Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 17:41:26 +0100 Subject: [PATCH 044/110] New translations --- resources/lang/de_DE/firefly.php | 44 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/resources/lang/de_DE/firefly.php b/resources/lang/de_DE/firefly.php index 729f01eab1..c96d7b44d5 100644 --- a/resources/lang/de_DE/firefly.php +++ b/resources/lang/de_DE/firefly.php @@ -667,7 +667,7 @@ return [ 'in' => 'Rein', 'out' => 'Raus', 'topX' => 'top :number', - 'show_full_list' => 'Show entire list', + 'show_full_list' => 'Zeige die gesamte Liste', 'show_only_top' => 'Show only top :number', 'sum_of_year' => 'Summe des Jahres', 'sum_of_years' => 'Summe der Jahre', @@ -695,7 +695,7 @@ return [ 'audit_end_balance' => 'Account balance of :account_name at the end of :end was: :balance', 'reports_extra_options' => 'Extra options', 'report_has_no_extra_options' => 'This report has no extra options', - 'reports_submit' => 'View report', + 'reports_submit' => 'Zeige Bericht', 'end_after_start_date' => 'End date of report must be after start date.', 'select_category' => 'Select one or more categories.', 'income_per_category' => 'Income per category', @@ -703,26 +703,26 @@ return [ 'income_per_account' => 'Income per account', 'expense_per_account' => 'Expense per account', 'include_not_in_category' => 'Include transactions not selected for this report', - 'everything_else' => 'Everything else', - 'income_and_expenses' => 'Income and expenses', - 'spent_average' => 'Spent (average)', - 'income_average' => 'Income (average)', - 'transaction_count' => 'Transaction count', - 'average_spending_per_account' => 'Average spending per account', - 'average_income_per_account' => 'Average income per account', - 'total' => 'Total', - 'description' => 'Description', + 'everything_else' => 'Der Rest', + 'income_and_expenses' => 'Einkommen und Ausgaben', + 'spent_average' => 'Ausgaben (Durchschnitt)', + 'income_average' => 'Einkommen (Durchschnitt)', + 'transaction_count' => 'Überweisungen', + 'average_spending_per_account' => 'Durchschnittsausgaben pro Konto', + 'average_income_per_account' => 'Durchschnittseinkommen pro Konto', + 'total' => 'Gesamt', + 'description' => 'Beschreibung', // charts: - 'chart' => 'Chart', - 'dayOfMonth' => 'Day of the month', + 'chart' => 'Diagram', + 'dayOfMonth' => 'Tag des Monats', 'month' => 'Monat', 'budget' => 'Budget', 'spent' => 'Ausgegeben', 'earned' => 'Verdient', - 'overspent' => 'Overspent', - 'left' => 'Left', + 'overspent' => 'Zuviel ausgegeben', + 'left' => 'Übrig', 'no_budget' => '(kein Budget)', 'maxAmount' => 'Höchstbetrag', 'minAmount' => 'Mindestbetrag', @@ -767,7 +767,7 @@ return [ 'start_date' => 'Startdatum', 'target_date' => 'Zieldatum', 'no_target_date' => 'Kein Zieldatum', - 'todo' => 'to do', + 'todo' => 'Zu erledigen', 'table' => 'Tabelle', 'piggy_bank_not_exists' => 'Dieses Sparschwein existiert nicht mehr.', 'add_any_amount_to_piggy' => 'Fügen sie Geld ihrem Sparschein hinzu, um ihr Ziel von :amount zu erreichen.', @@ -805,11 +805,11 @@ return [ // administration 'administration' => 'Administration', 'user_administration' => 'Nutzerinformation', - 'list_all_users' => 'All users', - 'all_users' => 'All users', - 'all_blocked_domains' => 'All blocked domains', - 'blocked_domains' => 'Blocked domains', - 'no_domains_banned' => 'No domains blocked', + 'list_all_users' => 'Alle Benutzer', + 'all_users' => 'Alle Benutzer', + 'all_blocked_domains' => 'Alle blockierten Domains', + 'blocked_domains' => 'Blockierte Domains', + 'no_domains_banned' => 'Keine blockierten Domains', 'all_user_domains' => 'All user email address domains', 'all_domains_is_filtered' => 'This list does not include already blocked domains.', 'domain_now_blocked' => 'Domain :domain is now blocked', @@ -898,7 +898,7 @@ return [ 'import_status_header' => 'Import status and progress', 'import_status_errors' => 'Import errors', 'import_status_report' => 'Import report', - 'import_finished' => 'Import has finished', + 'import_finished' => 'Der Importierungsvorgang ist beendet', 'import_error_single' => 'An error has occured during the import.', 'import_error_multi' => 'Some errors occured during the import.', 'import_error_fatal' => 'There was an error during the import routine. Please check the log files. The error seems to be:', From 71e1b58f1d9e66e81ac1d166add338cae2dc3271 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Nov 2016 19:34:54 +0100 Subject: [PATCH 045/110] =?UTF-8?q?Experimental=20code=20for=20issue=20#43?= =?UTF-8?q?5.=20Let=E2=80=99s=20try=20this=20a=20few=20times,=20see=20how?= =?UTF-8?q?=20it=20works.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/layout/default.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/layout/default.twig b/resources/views/layout/default.twig index 6aed4659ed..bf006c8696 100644 --- a/resources/views/layout/default.twig +++ b/resources/views/layout/default.twig @@ -67,7 +67,7 @@
  • - +
  • From 6638f6fb5c0defcb4bbf8984b80beb3bb5e28fe9 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 1 Dec 2016 08:01:07 +0100 Subject: [PATCH 046/110] Approved. Step name: Proofread --- resources/lang/nl_NL/firefly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.php index 92134a0c73..133343784a 100644 --- a/resources/lang/nl_NL/firefly.php +++ b/resources/lang/nl_NL/firefly.php @@ -521,7 +521,7 @@ return [ 'stored_new_account' => 'Nieuwe rekening ":name" opgeslagen!', 'updated_account' => 'Rekening ":name" geüpdatet', 'credit_card_options' => 'Opties voor credit cards', - 'no_transactions_account' => 'Betaalrekening ":name" heeft geen geen transacties (in deze periode).', + 'no_transactions_account' => 'Betaalrekening ":name" heeft geen transacties (in deze periode).', 'no_data_for_chart' => 'Er is (nog) niet genoeg informatie om deze grafiek te tekenen.', 'select_more_than_one_account' => 'Selecteer meer dan één rekening', 'select_more_than_one_category' => 'Selecteer meer dan één categorie', From 8377a2a0debd8d2e685beb578a3d9c56af440c40 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 3 Dec 2016 20:38:13 +0100 Subject: [PATCH 047/110] Building report from issue #386 --- app/Helpers/Collector/JournalCollector.php | 102 +++++++++++-- .../Collector/JournalCollectorInterface.php | 12 +- .../Controllers/Report/CategoryController.php | 131 ++++++++++++++++ app/Repositories/Budget/BudgetRepository.php | 142 ++++++++++-------- app/Support/Navigation.php | 8 +- public/js/ff/accounts/show.js | 2 +- public/js/ff/reports/default/year.js | 3 +- resources/views/reports/default/year.twig | 14 ++ .../reports/partials/category-period.twig | 54 +++++++ routes/web.php | 7 + 10 files changed, 389 insertions(+), 86 deletions(-) create mode 100644 resources/views/reports/partials/category-period.twig diff --git a/app/Helpers/Collector/JournalCollector.php b/app/Helpers/Collector/JournalCollector.php index 328f4ca53f..7816e1a61c 100644 --- a/app/Helpers/Collector/JournalCollector.php +++ b/app/Helpers/Collector/JournalCollector.php @@ -60,6 +60,8 @@ class JournalCollector implements JournalCollectorInterface 'account_types.type as account_type', ]; /** @var bool */ + private $filterInternalTransfers; + /** @var bool */ private $filterTransfers = false; /** @var bool */ private $joinedBudget = false; @@ -127,6 +129,26 @@ class JournalCollector implements JournalCollectorInterface return $this; } + /** + * @return JournalCollectorInterface + */ + public function disableInternalFilter(): JournalCollectorInterface + { + $this->filterInternalTransfers = false; + + return $this; + } + + /** + * @return JournalCollectorInterface + */ + public function enableInternalFilter(): JournalCollectorInterface + { + $this->filterInternalTransfers = true; + + return $this; + } + /** * @return Collection */ @@ -138,6 +160,11 @@ class JournalCollector implements JournalCollectorInterface $set = $this->filterTransfers($set); Log::debug(sprintf('Count of set after filterTransfers() is %d', $set->count())); + // possibly filter "internal" transfers: + $set = $this->filterInternalTransfers($set); + Log::debug(sprintf('Count of set after filterInternalTransfers() is %d', $set->count())); + + // loop for decryption. $set->each( function (Transaction $transaction) { @@ -501,6 +528,47 @@ class JournalCollector implements JournalCollectorInterface return $this; } + /** + * @param Collection $set + * + * @return Collection + */ + private function filterInternalTransfers(Collection $set): Collection + { + if ($this->filterInternalTransfers === false) { + Log::debug('Did NO filtering for internal transfers on given set.'); + + return $set; + } + if ($this->joinedOpposing === false) { + Log::error('Cannot filter internal transfers because no opposing information is present.'); + + return $set; + } + + $accountIds = $this->accountIds; + $set = $set->filter( + function (Transaction $transaction) use ($accountIds) { + // both id's in $accountids? + if (in_array($transaction->account_id, $accountIds) && in_array($transaction->opposing_account_id, $accountIds)) { + Log::debug( + sprintf( + 'Transaction #%d has #%d and #%d in set, so removed', + $transaction->id, $transaction->account_id, $transaction->opposing_account_id + ), $accountIds + ); + + return false; + } + + return $transaction; + + } + ); + + return $set; + } + /** * If the set of accounts used by the collector includes more than one asset * account, chances are the set include double entries: transfers get selected @@ -583,6 +651,7 @@ class JournalCollector implements JournalCollectorInterface private function joinOpposingTables() { if (!$this->joinedOpposing) { + Log::debug('joinedOpposing is false'); // join opposing transaction (hard): $this->query->leftJoin( 'transactions as opposing', function (JoinClause $join) { @@ -595,11 +664,12 @@ class JournalCollector implements JournalCollectorInterface $this->query->leftJoin('account_types as opposing_account_types', 'opposing_accounts.account_type_id', '=', 'opposing_account_types.id'); $this->query->whereNull('opposing.deleted_at'); - $this->fields[] = 'opposing.account_id as opposing_account_id'; - $this->fields[] = 'opposing_accounts.name as opposing_account_name'; - $this->fields[] = 'opposing_accounts.encrypted as opposing_account_encrypted'; - $this->fields[] = 'opposing_account_types.type as opposing_account_type'; - + $this->fields[] = 'opposing.account_id as opposing_account_id'; + $this->fields[] = 'opposing_accounts.name as opposing_account_name'; + $this->fields[] = 'opposing_accounts.encrypted as opposing_account_encrypted'; + $this->fields[] = 'opposing_account_types.type as opposing_account_type'; + $this->joinedOpposing = true; + Log::debug('joinedOpposing is now true!'); } } @@ -622,17 +692,17 @@ class JournalCollector implements JournalCollectorInterface { $query = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->leftJoin('transaction_currencies', 'transaction_currencies.id', 'transaction_journals.transaction_currency_id') - ->leftJoin('transaction_types', 'transaction_types.id', 'transaction_journals.transaction_type_id') - ->leftJoin('bills', 'bills.id', 'transaction_journals.bill_id') - ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id') - ->leftJoin('account_types', 'accounts.account_type_id', 'account_types.id') - ->whereNull('transactions.deleted_at') - ->whereNull('transaction_journals.deleted_at') - ->where('transaction_journals.user_id', $this->user->id) - ->orderBy('transaction_journals.date', 'DESC') - ->orderBy('transaction_journals.order', 'ASC') - ->orderBy('transaction_journals.id', 'DESC'); + ->leftJoin('transaction_currencies', 'transaction_currencies.id', 'transaction_journals.transaction_currency_id') + ->leftJoin('transaction_types', 'transaction_types.id', 'transaction_journals.transaction_type_id') + ->leftJoin('bills', 'bills.id', 'transaction_journals.bill_id') + ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id') + ->leftJoin('account_types', 'accounts.account_type_id', 'account_types.id') + ->whereNull('transactions.deleted_at') + ->whereNull('transaction_journals.deleted_at') + ->where('transaction_journals.user_id', $this->user->id) + ->orderBy('transaction_journals.date', 'DESC') + ->orderBy('transaction_journals.order', 'ASC') + ->orderBy('transaction_journals.id', 'DESC'); return $query; diff --git a/app/Helpers/Collector/JournalCollectorInterface.php b/app/Helpers/Collector/JournalCollectorInterface.php index a9a70a8944..320fcab93b 100644 --- a/app/Helpers/Collector/JournalCollectorInterface.php +++ b/app/Helpers/Collector/JournalCollectorInterface.php @@ -38,6 +38,16 @@ interface JournalCollectorInterface */ public function disableFilter(): JournalCollectorInterface; + /** + * @return JournalCollectorInterface + */ + public function disableInternalFilter(): JournalCollectorInterface; + + /** + * @return JournalCollectorInterface + */ + public function enableInternalFilter(): JournalCollectorInterface; + /** * @return Collection */ @@ -46,7 +56,7 @@ interface JournalCollectorInterface /** * @return LengthAwarePaginator */ - public function getPaginatedJournals():LengthAwarePaginator; + public function getPaginatedJournals(): LengthAwarePaginator; /** * @param Collection $accounts diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index 48ee5d77b7..3e993a9b16 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -15,10 +15,15 @@ namespace FireflyIII\Http\Controllers\Report; use Carbon\Carbon; +use FireflyIII\Helpers\Collector\JournalCollectorInterface; use FireflyIII\Helpers\Report\ReportHelperInterface; use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Models\Category; +use FireflyIII\Models\TransactionType; +use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; +use Navigation; /** * Class CategoryController @@ -27,6 +32,84 @@ use Illuminate\Support\Collection; */ class CategoryController extends Controller { + /** + * + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts + * + * @return string + */ + public function categoryPeriodReport(Carbon $start, Carbon $end, Collection $accounts) + { + /** @var CategoryRepositoryInterface $repository */ + $repository = app(CategoryRepositoryInterface::class); + $categories = $repository->getCategories(); + $data = []; + + // income only: + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end) + ->withOpposingAccount() + ->enableInternalFilter() + ->setCategories($categories); + + $transactions = $collector->getJournals(); + + // this is the date format we need: + // define period to group on: + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + + // this is the set of transactions for this period + // in these budgets. Now they must be grouped (manually) + // id, period => amount + $income = []; + foreach ($transactions as $transaction) { + $categoryId = max(intval($transaction->transaction_journal_category_id), intval($transaction->transaction_category_id)); + $date = $transaction->date->format($carbonFormat); + + if (!isset($income[$categoryId])) { + $income[$categoryId]['name'] = $this->getCategoryName($categoryId, $categories); + $income[$categoryId]['sum'] = '0'; + $income[$categoryId]['entries'] = []; + } + + if (!isset($income[$categoryId]['entries'][$date])) { + $income[$categoryId]['entries'][$date] = '0'; + } + $income[$categoryId]['entries'][$date] = bcadd($income[$categoryId]['entries'][$date], $transaction->transaction_amount); + } + + // and now the same for stuff without a category: + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAllAssetAccounts()->setRange($start, $end); + $collector->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER]); + $collector->withoutCategory(); + $transactions = $collector->getJournals(); + + $income[0]['entries'] = []; + $income[0]['name'] = strval(trans('firefly.no_category')); + $income[0]['sum'] = '0'; + + foreach ($transactions as $transaction) { + $date = $transaction->date->format($carbonFormat); + + if (!isset($income[0]['entries'][$date])) { + $income[0]['entries'][$date] = '0'; + } + $income[0]['entries'][$date] = bcadd($income[0]['entries'][$date], $transaction->transaction_amount); + } + + $periods = Navigation::listOfPeriods($start, $end); + + $income = $this->filterCategoryPeriodReport($income); + + $result = view('reports.partials.category-period', compact('categories', 'periods', 'income'))->render(); + + return $result; + } /** * @param ReportHelperInterface $helper @@ -56,4 +139,52 @@ class CategoryController extends Controller return $result; } + /** + * Filters empty results from category period report + * + * @param array $data + * + * @return array + */ + private function filterCategoryPeriodReport(array $data): array + { + /** + * @var int $categoryId + * @var array $set + */ + foreach ($data as $categoryId => $set) { + $sum = '0'; + foreach ($set['entries'] as $amount) { + $sum = bcadd($amount, $sum); + } + $data[$categoryId]['sum'] = $sum; + if (bccomp('0', $sum) === 0) { + unset($data[$categoryId]); + } + } + + return $data; + } + + /** + * @param int $categoryId + * @param Collection $categories + * + * @return string + */ + private function getCategoryName(int $categoryId, Collection $categories): string + { + + $first = $categories->filter( + function (Category $category) use ($categoryId) { + return $categoryId === $category->id; + } + ); + if (!is_null($first->first())) { + return $first->first()->name; + } + + return '(unknown)'; + } + } \ No newline at end of file diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index c2db7da39a..d76c229ac3 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -226,55 +226,34 @@ class BudgetRepository implements BudgetRepositoryInterface */ public function getBudgetPeriodReport(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end): array { + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + $data = []; + // prep data array: + /** @var Budget $budget */ + foreach ($budgets as $budget) { + $data[$budget->id] = [ + 'name' => $budget->name, + 'sum' => '0', + 'entries' => [], + ]; + } + + // get all transactions: /** @var JournalCollectorInterface $collector */ $collector = app(JournalCollectorInterface::class); - $collector->setAllAssetAccounts()->setRange($start, $end); + $collector->setAccounts($accounts)->setRange($start, $end); $collector->setBudgets($budgets); $transactions = $collector->getJournals(); - // this is the date format we need: - // define period to group on: - $carbonFormat = Navigation::preferredCarbonFormat($start, $end); - - // this is the set of transactions for this period - // in these budgets. Now they must be grouped (manually) - // id, period => amount - $data = []; + // loop transactions: + /** @var Transaction $transaction */ foreach ($transactions as $transaction) { - $budgetId = max(intval($transaction->transaction_journal_budget_id), intval($transaction->transaction_budget_id)); - $date = $transaction->date->format($carbonFormat); - - if (!isset($data[$budgetId])) { - $data[$budgetId]['name'] = $this->getBudgetName($budgetId, $budgets); - $data[$budgetId]['sum'] = '0'; - $data[$budgetId]['entries'] = []; - } - - if (!isset($data[$budgetId]['entries'][$date])) { - $data[$budgetId]['entries'][$date] = '0'; - } - $data[$budgetId]['entries'][$date] = bcadd($data[$budgetId]['entries'][$date], $transaction->transaction_amount); + $budgetId = max(intval($transaction->transaction_journal_budget_id), intval($transaction->transaction_budget_id)); + $date = $transaction->date->format($carbonFormat); + $data[$budgetId]['entries'][$date] = bcadd($data[$budgetId]['entries'][$date] ?? '0', $transaction->transaction_amount); } // and now the same for stuff without a budget: - /** @var JournalCollectorInterface $collector */ - $collector = app(JournalCollectorInterface::class); - $collector->setAllAssetAccounts()->setRange($start, $end); - $collector->setTypes([TransactionType::WITHDRAWAL]); - $collector->withoutBudget(); - $transactions = $collector->getJournals(); - - $data[0]['entries'] = []; - $data[0]['name'] = strval(trans('firefly.no_budget')); - $data[0]['sum'] = '0'; - - foreach ($transactions as $transaction) { - $date = $transaction->date->format($carbonFormat); - - if (!isset($data[0]['entries'][$date])) { - $data[0]['entries'][$date] = '0'; - } - $data[0]['entries'][$date] = bcadd($data[0]['entries'][$date], $transaction->transaction_amount); - } + $data[0] = $this->getNoBudgetPeriodReport($start, $end); return $data; @@ -332,19 +311,23 @@ class BudgetRepository implements BudgetRepositoryInterface Log::debug('spentInPeriod: and these accounts: ', $accountIds); Log::debug(sprintf('spentInPeriod: Start date is "%s", end date is "%s"', $start->format('Y-m-d'), $end->format('Y-m-d'))); - $fromJournalsQuery = TransactionJournal::leftJoin('budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id') - ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') - ->leftJoin( - 'transactions', function (JoinClause $join) { - $join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')->where('transactions.amount', '<', 0); - } - ) - ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) - ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) - ->whereNull('transaction_journals.deleted_at') - ->whereNull('transactions.deleted_at') - ->where('transaction_journals.user_id', $this->user->id) - ->where('transaction_types.type', 'Withdrawal'); + $fromJournalsQuery = TransactionJournal::leftJoin( + 'budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id' + ) + ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') + ->leftJoin( + 'transactions', function (JoinClause $join) { + $join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')->where( + 'transactions.amount', '<', 0 + ); + } + ) + ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) + ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) + ->whereNull('transaction_journals.deleted_at') + ->whereNull('transactions.deleted_at') + ->where('transaction_journals.user_id', $this->user->id) + ->where('transaction_types.type', 'Withdrawal'); // add budgets: if ($budgets->count() > 0) { @@ -368,15 +351,15 @@ class BudgetRepository implements BudgetRepositoryInterface * and transactions.account_id in (2) */ $fromTransactionsQuery = Transaction::leftJoin('budget_transaction', 'budget_transaction.transaction_id', '=', 'transactions.id') - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') - ->whereNull('transactions.deleted_at') - ->whereNull('transaction_journals.deleted_at') - ->where('transactions.amount', '<', 0) - ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) - ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) - ->where('transaction_journals.user_id', $this->user->id) - ->where('transaction_types.type', 'Withdrawal'); + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') + ->whereNull('transactions.deleted_at') + ->whereNull('transaction_journals.deleted_at') + ->where('transactions.amount', '<', 0) + ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) + ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) + ->where('transaction_journals.user_id', $this->user->id) + ->where('transaction_types.type', 'Withdrawal'); // add budgets: if ($budgets->count() > 0) { @@ -569,4 +552,37 @@ class BudgetRepository implements BudgetRepositoryInterface return '(unknown)'; } + + /** + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + private function getNoBudgetPeriodReport(Carbon $start, Carbon $end): array + { + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAllAssetAccounts()->setRange($start, $end); + $collector->setTypes([TransactionType::WITHDRAWAL]); + $collector->withoutBudget(); + $transactions = $collector->getJournals(); + $result = [ + 'entries' => [], + 'name' => strval(trans('firefly.no_budget')), + 'sum' => '0', + ]; + + foreach ($transactions as $transaction) { + $date = $transaction->date->format($carbonFormat); + + if (!isset($result['entries'][$date])) { + $result['entries'][$date] = '0'; + } + $result['entries'][$date] = bcadd($result['entries'][$date], $transaction->transaction_amount); + } + + return $result; + } } diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index f8ec640963..48ff2724fb 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -246,8 +246,8 @@ class Navigation * If the date difference between start and end is less than a month, method returns "Y-m-d". If the difference is less than a year, * method returns "Y-m". If the date difference is larger, method returns "Y". * - * @param Carbon $start - * @param Carbon $end + * @param \Carbon\Carbon $start + * @param \Carbon\Carbon $end * * @return string */ @@ -270,8 +270,8 @@ class Navigation * If the date difference between start and end is less than a month, method returns "1D". If the difference is less than a year, * method returns "1M". If the date difference is larger, method returns "1Y". * - * @param Carbon $start - * @param Carbon $end + * @param \Carbon\Carbon $start + * @param \Carbon\Carbon $end * * @return string */ diff --git a/public/js/ff/accounts/show.js b/public/js/ff/accounts/show.js index 0bfb8e9a69..4de17eddb5 100644 --- a/public/js/ff/accounts/show.js +++ b/public/js/ff/accounts/show.js @@ -15,7 +15,7 @@ var fixHelper = function (e, tr) { $(function () { "use strict"; - lineChart('chart/account/' + accountID, 'overview-chart'); + lineChart('chart/account/' + accountID, 'overview-chart'); pieChart(incomeByCategoryUri, 'account-cat-in'); pieChart(expenseByCategoryUri, 'account-cat-out'); pieChart(expenseByBudgetUri, 'account-budget-out'); diff --git a/public/js/ff/reports/default/year.js b/public/js/ff/reports/default/year.js index a7c5121abe..237f3bac77 100644 --- a/public/js/ff/reports/default/year.js +++ b/public/js/ff/reports/default/year.js @@ -1,10 +1,11 @@ -/* globals google, accountIds, budgetPeriodReportUri */ +/* globals google, accountIds, budgetPeriodReportUri, categoryPeriodReportUri */ $(function () { "use strict"; drawChart(); loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUri); + loadAjaxPartial('categoryPeriodReport', categoryPeriodReportUri); }); function drawChart() { diff --git a/resources/views/reports/default/year.twig b/resources/views/reports/default/year.twig index 8ef09d32af..1824ad5f05 100644 --- a/resources/views/reports/default/year.twig +++ b/resources/views/reports/default/year.twig @@ -113,6 +113,19 @@
    + {# same thing but for categories #} +
    +
    +
    +
    +

    {{ 'categories'|_ }}

    +
    +
    +
    +
    +
    + + {% endblock %} {% block scripts %} @@ -135,6 +148,7 @@ var incExpReportUri = '{{ route('reports.data.incExpReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; var budgetPeriodReportUri = '{{ route('reports.data.budgetPeriodReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; + var categoryPeriodReportUri = '{{ route('reports.data.categoryPeriodReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; diff --git a/resources/views/reports/partials/category-period.twig b/resources/views/reports/partials/category-period.twig new file mode 100644 index 0000000000..a7fbebadd6 --- /dev/null +++ b/resources/views/reports/partials/category-period.twig @@ -0,0 +1,54 @@ + + + + + {% for period in periods %} + + {% endfor %} + + + + {% for period in periods %} + + + {% endfor %} + + + + + + {% for category in categories %} + {% if income[category.id] %} + + + + {% for key, period in periods %} + {# income first #} + {% if(income[category.id].entries[key]) %} + + {% else %} + + {% endif %} + + {# expenses #} + + {% endfor %} + + + + {% endif %} + {% endfor %} + +
    {{ 'category'|_ }}{{ period }}{{ 'sum'|_ }}
    InOutInOut
    + {{ category.name }} + + {{ income[category.id].entries[key]|formatAmount }} + + {{ 0|formatAmount }} + + + + 0 + + 1 +
    \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 9409bae581..67c4135254 100755 --- a/routes/web.php +++ b/routes/web.php @@ -402,12 +402,19 @@ Route::group( '/reports/data/budget-report/{start_date}/{end_date}/{accountList}', ['uses' => 'Report\BudgetController@budgetReport', 'as' => 'reports.data.budgetReport'] ); + // budget period overview Route::get( '/reports/data/budget-period/{start_date}/{end_date}/{accountList}', ['uses' => 'Report\BudgetController@budgetPeriodReport', 'as' => 'reports.data.budgetPeriodReport'] ); + // category period overview + Route::get( + '/reports/data/category-period/{start_date}/{end_date}/{accountList}', + ['uses' => 'Report\CategoryController@categoryPeriodReport', 'as' => 'reports.data.categoryPeriodReport'] + ); + /** * Rules Controller */ From b032825342d56595c35cd6a9b00639d9df0cd5a4 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 3 Dec 2016 21:03:20 +0100 Subject: [PATCH 048/110] Building report from issue #386 --- app/Helpers/Report/BudgetReportHelper.php | 2 +- .../Controllers/Chart/BudgetController.php | 2 +- .../Controllers/Report/CategoryController.php | 94 ++++--------------- app/Repositories/Budget/BudgetRepository.php | 16 ++-- .../Budget/BudgetRepositoryInterface.php | 9 +- .../Category/CategoryRepository.php | 80 +++++++++++++++- .../Category/CategoryRepositoryInterface.php | 22 ++++- .../reports/partials/category-period.twig | 28 +++--- 8 files changed, 148 insertions(+), 105 deletions(-) diff --git a/app/Helpers/Report/BudgetReportHelper.php b/app/Helpers/Report/BudgetReportHelper.php index d4af9fc8a4..eac93e796c 100644 --- a/app/Helpers/Report/BudgetReportHelper.php +++ b/app/Helpers/Report/BudgetReportHelper.php @@ -52,7 +52,7 @@ class BudgetReportHelper implements BudgetReportHelperInterface public function getBudgetPeriodReport(Carbon $start, Carbon $end, Collection $accounts): array { $budgets = $this->repository->getBudgets(); - $report = $this->repository->getBudgetPeriodReport($budgets, $accounts, $start, $end); + $report = $this->repository->getBudgetPeriodReport($budgets, $accounts, $start, $end, true); $data = $this->filterBudgetPeriodReport($report); return $data; diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index b2da79b704..ab2198be3b 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -209,7 +209,7 @@ class BudgetController extends Controller // the expenses: $periods = Navigation::listOfPeriods($start, $end); - $entries = $repository->getBudgetPeriodReport(new Collection([$budget]), $accounts, $start, $end); + $entries = $repository->getBudgetPeriodReport(new Collection([$budget]), $accounts, $start, $end, false); $budgeted = []; $key = Navigation::preferredCarbonFormat($start, $end); $range = Navigation::preferredRangeFormat($start, $end); diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index 3e993a9b16..686cdc9760 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -15,11 +15,9 @@ namespace FireflyIII\Http\Controllers\Report; use Carbon\Carbon; -use FireflyIII\Helpers\Collector\JournalCollectorInterface; use FireflyIII\Helpers\Report\ReportHelperInterface; use FireflyIII\Http\Controllers\Controller; use FireflyIII\Models\Category; -use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; @@ -42,71 +40,15 @@ class CategoryController extends Controller */ public function categoryPeriodReport(Carbon $start, Carbon $end, Collection $accounts) { + /** @var CategoryRepositoryInterface $repository */ $repository = app(CategoryRepositoryInterface::class); $categories = $repository->getCategories(); - $data = []; + $report = $repository->getCategoryPeriodReport($categories, $accounts, $start, $end, true); + $report = $this->filterCategoryPeriodReport($report); + $periods = Navigation::listOfPeriods($start, $end); - // income only: - /** @var JournalCollectorInterface $collector */ - $collector = app(JournalCollectorInterface::class); - $collector->setAccounts($accounts)->setRange($start, $end) - ->withOpposingAccount() - ->enableInternalFilter() - ->setCategories($categories); - - $transactions = $collector->getJournals(); - - // this is the date format we need: - // define period to group on: - $carbonFormat = Navigation::preferredCarbonFormat($start, $end); - - // this is the set of transactions for this period - // in these budgets. Now they must be grouped (manually) - // id, period => amount - $income = []; - foreach ($transactions as $transaction) { - $categoryId = max(intval($transaction->transaction_journal_category_id), intval($transaction->transaction_category_id)); - $date = $transaction->date->format($carbonFormat); - - if (!isset($income[$categoryId])) { - $income[$categoryId]['name'] = $this->getCategoryName($categoryId, $categories); - $income[$categoryId]['sum'] = '0'; - $income[$categoryId]['entries'] = []; - } - - if (!isset($income[$categoryId]['entries'][$date])) { - $income[$categoryId]['entries'][$date] = '0'; - } - $income[$categoryId]['entries'][$date] = bcadd($income[$categoryId]['entries'][$date], $transaction->transaction_amount); - } - - // and now the same for stuff without a category: - /** @var JournalCollectorInterface $collector */ - $collector = app(JournalCollectorInterface::class); - $collector->setAllAssetAccounts()->setRange($start, $end); - $collector->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER]); - $collector->withoutCategory(); - $transactions = $collector->getJournals(); - - $income[0]['entries'] = []; - $income[0]['name'] = strval(trans('firefly.no_category')); - $income[0]['sum'] = '0'; - - foreach ($transactions as $transaction) { - $date = $transaction->date->format($carbonFormat); - - if (!isset($income[0]['entries'][$date])) { - $income[0]['entries'][$date] = '0'; - } - $income[0]['entries'][$date] = bcadd($income[0]['entries'][$date], $transaction->transaction_amount); - } - - $periods = Navigation::listOfPeriods($start, $end); - - $income = $this->filterCategoryPeriodReport($income); - - $result = view('reports.partials.category-period', compact('categories', 'periods', 'income'))->render(); + $result = view('reports.partials.category-period', compact('categories', 'periods', 'report'))->render(); return $result; } @@ -148,18 +90,20 @@ class CategoryController extends Controller */ private function filterCategoryPeriodReport(array $data): array { - /** - * @var int $categoryId - * @var array $set - */ - foreach ($data as $categoryId => $set) { - $sum = '0'; - foreach ($set['entries'] as $amount) { - $sum = bcadd($amount, $sum); - } - $data[$categoryId]['sum'] = $sum; - if (bccomp('0', $sum) === 0) { - unset($data[$categoryId]); + foreach ($data as $key => $set) { + /** + * @var int $categoryId + * @var array $set + */ + foreach ($set as $categoryId => $info) { + $sum = '0'; + foreach ($info['entries'] as $amount) { + $sum = bcadd($amount, $sum); + } + $data[$key][$categoryId]['sum'] = $sum; + if (bccomp('0', $sum) === 0) { + unset($data[$key][$categoryId]); + } } } diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index d76c229ac3..47cf4e7273 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -212,19 +212,18 @@ class BudgetRepository implements BudgetRepositoryInterface } /** - * This method is being used to generate the budget overview in the year/multi-year report. More specifically, this - * method runs the query and returns the result that is used for this report. - * - * The query is used in both the year/multi-year budget overview AND in the accompanying chart. + * This method is being used to generate the budget overview in the year/multi-year report. Its used + * in both the year/multi-year budget overview AND in the accompanying chart. * * @param Collection $budgets * @param Collection $accounts * @param Carbon $start * @param Carbon $end + * @param bool $noBudget * * @return array */ - public function getBudgetPeriodReport(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end): array + public function getBudgetPeriodReport(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end, bool $noBudget): array { $carbonFormat = Navigation::preferredCarbonFormat($start, $end); $data = []; @@ -252,8 +251,11 @@ class BudgetRepository implements BudgetRepositoryInterface $date = $transaction->date->format($carbonFormat); $data[$budgetId]['entries'][$date] = bcadd($data[$budgetId]['entries'][$date] ?? '0', $transaction->transaction_amount); } - // and now the same for stuff without a budget: - $data[0] = $this->getNoBudgetPeriodReport($start, $end); + + if ($noBudget) { + // and now the same for stuff without a budget: + $data[0] = $this->getNoBudgetPeriodReport($start, $end); + } return $data; diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.php index f81788a435..296b06ed4f 100644 --- a/app/Repositories/Budget/BudgetRepositoryInterface.php +++ b/app/Repositories/Budget/BudgetRepositoryInterface.php @@ -96,10 +96,11 @@ interface BudgetRepositoryInterface * @param Collection $accounts * @param Carbon $start * @param Carbon $end + * @param bool $noBudget * * @return array */ - public function getBudgetPeriodReport(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end): array; + public function getBudgetPeriodReport(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end, bool $noBudget): array; /** * @return Collection @@ -119,7 +120,7 @@ interface BudgetRepositoryInterface * * @return string */ - public function spentInPeriod(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end) : string; + public function spentInPeriod(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end): string; /** * @param Collection $accounts @@ -143,7 +144,7 @@ interface BudgetRepositoryInterface * * @return Budget */ - public function update(Budget $budget, array $data) : Budget; + public function update(Budget $budget, array $data): Budget; /** * @param Budget $budget @@ -154,6 +155,6 @@ interface BudgetRepositoryInterface * * @return BudgetLimit */ - public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, string $range, int $amount) : BudgetLimit; + public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, string $range, int $amount): BudgetLimit; } diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index 98d613e9ba..403df60c5e 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -15,12 +15,15 @@ namespace FireflyIII\Repositories\Category; use Carbon\Carbon; use DB; +use FireflyIII\Helpers\Collector\JournalCollectorInterface; use FireflyIII\Models\Category; +use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\User; use Illuminate\Database\Query\JoinClause; use Illuminate\Support\Collection; +use Navigation; /** * Class CategoryRepository @@ -172,6 +175,32 @@ class CategoryRepository implements CategoryRepositoryInterface return $set; } + /** + * This method is being used to generate the category overview in the year/multi-year report. Its used + * in both the year/multi-year budget overview AND in the accompanying chart. + * + * @param Collection $categories + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * @param @bool $noCategory + * + * @return array + */ + public function getCategoryPeriodReport(Collection $categories, Collection $accounts, Carbon $start, Carbon $end, bool $noCategory): array + { + $data = [ + 'income' => $this->getCategoryReportData($categories, $accounts, $start, $end, $noCategory, [TransactionType::DEPOSIT, TransactionType::TRANSFER]), + 'expense' => $this->getCategoryReportData( + $categories, $accounts, $start, $end, $noCategory, [TransactionType::WITHDRAWAL, TransactionType::TRANSFER] + ), + ]; + + return $data; + + + } + /** * @param Category $category * @param Collection $accounts @@ -233,6 +262,7 @@ class CategoryRepository implements CategoryRepositoryInterface { $sum = $this->sumInPeriod($categories, $accounts, TransactionType::WITHDRAWAL, $start, $end); $sum = bcmul($sum, '-1'); + return $sum; } @@ -284,6 +314,55 @@ class CategoryRepository implements CategoryRepositoryInterface return $category; } + /** + * @param Collection $categories + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * @param bool $noCategory + * @param array $types + * + * @return array + */ + private function getCategoryReportData(Collection $categories, Collection $accounts, Carbon $start, Carbon $end, bool $noCategory, array $types): array + { + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + $data = []; + // prep data array: + /** @var Category $category */ + foreach ($categories as $category) { + $data[$category->id] = [ + 'name' => $category->name, + 'sum' => '0', + 'entries' => [], + ]; + } + + // get all transactions: + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end); + $collector->setCategories($categories)->setTypes($types) + ->withOpposingAccount() + ->enableInternalFilter(); + $transactions = $collector->getJournals(); + + // loop transactions: + /** @var Transaction $transaction */ + foreach ($transactions as $transaction) { + $categoryId = max(intval($transaction->transaction_journal_category_id), intval($transaction->transaction_category_id)); + $date = $transaction->date->format($carbonFormat); + $data[$categoryId]['entries'][$date] = bcadd($data[$categoryId]['entries'][$date] ?? '0', $transaction->transaction_amount); + } + + if ($noCategory) { + // and now the same for stuff without a budget: + //$data[0] = $this->getNoBudgetPeriodReport($start, $end); + } + + return $data; + } + /** * @param Collection $categories * @param Collection $accounts @@ -404,5 +483,4 @@ class CategoryRepository implements CategoryRepositoryInterface return $sum; } - } diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php index d088eebe5d..feb479c52d 100644 --- a/app/Repositories/Category/CategoryRepositoryInterface.php +++ b/app/Repositories/Category/CategoryRepositoryInterface.php @@ -49,7 +49,7 @@ interface CategoryRepositoryInterface * * @return string */ - public function earnedInPeriodWithoutCategory(Collection $accounts, Carbon $start, Carbon $end) :string; + public function earnedInPeriodWithoutCategory(Collection $accounts, Carbon $start, Carbon $end): string; /** * Find a category @@ -58,7 +58,7 @@ interface CategoryRepositoryInterface * * @return Category */ - public function find(int $categoryId) : Category; + public function find(int $categoryId): Category; /** * Find a category @@ -67,7 +67,7 @@ interface CategoryRepositoryInterface * * @return Category */ - public function findByName(string $name) : Category; + public function findByName(string $name): Category; /** * @param Category $category @@ -83,6 +83,20 @@ interface CategoryRepositoryInterface */ public function getCategories(): Collection; + /** + * This method is being used to generate the category overview in the year/multi-year report. Its used + * in both the year/multi-year budget overview AND in the accompanying chart. + * + * @param Collection $categories + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * @param bool $noCategory + * + * @return array + */ + public function getCategoryPeriodReport(Collection $categories, Collection $accounts, Carbon $start, Carbon $end, bool $noCategory): array; + /** * Return most recent transaction(journal) date. * @@ -110,7 +124,7 @@ interface CategoryRepositoryInterface * * @return string */ - public function spentInPeriodWithoutCategory(Collection $accounts, Carbon $start, Carbon $end) : string; + public function spentInPeriodWithoutCategory(Collection $accounts, Carbon $start, Carbon $end): string; /** * @param array $data diff --git a/resources/views/reports/partials/category-period.twig b/resources/views/reports/partials/category-period.twig index a7fbebadd6..7a20b962f5 100644 --- a/resources/views/reports/partials/category-period.twig +++ b/resources/views/reports/partials/category-period.twig @@ -18,7 +18,7 @@ {% for category in categories %} - {% if income[category.id] %} + {% if report.income[category.id] or report.expense[category.id] %} {{ category.name }} @@ -26,26 +26,30 @@ {% for key, period in periods %} {# income first #} - {% if(income[category.id].entries[key]) %} - - {{ income[category.id].entries[key]|formatAmount }} + {% if(report.income[category.id].entries[key]) %} + + {{ report.income[category.id].entries[key]|formatAmount }} {% else %} - {{ 0|formatAmount }} {% endif %} {# expenses #} - - - + {% if(report.expense[category.id].entries[key]) %} + + {{ report.expense[category.id].entries[key]|formatAmount }} + + {% else %} + + + {% endif %} {% endfor %} - - 0 + + {{ report.income[category.id].sum }} - - 1 + + {{ report.expense[category.id].sum }} {% endif %} From c5d31bccc5b77594f8910b3cfa65a074a8ad7396 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 3 Dec 2016 21:12:02 +0100 Subject: [PATCH 049/110] Small table optimisations [skip ci] --- resources/views/reports/partials/category-period.twig | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/views/reports/partials/category-period.twig b/resources/views/reports/partials/category-period.twig index 7a20b962f5..17368414ed 100644 --- a/resources/views/reports/partials/category-period.twig +++ b/resources/views/reports/partials/category-period.twig @@ -1,4 +1,4 @@ - +
    @@ -32,6 +32,7 @@ {% else %} {% endif %} @@ -42,14 +43,15 @@ {% else %} {% endif %} {% endfor %} {% endif %} From 53daa89fcb0a44e984116581693c5051b3930f3f Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 3 Dec 2016 21:24:55 +0100 Subject: [PATCH 050/110] Display optimisations. [skip ci] --- .../Controllers/Report/CategoryController.php | 31 +++++++--- .../reports/partials/category-period.twig | 61 ++++++++++++------- 2 files changed, 60 insertions(+), 32 deletions(-) diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index 686cdc9760..b683171ae8 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -21,6 +21,7 @@ use FireflyIII\Models\Category; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; +use Log; use Navigation; /** @@ -40,7 +41,16 @@ class CategoryController extends Controller */ public function categoryPeriodReport(Carbon $start, Carbon $end, Collection $accounts) { + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('category-period-report'); + $cache->addProperty($accounts->pluck('id')->toArray()); + if ($cache->has()) { + Log::debug('Return report from cache'); + return $cache->get(); + } /** @var CategoryRepositoryInterface $repository */ $repository = app(CategoryRepositoryInterface::class); $categories = $repository->getCategories(); @@ -50,6 +60,8 @@ class CategoryController extends Controller $result = view('reports.partials.category-period', compact('categories', 'periods', 'report'))->render(); + $cache->store($result); + return $result; } @@ -90,23 +102,24 @@ class CategoryController extends Controller */ private function filterCategoryPeriodReport(array $data): array { - foreach ($data as $key => $set) { - /** - * @var int $categoryId - * @var array $set - */ - foreach ($set as $categoryId => $info) { + /** + * @var string $type + * @var array $report + */ + foreach ($data as $type => $report) { + foreach ($report as $categoryId => $set) { $sum = '0'; - foreach ($info['entries'] as $amount) { + foreach ($set['entries'] as $amount) { $sum = bcadd($amount, $sum); } - $data[$key][$categoryId]['sum'] = $sum; + $data[$type][$categoryId]['sum'] = $sum; if (bccomp('0', $sum) === 0) { - unset($data[$key][$categoryId]); + unset($data[$type][$categoryId]); } } } + return $data; } diff --git a/resources/views/reports/partials/category-period.twig b/resources/views/reports/partials/category-period.twig index 17368414ed..77ed5eddb8 100644 --- a/resources/views/reports/partials/category-period.twig +++ b/resources/views/reports/partials/category-period.twig @@ -19,42 +19,57 @@ {% for category in categories %} {% if report.income[category.id] or report.expense[category.id] %} - - + + - {% for key, period in periods %} - {# income first #} - {% if(report.income[category.id].entries[key]) %} - + {% else %} + + {% endif %} + + {# expenses #} + {% if(report.expense[category.id].entries[key]) %} + + {% else %} + + {% endif %} + {% endfor %} + + {# if sum of income, display: #} + {% if report.income[category.id].sum %} + {% else %} {% endif %} - - {# expenses #} - {% if(report.expense[category.id].entries[key]) %} - {% else %} {% endif %} - {% endfor %} - - - - {% endif %} + + {% endif %} {% endfor %}
    {{ 'category'|_ }} + {{ 0|formatAmount }} + {{ 0|formatAmount }} - {{ report.income[category.id].sum }} + {{ report.income[category.id].sum|formatAmount }} - {{ report.expense[category.id].sum }} + {{ report.expense[category.id].sum|formatAmount }}
    - {{ category.name }} -
    + {{ category.name }} + - {{ report.income[category.id].entries[key]|formatAmount }} + {% for key, period in periods %} + {# income first #} + {% if(report.income[category.id].entries[key]) %} + + {{ report.income[category.id].entries[key]|formatAmount }} + + {{ 0|formatAmount }} + + {{ report.expense[category.id].entries[key]|formatAmount }} + + {{ 0|formatAmount }} + + {{ report.income[category.id].sum }} {{ 0|formatAmount }} - {{ report.expense[category.id].entries[key]|formatAmount }} + {# if sum of expense, display: #} + {% if report.expense[category.id].sum %} + + {{ report.expense[category.id].sum }} {{ 0|formatAmount }} - {{ report.income[category.id].sum|formatAmount }} - - {{ report.expense[category.id].sum|formatAmount }} -
    \ No newline at end of file From 0a844e431300fc6695004d73178ff62e9600a948 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 3 Dec 2016 21:26:34 +0100 Subject: [PATCH 051/110] Use format amount routine [skip ci] --- resources/views/reports/partials/category-period.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/reports/partials/category-period.twig b/resources/views/reports/partials/category-period.twig index 77ed5eddb8..59185a3adf 100644 --- a/resources/views/reports/partials/category-period.twig +++ b/resources/views/reports/partials/category-period.twig @@ -51,7 +51,7 @@ {# if sum of income, display: #} {% if report.income[category.id].sum %} - {{ report.income[category.id].sum }} + {{ report.income[category.id].sum|formatAmount }} {% else %} @@ -61,7 +61,7 @@ {# if sum of expense, display: #} {% if report.expense[category.id].sum %} - {{ report.expense[category.id].sum }} + {{ report.expense[category.id].sum|formatAmount }} {% else %} From 9dc6f41c1892f124227b807bff59899d43608ad1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 3 Dec 2016 21:48:40 +0100 Subject: [PATCH 052/110] Include chart with report --- .../CategoryChartGeneratorInterface.php | 8 +++- .../ChartJsCategoryChartGenerator.php | 35 ++++++++++++++++++ .../Controllers/Chart/CategoryController.php | 37 +++++++++++++++++++ public/js/ff/reports/default/all.js | 17 ++++++++- public/js/ff/reports/default/multi-year.js | 1 + .../views/reports/default/multi-year.twig | 29 +++++++++++++++ resources/views/reports/default/year.twig | 16 ++++++++ routes/web.php | 1 + 8 files changed, 142 insertions(+), 2 deletions(-) diff --git a/app/Generator/Chart/Category/CategoryChartGeneratorInterface.php b/app/Generator/Chart/Category/CategoryChartGeneratorInterface.php index ee8ff8eb96..c311d70298 100644 --- a/app/Generator/Chart/Category/CategoryChartGeneratorInterface.php +++ b/app/Generator/Chart/Category/CategoryChartGeneratorInterface.php @@ -22,7 +22,6 @@ use Illuminate\Support\Collection; */ interface CategoryChartGeneratorInterface { - /** * @param Collection $entries * @@ -58,4 +57,11 @@ interface CategoryChartGeneratorInterface */ public function pieChart(array $data): array; + /** + * @param array $entries + * + * @return array + */ + public function reportPeriod(array $entries): array; + } diff --git a/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php b/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php index 1787125c23..b667811753 100644 --- a/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php +++ b/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php @@ -142,6 +142,41 @@ class ChartJsCategoryChartGenerator implements CategoryChartGeneratorInterface } + /** + * @param array $entries + * + * @return array + */ + public function reportPeriod(array $entries): array + { + + $data = [ + 'labels' => array_keys($entries), + 'datasets' => [ + 0 => [ + 'label' => trans('firefly.earned'), + 'data' => [], + ], + 1 => [ + 'label' => trans('firefly.spent'), + 'data' => [], + ], + ], + 'count' => 2, + ]; + + foreach ($entries as $label => $entry) { + // data set 0 is budgeted + // data set 1 is spent: + $data['datasets'][0]['data'][] = round($entry['earned'], 2); + $data['datasets'][1]['data'][] = round(bcmul($entry['spent'], '-1'), 2); + + } + + return $data; + + } + /** * @param array $entries * diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index 02645460dc..be6110534b 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -152,6 +152,43 @@ class CategoryController extends Controller } + /** + * @param CRI $repository + * @param Category $category + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts + */ + public function reportPeriod(CRI $repository, Category $category, Carbon $start, Carbon $end, Collection $accounts) + { + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('category-period-chart'); + $cache->addProperty($accounts->pluck('id')->toArray()); + $cache->addProperty($category); + if ($cache->has()) { + + return $cache->get(); + } + $report = $repository->getCategoryPeriodReport(new Collection([$category]), $accounts, $start, $end, true); + $periods = Navigation::listOfPeriods($start, $end); + + + // join them: + $result = []; + foreach (array_keys($periods) as $period) { + $nice = $periods[$period]; + $result[$nice] = [ + 'earned' => $report['income'][$category->id]['entries'][$period] ?? '0', + 'spent' => $report['expense'][$category->id]['entries'][$period] ?? '0', + ]; + } + $data = $this->generator->reportPeriod($result); + + return Response::json($data); + } + /** * @param CRI $repository * @param Category $category diff --git a/public/js/ff/reports/default/all.js b/public/js/ff/reports/default/all.js index ec3fb8c1e6..0d3f056e2b 100644 --- a/public/js/ff/reports/default/all.js +++ b/public/js/ff/reports/default/all.js @@ -89,8 +89,11 @@ function displayAjaxPartial(data, holder) { // trigger list thing listLengthInitial(); - // budget thing + // budget thing in year and multi year report: $('.budget-chart-activate').unbind('click').on('click', clickBudgetChart); + + // category thing in year and multi year report: + $('.category-chart-activate').unbind('click').on('click', clickCategoryChart); } function failAjaxPartial(uri, holder) { @@ -100,6 +103,18 @@ function failAjaxPartial(uri, holder) { } +function clickCategoryChart(e) { + "use strict"; + var link = $(e.target); + var categoryId = link.data('category'); + + // this url is different from the one below. this is something that must be fixed + var URL = 'chart/category/' + categoryId + '/report-period/' + startDate + '/' + endDate + '/' + accountIds; + var container = 'category_chart'; + columnChart(URL, container); + return false; +} + function clickBudgetChart(e) { "use strict"; var link = $(e.target); diff --git a/public/js/ff/reports/default/multi-year.js b/public/js/ff/reports/default/multi-year.js index 1bc23389ae..3988ee298b 100644 --- a/public/js/ff/reports/default/multi-year.js +++ b/public/js/ff/reports/default/multi-year.js @@ -6,6 +6,7 @@ $(function () { drawChart(); loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUri); + loadAjaxPartial('categoryPeriodReport', categoryPeriodReportUri); }); function drawChart() { diff --git a/resources/views/reports/default/multi-year.twig b/resources/views/reports/default/multi-year.twig index 95f2932824..c92c8f3e91 100644 --- a/resources/views/reports/default/multi-year.twig +++ b/resources/views/reports/default/multi-year.twig @@ -114,6 +114,34 @@
    + {# same thing but for categories #} +
    +
    +
    +
    +

    {{ 'categories'|_ }}

    +
    +
    +
    +
    +
    +
    + + {# and the same chart too! #} +
    +
    +
    +
    +

    {{ 'chart'|_ }}

    +
    +
    + + +
    +
    +
    +
    + {% endblock %} {% block styles %} @@ -141,6 +169,7 @@ var incExpReportUri = '{{ route('reports.data.incExpReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; var budgetPeriodReportUri = '{{ route('reports.data.budgetPeriodReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; + var categoryPeriodReportUri = '{{ route('reports.data.categoryPeriodReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; diff --git a/resources/views/reports/default/year.twig b/resources/views/reports/default/year.twig index 1824ad5f05..01dcfc304c 100644 --- a/resources/views/reports/default/year.twig +++ b/resources/views/reports/default/year.twig @@ -124,6 +124,22 @@ + + + {# and the same chart too! #} +
    +
    +
    +
    +

    {{ 'chart'|_ }}

    +
    +
    + + +
    +
    +
    +
    {% endblock %} diff --git a/routes/web.php b/routes/web.php index 67c4135254..2d1d1d4ac4 100755 --- a/routes/web.php +++ b/routes/web.php @@ -221,6 +221,7 @@ Route::group( Route::get('/chart/category/{category}/period', ['uses' => 'Chart\CategoryController@currentPeriod']); Route::get('/chart/category/{category}/period/{date}', ['uses' => 'Chart\CategoryController@specificPeriod']); Route::get('/chart/category/{category}/all', ['uses' => 'Chart\CategoryController@all']); + Route::get('/chart/category/{category}/report-period/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\CategoryController@reportPeriod']); // these charts are used in reports (category reports): Route::get( From 49f7c1bbc1bbf9614a80a68427a6490cae570223 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 3 Dec 2016 21:53:08 +0100 Subject: [PATCH 053/110] Updated composer file [skip ci] --- composer.lock | 92 +++++++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 43 deletions(-) diff --git a/composer.lock b/composer.lock index a21d00f998..d330eb802d 100644 --- a/composer.lock +++ b/composer.lock @@ -105,20 +105,20 @@ }, { "name": "classpreloader/classpreloader", - "version": "3.0.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/ClassPreloader/ClassPreloader.git", - "reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a" + "reference": "bc7206aa892b5a33f4680421b69b191efd32b096" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/9b10b913c2bdf90c3d2e0d726b454fb7f77c552a", - "reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a", + "url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/bc7206aa892b5a33f4680421b69b191efd32b096", + "reference": "bc7206aa892b5a33f4680421b69b191efd32b096", "shasum": "" }, "require": { - "nikic/php-parser": "^1.0|^2.0", + "nikic/php-parser": "^1.0|^2.0|^3.0", "php": ">=5.5.9" }, "require-dev": { @@ -127,7 +127,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -155,7 +155,7 @@ "class", "preload" ], - "time": "2015-11-09 22:51:51" + "time": "2016-09-16 12:50:15" }, { "name": "davejamesmiller/laravel-breadcrumbs", @@ -445,16 +445,16 @@ }, { "name": "doctrine/common", - "version": "v2.6.1", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "a579557bc689580c19fee4e27487a67fe60defc0" + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/a579557bc689580c19fee4e27487a67fe60defc0", - "reference": "a579557bc689580c19fee4e27487a67fe60defc0", + "url": "https://api.github.com/repos/doctrine/common/zipball/7bce00698899aa2c06fe7365c76e4d78ddb15fa3", + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3", "shasum": "" }, "require": { @@ -514,7 +514,7 @@ "persistence", "spl" ], - "time": "2015-12-25 13:18:31" + "time": "2016-11-30 16:50:46" }, { "name": "doctrine/dbal", @@ -2060,16 +2060,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v3.1.7", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "28b0832b2553ffb80cabef6a7a812ff1e670c0bc" + "reference": "e8f47a327c2f0fd5aa04fa60af2b693006ed7283" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/28b0832b2553ffb80cabef6a7a812ff1e670c0bc", - "reference": "28b0832b2553ffb80cabef6a7a812ff1e670c0bc", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/e8f47a327c2f0fd5aa04fa60af2b693006ed7283", + "reference": "e8f47a327c2f0fd5aa04fa60af2b693006ed7283", "shasum": "" }, "require": { @@ -2089,7 +2089,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -2116,7 +2116,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-10-13 06:28:43" + "time": "2016-10-13 06:29:04" }, { "name": "symfony/finder", @@ -3578,16 +3578,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "4.0.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6cba06ff75a1a63a71033e1a01b89056f3af1e8d" + "reference": "903fd6318d0a90b4770a009ff73e4a4e9c437929" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6cba06ff75a1a63a71033e1a01b89056f3af1e8d", - "reference": "6cba06ff75a1a63a71033e1a01b89056f3af1e8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/903fd6318d0a90b4770a009ff73e4a4e9c437929", + "reference": "903fd6318d0a90b4770a009ff73e4a4e9c437929", "shasum": "" }, "require": { @@ -3637,7 +3637,7 @@ "testing", "xunit" ], - "time": "2016-11-01 05:06:24" + "time": "2016-11-28 16:00:31" }, { "name": "phpunit/php-file-iterator", @@ -3822,16 +3822,16 @@ }, { "name": "phpunit/phpunit", - "version": "5.6.5", + "version": "5.7.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "875145fabfa261fa9c1aea663dd29ddce92dca8f" + "reference": "336aff0ac52e306c98e7455bc3e8d7b0bf777a5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/875145fabfa261fa9c1aea663dd29ddce92dca8f", - "reference": "875145fabfa261fa9c1aea663dd29ddce92dca8f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/336aff0ac52e306c98e7455bc3e8d7b0bf777a5e", + "reference": "336aff0ac52e306c98e7455bc3e8d7b0bf777a5e", "shasum": "" }, "require": { @@ -3843,14 +3843,14 @@ "myclabs/deep-copy": "~1.3", "php": "^5.6 || ^7.0", "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "^4.0.1", + "phpunit/php-code-coverage": "^4.0.3", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "^3.2", "sebastian/comparator": "~1.2.2", "sebastian/diff": "~1.2", - "sebastian/environment": "^1.3 || ^2.0", + "sebastian/environment": "^1.3.4 || ^2.0", "sebastian/exporter": "~2.0", "sebastian/global-state": "~1.0", "sebastian/object-enumerator": "~2.0", @@ -3874,7 +3874,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.6.x-dev" + "dev-master": "5.7.x-dev" } }, "autoload": { @@ -3900,7 +3900,7 @@ "testing", "xunit" ], - "time": "2016-11-21 15:23:34" + "time": "2016-12-03 08:33:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -4476,16 +4476,16 @@ }, { "name": "symfony/class-loader", - "version": "v3.1.7", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/class-loader.git", - "reference": "61de6c27f9d4efe988ea8274f19c2d4e331dd4e4" + "reference": "87cd4e69435d98de01d0162c5f9c0ac017075c63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/class-loader/zipball/61de6c27f9d4efe988ea8274f19c2d4e331dd4e4", - "reference": "61de6c27f9d4efe988ea8274f19c2d4e331dd4e4", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/87cd4e69435d98de01d0162c5f9c0ac017075c63", + "reference": "87cd4e69435d98de01d0162c5f9c0ac017075c63", "shasum": "" }, "require": { @@ -4501,7 +4501,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -4528,7 +4528,7 @@ ], "description": "Symfony ClassLoader Component", "homepage": "https://symfony.com", - "time": "2016-11-15 12:07:16" + "time": "2016-11-29 08:26:13" }, { "name": "symfony/css-selector", @@ -4641,25 +4641,31 @@ }, { "name": "symfony/yaml", - "version": "v3.1.7", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "9da375317228e54f4ea1b013b30fa47417e84943" + "reference": "f2300ba8fbb002c028710b92e1906e7457410693" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/9da375317228e54f4ea1b013b30fa47417e84943", - "reference": "9da375317228e54f4ea1b013b30fa47417e84943", + "url": "https://api.github.com/repos/symfony/yaml/zipball/f2300ba8fbb002c028710b92e1906e7457410693", + "reference": "f2300ba8fbb002c028710b92e1906e7457410693", "shasum": "" }, "require": { "php": ">=5.5.9" }, + "require-dev": { + "symfony/console": "~2.8|~3.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -4686,7 +4692,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-11-18 21:05:29" + "time": "2016-11-18 21:17:59" }, { "name": "webmozart/assert", From 62a9fda1c2cd8b49afd95b488ba7f58c82190986 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Dec 2016 08:11:29 +0100 Subject: [PATCH 054/110] New tests. --- .../Admin/ConfigurationControllerTest.php | 2 +- .../Controllers/Admin/DomainControllerTest.php | 2 +- .../Controllers/Admin/HomeControllerTest.php | 2 +- .../Controllers/Admin/UserControllerTest.php | 2 +- .../Controllers/AttachmentControllerTest.php | 2 +- .../Auth/ConfirmationControllerTest.php | 2 +- .../Auth/ForgotPasswordControllerTest.php | 2 +- .../Controllers/Auth/LoginControllerTest.php | 2 +- .../Controllers/Auth/PasswordControllerTest.php | 2 +- .../Controllers/Auth/RegisterControllerTest.php | 2 +- .../Auth/ResetPasswordControllerTest.php | 2 +- .../Controllers/Auth/TwoFactorControllerTest.php | 2 +- .../acceptance/Controllers/BillControllerTest.php | 2 +- .../Controllers/BudgetControllerTest.php | 2 +- .../Controllers/CategoryControllerTest.php | 2 +- .../Controllers/Chart/AccountControllerTest.php | 2 +- .../Controllers/Chart/BillControllerTest.php | 2 +- .../Controllers/Chart/BudgetControllerTest.php | 2 +- .../Controllers/Chart/CategoryControllerTest.php | 14 +++++++++++++- .../Chart/CategoryReportControllerTest.php | 2 +- .../Controllers/Chart/PiggyBankControllerTest.php | 2 +- .../Controllers/Chart/ReportControllerTest.php | 2 +- tests/acceptance/Controllers/ControllerTest.php | 2 +- .../Controllers/CurrencyControllerTest.php | 2 +- .../Controllers/ExportControllerTest.php | 2 +- .../acceptance/Controllers/HelpControllerTest.php | 2 +- .../Controllers/ImportControllerTest.php | 2 +- .../acceptance/Controllers/JsonControllerTest.php | 2 +- .../Controllers/NewUserControllerTest.php | 2 +- .../Controllers/PiggyBankControllerTest.php | 2 +- .../Controllers/Popup/ReportControllerTest.php | 2 +- .../Controllers/PreferencesControllerTest.php | 2 +- .../Controllers/ProfileControllerTest.php | 2 +- .../Controllers/Report/AccountControllerTest.php | 2 +- .../Controllers/Report/BalanceControllerTest.php | 2 +- .../Controllers/Report/BudgetControllerTest.php | 2 +- .../Controllers/Report/CategoryControllerTest.php | 14 +++++++++++++- .../Controllers/Report/InOutControllerTest.php | 2 +- .../Controllers/ReportControllerTest.php | 2 +- .../acceptance/Controllers/RuleControllerTest.php | 2 +- .../Controllers/RuleGroupControllerTest.php | 2 +- .../Controllers/SearchControllerTest.php | 2 +- tests/acceptance/Controllers/TagControllerTest.php | 2 +- .../Transaction/ConvertControllerTest.php | 2 +- .../Controllers/Transaction/MassControllerTest.php | 2 +- .../Transaction/SingleControllerTest.php | 2 +- .../Transaction/SplitControllerTest.php | 2 +- .../Controllers/TransactionControllerTest.php | 2 +- 48 files changed, 72 insertions(+), 48 deletions(-) diff --git a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php index c7a22b8a52..f26a87346a 100644 --- a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php +++ b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php @@ -4,7 +4,7 @@ namespace Admin; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:16. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:38. */ class ConfigurationControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Admin/DomainControllerTest.php b/tests/acceptance/Controllers/Admin/DomainControllerTest.php index 8bdefa711f..6802bd1a52 100644 --- a/tests/acceptance/Controllers/Admin/DomainControllerTest.php +++ b/tests/acceptance/Controllers/Admin/DomainControllerTest.php @@ -4,7 +4,7 @@ namespace Admin; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:16. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:38. */ class DomainControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Admin/HomeControllerTest.php b/tests/acceptance/Controllers/Admin/HomeControllerTest.php index a531c21c9f..ca787e8a29 100644 --- a/tests/acceptance/Controllers/Admin/HomeControllerTest.php +++ b/tests/acceptance/Controllers/Admin/HomeControllerTest.php @@ -4,7 +4,7 @@ namespace Admin; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:38. */ class HomeControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Admin/UserControllerTest.php b/tests/acceptance/Controllers/Admin/UserControllerTest.php index 31ad7f1e89..fd8ba503e8 100644 --- a/tests/acceptance/Controllers/Admin/UserControllerTest.php +++ b/tests/acceptance/Controllers/Admin/UserControllerTest.php @@ -4,7 +4,7 @@ namespace Admin; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:38. */ class UserControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/AttachmentControllerTest.php b/tests/acceptance/Controllers/AttachmentControllerTest.php index 16607667c4..96d3c592fe 100644 --- a/tests/acceptance/Controllers/AttachmentControllerTest.php +++ b/tests/acceptance/Controllers/AttachmentControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:39. */ class AttachmentControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php b/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php index 2f75757590..809aa9b8b3 100644 --- a/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php +++ b/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php @@ -4,7 +4,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:39. */ class ConfirmationControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Auth/ForgotPasswordControllerTest.php b/tests/acceptance/Controllers/Auth/ForgotPasswordControllerTest.php index 7b2198b44d..8842709799 100644 --- a/tests/acceptance/Controllers/Auth/ForgotPasswordControllerTest.php +++ b/tests/acceptance/Controllers/Auth/ForgotPasswordControllerTest.php @@ -4,7 +4,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:39. */ class ForgotPasswordControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Auth/LoginControllerTest.php b/tests/acceptance/Controllers/Auth/LoginControllerTest.php index 97de2415bb..afa843def5 100644 --- a/tests/acceptance/Controllers/Auth/LoginControllerTest.php +++ b/tests/acceptance/Controllers/Auth/LoginControllerTest.php @@ -4,7 +4,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:39. */ class LoginControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Auth/PasswordControllerTest.php b/tests/acceptance/Controllers/Auth/PasswordControllerTest.php index c1d058dd81..c9188dedf1 100644 --- a/tests/acceptance/Controllers/Auth/PasswordControllerTest.php +++ b/tests/acceptance/Controllers/Auth/PasswordControllerTest.php @@ -4,7 +4,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:39. */ class PasswordControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Auth/RegisterControllerTest.php b/tests/acceptance/Controllers/Auth/RegisterControllerTest.php index 1c5e47b479..d43abd2e90 100644 --- a/tests/acceptance/Controllers/Auth/RegisterControllerTest.php +++ b/tests/acceptance/Controllers/Auth/RegisterControllerTest.php @@ -4,7 +4,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:39. */ class RegisterControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Auth/ResetPasswordControllerTest.php b/tests/acceptance/Controllers/Auth/ResetPasswordControllerTest.php index f6a5bb13ef..35f5035506 100644 --- a/tests/acceptance/Controllers/Auth/ResetPasswordControllerTest.php +++ b/tests/acceptance/Controllers/Auth/ResetPasswordControllerTest.php @@ -4,7 +4,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:39. */ class ResetPasswordControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Auth/TwoFactorControllerTest.php b/tests/acceptance/Controllers/Auth/TwoFactorControllerTest.php index 3e81162b01..62b8b7b30f 100644 --- a/tests/acceptance/Controllers/Auth/TwoFactorControllerTest.php +++ b/tests/acceptance/Controllers/Auth/TwoFactorControllerTest.php @@ -4,7 +4,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:39. */ class TwoFactorControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/BillControllerTest.php b/tests/acceptance/Controllers/BillControllerTest.php index aa66fa1eb3..b0ed2d0def 100644 --- a/tests/acceptance/Controllers/BillControllerTest.php +++ b/tests/acceptance/Controllers/BillControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:39. */ class BillControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/BudgetControllerTest.php b/tests/acceptance/Controllers/BudgetControllerTest.php index fdfda1fdab..e09fb034b9 100644 --- a/tests/acceptance/Controllers/BudgetControllerTest.php +++ b/tests/acceptance/Controllers/BudgetControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:40. */ class BudgetControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/CategoryControllerTest.php b/tests/acceptance/Controllers/CategoryControllerTest.php index a24f2f713d..81ed138644 100644 --- a/tests/acceptance/Controllers/CategoryControllerTest.php +++ b/tests/acceptance/Controllers/CategoryControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:40. */ class CategoryControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Chart/AccountControllerTest.php b/tests/acceptance/Controllers/Chart/AccountControllerTest.php index 88ab913ec1..e231c341b0 100644 --- a/tests/acceptance/Controllers/Chart/AccountControllerTest.php +++ b/tests/acceptance/Controllers/Chart/AccountControllerTest.php @@ -4,7 +4,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:40. */ class AccountControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Chart/BillControllerTest.php b/tests/acceptance/Controllers/Chart/BillControllerTest.php index 40dee53118..7c8e5c5e81 100644 --- a/tests/acceptance/Controllers/Chart/BillControllerTest.php +++ b/tests/acceptance/Controllers/Chart/BillControllerTest.php @@ -4,7 +4,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:40. */ class BillControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Chart/BudgetControllerTest.php b/tests/acceptance/Controllers/Chart/BudgetControllerTest.php index 810e8aa344..378da4eda3 100644 --- a/tests/acceptance/Controllers/Chart/BudgetControllerTest.php +++ b/tests/acceptance/Controllers/Chart/BudgetControllerTest.php @@ -4,7 +4,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:40. */ class BudgetControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Chart/CategoryControllerTest.php b/tests/acceptance/Controllers/Chart/CategoryControllerTest.php index 82dbe9aac0..164c4995d1 100644 --- a/tests/acceptance/Controllers/Chart/CategoryControllerTest.php +++ b/tests/acceptance/Controllers/Chart/CategoryControllerTest.php @@ -4,7 +4,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:19. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:40. */ class CategoryControllerTest extends TestCase { @@ -55,6 +55,18 @@ class CategoryControllerTest extends TestCase ); } + /** + * @covers FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriod + * Implement testReportPeriod(). + */ + public function testReportPeriod() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + /** * @covers FireflyIII\Http\Controllers\Chart\CategoryController::specificPeriod * Implement testSpecificPeriod(). diff --git a/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php b/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php index 7a9d45cfd9..3b6f57f9b8 100644 --- a/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php +++ b/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php @@ -4,7 +4,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:19. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:40. */ class CategoryReportControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Chart/PiggyBankControllerTest.php b/tests/acceptance/Controllers/Chart/PiggyBankControllerTest.php index 682aceaeaa..b1b16968c5 100644 --- a/tests/acceptance/Controllers/Chart/PiggyBankControllerTest.php +++ b/tests/acceptance/Controllers/Chart/PiggyBankControllerTest.php @@ -4,7 +4,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:20. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:40. */ class PiggyBankControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Chart/ReportControllerTest.php b/tests/acceptance/Controllers/Chart/ReportControllerTest.php index 48c8145b7e..b799d65a13 100644 --- a/tests/acceptance/Controllers/Chart/ReportControllerTest.php +++ b/tests/acceptance/Controllers/Chart/ReportControllerTest.php @@ -4,7 +4,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:20. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:41. */ class ReportControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/ControllerTest.php b/tests/acceptance/Controllers/ControllerTest.php index f104d3fafc..3e6c213205 100644 --- a/tests/acceptance/Controllers/ControllerTest.php +++ b/tests/acceptance/Controllers/ControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:20. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:41. */ class ControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/CurrencyControllerTest.php b/tests/acceptance/Controllers/CurrencyControllerTest.php index 11f5469659..d59b736736 100644 --- a/tests/acceptance/Controllers/CurrencyControllerTest.php +++ b/tests/acceptance/Controllers/CurrencyControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:20. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:41. */ class CurrencyControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/ExportControllerTest.php b/tests/acceptance/Controllers/ExportControllerTest.php index ae39c661ec..389e0c1038 100644 --- a/tests/acceptance/Controllers/ExportControllerTest.php +++ b/tests/acceptance/Controllers/ExportControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:41. */ class ExportControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/HelpControllerTest.php b/tests/acceptance/Controllers/HelpControllerTest.php index a72daf3cdf..e248b892ff 100644 --- a/tests/acceptance/Controllers/HelpControllerTest.php +++ b/tests/acceptance/Controllers/HelpControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:42. */ class HelpControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/ImportControllerTest.php b/tests/acceptance/Controllers/ImportControllerTest.php index a68af92f56..b5c4c3045c 100644 --- a/tests/acceptance/Controllers/ImportControllerTest.php +++ b/tests/acceptance/Controllers/ImportControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:42. */ class ImportControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/JsonControllerTest.php b/tests/acceptance/Controllers/JsonControllerTest.php index 4fd56ab93d..0b6579c7df 100644 --- a/tests/acceptance/Controllers/JsonControllerTest.php +++ b/tests/acceptance/Controllers/JsonControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:42. */ class JsonControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/NewUserControllerTest.php b/tests/acceptance/Controllers/NewUserControllerTest.php index 75e66b81d0..91e66d7036 100644 --- a/tests/acceptance/Controllers/NewUserControllerTest.php +++ b/tests/acceptance/Controllers/NewUserControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:42. */ class NewUserControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/PiggyBankControllerTest.php b/tests/acceptance/Controllers/PiggyBankControllerTest.php index f1036d22fe..ff5d963e3c 100644 --- a/tests/acceptance/Controllers/PiggyBankControllerTest.php +++ b/tests/acceptance/Controllers/PiggyBankControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:43. */ class PiggyBankControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Popup/ReportControllerTest.php b/tests/acceptance/Controllers/Popup/ReportControllerTest.php index 65aecd1e42..bdb52d6ab6 100644 --- a/tests/acceptance/Controllers/Popup/ReportControllerTest.php +++ b/tests/acceptance/Controllers/Popup/ReportControllerTest.php @@ -4,7 +4,7 @@ namespace Popup; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:43. */ class ReportControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/PreferencesControllerTest.php b/tests/acceptance/Controllers/PreferencesControllerTest.php index ff32194be5..9d3048036b 100644 --- a/tests/acceptance/Controllers/PreferencesControllerTest.php +++ b/tests/acceptance/Controllers/PreferencesControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:43. */ class PreferencesControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/ProfileControllerTest.php b/tests/acceptance/Controllers/ProfileControllerTest.php index 9f78689f5e..2b04f6ab76 100644 --- a/tests/acceptance/Controllers/ProfileControllerTest.php +++ b/tests/acceptance/Controllers/ProfileControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:43. */ class ProfileControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Report/AccountControllerTest.php b/tests/acceptance/Controllers/Report/AccountControllerTest.php index 21a2a976cc..352da3206f 100644 --- a/tests/acceptance/Controllers/Report/AccountControllerTest.php +++ b/tests/acceptance/Controllers/Report/AccountControllerTest.php @@ -4,7 +4,7 @@ namespace Report; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:43. */ class AccountControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Report/BalanceControllerTest.php b/tests/acceptance/Controllers/Report/BalanceControllerTest.php index d925e2fe33..fcae91dc8d 100644 --- a/tests/acceptance/Controllers/Report/BalanceControllerTest.php +++ b/tests/acceptance/Controllers/Report/BalanceControllerTest.php @@ -4,7 +4,7 @@ namespace Report; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:43. */ class BalanceControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Report/BudgetControllerTest.php b/tests/acceptance/Controllers/Report/BudgetControllerTest.php index f232627ccc..adc7c4c49b 100644 --- a/tests/acceptance/Controllers/Report/BudgetControllerTest.php +++ b/tests/acceptance/Controllers/Report/BudgetControllerTest.php @@ -4,7 +4,7 @@ namespace Report; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:44. */ class BudgetControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Report/CategoryControllerTest.php b/tests/acceptance/Controllers/Report/CategoryControllerTest.php index c31d2b5c24..948b82cf83 100644 --- a/tests/acceptance/Controllers/Report/CategoryControllerTest.php +++ b/tests/acceptance/Controllers/Report/CategoryControllerTest.php @@ -4,7 +4,7 @@ namespace Report; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:44. */ class CategoryControllerTest extends TestCase { @@ -19,6 +19,18 @@ class CategoryControllerTest extends TestCase parent::setUp(); } + /** + * @covers FireflyIII\Http\Controllers\Report\CategoryController::categoryPeriodReport + * Implement testCategoryPeriodReport(). + */ + public function testCategoryPeriodReport() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + /** * @covers FireflyIII\Http\Controllers\Report\CategoryController::categoryReport * Implement testCategoryReport(). diff --git a/tests/acceptance/Controllers/Report/InOutControllerTest.php b/tests/acceptance/Controllers/Report/InOutControllerTest.php index 929d5bed7c..d8628164c2 100644 --- a/tests/acceptance/Controllers/Report/InOutControllerTest.php +++ b/tests/acceptance/Controllers/Report/InOutControllerTest.php @@ -4,7 +4,7 @@ namespace Report; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:44. */ class InOutControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/ReportControllerTest.php b/tests/acceptance/Controllers/ReportControllerTest.php index 4fc829622d..579e9e6171 100644 --- a/tests/acceptance/Controllers/ReportControllerTest.php +++ b/tests/acceptance/Controllers/ReportControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:44. */ class ReportControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/RuleControllerTest.php b/tests/acceptance/Controllers/RuleControllerTest.php index 6cde62313c..9a8ee31733 100644 --- a/tests/acceptance/Controllers/RuleControllerTest.php +++ b/tests/acceptance/Controllers/RuleControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:44. */ class RuleControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/RuleGroupControllerTest.php b/tests/acceptance/Controllers/RuleGroupControllerTest.php index 1d73fbc8de..86c035b077 100644 --- a/tests/acceptance/Controllers/RuleGroupControllerTest.php +++ b/tests/acceptance/Controllers/RuleGroupControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:44. */ class RuleGroupControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/SearchControllerTest.php b/tests/acceptance/Controllers/SearchControllerTest.php index 144059ef44..ba27e918bf 100644 --- a/tests/acceptance/Controllers/SearchControllerTest.php +++ b/tests/acceptance/Controllers/SearchControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:44. */ class SearchControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/TagControllerTest.php b/tests/acceptance/Controllers/TagControllerTest.php index 329a9b4e4c..0f07256556 100644 --- a/tests/acceptance/Controllers/TagControllerTest.php +++ b/tests/acceptance/Controllers/TagControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:23. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:45. */ class TagControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Transaction/ConvertControllerTest.php b/tests/acceptance/Controllers/Transaction/ConvertControllerTest.php index 59059d041b..084b73a78c 100644 --- a/tests/acceptance/Controllers/Transaction/ConvertControllerTest.php +++ b/tests/acceptance/Controllers/Transaction/ConvertControllerTest.php @@ -4,7 +4,7 @@ namespace Transaction; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:23. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:45. */ class ConvertControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Transaction/MassControllerTest.php b/tests/acceptance/Controllers/Transaction/MassControllerTest.php index b9f78a1352..d0bc7be105 100644 --- a/tests/acceptance/Controllers/Transaction/MassControllerTest.php +++ b/tests/acceptance/Controllers/Transaction/MassControllerTest.php @@ -4,7 +4,7 @@ namespace Transaction; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:23. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:45. */ class MassControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Transaction/SingleControllerTest.php b/tests/acceptance/Controllers/Transaction/SingleControllerTest.php index 2c4d42890a..204068cd99 100644 --- a/tests/acceptance/Controllers/Transaction/SingleControllerTest.php +++ b/tests/acceptance/Controllers/Transaction/SingleControllerTest.php @@ -4,7 +4,7 @@ namespace Transaction; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:23. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:45. */ class SingleControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/Transaction/SplitControllerTest.php b/tests/acceptance/Controllers/Transaction/SplitControllerTest.php index ce8df1b82c..dce180417f 100644 --- a/tests/acceptance/Controllers/Transaction/SplitControllerTest.php +++ b/tests/acceptance/Controllers/Transaction/SplitControllerTest.php @@ -4,7 +4,7 @@ namespace Transaction; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:23. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:45. */ class SplitControllerTest extends TestCase { diff --git a/tests/acceptance/Controllers/TransactionControllerTest.php b/tests/acceptance/Controllers/TransactionControllerTest.php index b2c65af957..93e1bedb01 100644 --- a/tests/acceptance/Controllers/TransactionControllerTest.php +++ b/tests/acceptance/Controllers/TransactionControllerTest.php @@ -2,7 +2,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-11-26 at 07:52:23. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-04 at 07:07:45. */ class TransactionControllerTest extends TestCase { From 86ea9db37ed4d19201ded8743ea6c258e4928beb Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Dec 2016 09:33:41 +0100 Subject: [PATCH 055/110] Extend currency data for issue #439 --- .../2016_06_16_000002_create_main_tables.php | 18 +++++++++--------- database/seeds/TransactionCurrencySeeder.php | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/database/migrations/2016_06_16_000002_create_main_tables.php b/database/migrations/2016_06_16_000002_create_main_tables.php index 1d214c7d2e..989fa06e10 100644 --- a/database/migrations/2016_06_16_000002_create_main_tables.php +++ b/database/migrations/2016_06_16_000002_create_main_tables.php @@ -87,7 +87,7 @@ class CreateMainTables extends Migration $table->integer('user_id', false, true); $table->integer('account_type_id', false, true); $table->string('name', 1024); - $table->decimal('virtual_balance', 10, 4)->nullable(); + $table->decimal('virtual_balance', 14, 4)->nullable(); $table->string('iban', 255)->nullable(); $table->boolean('active')->default(1); @@ -165,8 +165,8 @@ class CreateMainTables extends Migration $table->integer('user_id', false, true); $table->string('name', 1024); $table->string('match', 1024); - $table->decimal('amount_min', 10, 4); - $table->decimal('amount_max', 10, 4); + $table->decimal('amount_min', 14, 4); + $table->decimal('amount_max', 14, 4); $table->date('date'); $table->string('repeat_freq', 30); $table->smallInteger('skip', false, true)->default(0); @@ -215,7 +215,7 @@ class CreateMainTables extends Migration $table->timestamps(); $table->integer('budget_id', false, true); $table->date('startdate'); - $table->decimal('amount', 10, 4); + $table->decimal('amount', 14, 4); $table->string('repeat_freq', 30); $table->boolean('repeats')->default(0); @@ -233,7 +233,7 @@ class CreateMainTables extends Migration $table->integer('budget_limit_id', false, true); $table->date('startdate'); $table->date('enddate'); - $table->decimal('amount', 10, 4); + $table->decimal('amount', 14, 4); // link budget limit id to budget_limitss table $table->foreign('budget_limit_id')->references('id')->on('budget_limits')->onDelete('cascade'); @@ -313,7 +313,7 @@ class CreateMainTables extends Migration $table->softDeletes(); $table->integer('account_id', false, true); $table->string('name', 1024); - $table->decimal('targetamount', 10, 4); + $table->decimal('targetamount', 14, 4); $table->date('startdate')->nullable(); $table->date('targetdate')->nullable(); $table->integer('order', false, true)->default(0); @@ -334,7 +334,7 @@ class CreateMainTables extends Migration $table->integer('piggy_bank_id', false, true); $table->date('startdate')->nullable(); $table->date('targetdate')->nullable(); - $table->decimal('currentamount', 10, 4); + $table->decimal('currentamount', 14, 4); $table->foreign('piggy_bank_id')->references('id')->on('piggy_banks')->onDelete('cascade'); @@ -606,7 +606,7 @@ class CreateMainTables extends Migration $table->integer('piggy_bank_id', false, true); $table->integer('transaction_journal_id', false, true)->nullable(); $table->date('date'); - $table->decimal('amount', 10, 4); + $table->decimal('amount', 14, 4); $table->foreign('piggy_bank_id')->references('id')->on('piggy_banks')->onDelete('cascade'); $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('set null'); @@ -623,7 +623,7 @@ class CreateMainTables extends Migration $table->integer('account_id', false, true); $table->integer('transaction_journal_id', false, true); $table->string('description', 1024)->nullable(); - $table->decimal('amount', 10, 4); + $table->decimal('amount', 14, 4); $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade'); diff --git a/database/seeds/TransactionCurrencySeeder.php b/database/seeds/TransactionCurrencySeeder.php index 887ce75f4a..6edd351d28 100644 --- a/database/seeds/TransactionCurrencySeeder.php +++ b/database/seeds/TransactionCurrencySeeder.php @@ -28,6 +28,7 @@ class TransactionCurrencySeeder extends Seeder TransactionCurrency::create(['code' => 'HUF', 'name' => 'Hungarian forint', 'symbol' => 'Ft']); TransactionCurrency::create(['code' => 'BRL', 'name' => 'Real', 'symbol' => 'R$']); TransactionCurrency::create(['code' => 'GBP', 'name' => 'British Pound', 'symbol' => '£']); + TransactionCurrency::create(['code' => 'IDR', 'name' => 'Indonesian rupiah', 'symbol' => 'Rp']); } } From 89e4c3de254b53fa496b6e3cb45a05941596a5e2 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Dec 2016 17:13:37 +0100 Subject: [PATCH 056/110] A fairly primitive data validation routine for split transactions. --- .../Transaction/SplitController.php | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Transaction/SplitController.php b/app/Http/Controllers/Transaction/SplitController.php index f14cde1885..f98380c31c 100644 --- a/app/Http/Controllers/Transaction/SplitController.php +++ b/app/Http/Controllers/Transaction/SplitController.php @@ -135,7 +135,21 @@ class SplitController extends Controller return $this->redirectToAccount($journal); } - $data = $this->arrayFromInput($request); + $data = $this->arrayFromInput($request); + + // need to do some validation! + // sum of amount must be > 0 + // TODO move to proper validator + $sum = '0'; + foreach ($data['transactions'] as $transaction) { + Session::flash('error',strval(trans('validation.amount_zero'))); + $sum = bcadd($sum, strval($transaction['amount'])); + } + if (bccomp($sum, '0') === 0) { + return redirect(route('transactions.edit-split', [$journal->id]))->withInput(); + } + + $journal = $repository->updateSplitJournal($journal, $data); // save attachments: @@ -249,8 +263,8 @@ class SplitController extends Controller $transactions = $this->tasker->getTransactionsOverview($journal); $return = []; /** @var array $transaction */ - foreach ($transactions as $transaction) { - $return[] = [ + foreach ($transactions as $index => $transaction) { + $set = [ 'description' => $transaction['description'], 'source_account_id' => $transaction['source_account_id'], 'source_account_name' => $transaction['source_account_name'], @@ -260,6 +274,15 @@ class SplitController extends Controller 'budget_id' => isset($transaction['budget_id']) ? intval($transaction['budget_id']) : 0, 'category' => $transaction['category'], ]; + + // set initial category and/or budget: + if (count($transactions) === 1 && $index === 0) { + $set['budget_id'] = TransactionJournal::budgetId($journal); + $set['category'] = TransactionJournal::categoryAsString($journal); + } + + $return[] = $set; + } return $return; From 905a2432c66387eacc8ad6ec8b4779eea5a2bf13 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Dec 2016 17:17:25 +0100 Subject: [PATCH 057/110] Remove todo from code, as we are supposed to. --- app/Http/Controllers/Transaction/SplitController.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Http/Controllers/Transaction/SplitController.php b/app/Http/Controllers/Transaction/SplitController.php index f98380c31c..a7883f2a4a 100644 --- a/app/Http/Controllers/Transaction/SplitController.php +++ b/app/Http/Controllers/Transaction/SplitController.php @@ -139,7 +139,6 @@ class SplitController extends Controller // need to do some validation! // sum of amount must be > 0 - // TODO move to proper validator $sum = '0'; foreach ($data['transactions'] as $transaction) { Session::flash('error',strval(trans('validation.amount_zero'))); From f4b9b7ae8423b09459ced3345a6161bc7efabb67 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Dec 2016 18:02:19 +0100 Subject: [PATCH 058/110] Various report updates and code cleanup. --- .../Budget/BudgetChartGeneratorInterface.php | 7 + .../Budget/ChartJsBudgetChartGenerator.php | 30 ++- .../Report/Audit/MonthReportGenerator.php | 4 +- app/Helpers/Report/BudgetReportHelper.php | 43 ---- .../Report/BudgetReportHelperInterface.php | 9 - .../Controllers/Chart/BudgetController.php | 42 ++++ .../Controllers/Report/BudgetController.php | 52 +++- .../Controllers/Report/CategoryController.php | 145 +++++------ .../Account/AccountRepository.php | 8 +- app/Repositories/Account/AccountTasker.php | 66 ++--- app/Repositories/Bill/BillRepository.php | 4 +- .../Bill/BillRepositoryInterface.php | 4 +- app/Repositories/Budget/BudgetRepository.php | 96 +++----- .../Budget/BudgetRepositoryInterface.php | 11 +- .../Category/CategoryRepository.php | 227 ++++++++++++------ .../Category/CategoryRepositoryInterface.php | 53 ++-- .../Currency/CurrencyRepository.php | 8 +- .../Currency/CurrencyRepositoryInterface.php | 8 +- .../Journal/JournalRepository.php | 2 +- .../Journal/JournalRepositoryInterface.php | 2 +- app/Repositories/Journal/JournalTasker.php | 60 ++--- .../PiggyBank/PiggyBankRepository.php | 2 +- .../PiggyBankRepositoryInterface.php | 6 +- app/Repositories/Tag/TagRepository.php | 4 +- .../Tag/TagRepositoryInterface.php | 4 +- app/Repositories/User/UserRepository.php | 8 +- public/js/ff/reports/default/year.js | 4 +- resources/lang/en_US/validation.php | 1 + resources/views/reports/default/year.twig | 23 +- .../views/reports/partials/budget-period.twig | 2 +- .../reports/partials/category-period.twig | 95 +++----- routes/web.php | 12 +- 32 files changed, 592 insertions(+), 450 deletions(-) diff --git a/app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php b/app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php index acddc5b6da..1abaa89746 100644 --- a/app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php +++ b/app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php @@ -44,4 +44,11 @@ interface BudgetChartGeneratorInterface * @return array */ public function period(array $entries): array; + + /** + * @param array $entries + * + * @return array + */ + public function periodNoBudget(array $entries): array; } diff --git a/app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php b/app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php index 131fae600c..bec7872b28 100644 --- a/app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php +++ b/app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php @@ -104,7 +104,7 @@ class ChartJsBudgetChartGenerator implements BudgetChartGeneratorInterface * * @return array */ - public function period(array $entries) : array + public function period(array $entries): array { $data = [ @@ -133,4 +133,32 @@ class ChartJsBudgetChartGenerator implements BudgetChartGeneratorInterface return $data; } + + /** + * @param array $entries + * + * @return array + */ + public function periodNoBudget(array $entries): array + { + $data = [ + 'labels' => array_keys($entries), + 'datasets' => [ + 0 => [ + 'label' => trans('firefly.spent'), + 'data' => [], + ], + ], + 'count' => 1, + ]; + + foreach ($entries as $label => $entry) { + // data set 0 is budgeted + // data set 1 is spent: + $data['datasets'][0]['data'][] = round(($entry['spent'] * -1), 2); + + } + + return $data; + } } diff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.php index 5b0952ab55..7caff56bb4 100644 --- a/app/Generator/Report/Audit/MonthReportGenerator.php +++ b/app/Generator/Report/Audit/MonthReportGenerator.php @@ -78,6 +78,7 @@ class MonthReportGenerator implements ReportGeneratorInterface $auditData[$id]['dayBeforeBalance'] = $dayBeforeBalance; } + $defaultShow = ['icon', 'description', 'balance_before', 'amount', 'balance_after', 'date', 'to']; $reportType = 'audit'; $accountIds = join(',', $this->accounts->pluck('id')->toArray()); $hideable = ['buttons', 'icon', 'description', 'balance_before', 'amount', 'balance_after', 'date', @@ -87,10 +88,9 @@ class MonthReportGenerator implements ReportGeneratorInterface 'from', 'to', 'budget', 'category', 'bill', // more new optional fields 'internal_reference', 'notes', - 'create_date', 'update_date', ]; - $defaultShow = ['icon', 'description', 'balance_before', 'amount', 'balance_after', 'date', 'to']; + return view('reports.audit.report', compact('reportType', 'accountIds', 'auditData', 'hideable', 'defaultShow')) ->with('start', $this->start)->with('end', $this->end)->with('accounts', $this->accounts) diff --git a/app/Helpers/Report/BudgetReportHelper.php b/app/Helpers/Report/BudgetReportHelper.php index eac93e796c..d79b9617b3 100644 --- a/app/Helpers/Report/BudgetReportHelper.php +++ b/app/Helpers/Report/BudgetReportHelper.php @@ -42,22 +42,6 @@ class BudgetReportHelper implements BudgetReportHelperInterface $this->repository = $repository; } - /** - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return array - */ - public function getBudgetPeriodReport(Carbon $start, Carbon $end, Collection $accounts): array - { - $budgets = $this->repository->getBudgets(); - $report = $this->repository->getBudgetPeriodReport($budgets, $accounts, $start, $end, true); - $data = $this->filterBudgetPeriodReport($report); - - return $data; - } - /** * @param Carbon $start * @param Carbon $end @@ -162,31 +146,4 @@ class BudgetReportHelper implements BudgetReportHelperInterface return $array; } - - /** - * Filters empty results from getBudgetPeriodReport - * - * @param array $data - * - * @return array - */ - private function filterBudgetPeriodReport(array $data): array - { - /** - * @var int $budgetId - * @var array $set - */ - foreach ($data as $budgetId => $set) { - $sum = '0'; - foreach ($set['entries'] as $amount) { - $sum = bcadd($amount, $sum); - } - $data[$budgetId]['sum'] = $sum; - if (bccomp('0', $sum) === 0) { - unset($data[$budgetId]); - } - } - - return $data; - } } diff --git a/app/Helpers/Report/BudgetReportHelperInterface.php b/app/Helpers/Report/BudgetReportHelperInterface.php index ad8540a22a..07234f9694 100644 --- a/app/Helpers/Report/BudgetReportHelperInterface.php +++ b/app/Helpers/Report/BudgetReportHelperInterface.php @@ -26,15 +26,6 @@ use Illuminate\Support\Collection; interface BudgetReportHelperInterface { - /** - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return array - */ - public function getBudgetPeriodReport(Carbon $start, Carbon $end, Collection $accounts): array; - /** * @param Carbon $start * @param Carbon $end diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index ab2198be3b..1ef712a9a3 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -252,6 +252,48 @@ class BudgetController extends Controller return Response::json($data); } + /** + * @param BudgetRepositoryInterface $repository + * @param Budget $budget + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts + * + * @return \Illuminate\Http\JsonResponse + */ + public function periodNoBudget(BudgetRepositoryInterface $repository, Carbon $start, Carbon $end, Collection $accounts) + { + // chart properties for cache: + $cache = new CacheProperties(); + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty($accounts); + $cache->addProperty('no-budget'); + $cache->addProperty('period'); + if ($cache->has()) { + return Response::json($cache->get()); + } + + // the expenses: + $periods = Navigation::listOfPeriods($start, $end); + $entries = $repository->getNoBudgetPeriodReport($accounts, $start, $end); + + // join them: + $result = []; + foreach (array_keys($periods) as $period) { + $nice = $periods[$period]; + $result[$nice] = [ + 'spent' => isset($entries['entries'][$period]) ? $entries['entries'][$period] : '0', + ]; + } + + $data = $this->generator->periodNoBudget($result); + + $cache->store($data); + + return Response::json($data); + } + /** * @param Collection $repetitions * @param Budget $budget diff --git a/app/Http/Controllers/Report/BudgetController.php b/app/Http/Controllers/Report/BudgetController.php index 8e76f2c5d5..89b5136b60 100644 --- a/app/Http/Controllers/Report/BudgetController.php +++ b/app/Http/Controllers/Report/BudgetController.php @@ -17,6 +17,7 @@ namespace FireflyIII\Http\Controllers\Report; use Carbon\Carbon; use FireflyIII\Helpers\Report\BudgetReportHelperInterface; use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; use Navigation; @@ -31,14 +32,13 @@ class BudgetController extends Controller /** * - * @param BudgetReportHelperInterface $helper - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts * * @return string */ - public function budgetPeriodReport(BudgetReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) + public function budgetPeriodReport(Carbon $start, Carbon $end, Collection $accounts) { $cache = new CacheProperties; $cache->addProperty($start); @@ -46,12 +46,19 @@ class BudgetController extends Controller $cache->addProperty('budget-period-report'); $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { - return $cache->get(); + return $cache->get(); } - $periods = Navigation::listOfPeriods($start, $end); - $budgets = $helper->getBudgetPeriodReport($start, $end, $accounts); - $result = view('reports.partials.budget-period', compact('budgets', 'periods'))->render(); + // generate budget report right here. + /** @var BudgetRepositoryInterface $repository */ + $repository = app(BudgetRepositoryInterface::class); + $budgets = $repository->getBudgets(); + $data = $repository->getBudgetPeriodReport($budgets, $accounts, $start, $end); + $data[0] = $repository->getNoBudgetPeriodReport($accounts, $start, $end); // append report data for "no budget" + $report = $this->filterBudgetPeriodReport($data); + $periods = Navigation::listOfPeriods($start, $end); + + $result = view('reports.partials.budget-period', compact('report', 'periods'))->render(); $cache->store($result); return $result; @@ -86,4 +93,31 @@ class BudgetController extends Controller return $result; } + + /** + * Filters empty results from getBudgetPeriodReport + * + * @param array $data + * + * @return array + */ + private function filterBudgetPeriodReport(array $data): array + { + /** + * @var int $budgetId + * @var array $set + */ + foreach ($data as $budgetId => $set) { + $sum = '0'; + foreach ($set['entries'] as $amount) { + $sum = bcadd($amount, $sum); + } + $data[$budgetId]['sum'] = $sum; + if (bccomp('0', $sum) === 0) { + unset($data[$budgetId]); + } + } + + return $data; + } } \ No newline at end of file diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index b683171ae8..7284638f27 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -31,40 +31,6 @@ use Navigation; */ class CategoryController extends Controller { - /** - * - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return string - */ - public function categoryPeriodReport(Carbon $start, Carbon $end, Collection $accounts) - { - $cache = new CacheProperties; - $cache->addProperty($start); - $cache->addProperty($end); - $cache->addProperty('category-period-report'); - $cache->addProperty($accounts->pluck('id')->toArray()); - if ($cache->has()) { - Log::debug('Return report from cache'); - - return $cache->get(); - } - /** @var CategoryRepositoryInterface $repository */ - $repository = app(CategoryRepositoryInterface::class); - $categories = $repository->getCategories(); - $report = $repository->getCategoryPeriodReport($categories, $accounts, $start, $end, true); - $report = $this->filterCategoryPeriodReport($report); - $periods = Navigation::listOfPeriods($start, $end); - - $result = view('reports.partials.category-period', compact('categories', 'periods', 'report'))->render(); - - $cache->store($result); - - return $result; - } - /** * @param ReportHelperInterface $helper * @param Carbon $start @@ -93,6 +59,73 @@ class CategoryController extends Controller return $result; } + /** + * + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts + * + * @return string + */ + public function expenseReport(Carbon $start, Carbon $end, Collection $accounts) + { + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('category-period-expenses-report'); + $cache->addProperty($accounts->pluck('id')->toArray()); + if ($cache->has()) { + Log::debug('Return report from cache'); + return $cache->get(); + } + /** @var CategoryRepositoryInterface $repository */ + $repository = app(CategoryRepositoryInterface::class); + $categories = $repository->getCategories(); + $data = $repository->periodExpenses($categories, $accounts, $start, $end); + $data[0] = $repository->periodExpensesNoCategory($accounts, $start, $end); + $report = $this->filterReport($data); + $periods = Navigation::listOfPeriods($start, $end); + $result = view('reports.partials.category-period', compact('report', 'periods'))->render(); + + $cache->store($result); + + return $result; + } + + /** + * + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts + * + * @return string + */ + public function incomeReport(Carbon $start, Carbon $end, Collection $accounts) + { + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('category-period-income-report'); + $cache->addProperty($accounts->pluck('id')->toArray()); + if ($cache->has()) { + Log::debug('Return report from cache'); + return $cache->get(); + } + /** @var CategoryRepositoryInterface $repository */ + $repository = app(CategoryRepositoryInterface::class); + $categories = $repository->getCategories(); + $data = $repository->periodIncome($categories, $accounts, $start, $end); + $data[0] = $repository->periodIncomeNoCategory($accounts, $start, $end); + $report = $this->filterReport($data); + $periods = Navigation::listOfPeriods($start, $end); + $result = view('reports.partials.category-period', compact('report', 'periods'))->render(); + + $cache->store($result); + + return $result; + } + + /** * Filters empty results from category period report * @@ -100,22 +133,16 @@ class CategoryController extends Controller * * @return array */ - private function filterCategoryPeriodReport(array $data): array + private function filterReport(array $data): array { - /** - * @var string $type - * @var array $report - */ - foreach ($data as $type => $report) { - foreach ($report as $categoryId => $set) { - $sum = '0'; - foreach ($set['entries'] as $amount) { - $sum = bcadd($amount, $sum); - } - $data[$type][$categoryId]['sum'] = $sum; - if (bccomp('0', $sum) === 0) { - unset($data[$type][$categoryId]); - } + foreach ($data as $categoryId => $set) { + $sum = '0'; + foreach ($set['entries'] as $amount) { + $sum = bcadd($amount, $sum); + } + $data[$categoryId]['sum'] = $sum; + if (bccomp('0', $sum) === 0) { + unset($data[$categoryId]); } } @@ -123,25 +150,5 @@ class CategoryController extends Controller return $data; } - /** - * @param int $categoryId - * @param Collection $categories - * - * @return string - */ - private function getCategoryName(int $categoryId, Collection $categories): string - { - - $first = $categories->filter( - function (Category $category) use ($categoryId) { - return $categoryId === $category->id; - } - ); - if (!is_null($first->first())) { - return $first->first()->name; - } - - return '(unknown)'; - } } \ No newline at end of file diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index ecdafaf1b8..140b865fd3 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -368,10 +368,10 @@ class AccountRepository implements AccountRepositoryInterface protected function openingBalanceTransaction(Account $account): TransactionJournal { $journal = TransactionJournal::sortCorrectly() - ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') - ->where('transactions.account_id', $account->id) - ->transactionTypes([TransactionType::OPENING_BALANCE]) - ->first(['transaction_journals.*']); + ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + ->where('transactions.account_id', $account->id) + ->transactionTypes([TransactionType::OPENING_BALANCE]) + ->first(['transaction_journals.*']); if (is_null($journal)) { Log::debug('Could not find a opening balance journal, return empty one.'); diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index efcff148de..691181b40f 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -250,19 +250,19 @@ class AccountTasker implements AccountTaskerInterface $selection = $incoming ? '>' : '<'; $query = Transaction::distinct() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->leftJoin( - 'transactions as other_side', function (JoinClause $join) use ($joinModifier) { - $join->on('transaction_journals.id', '=', 'other_side.transaction_journal_id')->where('other_side.amount', $joinModifier, 0); - } - ) - ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) - ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) - ->where('transaction_journals.user_id', $this->user->id) - ->whereNull('transactions.deleted_at') - ->whereNull('transaction_journals.deleted_at') - ->whereIn('transactions.account_id', $accounts['accounts']) - ->where('transactions.amount', $selection, 0); + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->leftJoin( + 'transactions as other_side', function (JoinClause $join) use ($joinModifier) { + $join->on('transaction_journals.id', '=', 'other_side.transaction_journal_id')->where('other_side.amount', $joinModifier, 0); + } + ) + ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) + ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) + ->where('transaction_journals.user_id', $this->user->id) + ->whereNull('transactions.deleted_at') + ->whereNull('transaction_journals.deleted_at') + ->whereIn('transactions.account_id', $accounts['accounts']) + ->where('transactions.amount', $selection, 0); if (count($accounts['exclude']) > 0) { $query->whereNotIn('other_side.account_id', $accounts['exclude']); } @@ -302,25 +302,27 @@ class AccountTasker implements AccountTaskerInterface $joinModifier = $incoming ? '<' : '>'; $selection = $incoming ? '>' : '<'; $query = Transaction::distinct() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->leftJoin('transaction_types', 'transaction_journals.transaction_type_id', '=', 'transaction_types.id') - ->leftJoin( - 'transactions as other_side', function (JoinClause $join) use ($joinModifier) { - $join->on('transaction_journals.id', '=', 'other_side.transaction_journal_id')->where('other_side.amount', $joinModifier, 0); - } - ) - ->leftJoin('accounts as other_account', 'other_account.id', '=', 'other_side.account_id') - ->where('transaction_types.type', '!=', TransactionType::OPENING_BALANCE) - ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) - ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) - ->where('transaction_journals.user_id', $this->user->id) - ->whereNull('transactions.deleted_at') - ->whereNull('other_side.deleted_at') - ->whereNull('transaction_journals.deleted_at') - ->whereIn('transactions.account_id', $accounts['accounts']) - ->where('other_side.amount', '=', DB::raw('transactions.amount * -1')) - ->where('transactions.amount', $selection, 0) - ->orderBy('transactions.amount'); + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->leftJoin('transaction_types', 'transaction_journals.transaction_type_id', '=', 'transaction_types.id') + ->leftJoin( + 'transactions as other_side', function (JoinClause $join) use ($joinModifier) { + $join->on('transaction_journals.id', '=', 'other_side.transaction_journal_id')->where( + 'other_side.amount', $joinModifier, 0 + ); + } + ) + ->leftJoin('accounts as other_account', 'other_account.id', '=', 'other_side.account_id') + ->where('transaction_types.type', '!=', TransactionType::OPENING_BALANCE) + ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) + ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) + ->where('transaction_journals.user_id', $this->user->id) + ->whereNull('transactions.deleted_at') + ->whereNull('other_side.deleted_at') + ->whereNull('transaction_journals.deleted_at') + ->whereIn('transactions.account_id', $accounts['accounts']) + ->where('other_side.amount', '=', DB::raw('transactions.amount * -1')) + ->where('transactions.amount', $selection, 0) + ->orderBy('transactions.amount'); if (count($accounts['exclude']) > 0) { $query->whereNotIn('other_side.account_id', $accounts['exclude']); diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index e41196b81d..179e0aa12b 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -66,7 +66,7 @@ class BillRepository implements BillRepositoryInterface * * @return Bill */ - public function find(int $billId) : Bill + public function find(int $billId): Bill { $bill = $this->user->bills()->find($billId); if (is_null($bill)) { @@ -83,7 +83,7 @@ class BillRepository implements BillRepositoryInterface * * @return Bill */ - public function findByName(string $name) : Bill + public function findByName(string $name): Bill { $bills = $this->user->bills()->get(['bills.*']); diff --git a/app/Repositories/Bill/BillRepositoryInterface.php b/app/Repositories/Bill/BillRepositoryInterface.php index cf71d133bc..c2c6cd223d 100644 --- a/app/Repositories/Bill/BillRepositoryInterface.php +++ b/app/Repositories/Bill/BillRepositoryInterface.php @@ -40,7 +40,7 @@ interface BillRepositoryInterface * * @return Bill */ - public function find(int $billId) : Bill; + public function find(int $billId): Bill; /** * Find a bill by name. @@ -49,7 +49,7 @@ interface BillRepositoryInterface * * @return Bill */ - public function findByName(string $name) : Bill; + public function findByName(string $name): Bill; /** * @return Collection diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index 47cf4e7273..ff5e4467b5 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -219,11 +219,10 @@ class BudgetRepository implements BudgetRepositoryInterface * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param bool $noBudget * * @return array */ - public function getBudgetPeriodReport(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end, bool $noBudget): array + public function getBudgetPeriodReport(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end): array { $carbonFormat = Navigation::preferredCarbonFormat($start, $end); $data = []; @@ -252,11 +251,6 @@ class BudgetRepository implements BudgetRepositoryInterface $data[$budgetId]['entries'][$date] = bcadd($data[$budgetId]['entries'][$date] ?? '0', $transaction->transaction_amount); } - if ($noBudget) { - // and now the same for stuff without a budget: - $data[0] = $this->getNoBudgetPeriodReport($start, $end); - } - return $data; } @@ -295,6 +289,40 @@ class BudgetRepository implements BudgetRepositoryInterface return $set; } + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function getNoBudgetPeriodReport(Collection $accounts, Carbon $start, Carbon $end): array + { + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end); + $collector->setTypes([TransactionType::WITHDRAWAL]); + $collector->withoutBudget(); + $transactions = $collector->getJournals(); + $result = [ + 'entries' => [], + 'name' => strval(trans('firefly.no_budget')), + 'sum' => '0', + ]; + + foreach ($transactions as $transaction) { + $date = $transaction->date->format($carbonFormat); + + if (!isset($result['entries'][$date])) { + $result['entries'][$date] = '0'; + } + $result['entries'][$date] = bcadd($result['entries'][$date], $transaction->transaction_amount); + } + + return $result; + } + /** * @param Collection $budgets * @param Collection $accounts @@ -533,58 +561,4 @@ class BudgetRepository implements BudgetRepositoryInterface return $limit; } - - /** - * @param int $budgetId - * @param Collection $budgets - * - * @return string - */ - private function getBudgetName(int $budgetId, Collection $budgets): string - { - - $first = $budgets->filter( - function (Budget $budget) use ($budgetId) { - return $budgetId === $budget->id; - } - ); - if (!is_null($first->first())) { - return $first->first()->name; - } - - return '(unknown)'; - } - - /** - * @param Carbon $start - * @param Carbon $end - * - * @return array - */ - private function getNoBudgetPeriodReport(Carbon $start, Carbon $end): array - { - $carbonFormat = Navigation::preferredCarbonFormat($start, $end); - /** @var JournalCollectorInterface $collector */ - $collector = app(JournalCollectorInterface::class); - $collector->setAllAssetAccounts()->setRange($start, $end); - $collector->setTypes([TransactionType::WITHDRAWAL]); - $collector->withoutBudget(); - $transactions = $collector->getJournals(); - $result = [ - 'entries' => [], - 'name' => strval(trans('firefly.no_budget')), - 'sum' => '0', - ]; - - foreach ($transactions as $transaction) { - $date = $transaction->date->format($carbonFormat); - - if (!isset($result['entries'][$date])) { - $result['entries'][$date] = '0'; - } - $result['entries'][$date] = bcadd($result['entries'][$date], $transaction->transaction_amount); - } - - return $result; - } } diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.php index 296b06ed4f..6161545760 100644 --- a/app/Repositories/Budget/BudgetRepositoryInterface.php +++ b/app/Repositories/Budget/BudgetRepositoryInterface.php @@ -96,11 +96,10 @@ interface BudgetRepositoryInterface * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param bool $noBudget * * @return array */ - public function getBudgetPeriodReport(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end, bool $noBudget): array; + public function getBudgetPeriodReport(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end): array; /** * @return Collection @@ -112,6 +111,14 @@ interface BudgetRepositoryInterface */ public function getInactiveBudgets(): Collection; + /** + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function getNoBudgetPeriodReport(Collection $accounts, Carbon $start, Carbon $end): array; + /** * @param Collection $budgets * @param Collection $accounts diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index 403df60c5e..7c002558a2 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -175,32 +175,6 @@ class CategoryRepository implements CategoryRepositoryInterface return $set; } - /** - * This method is being used to generate the category overview in the year/multi-year report. Its used - * in both the year/multi-year budget overview AND in the accompanying chart. - * - * @param Collection $categories - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * @param @bool $noCategory - * - * @return array - */ - public function getCategoryPeriodReport(Collection $categories, Collection $accounts, Carbon $start, Carbon $end, bool $noCategory): array - { - $data = [ - 'income' => $this->getCategoryReportData($categories, $accounts, $start, $end, $noCategory, [TransactionType::DEPOSIT, TransactionType::TRANSFER]), - 'expense' => $this->getCategoryReportData( - $categories, $accounts, $start, $end, $noCategory, [TransactionType::WITHDRAWAL, TransactionType::TRANSFER] - ), - ]; - - return $data; - - - } - /** * @param Category $category * @param Collection $accounts @@ -250,6 +224,158 @@ class CategoryRepository implements CategoryRepositoryInterface return $last; } + /** + * @param Collection $categories + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodExpenses(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): array + { + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + $data = []; + // prep data array: + /** @var Category $category */ + foreach ($categories as $category) { + $data[$category->id] = [ + 'name' => $category->name, + 'sum' => '0', + 'entries' => [], + ]; + } + + // get all transactions: + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end); + $collector->setCategories($categories)->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER]) + ->withOpposingAccount() + ->enableInternalFilter(); + $transactions = $collector->getJournals(); + + // loop transactions: + /** @var Transaction $transaction */ + foreach ($transactions as $transaction) { + $categoryId = max(intval($transaction->transaction_journal_category_id), intval($transaction->transaction_category_id)); + $date = $transaction->date->format($carbonFormat); + $data[$categoryId]['entries'][$date] = bcadd($data[$categoryId]['entries'][$date] ?? '0', $transaction->transaction_amount); + } + + return $data; + } + + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodExpensesNoCategory(Collection $accounts, Carbon $start, Carbon $end): array + { + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end); + $collector->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER])->enableInternalFilter(); + $collector->withoutCategory(); + $transactions = $collector->getJournals(); + $result = [ + 'entries' => [], + 'name' => strval(trans('firefly.no_category')), + 'sum' => '0', + ]; + + foreach ($transactions as $transaction) { + $date = $transaction->date->format($carbonFormat); + + if (!isset($result['entries'][$date])) { + $result['entries'][$date] = '0'; + } + $result['entries'][$date] = bcadd($result['entries'][$date], $transaction->transaction_amount); + } + + return $result; + } + + /** + * @param Collection $categories + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodIncome(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): array + { + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + $data = []; + // prep data array: + /** @var Category $category */ + foreach ($categories as $category) { + $data[$category->id] = [ + 'name' => $category->name, + 'sum' => '0', + 'entries' => [], + ]; + } + + // get all transactions: + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end); + $collector->setCategories($categories)->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER]) + ->withOpposingAccount() + ->enableInternalFilter(); + $transactions = $collector->getJournals(); + + // loop transactions: + /** @var Transaction $transaction */ + foreach ($transactions as $transaction) { + $categoryId = max(intval($transaction->transaction_journal_category_id), intval($transaction->transaction_category_id)); + $date = $transaction->date->format($carbonFormat); + $data[$categoryId]['entries'][$date] = bcadd($data[$categoryId]['entries'][$date] ?? '0', $transaction->transaction_amount); + } + + return $data; + } + + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodIncomeNoCategory(Collection $accounts, Carbon $start, Carbon $end): array + { + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end); + $collector->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER])->enableInternalFilter(); + $collector->withoutCategory(); + $transactions = $collector->getJournals(); + $result = [ + 'entries' => [], + 'name' => strval(trans('firefly.no_category')), + 'sum' => '0', + ]; + + foreach ($transactions as $transaction) { + $date = $transaction->date->format($carbonFormat); + + if (!isset($result['entries'][$date])) { + $result['entries'][$date] = '0'; + } + $result['entries'][$date] = bcadd($result['entries'][$date], $transaction->transaction_amount); + } + + return $result; + } + /** * @param Collection $categories * @param Collection $accounts @@ -314,55 +440,6 @@ class CategoryRepository implements CategoryRepositoryInterface return $category; } - /** - * @param Collection $categories - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * @param bool $noCategory - * @param array $types - * - * @return array - */ - private function getCategoryReportData(Collection $categories, Collection $accounts, Carbon $start, Carbon $end, bool $noCategory, array $types): array - { - $carbonFormat = Navigation::preferredCarbonFormat($start, $end); - $data = []; - // prep data array: - /** @var Category $category */ - foreach ($categories as $category) { - $data[$category->id] = [ - 'name' => $category->name, - 'sum' => '0', - 'entries' => [], - ]; - } - - // get all transactions: - /** @var JournalCollectorInterface $collector */ - $collector = app(JournalCollectorInterface::class); - $collector->setAccounts($accounts)->setRange($start, $end); - $collector->setCategories($categories)->setTypes($types) - ->withOpposingAccount() - ->enableInternalFilter(); - $transactions = $collector->getJournals(); - - // loop transactions: - /** @var Transaction $transaction */ - foreach ($transactions as $transaction) { - $categoryId = max(intval($transaction->transaction_journal_category_id), intval($transaction->transaction_category_id)); - $date = $transaction->date->format($carbonFormat); - $data[$categoryId]['entries'][$date] = bcadd($data[$categoryId]['entries'][$date] ?? '0', $transaction->transaction_amount); - } - - if ($noCategory) { - // and now the same for stuff without a budget: - //$data[0] = $this->getNoBudgetPeriodReport($start, $end); - } - - return $data; - } - /** * @param Collection $categories * @param Collection $accounts diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php index feb479c52d..bbcd272d1e 100644 --- a/app/Repositories/Category/CategoryRepositoryInterface.php +++ b/app/Repositories/Category/CategoryRepositoryInterface.php @@ -24,7 +24,6 @@ use Illuminate\Support\Collection; */ interface CategoryRepositoryInterface { - /** * @param Category $category * @@ -83,20 +82,6 @@ interface CategoryRepositoryInterface */ public function getCategories(): Collection; - /** - * This method is being used to generate the category overview in the year/multi-year report. Its used - * in both the year/multi-year budget overview AND in the accompanying chart. - * - * @param Collection $categories - * @param Collection $accounts - * @param Carbon $start - * @param Carbon $end - * @param bool $noCategory - * - * @return array - */ - public function getCategoryPeriodReport(Collection $categories, Collection $accounts, Carbon $start, Carbon $end, bool $noCategory): array; - /** * Return most recent transaction(journal) date. * @@ -107,6 +92,44 @@ interface CategoryRepositoryInterface */ public function lastUseDate(Category $category, Collection $accounts): Carbon; + /** + * @param Collection $categories + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodExpenses(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): array; + + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodExpensesNoCategory(Collection $accounts, Carbon $start, Carbon $end): array; + + /** + * @param Collection $categories + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodIncome(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): array; + + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodIncomeNoCategory(Collection $accounts, Carbon $start, Carbon $end): array; + /** * @param Collection $categories * @param Collection $accounts diff --git a/app/Repositories/Currency/CurrencyRepository.php b/app/Repositories/Currency/CurrencyRepository.php index 3b88e9ede4..1bf6e8728f 100644 --- a/app/Repositories/Currency/CurrencyRepository.php +++ b/app/Repositories/Currency/CurrencyRepository.php @@ -43,7 +43,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function find(int $currencyId) : TransactionCurrency + public function find(int $currencyId): TransactionCurrency { $currency = TransactionCurrency::find($currencyId); if (is_null($currency)) { @@ -61,7 +61,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function findByCode(string $currencyCode) : TransactionCurrency + public function findByCode(string $currencyCode): TransactionCurrency { $currency = TransactionCurrency::whereCode($currencyCode)->first(); if (is_null($currency)) { @@ -78,7 +78,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function findByName(string $currencyName) : TransactionCurrency + public function findByName(string $currencyName): TransactionCurrency { $preferred = TransactionCurrency::whereName($currencyName)->first(); if (is_null($preferred)) { @@ -95,7 +95,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function findBySymbol(string $currencySymbol) : TransactionCurrency + public function findBySymbol(string $currencySymbol): TransactionCurrency { $currency = TransactionCurrency::whereSymbol($currencySymbol)->first(); if (is_null($currency)) { diff --git a/app/Repositories/Currency/CurrencyRepositoryInterface.php b/app/Repositories/Currency/CurrencyRepositoryInterface.php index 4bd01fa256..94ae094cbe 100644 --- a/app/Repositories/Currency/CurrencyRepositoryInterface.php +++ b/app/Repositories/Currency/CurrencyRepositoryInterface.php @@ -39,7 +39,7 @@ interface CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function find(int $currencyId) : TransactionCurrency; + public function find(int $currencyId): TransactionCurrency; /** * Find by currency code @@ -48,7 +48,7 @@ interface CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function findByCode(string $currencyCode) : TransactionCurrency; + public function findByCode(string $currencyCode): TransactionCurrency; /** * Find by currency name @@ -57,7 +57,7 @@ interface CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function findByName(string $currencyName) : TransactionCurrency; + public function findByName(string $currencyName): TransactionCurrency; /** * Find by currency symbol @@ -66,7 +66,7 @@ interface CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function findBySymbol(string $currencySymbol) : TransactionCurrency; + public function findBySymbol(string $currencySymbol): TransactionCurrency; /** * @return Collection diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index 1643007904..c655b20f41 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -105,7 +105,7 @@ class JournalRepository implements JournalRepositoryInterface * * @return TransactionJournal */ - public function find(int $journalId) : TransactionJournal + public function find(int $journalId): TransactionJournal { $journal = $this->user->transactionJournals()->where('id', $journalId)->first(); if (is_null($journal)) { diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.php index 8a25f542b9..fb9779eec3 100644 --- a/app/Repositories/Journal/JournalRepositoryInterface.php +++ b/app/Repositories/Journal/JournalRepositoryInterface.php @@ -52,7 +52,7 @@ interface JournalRepositoryInterface * * @return TransactionJournal */ - public function find(int $journalId) : TransactionJournal; + public function find(int $journalId): TransactionJournal; /** * Get users very first transaction journal diff --git a/app/Repositories/Journal/JournalTasker.php b/app/Repositories/Journal/JournalTasker.php index 90e3edbd75..16cc5a5f3a 100644 --- a/app/Repositories/Journal/JournalTasker.php +++ b/app/Repositories/Journal/JournalTasker.php @@ -172,36 +172,36 @@ class JournalTasker implements JournalTaskerInterface // go! $sum = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('account_id', $transaction->account_id) - ->whereNull('transactions.deleted_at') - ->whereNull('transaction_journals.deleted_at') - ->where('transactions.id', '!=', $transactionId) - ->where( - function (Builder $q1) use ($date, $order, $journalId, $identifier) { - $q1->where('transaction_journals.date', '<', $date); // date - $q1->orWhere( - function (Builder $q2) use ($date, $order) { // function 1 - $q2->where('transaction_journals.date', $date); - $q2->where('transaction_journals.order', '>', $order); - } - ); - $q1->orWhere( - function (Builder $q3) use ($date, $order, $journalId) { // function 2 - $q3->where('transaction_journals.date', $date); - $q3->where('transaction_journals.order', $order); - $q3->where('transaction_journals.id', '<', $journalId); - } - ); - $q1->orWhere( - function (Builder $q4) use ($date, $order, $journalId, $identifier) { // function 3 - $q4->where('transaction_journals.date', $date); - $q4->where('transaction_journals.order', $order); - $q4->where('transaction_journals.id', $journalId); - $q4->where('transactions.identifier', '>', $identifier); - } - ); - } - )->sum('transactions.amount'); + ->where('account_id', $transaction->account_id) + ->whereNull('transactions.deleted_at') + ->whereNull('transaction_journals.deleted_at') + ->where('transactions.id', '!=', $transactionId) + ->where( + function (Builder $q1) use ($date, $order, $journalId, $identifier) { + $q1->where('transaction_journals.date', '<', $date); // date + $q1->orWhere( + function (Builder $q2) use ($date, $order) { // function 1 + $q2->where('transaction_journals.date', $date); + $q2->where('transaction_journals.order', '>', $order); + } + ); + $q1->orWhere( + function (Builder $q3) use ($date, $order, $journalId) { // function 2 + $q3->where('transaction_journals.date', $date); + $q3->where('transaction_journals.order', $order); + $q3->where('transaction_journals.id', '<', $journalId); + } + ); + $q1->orWhere( + function (Builder $q4) use ($date, $order, $journalId, $identifier) { // function 3 + $q4->where('transaction_journals.date', $date); + $q4->where('transaction_journals.order', $order); + $q4->where('transaction_journals.id', $journalId); + $q4->where('transactions.identifier', '>', $identifier); + } + ); + } + )->sum('transactions.amount'); return strval($sum); } diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php index 6eef1e358e..ede86894c7 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepository.php +++ b/app/Repositories/PiggyBank/PiggyBankRepository.php @@ -117,7 +117,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface * * @return Collection */ - public function getPiggyBanksWithAmount() : Collection + public function getPiggyBanksWithAmount(): Collection { $set = $this->getPiggyBanks(); foreach ($set as $piggy) { diff --git a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php index 22eb0a4e9a..aae01702d7 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php +++ b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php @@ -58,7 +58,7 @@ interface PiggyBankRepositoryInterface * * @return Collection */ - public function getEvents(PiggyBank $piggyBank) : Collection; + public function getEvents(PiggyBank $piggyBank): Collection; /** * Highest order of all piggy banks. @@ -72,14 +72,14 @@ interface PiggyBankRepositoryInterface * * @return Collection */ - public function getPiggyBanks() : Collection; + public function getPiggyBanks(): Collection; /** * Also add amount in name. * * @return Collection */ - public function getPiggyBanksWithAmount() : Collection; + public function getPiggyBanksWithAmount(): Collection; /** * Set all piggy banks to order 0. diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php index ecdc5bfe94..3740584f41 100644 --- a/app/Repositories/Tag/TagRepository.php +++ b/app/Repositories/Tag/TagRepository.php @@ -93,7 +93,7 @@ class TagRepository implements TagRepositoryInterface * * @return Tag */ - public function find(int $tagId) : Tag + public function find(int $tagId): Tag { $tag = $this->user->tags()->find($tagId); if (is_null($tag)) { @@ -108,7 +108,7 @@ class TagRepository implements TagRepositoryInterface * * @return Tag */ - public function findByTag(string $tag) : Tag + public function findByTag(string $tag): Tag { $tags = $this->user->tags()->get(); /** @var Tag $tag */ diff --git a/app/Repositories/Tag/TagRepositoryInterface.php b/app/Repositories/Tag/TagRepositoryInterface.php index dd1966bd51..3da24ab718 100644 --- a/app/Repositories/Tag/TagRepositoryInterface.php +++ b/app/Repositories/Tag/TagRepositoryInterface.php @@ -49,14 +49,14 @@ interface TagRepositoryInterface * * @return Tag */ - public function find(int $tagId) : Tag; + public function find(int $tagId): Tag; /** * @param string $tag * * @return Tag */ - public function findByTag(string $tag) : Tag; + public function findByTag(string $tag): Tag; /** * This method returns all the user's tags. diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php index e3fa94480a..87ac639290 100644 --- a/app/Repositories/User/UserRepository.php +++ b/app/Repositories/User/UserRepository.php @@ -114,10 +114,10 @@ class UserRepository implements UserRepositoryInterface $return['categories'] = $user->categories()->count(); $return['budgets'] = $user->budgets()->count(); $return['budgets_with_limits'] = BudgetLimit::distinct() - ->leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id') - ->where('amount', '>', 0) - ->whereNull('budgets.deleted_at') - ->where('budgets.user_id', $user->id)->get(['budget_limits.budget_id'])->count(); + ->leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id') + ->where('amount', '>', 0) + ->whereNull('budgets.deleted_at') + ->where('budgets.user_id', $user->id)->get(['budget_limits.budget_id'])->count(); $return['export_jobs'] = $user->exportJobs()->count(); $return['export_jobs_success'] = $user->exportJobs()->where('status', 'export_downloaded')->count(); $return['import_jobs'] = $user->exportJobs()->count(); diff --git a/public/js/ff/reports/default/year.js b/public/js/ff/reports/default/year.js index 237f3bac77..96e2d64167 100644 --- a/public/js/ff/reports/default/year.js +++ b/public/js/ff/reports/default/year.js @@ -5,7 +5,9 @@ $(function () { drawChart(); loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUri); - loadAjaxPartial('categoryPeriodReport', categoryPeriodReportUri); + + loadAjaxPartial('categoryExpense', categoryExpenseUri); + loadAjaxPartial('categoryIncome', categoryIncomeUri); }); function drawChart() { diff --git a/resources/lang/en_US/validation.php b/resources/lang/en_US/validation.php index fd25fbd685..33f05b180e 100644 --- a/resources/lang/en_US/validation.php +++ b/resources/lang/en_US/validation.php @@ -85,4 +85,5 @@ return [ 'file' => 'The :attribute must be a file.', 'in_array' => 'The :attribute field does not exist in :other.', 'present' => 'The :attribute field must be present.', + 'amount_zero' => 'The total amount cannot be zero', ]; diff --git a/resources/views/reports/default/year.twig b/resources/views/reports/default/year.twig index 01dcfc304c..5b757717b0 100644 --- a/resources/views/reports/default/year.twig +++ b/resources/views/reports/default/year.twig @@ -113,14 +113,27 @@ - {# same thing but for categories #} + {# same thing but for categories (expenses) #}
    -

    {{ 'categories'|_ }}

    +

    {{ 'categories'|_ }} ({{ 'expenses'|_ }})

    -
    +
    +
    +
    +
    +
    + + {# same thing but for categories (income) #} +
    +
    +
    +
    +

    {{ 'categories'|_ }} ({{ 'income'|_ }})

    +
    +
    @@ -164,7 +177,9 @@ var incExpReportUri = '{{ route('reports.data.incExpReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; var budgetPeriodReportUri = '{{ route('reports.data.budgetPeriodReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var categoryPeriodReportUri = '{{ route('reports.data.categoryPeriodReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; + var categoryExpenseUri = '{{ route('reports.data.categoryExpense', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; + var categoryIncomeUri = '{{ route('reports.data.categoryIncome', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; + diff --git a/resources/views/reports/partials/budget-period.twig b/resources/views/reports/partials/budget-period.twig index 6660019cbc..c9bb1cbd45 100644 --- a/resources/views/reports/partials/budget-period.twig +++ b/resources/views/reports/partials/budget-period.twig @@ -9,7 +9,7 @@ - {% for id, info in budgets %} + {% for id, info in report %} {{ info.name }} diff --git a/resources/views/reports/partials/category-period.twig b/resources/views/reports/partials/category-period.twig index 59185a3adf..ca20b994ff 100644 --- a/resources/views/reports/partials/category-period.twig +++ b/resources/views/reports/partials/category-period.twig @@ -1,75 +1,44 @@ - + {% for period in periods %} - + {% endfor %} - - - - {% for period in periods %} - - - {% endfor %} - - + - {% for category in categories %} - {% if report.income[category.id] or report.expense[category.id] %} - - + + + {% for key, period in periods %} + {# income first #} + {% if(info.entries[key]) %} + + {% else %} + + {% endif %} + {% endfor %} + + {# if sum of income, display: #} + {% if info.sum %} + - - {% for key, period in periods %} - {# income first #} - {% if(report.income[category.id].entries[key]) %} - - {% else %} - - {% endif %} - - {# expenses #} - {% if(report.expense[category.id].entries[key]) %} - - {% else %} - - {% endif %} - {% endfor %} - - {# if sum of income, display: #} - {% if report.income[category.id].sum %} - - {% else %} - - {% endif %} - {# if sum of expense, display: #} - {% if report.expense[category.id].sum %} - - {% else %} - - {% endif %} - - {% endif %} + {% else %} + + {% endif %} + {% endfor %}
    {{ 'category'|_ }}{{ 'category'|_ }}{{ period }}{{ period }}{{ 'sum'|_ }}
    InOutInOut{{ 'sum'|_ }}
    - {{ category.name }} + {% for id, info in report %} +
    + {{ info.name }} + + {{ info.entries[key]|formatAmount }} + + {{ 0|formatAmount }} + + {{ info.sum|formatAmount }} - {{ report.income[category.id].entries[key]|formatAmount }} - - {{ 0|formatAmount }} - - {{ report.expense[category.id].entries[key]|formatAmount }} - - {{ 0|formatAmount }} - - {{ report.income[category.id].sum|formatAmount }} - - {{ 0|formatAmount }} - - {{ report.expense[category.id].sum|formatAmount }} - - {{ 0|formatAmount }} -
    + {{ 0|formatAmount }} +
    \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 2d1d1d4ac4..3b7fe776c0 100755 --- a/routes/web.php +++ b/routes/web.php @@ -210,6 +210,7 @@ Route::group( // budgets: Route::get('/chart/budget/frontpage', ['uses' => 'Chart\BudgetController@frontpage']); + Route::get('/chart/budget/period/0/default/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\BudgetController@periodNoBudget']); Route::get('/chart/budget/period/{budget}/default/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\BudgetController@period']); // this chart is used in reports: @@ -410,11 +411,16 @@ Route::group( ['uses' => 'Report\BudgetController@budgetPeriodReport', 'as' => 'reports.data.budgetPeriodReport'] ); - // category period overview + // category period overview (expense and income) Route::get( - '/reports/data/category-period/{start_date}/{end_date}/{accountList}', - ['uses' => 'Report\CategoryController@categoryPeriodReport', 'as' => 'reports.data.categoryPeriodReport'] + '/reports/data/category-expense/{start_date}/{end_date}/{accountList}', + ['uses' => 'Report\CategoryController@expenseReport', 'as' => 'reports.data.categoryExpense'] ); + Route::get( + '/reports/data/category-income/{start_date}/{end_date}/{accountList}', + ['uses' => 'Report\CategoryController@incomeReport', 'as' => 'reports.data.categoryIncome'] + ); + /** * Rules Controller From a7b8c9d94dec1871df929bd07419b1ceae1916ec Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Dec 2016 18:11:16 +0100 Subject: [PATCH 059/110] Translated --- resources/lang/pt_BR/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/pt_BR/validation.php b/resources/lang/pt_BR/validation.php index f35ca914d2..fa6003e890 100644 --- a/resources/lang/pt_BR/validation.php +++ b/resources/lang/pt_BR/validation.php @@ -85,4 +85,5 @@ return [ 'file' => 'O :attribute deve ser um arquivo.', 'in_array' => 'O campo :attribute não existe em :other.', 'present' => 'O campo :attribute deve estar presente.', + 'amount_zero' => 'The total amount cannot be zero', ]; \ No newline at end of file From c5f81d4a94e15ce26bd247050214853e1a109796 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Dec 2016 18:11:19 +0100 Subject: [PATCH 060/110] Approved. Step name: Proofread --- resources/lang/nl_NL/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/nl_NL/validation.php b/resources/lang/nl_NL/validation.php index 902c6ccf2f..6ddaad4ec1 100644 --- a/resources/lang/nl_NL/validation.php +++ b/resources/lang/nl_NL/validation.php @@ -85,4 +85,5 @@ return [ 'file' => ':attribute moet een bestand zijn.', 'in_array' => 'Het :attribute veld bestaat niet in :other.', 'present' => 'Het :attribute veld moet aanwezig zijn.', + 'amount_zero' => 'The total amount cannot be zero', ]; \ No newline at end of file From e8792fa2185611aac935b3e513f3d306490765ed Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Dec 2016 18:11:20 +0100 Subject: [PATCH 061/110] Translated --- resources/lang/de_DE/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/de_DE/validation.php b/resources/lang/de_DE/validation.php index aa045fd645..2043a1d484 100644 --- a/resources/lang/de_DE/validation.php +++ b/resources/lang/de_DE/validation.php @@ -85,4 +85,5 @@ return [ 'file' => 'Das :attribute muss eine Datei sein.', 'in_array' => ':attribute existiert nicht in :other.', 'present' => 'Das :attribute Feld muss vorhanden sein.', + 'amount_zero' => 'The total amount cannot be zero', ]; \ No newline at end of file From bba15cef24b2540a0b12da9abca9fb384cdc0b8f Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Dec 2016 18:11:28 +0100 Subject: [PATCH 062/110] New translations --- resources/lang/zh_HK/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/zh_HK/validation.php b/resources/lang/zh_HK/validation.php index 39d9ae5ed9..b391855829 100644 --- a/resources/lang/zh_HK/validation.php +++ b/resources/lang/zh_HK/validation.php @@ -85,4 +85,5 @@ return [ 'file' => 'The :attribute must be a file.', 'in_array' => 'The :attribute field does not exist in :other.', 'present' => 'The :attribute field must be present.', + 'amount_zero' => 'The total amount cannot be zero', ]; \ No newline at end of file From 38919ae30048e3825f420cbbf02f415541e9c153 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Dec 2016 18:11:34 +0100 Subject: [PATCH 063/110] New translations --- resources/lang/zh_TW/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/zh_TW/validation.php b/resources/lang/zh_TW/validation.php index dbf37d12b2..9334e9cfa3 100644 --- a/resources/lang/zh_TW/validation.php +++ b/resources/lang/zh_TW/validation.php @@ -85,4 +85,5 @@ return [ 'file' => 'The :attribute must be a file.', 'in_array' => 'The :attribute field does not exist in :other.', 'present' => 'The :attribute field must be present.', + 'amount_zero' => 'The total amount cannot be zero', ]; \ No newline at end of file From f7abf132e2916963248d42ca3564519a45fd7de5 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Dec 2016 18:11:44 +0100 Subject: [PATCH 064/110] New translations --- resources/lang/fr_FR/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/fr_FR/validation.php b/resources/lang/fr_FR/validation.php index 9a671c5a01..11f910cddc 100644 --- a/resources/lang/fr_FR/validation.php +++ b/resources/lang/fr_FR/validation.php @@ -85,4 +85,5 @@ return [ 'file' => 'The :attribute must be a file.', 'in_array' => 'The :attribute field does not exist in :other.', 'present' => 'The :attribute field must be present.', + 'amount_zero' => 'The total amount cannot be zero', ]; \ No newline at end of file From ba92aa207cf8381c45ff2903a6d99edecaf18025 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Dec 2016 18:11:51 +0100 Subject: [PATCH 065/110] New translations --- resources/lang/hr_HR/validation.php | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/lang/hr_HR/validation.php b/resources/lang/hr_HR/validation.php index 39d9ae5ed9..b391855829 100644 --- a/resources/lang/hr_HR/validation.php +++ b/resources/lang/hr_HR/validation.php @@ -85,4 +85,5 @@ return [ 'file' => 'The :attribute must be a file.', 'in_array' => 'The :attribute field does not exist in :other.', 'present' => 'The :attribute field must be present.', + 'amount_zero' => 'The total amount cannot be zero', ]; \ No newline at end of file From 2476dd38b32e5c4db6888254ff481c10e2acf030 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 4 Dec 2016 19:55:15 +0100 Subject: [PATCH 066/110] Route clean up --- routes/web.php | 153 ++++++++++++++++++++++++++++--------------------- 1 file changed, 89 insertions(+), 64 deletions(-) diff --git a/routes/web.php b/routes/web.php index 3b7fe776c0..f0e4508d35 100755 --- a/routes/web.php +++ b/routes/web.php @@ -84,65 +84,90 @@ Route::group( Route::get('/home', ['uses' => 'HomeController@index', 'as' => 'home']); Route::post('/daterange', ['uses' => 'HomeController@dateRange', 'as' => 'daterange']); Route::get('/routes', ['uses' => 'HomeController@routes', 'as' => 'allRoutes']); - /** - * Account Controller - */ - Route::get('/accounts/{what}', ['uses' => 'AccountController@index', 'as' => 'accounts.index'])->where('what', 'revenue|asset|expense'); - Route::get('/accounts/create/{what}', ['uses' => 'AccountController@create', 'as' => 'accounts.create'])->where('what', 'revenue|asset|expense'); - Route::get('/accounts/edit/{account}', ['uses' => 'AccountController@edit', 'as' => 'accounts.edit']); - Route::get('/accounts/delete/{account}', ['uses' => 'AccountController@delete', 'as' => 'accounts.delete']); - Route::get('/accounts/show/{account}', ['uses' => 'AccountController@show', 'as' => 'accounts.show']); - Route::get('/accounts/show/{account}/all', ['uses' => 'AccountController@showAll', 'as' => 'accounts.show.all']); - Route::get('/accounts/show/{account}/{date}', ['uses' => 'AccountController@showWithDate', 'as' => 'accounts.show.date']); +} +); + +/** + * Account Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'accounts', 'as' => 'accounts.'], function () { + + Route::get('{what}', ['uses' => 'AccountController@index', 'as' => 'index'])->where('what', 'revenue|asset|expense'); + Route::get('create/{what}', ['uses' => 'AccountController@create', 'as' => 'create'])->where('what', 'revenue|asset|expense'); + Route::get('edit/{account}', ['uses' => 'AccountController@edit', 'as' => 'edit']); + Route::get('delete/{account}', ['uses' => 'AccountController@delete', 'as' => 'delete']); + Route::get('show/{account}', ['uses' => 'AccountController@show', 'as' => 'show']); // consistent + Route::get('show/{account}/all', ['uses' => 'AccountController@showAll', 'as' => 'show.all']); + Route::get('show/{account}/{date}', ['uses' => 'AccountController@showWithDate', 'as' => 'show.date']); + + Route::post('store', ['uses' => 'AccountController@store', 'as' => 'store']); + Route::post('update/{account}', ['uses' => 'AccountController@update', 'as' => 'update']); + Route::post('destroy/{account}', ['uses' => 'AccountController@destroy', 'as' => 'destroy']); + +} +); + +/** + * Attachment Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'attachments', 'as' => 'attachments.'], function () { + Route::get('edit/{attachment}', ['uses' => 'AttachmentController@edit', 'as' => 'edit']); + Route::get('delete/{attachment}', ['uses' => 'AttachmentController@delete', 'as' => 'delete']); + Route::get('preview/{attachment}', ['uses' => 'AttachmentController@preview', 'as' => 'preview']); + Route::get('download/{attachment}', ['uses' => 'AttachmentController@download', 'as' => 'download']); + + Route::post('update/{attachment}', ['uses' => 'AttachmentController@update', 'as' => 'update']); + Route::post('destroy/{attachment}', ['uses' => 'AttachmentController@destroy', 'as' => 'destroy']); + +} +); + +/** + * Bills Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'bills','as' => 'bills.'], function () { + + Route::get('', ['uses' => 'BillController@index', 'as' => 'index']); + Route::get('rescan/{bill}', ['uses' => 'BillController@rescan', 'as' => 'rescan']); + Route::get('create', ['uses' => 'BillController@create', 'as' => 'create']); + Route::get('edit/{bill}', ['uses' => 'BillController@edit', 'as' => 'edit']); + Route::get('delete/{bill}', ['uses' => 'BillController@delete', 'as' => 'delete']); + Route::get('show/{bill}', ['uses' => 'BillController@show', 'as' => 'show']); + Route::post('store', ['uses' => 'BillController@store', 'as' => 'store']); + + Route::post('update/{bill}', ['uses' => 'BillController@update', 'as' => 'update']); + Route::post('destroy/{bill}', ['uses' => 'BillController@destroy', 'as' => 'destroy']); +}); - Route::post('/accounts/store', ['uses' => 'AccountController@store', 'as' => 'accounts.store']); - Route::post('/accounts/update/{account}', ['uses' => 'AccountController@update', 'as' => 'accounts.update']); - Route::post('/accounts/destroy/{account}', ['uses' => 'AccountController@destroy', 'as' => 'accounts.destroy']); +/** + * Budget Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'budgets','as' => 'budgets.'], function () { + Route::get('', ['uses' => 'BudgetController@index', 'as' => 'index']); + Route::get('income', ['uses' => 'BudgetController@updateIncome', 'as' => 'income']); + Route::get('create', ['uses' => 'BudgetController@create', 'as' => 'create']); + Route::get('edit/{budget}', ['uses' => 'BudgetController@edit', 'as' => 'edit']); + Route::get('delete/{budget}', ['uses' => 'BudgetController@delete', 'as' => 'delete']); - /** - * Attachment Controller - */ + Route::get('show/{budget}', ['uses' => 'BudgetController@show', 'as' => 'show']); // consistent + Route::get('show/{budget}/{limitrepetition}', ['uses' => 'BudgetController@showWithRepetition', 'as' => 'showWithRepetition']); + Route::get('list/noBudget', ['uses' => 'BudgetController@noBudget', 'as' => 'noBudget']); - Route::post('/attachment/update/{attachment}', ['uses' => 'AttachmentController@update', 'as' => 'attachments.update']); - Route::post('/attachment/destroy/{attachment}', ['uses' => 'AttachmentController@destroy', 'as' => 'attachments.destroy']); + Route::post('income', ['uses' => 'BudgetController@postUpdateIncome', 'as' => 'postIncome']); + Route::post('store', ['uses' => 'BudgetController@store', 'as' => 'store']); + Route::post('update/{budget}', ['uses' => 'BudgetController@update', 'as' => 'update']); + Route::post('destroy/{budget}', ['uses' => 'BudgetController@destroy', 'as' => 'destroy']); + Route::post('amount/{budget}', ['uses' => 'BudgetController@amount']); +}); - Route::get('/attachment/edit/{attachment}', ['uses' => 'AttachmentController@edit', 'as' => 'attachments.edit']); - Route::get('/attachment/delete/{attachment}', ['uses' => 'AttachmentController@delete', 'as' => 'attachments.delete']); - Route::get('/attachment/preview/{attachment}', ['uses' => 'AttachmentController@preview', 'as' => 'attachments.preview']); - Route::get('/attachment/download/{attachment}', ['uses' => 'AttachmentController@download', 'as' => 'attachments.download']); - - - /** - * Bills Controller - */ - Route::get('/bills', ['uses' => 'BillController@index', 'as' => 'bills.index']); - Route::get('/bills/rescan/{bill}', ['uses' => 'BillController@rescan', 'as' => 'bills.rescan']); - Route::get('/bills/create', ['uses' => 'BillController@create', 'as' => 'bills.create']); - Route::get('/bills/edit/{bill}', ['uses' => 'BillController@edit', 'as' => 'bills.edit']); - Route::get('/bills/delete/{bill}', ['uses' => 'BillController@delete', 'as' => 'bills.delete']); - Route::get('/bills/show/{bill}', ['uses' => 'BillController@show', 'as' => 'bills.show']); - Route::post('/bills/store', ['uses' => 'BillController@store', 'as' => 'bills.store']); - Route::post('/bills/update/{bill}', ['uses' => 'BillController@update', 'as' => 'bills.update']); - Route::post('/bills/destroy/{bill}', ['uses' => 'BillController@destroy', 'as' => 'bills.destroy']); - - /** - * Budget Controller - */ - Route::get('/budgets', ['uses' => 'BudgetController@index', 'as' => 'budgets.index']); - Route::get('/budgets/income', ['uses' => 'BudgetController@updateIncome', 'as' => 'budgets.income']); - Route::get('/budgets/create', ['uses' => 'BudgetController@create', 'as' => 'budgets.create']); - Route::get('/budgets/edit/{budget}', ['uses' => 'BudgetController@edit', 'as' => 'budgets.edit']); - Route::get('/budgets/delete/{budget}', ['uses' => 'BudgetController@delete', 'as' => 'budgets.delete']); - Route::get('/budgets/show/{budget}', ['uses' => 'BudgetController@show', 'as' => 'budgets.show']); - Route::get('/budgets/show/{budget}/{limitrepetition}', ['uses' => 'BudgetController@showWithRepetition', 'as' => 'budgets.showWithRepetition']); - Route::get('/budgets/list/noBudget', ['uses' => 'BudgetController@noBudget', 'as' => 'budgets.noBudget']); - Route::post('/budgets/income', ['uses' => 'BudgetController@postUpdateIncome', 'as' => 'budgets.postIncome']); - Route::post('/budgets/store', ['uses' => 'BudgetController@store', 'as' => 'budgets.store']); - Route::post('/budgets/update/{budget}', ['uses' => 'BudgetController@update', 'as' => 'budgets.update']); - Route::post('/budgets/destroy/{budget}', ['uses' => 'BudgetController@destroy', 'as' => 'budgets.destroy']); - Route::post('budgets/amount/{budget}', ['uses' => 'BudgetController@amount']); +Route::group( + ['middleware' => ['user-full-auth']], function () { /** * Category Controller @@ -543,24 +568,24 @@ Route::group( * For the admin routes, the user must be logged in and have the role of 'owner' */ Route::group( - ['middleware' => 'admin'], function () { + ['middleware' => 'admin', 'namespace' => 'Admin', 'prefix' => 'admin', 'as' => 'admin.'], function () { // admin home - Route::get('/admin', ['uses' => 'Admin\HomeController@index', 'as' => 'admin.index']); + Route::get('', ['uses' => 'HomeController@index', 'as' => 'index']); // user manager - Route::get('/admin/users', ['uses' => 'Admin\UserController@index', 'as' => 'admin.users']); - Route::get('/admin/users/edit/{user}', ['uses' => 'Admin\UserController@edit', 'as' => 'admin.users.edit']); - Route::get('/admin/users/show/{user}', ['uses' => 'Admin\UserController@show', 'as' => 'admin.users.show']); + Route::get('users', ['uses' => 'UserController@index', 'as' => 'users']); + Route::get('users/edit/{user}', ['uses' => 'UserController@edit', 'as' => 'users.edit']); + Route::get('users/show/{user}', ['uses' => 'UserController@show', 'as' => 'users.show']); - // user domains: - Route::get('/admin/domains', ['uses' => 'Admin\DomainController@domains', 'as' => 'admin.users.domains']); - Route::get('/admin/domains/toggle/{domain}', ['uses' => 'Admin\DomainController@toggleDomain', 'as' => 'admin.users.domains.block-toggle']); - Route::post('/admin/domains/manual', ['uses' => 'Admin\DomainController@manual', 'as' => 'admin.users.domains.manual']); + // user domain manager + Route::get('domains', ['uses' => 'DomainController@domains', 'as' => 'users.domains']); + Route::get('domains/toggle/{domain}', ['uses' => 'DomainController@toggleDomain', 'as' => 'users.domains.block-toggle']); + Route::post('domains/manual', ['uses' => 'DomainController@manual', 'as' => 'users.domains.manual']); // FF configuration: - Route::get('/admin/configuration', ['uses' => 'Admin\ConfigurationController@index', 'as' => 'admin.configuration.index']); - Route::post('/admin/configuration', ['uses' => 'Admin\ConfigurationController@store', 'as' => 'admin.configuration.store']); + Route::get('configuration', ['uses' => 'ConfigurationController@index', 'as' => 'configuration.index']); + Route::post('configuration', ['uses' => 'ConfigurationController@store', 'as' => 'configuration.store']); } ); From 098cc88d5f0d3ae9e48d1c4e674fd7813a52e347 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 5 Dec 2016 20:01:01 +0100 Subject: [PATCH 067/110] Fix various routes. --- app/Http/Controllers/CurrencyController.php | 44 ++++----- .../Transaction/SplitController.php | 15 +--- app/Http/breadcrumbs.php | 22 ++--- .../{currency => currencies}/create.twig | 2 +- .../{currency => currencies}/delete.twig | 2 +- .../views/{currency => currencies}/edit.twig | 2 +- .../views/{currency => currencies}/index.twig | 8 +- resources/views/partials/menu-sidebar.twig | 2 +- routes/web.php | 90 +++++++++++-------- 9 files changed, 96 insertions(+), 91 deletions(-) rename resources/views/{currency => currencies}/create.twig (92%) rename resources/views/{currency => currencies}/delete.twig (90%) rename resources/views/{currency => currencies}/edit.twig (96%) rename resources/views/{currency => currencies}/index.twig (88%) diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php index 19ccf48434..f5948f4785 100644 --- a/app/Http/Controllers/CurrencyController.php +++ b/app/Http/Controllers/CurrencyController.php @@ -60,14 +60,14 @@ class CurrencyController extends Controller $subTitle = trans('firefly.create_currency'); // put previous url in session if not redirect from store (not "create another"). - if (session('currency.create.fromStore') !== true) { - Session::put('currency.create.url', URL::previous()); + if (session('currencies.create.fromStore') !== true) { + Session::put('currencies.create.url', URL::previous()); } - Session::forget('currency.create.fromStore'); + Session::forget('currencies.create.fromStore'); Session::flash('gaEventCategory', 'currency'); Session::flash('gaEventAction', 'create'); - return view('currency.create', compact('subTitleIcon', 'subTitle')); + return view('currencies.create', compact('subTitleIcon', 'subTitle')); } /** @@ -85,7 +85,7 @@ class CurrencyController extends Controller Cache::forget('FFCURRENCYSYMBOL'); Cache::forget('FFCURRENCYCODE'); - return redirect(route('currency.index')); + return redirect(route('currencies.index')); } @@ -99,18 +99,18 @@ class CurrencyController extends Controller if (!$this->canDeleteCurrency($currency)) { Session::flash('error', trans('firefly.cannot_delete_currency', ['name' => $currency->name])); - return redirect(route('currency.index')); + return redirect(route('currencies.index')); } // put previous url in session - Session::put('currency.delete.url', URL::previous()); + Session::put('currencies.delete.url', URL::previous()); Session::flash('gaEventCategory', 'currency'); Session::flash('gaEventAction', 'delete'); $subTitle = trans('form.delete_currency', ['name' => $currency->name]); - return view('currency.delete', compact('currency', 'subTitle')); + return view('currencies.delete', compact('currency', 'subTitle')); } /** @@ -124,7 +124,7 @@ class CurrencyController extends Controller if (!$this->canDeleteCurrency($currency)) { Session::flash('error', trans('firefly.cannot_delete_currency', ['name' => $currency->name])); - return redirect(route('currency.index')); + return redirect(route('currencies.index')); } Session::flash('success', trans('firefly.deleted_currency', ['name' => $currency->name])); @@ -132,7 +132,7 @@ class CurrencyController extends Controller $currency->forceDelete(); } - return redirect(session('currency.delete.url')); + return redirect(session('currencies.delete.url')); } /** @@ -147,14 +147,14 @@ class CurrencyController extends Controller $currency->symbol = htmlentities($currency->symbol); // put previous url in session if not redirect from store (not "return_to_edit"). - if (session('currency.edit.fromUpdate') !== true) { - Session::put('currency.edit.url', URL::previous()); + if (session('currencies.edit.fromUpdate') !== true) { + Session::put('currencies.edit.url', URL::previous()); } - Session::forget('currency.edit.fromUpdate'); + Session::forget('currencies.edit.fromUpdate'); Session::flash('gaEventCategory', 'currency'); Session::flash('gaEventAction', 'edit'); - return view('currency.edit', compact('currency', 'subTitle', 'subTitleIcon')); + return view('currencies.edit', compact('currency', 'subTitle', 'subTitleIcon')); } @@ -174,7 +174,7 @@ class CurrencyController extends Controller } - return view('currency.index', compact('currencies', 'defaultCurrency')); + return view('currencies.index', compact('currencies', 'defaultCurrency')); } /** @@ -189,7 +189,7 @@ class CurrencyController extends Controller if (!auth()->user()->hasRole('owner')) { Log::error('User ' . auth()->user()->id . ' is not admin, but tried to store a currency.'); - return redirect(session('currency.create.url')); + return redirect(session('currencies.create.url')); } $data = $request->getCurrencyData(); @@ -197,13 +197,13 @@ class CurrencyController extends Controller Session::flash('success', trans('firefly.created_currency', ['name' => $currency->name])); if (intval(Input::get('create_another')) === 1) { - Session::put('currency.create.fromStore', true); + Session::put('currencies.create.fromStore', true); - return redirect(route('currency.create'))->withInput(); + return redirect(route('currencies.create'))->withInput(); } // redirect to previous URL. - return redirect(session('currency.create.url')); + return redirect(session('currencies.create.url')); } @@ -226,13 +226,13 @@ class CurrencyController extends Controller if (intval(Input::get('return_to_edit')) === 1) { - Session::put('currency.edit.fromUpdate', true); + Session::put('currencies.edit.fromUpdate', true); - return redirect(route('currency.edit', [$currency->id])); + return redirect(route('currencies.edit', [$currency->id])); } // redirect to previous URL. - return redirect(session('currency.edit.url')); + return redirect(session('currencies.edit.url')); } diff --git a/app/Http/Controllers/Transaction/SplitController.php b/app/Http/Controllers/Transaction/SplitController.php index a7883f2a4a..38c40f3f40 100644 --- a/app/Http/Controllers/Transaction/SplitController.php +++ b/app/Http/Controllers/Transaction/SplitController.php @@ -135,20 +135,7 @@ class SplitController extends Controller return $this->redirectToAccount($journal); } - $data = $this->arrayFromInput($request); - - // need to do some validation! - // sum of amount must be > 0 - $sum = '0'; - foreach ($data['transactions'] as $transaction) { - Session::flash('error',strval(trans('validation.amount_zero'))); - $sum = bcadd($sum, strval($transaction['amount'])); - } - if (bccomp($sum, '0') === 0) { - return redirect(route('transactions.edit-split', [$journal->id]))->withInput(); - } - - + $data = $this->arrayFromInput($request); $journal = $repository->updateSplitJournal($journal, $data); // save attachments: diff --git a/app/Http/breadcrumbs.php b/app/Http/breadcrumbs.php index 925c0cac99..879fb077e7 100644 --- a/app/Http/breadcrumbs.php +++ b/app/Http/breadcrumbs.php @@ -327,29 +327,29 @@ Breadcrumbs::register( * CURRENCIES */ Breadcrumbs::register( - 'currency.index', function (BreadCrumbGenerator $breadcrumbs) { + 'currencies.index', function (BreadCrumbGenerator $breadcrumbs) { $breadcrumbs->parent('home'); - $breadcrumbs->push(trans('firefly.currencies'), route('currency.index')); + $breadcrumbs->push(trans('firefly.currencies'), route('currencies.index')); } ); Breadcrumbs::register( - 'currency.create', function (BreadCrumbGenerator $breadcrumbs) { - $breadcrumbs->parent('currency.index'); - $breadcrumbs->push(trans('firefly.create_currency'), route('currency.create')); + 'currencies.create', function (BreadCrumbGenerator $breadcrumbs) { + $breadcrumbs->parent('currencies.index'); + $breadcrumbs->push(trans('firefly.create_currency'), route('currencies.create')); } ); Breadcrumbs::register( - 'currency.edit', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) { - $breadcrumbs->parent('currency.index'); - $breadcrumbs->push(trans('breadcrumbs.edit_currency', ['name' => e($currency->name)]), route('currency.edit', [$currency->id])); + 'currencies.edit', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) { + $breadcrumbs->parent('currencies.index'); + $breadcrumbs->push(trans('breadcrumbs.edit_currency', ['name' => e($currency->name)]), route('currencies.edit', [$currency->id])); } ); Breadcrumbs::register( - 'currency.delete', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) { - $breadcrumbs->parent('currency.index'); - $breadcrumbs->push(trans('breadcrumbs.delete_currency', ['name' => e($currency->name)]), route('currency.delete', [$currency->id])); + 'currencies.delete', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) { + $breadcrumbs->parent('currencies.index'); + $breadcrumbs->push(trans('breadcrumbs.delete_currency', ['name' => e($currency->name)]), route('currencies.delete', [$currency->id])); } ); diff --git a/resources/views/currency/create.twig b/resources/views/currencies/create.twig similarity index 92% rename from resources/views/currency/create.twig rename to resources/views/currencies/create.twig index 26dec5a0b1..8192a47171 100644 --- a/resources/views/currency/create.twig +++ b/resources/views/currencies/create.twig @@ -5,7 +5,7 @@ {% endblock %} {% block content %} -
    +
    diff --git a/resources/views/currency/delete.twig b/resources/views/currencies/delete.twig similarity index 90% rename from resources/views/currency/delete.twig rename to resources/views/currencies/delete.twig index 5874f126f2..e14902a17f 100644 --- a/resources/views/currency/delete.twig +++ b/resources/views/currencies/delete.twig @@ -6,7 +6,7 @@ {% block content %} - +
    diff --git a/resources/views/currency/edit.twig b/resources/views/currencies/edit.twig similarity index 96% rename from resources/views/currency/edit.twig rename to resources/views/currencies/edit.twig index e54d5f5ca1..2c4819545e 100644 --- a/resources/views/currency/edit.twig +++ b/resources/views/currencies/edit.twig @@ -5,7 +5,7 @@ {% endblock %} {% block content %} - {{ Form.model(currency, {'class' : 'form-horizontal','id' : 'update','url' : route('currency.update',currency.id)}) }} + {{ Form.model(currency, {'class' : 'form-horizontal','id' : 'update','url' : route('currencies.update',currency.id)}) }}
    diff --git a/resources/views/currency/index.twig b/resources/views/currencies/index.twig similarity index 88% rename from resources/views/currency/index.twig rename to resources/views/currencies/index.twig index 7720779d98..5955d6edc6 100644 --- a/resources/views/currency/index.twig +++ b/resources/views/currencies/index.twig @@ -28,8 +28,8 @@
    - - + +
    {{ currency.name }} ({{ currency.code }}) ({{ currency.symbol|raw }}) @@ -38,7 +38,7 @@ {{ 'default_currency'|_ }} {% else %} {{ 'make_default_currency'|_ }} + href="{{ route('currencies.default',currency.id) }}">{{ 'make_default_currency'|_ }} {% endif %} @@ -48,7 +48,7 @@ {% endif %}
    diff --git a/resources/views/partials/menu-sidebar.twig b/resources/views/partials/menu-sidebar.twig index f1b45e4a37..ead49f1f16 100644 --- a/resources/views/partials/menu-sidebar.twig +++ b/resources/views/partials/menu-sidebar.twig @@ -146,7 +146,7 @@ {{ 'preferences'|_ }}
  • - {{ 'currencies'|_ }} + {{ 'currencies'|_ }}
  • {% if Auth.user.hasRole('owner') %} diff --git a/routes/web.php b/routes/web.php index f0e4508d35..2185355826 100755 --- a/routes/web.php +++ b/routes/web.php @@ -159,51 +159,69 @@ Route::group( Route::get('show/{budget}/{limitrepetition}', ['uses' => 'BudgetController@showWithRepetition', 'as' => 'showWithRepetition']); Route::get('list/noBudget', ['uses' => 'BudgetController@noBudget', 'as' => 'noBudget']); - Route::post('income', ['uses' => 'BudgetController@postUpdateIncome', 'as' => 'postIncome']); + Route::post('income', ['uses' => 'BudgetController@postUpdateIncome', 'as' => 'postIncome']); // consistent Route::post('store', ['uses' => 'BudgetController@store', 'as' => 'store']); Route::post('update/{budget}', ['uses' => 'BudgetController@update', 'as' => 'update']); Route::post('destroy/{budget}', ['uses' => 'BudgetController@destroy', 'as' => 'destroy']); Route::post('amount/{budget}', ['uses' => 'BudgetController@amount']); }); +/** + * Category Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'categories','as' => 'categories.'], function () { + + Route::get('', ['uses' => 'CategoryController@index', 'as' => 'index']); + Route::get('create', ['uses' => 'CategoryController@create', 'as' => 'create']); + Route::get('edit/{category}', ['uses' => 'CategoryController@edit', 'as' => 'edit']); + Route::get('delete/{category}', ['uses' => 'CategoryController@delete', 'as' => 'delete']); + + Route::get('show/{category}', ['uses' => 'CategoryController@show', 'as' => 'show']); // consistent + Route::get('show/{category}/{date}', ['uses' => 'CategoryController@showWithDate', 'as' => 'show.date']); + Route::get('list/noCategory', ['uses' => 'CategoryController@noCategory', 'as' => 'noCategory']); + + Route::post('store', ['uses' => 'CategoryController@store', 'as' => 'store']); + Route::post('update/{category}', ['uses' => 'CategoryController@update', 'as' => 'update']); + Route::post('destroy/{category}', ['uses' => 'CategoryController@destroy', 'as' => 'destroy']); +}); + + +/** + * Currency Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'currencies','as' => 'currencies.'], function () { + + Route::get('', ['uses' => 'CurrencyController@index', 'as' => 'index']); + Route::get('create', ['uses' => 'CurrencyController@create', 'as' => 'create']); + Route::get('edit/{currency}', ['uses' => 'CurrencyController@edit', 'as' => 'edit']); + Route::get('delete/{currency}', ['uses' => 'CurrencyController@delete', 'as' => 'delete']); + Route::get('default/{currency}', ['uses' => 'CurrencyController@defaultCurrency', 'as' => 'default']); + + Route::post('store', ['uses' => 'CurrencyController@store', 'as' => 'store']); + Route::post('update/{currency}', ['uses' => 'CurrencyController@update', 'as' => 'update']); + Route::post('destroy/{currency}', ['uses' => 'CurrencyController@destroy', 'as' => 'destroy']); + +}); + +/** + * Export Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'export','as' => 'export.'], function () { + + Route::get('', ['uses' => 'ExportController@index', 'as' => 'index']); + Route::get('status/{jobKey}', ['uses' => 'ExportController@getStatus', 'as' => 'status']); + Route::get('download/{jobKey}', ['uses' => 'ExportController@download', 'as' => 'download']); + + Route::post('submit', ['uses' => 'ExportController@postIndex', 'as' => 'export']); + +}); + Route::group( ['middleware' => ['user-full-auth']], function () { - /** - * Category Controller - */ - Route::get('/categories', ['uses' => 'CategoryController@index', 'as' => 'categories.index']); - Route::get('/categories/create', ['uses' => 'CategoryController@create', 'as' => 'categories.create']); - Route::get('/categories/edit/{category}', ['uses' => 'CategoryController@edit', 'as' => 'categories.edit']); - Route::get('/categories/delete/{category}', ['uses' => 'CategoryController@delete', 'as' => 'categories.delete']); - Route::get('/categories/show/{category}', ['uses' => 'CategoryController@show', 'as' => 'categories.show']); - Route::get('/categories/show/{category}/{date}', ['uses' => 'CategoryController@showWithDate', 'as' => 'categories.show.date']); - Route::get('/categories/list/noCategory', ['uses' => 'CategoryController@noCategory', 'as' => 'categories.noCategory']); - Route::post('/categories/store', ['uses' => 'CategoryController@store', 'as' => 'categories.store']); - Route::post('/categories/update/{category}', ['uses' => 'CategoryController@update', 'as' => 'categories.update']); - Route::post('/categories/destroy/{category}', ['uses' => 'CategoryController@destroy', 'as' => 'categories.destroy']); - - /** - * Currency Controller - */ - Route::get('/currency', ['uses' => 'CurrencyController@index', 'as' => 'currency.index']); - Route::get('/currency/create', ['uses' => 'CurrencyController@create', 'as' => 'currency.create']); - Route::get('/currency/edit/{currency}', ['uses' => 'CurrencyController@edit', 'as' => 'currency.edit']); - Route::get('/currency/delete/{currency}', ['uses' => 'CurrencyController@delete', 'as' => 'currency.delete']); - Route::get('/currency/default/{currency}', ['uses' => 'CurrencyController@defaultCurrency', 'as' => 'currency.default']); - Route::post('/currency/store', ['uses' => 'CurrencyController@store', 'as' => 'currency.store']); - Route::post('/currency/update/{currency}', ['uses' => 'CurrencyController@update', 'as' => 'currency.update']); - Route::post('/currency/destroy/{currency}', ['uses' => 'CurrencyController@destroy', 'as' => 'currency.destroy']); - - /** - * Export Controller - */ - Route::get('/export', ['uses' => 'ExportController@index', 'as' => 'export.index']); - Route::post('/export/submit', ['uses' => 'ExportController@postIndex', 'as' => 'export.export']); - Route::get('/export/status/{jobKey}', ['uses' => 'ExportController@getStatus', 'as' => 'export.status']); - Route::get('/export/download/{jobKey}', ['uses' => 'ExportController@download', 'as' => 'export.download']); - - /** * ALL CHART Controllers */ From b713eae009f619316cf3ebed30bf69e52a844be1 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 5 Dec 2016 20:19:26 +0100 Subject: [PATCH 068/110] Fixed some issues with expense/income overview. --- .../Controllers/Report/InOutController.php | 99 +++++++++++++++++-- .../views/reports/partials/expenses.twig | 10 +- resources/views/reports/partials/income.twig | 18 ++-- 3 files changed, 106 insertions(+), 21 deletions(-) diff --git a/app/Http/Controllers/Report/InOutController.php b/app/Http/Controllers/Report/InOutController.php index 83ce241de1..faaf7256d8 100644 --- a/app/Http/Controllers/Report/InOutController.php +++ b/app/Http/Controllers/Report/InOutController.php @@ -15,8 +15,11 @@ namespace FireflyIII\Http\Controllers\Report; use Carbon\Carbon; +use FireflyIII\Helpers\Collector\JournalCollectorInterface; use FireflyIII\Helpers\Report\ReportHelperInterface; use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Models\Transaction; +use FireflyIII\Models\TransactionType; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; @@ -29,14 +32,13 @@ class InOutController extends Controller { /** - * @param ReportHelperInterface $helper - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts * * @return \Illuminate\Http\JsonResponse */ - public function expenseReport(ReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) + public function expenseReport(Carbon $start, Carbon $end, Collection $accounts) { // chart properties for cache: $cache = new CacheProperties; @@ -48,7 +50,38 @@ class InOutController extends Controller return $cache->get(); } - $expenses = $helper->getExpenseReport($start, $end, $accounts); + // get all expenses for the given accounts in the given period! + // also transfers! + // get all transactions: + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end); + $collector->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER]) + ->withOpposingAccount() + ->enableInternalFilter(); + $transactions = $collector->getJournals(); + $transactions = $transactions->filter( + function (Transaction $transaction) { + // return negative amounts only. + if (bccomp($transaction->transaction_amount, '0') === -1) { + return $transaction; + } + + return false; + } + ); + $expenses = $this->groupByOpposing($transactions); + + // sort the result + // Obtain a list of columns + $sum = []; + foreach ($expenses as $accountId => $row) { + $sum[$accountId] = floatval($row['sum']); + } + + // Sort the data with volume descending, edition ascending + // Add $data as the last parameter, to sort by the common key + array_multisort($sum, SORT_ASC, $expenses); $result = view('reports.partials.expenses', compact('expenses'))->render(); $cache->store($result); @@ -104,16 +137,64 @@ class InOutController extends Controller $cache->addProperty('income-report'); $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { - return $cache->get(); + //return $cache->get(); } - $incomes = $helper->getIncomeReport($start, $end, $accounts); + // get all expenses for the given accounts in the given period! + // also transfers! + // get all transactions: + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end); + $collector->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER]) + ->withOpposingAccount() + ->enableInternalFilter(); + $transactions = $collector->getJournals(); + $transactions = $transactions->filter( + function (Transaction $transaction) { + // return positive amounts only. + if (bccomp($transaction->transaction_amount, '0') === 1) { + return $transaction; + } - $result = view('reports.partials.income', compact('incomes'))->render(); + return false; + } + ); + $income = $this->groupByOpposing($transactions); + + $result = view('reports.partials.income', compact('income'))->render(); $cache->store($result); return $result; } + /** + * @param Collection $transactions + * + * @return array + */ + private function groupByOpposing(Collection $transactions): array + { + $expenses = []; + // join the result together: + foreach ($transactions as $transaction) { + $opposingId = $transaction->opposing_account_id; + $name = $transaction->opposing_account_name; + if (!isset($expenses[$opposingId])) { + $expenses[$opposingId] = [ + 'id' => $opposingId, + 'name' => $name, + 'sum' => '0', + 'count' => 0, + ]; + } + $expenses[$opposingId]['sum'] = bcadd($expenses[$opposingId]['sum'], $transaction->transaction_amount); + $expenses[$opposingId]['count']++; + } + + + return $expenses; + } + } \ No newline at end of file diff --git a/resources/views/reports/partials/expenses.twig b/resources/views/reports/partials/expenses.twig index f3cf12e4aa..e1d7956087 100644 --- a/resources/views/reports/partials/expenses.twig +++ b/resources/views/reports/partials/expenses.twig @@ -1,6 +1,8 @@ - {% for expense in expenses.getExpenses %} + {% set sum = 0 %} + {% for expense in expenses %} + {% set sum = sum + expense.sum %} {% if loop.index > listLength %} {% else %} @@ -18,13 +20,13 @@ {% endif %} {% endfor %} - {% if expenses.getExpenses|length > listLength %} + {% if expenses|length > listLength %} - +
    - {{ (expense.amount)|formatAmount }} + {{ (expense.sum)|formatAmount }}
    {{ trans('firefly.show_full_list',{number:incomeTopLength}) }} @@ -33,7 +35,7 @@ {% endif %}
    {{ 'sum'|_ }}{{ (expenses.getTotal)|formatAmount }}{{ (sum)|formatAmount }}
    diff --git a/resources/views/reports/partials/income.twig b/resources/views/reports/partials/income.twig index 3428b0a33a..be2e37dcd0 100644 --- a/resources/views/reports/partials/income.twig +++ b/resources/views/reports/partials/income.twig @@ -1,30 +1,32 @@ - {% for income in incomes.getIncomes %} + {% set sum = 0 %} + {% for row in income %} + {% set sum = sum + row.sum %} {% if loop.index > listLength %} {% else %} {% endif %} - + {% endfor %} - {% if incomes.getIncomes|length > listLength %} + {% if income|length > listLength %} - +
    - {{ income.name }} - {% if income.count > 1 %} + {{ row.name }} + {% if row.count > 1 %}
    - {{ income.count }} {{ 'transactions'|_|lower }} + {{ row.count }} {{ 'transactions'|_|lower }} + data-account-id="{{ row.id }}"> {% endif %}
    {{ income.amount|formatAmount }}{{ row.sum|formatAmount }}
    {{ trans('firefly.show_full_list',{ number:listLength } ) }} @@ -33,7 +35,7 @@ {% endif %}
    {{ 'sum'|_ }}{{ incomes.getTotal|formatAmount }}{{ sum|formatAmount }}
    From b1ef225bd09513d0cde4b449b4f0385086284fe4 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 5 Dec 2016 20:35:13 +0100 Subject: [PATCH 069/110] Also fix income/expenses sum --- .../Controllers/Report/InOutController.php | 159 ++++++++++++------ .../reports/partials/income-vs-expenses.twig | 6 +- 2 files changed, 108 insertions(+), 57 deletions(-) diff --git a/app/Http/Controllers/Report/InOutController.php b/app/Http/Controllers/Report/InOutController.php index faaf7256d8..2190e60f87 100644 --- a/app/Http/Controllers/Report/InOutController.php +++ b/app/Http/Controllers/Report/InOutController.php @@ -49,7 +49,96 @@ class InOutController extends Controller if ($cache->has()) { return $cache->get(); } + $expenses = $this->getExpenseReport($start, $end, $accounts); + $result = view('reports.partials.expenses', compact('expenses'))->render(); + $cache->store($result); + return $result; + + } + + /** + * @param ReportHelperInterface $helper + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts + * + * @return \Illuminate\Http\JsonResponse + */ + public function incExpReport(ReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) + { + // chart properties for cache: + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('inc-exp-report'); + $cache->addProperty($accounts->pluck('id')->toArray()); + if ($cache->has()) { + return $cache->get(); + } + + $incomes = $this->getIncomeReport($start, $end, $accounts); + $expenses = $this->getExpenseReport($start, $end, $accounts); + $incomeSum = array_sum( + array_map( + function ($item) { + return $item['sum']; + }, $incomes + ) + ); + + $expensesSum = array_sum( + array_map( + function ($item) { + return $item['sum']; + }, $expenses + ) + ); + + $result = view('reports.partials.income-vs-expenses', compact('incomeSum', 'expensesSum'))->render(); + $cache->store($result); + + return $result; + + } + + /** + * @param ReportHelperInterface $helper + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts + * + * @return \Illuminate\Http\JsonResponse + */ + public function incomeReport(ReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) + { + // chart properties for cache: + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('income-report'); + $cache->addProperty($accounts->pluck('id')->toArray()); + if ($cache->has()) { + //return $cache->get(); + } + $income = $this->getIncomeReport($start, $end, $accounts); + + $result = view('reports.partials.income', compact('income'))->render(); + $cache->store($result); + + return $result; + + } + + /** + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts + * + * @return array + */ + private function getExpenseReport(Carbon $start, Carbon $end, Collection $accounts): array + { // get all expenses for the given accounts in the given period! // also transfers! // get all transactions: @@ -83,63 +172,18 @@ class InOutController extends Controller // Add $data as the last parameter, to sort by the common key array_multisort($sum, SORT_ASC, $expenses); - $result = view('reports.partials.expenses', compact('expenses'))->render(); - $cache->store($result); - - return $result; - + return $expenses; } /** - * @param ReportHelperInterface $helper - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts * - * @return \Illuminate\Http\JsonResponse + * @return array */ - public function incExpReport(ReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) + private function getIncomeReport(Carbon $start, Carbon $end, Collection $accounts): array { - // chart properties for cache: - $cache = new CacheProperties; - $cache->addProperty($start); - $cache->addProperty($end); - $cache->addProperty('inc-exp-report'); - $cache->addProperty($accounts->pluck('id')->toArray()); - if ($cache->has()) { - return $cache->get(); - } - - $incomes = $helper->getIncomeReport($start, $end, $accounts); - $expenses = $helper->getExpenseReport($start, $end, $accounts); - - $result = view('reports.partials.income-vs-expenses', compact('expenses', 'incomes'))->render(); - $cache->store($result); - - return $result; - - } - - /** - * @param ReportHelperInterface $helper - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return \Illuminate\Http\JsonResponse - */ - public function incomeReport(ReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) - { - // chart properties for cache: - $cache = new CacheProperties; - $cache->addProperty($start); - $cache->addProperty($end); - $cache->addProperty('income-report'); - $cache->addProperty($accounts->pluck('id')->toArray()); - if ($cache->has()) { - //return $cache->get(); - } - // get all expenses for the given accounts in the given period! // also transfers! // get all transactions: @@ -162,11 +206,18 @@ class InOutController extends Controller ); $income = $this->groupByOpposing($transactions); - $result = view('reports.partials.income', compact('income'))->render(); - $cache->store($result); + // sort the result + // Obtain a list of columns + $sum = []; + foreach ($income as $accountId => $row) { + $sum[$accountId] = floatval($row['sum']); + } - return $result; + // Sort the data with volume descending, edition ascending + // Add $data as the last parameter, to sort by the common key + array_multisort($sum, SORT_ASC, $income); + return $income; } /** diff --git a/resources/views/reports/partials/income-vs-expenses.twig b/resources/views/reports/partials/income-vs-expenses.twig index b9c9d0f5f5..12fb1928f7 100644 --- a/resources/views/reports/partials/income-vs-expenses.twig +++ b/resources/views/reports/partials/income-vs-expenses.twig @@ -1,14 +1,14 @@ - + - + - +
    {{ 'in'|_ }}{{ incomes.getTotal|formatAmount }}{{ incomeSum|formatAmount }}
    {{ 'out'|_ }}{{ (expenses.getTotal)|formatAmount }}{{ expensesSum|formatAmount }}
    {{ 'difference'|_ }}{{ (incomes.getTotal + expenses.getTotal)|formatAmount }}{{ (incomeSum + expensesSum)|formatAmount }}
    From 344916d57e2919d16f7d46bd766126c4f3dc83ce Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 5 Dec 2016 20:39:17 +0100 Subject: [PATCH 070/110] Catch encrypted opposing accounts. [skip ci] --- app/Helpers/Collector/JournalCollector.php | 9 +++++++++ app/Http/Controllers/Report/InOutController.php | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/Helpers/Collector/JournalCollector.php b/app/Helpers/Collector/JournalCollector.php index 7816e1a61c..c4b3e8d3aa 100644 --- a/app/Helpers/Collector/JournalCollector.php +++ b/app/Helpers/Collector/JournalCollector.php @@ -16,6 +16,7 @@ use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\User; +use Illuminate\Contracts\Encryption\DecryptException; use Illuminate\Database\Eloquent\Builder as EloquentBuilder; use Illuminate\Database\Query\JoinClause; use Illuminate\Pagination\LengthAwarePaginator; @@ -171,6 +172,14 @@ class JournalCollector implements JournalCollectorInterface $transaction->date = new Carbon($transaction->date); $transaction->description = intval($transaction->encrypted) === 1 ? Crypt::decrypt($transaction->description) : $transaction->description; $transaction->bill_name = !is_null($transaction->bill_name) ? Crypt::decrypt($transaction->bill_name) : ''; + + // optionally decrypted: + try { + $transaction->opposing_account_name = Crypt::decrypt($transaction->opposing_account_name); + } catch (DecryptException $e) { + // if this fails its already decrypted. + } + } ); diff --git a/app/Http/Controllers/Report/InOutController.php b/app/Http/Controllers/Report/InOutController.php index 2190e60f87..7e5ee6bc95 100644 --- a/app/Http/Controllers/Report/InOutController.php +++ b/app/Http/Controllers/Report/InOutController.php @@ -77,8 +77,8 @@ class InOutController extends Controller return $cache->get(); } - $incomes = $this->getIncomeReport($start, $end, $accounts); - $expenses = $this->getExpenseReport($start, $end, $accounts); + $incomes = $this->getIncomeReport($start, $end, $accounts); + $expenses = $this->getExpenseReport($start, $end, $accounts); $incomeSum = array_sum( array_map( function ($item) { From d91b9e71d510029ea9d8f53cd50fdc372990ae93 Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 5 Dec 2016 20:44:20 +0100 Subject: [PATCH 071/110] Remove unused code. --- app/Helpers/Report/ReportHelper.php | 51 ------ app/Helpers/Report/ReportHelperInterface.php | 22 --- app/Repositories/Account/AccountTasker.php | 146 ------------------ .../Account/AccountTaskerInterface.php | 26 ---- 4 files changed, 245 deletions(-) diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index 53e1a28fb9..e75c49ae79 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -136,57 +136,6 @@ class ReportHelper implements ReportHelperInterface return $object; } - /** - * Get a full report on the users expenses during the period for a list of accounts. - * - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return Expense - */ - public function getExpenseReport(Carbon $start, Carbon $end, Collection $accounts): Expense - { - $object = new Expense; - - /** @var AccountTaskerInterface $tasker */ - $tasker = app(AccountTaskerInterface::class); - $collection = $tasker->expenseReport($accounts, $accounts, $start, $end); - - /** @var stdClass $entry */ - foreach ($collection as $entry) { - $object->addToTotal($entry->amount); - $object->addOrCreateExpense($entry); - } - - return $object; - } - - /** - * Get a full report on the users incomes during the period for the given accounts. - * - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return Income - */ - public function getIncomeReport(Carbon $start, Carbon $end, Collection $accounts): Income - { - $object = new Income; - /** @var AccountTaskerInterface $tasker */ - $tasker = app(AccountTaskerInterface::class); - $collection = $tasker->incomeReport($accounts, $accounts, $start, $end); - - /** @var stdClass $entry */ - foreach ($collection as $entry) { - $object->addToTotal($entry->amount); - $object->addOrCreateIncome($entry); - } - - return $object; - } - /** * @param Carbon $date * diff --git a/app/Helpers/Report/ReportHelperInterface.php b/app/Helpers/Report/ReportHelperInterface.php index 47af08976b..a4ec6ad874 100644 --- a/app/Helpers/Report/ReportHelperInterface.php +++ b/app/Helpers/Report/ReportHelperInterface.php @@ -51,28 +51,6 @@ interface ReportHelperInterface */ public function getCategoryReport(Carbon $start, Carbon $end, Collection $accounts): CategoryCollection; - /** - * Get a full report on the users expenses during the period for a list of accounts. - * - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return Expense - */ - public function getExpenseReport(Carbon $start, Carbon $end, Collection $accounts): Expense; - - /** - * Get a full report on the users incomes during the period for the given accounts. - * - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return Income - */ - public function getIncomeReport(Carbon $start, Carbon $end, Collection $accounts): Income; - /** * @param Carbon $date * diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index 691181b40f..b485fed700 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -105,35 +105,6 @@ class AccountTasker implements AccountTaskerInterface } - /** - * @param Collection $accounts - * @param Collection $excluded - * @param Carbon $start - * @param Carbon $end - * - * @return Collection - * @see self::financialReport - * - */ - public function expenseReport(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): Collection - { - $idList = [ - 'accounts' => $accounts->pluck('id')->toArray(), - 'exclude' => $excluded->pluck('id')->toArray(), - ]; - - Log::debug( - 'Now calling expenseReport.', - ['accounts' => $idList['accounts'], 'excluded' => $idList['exclude'], - 'start' => $start->format('Y-m-d'), - 'end' => $end->format('Y-m-d'), - ] - ); - - return $this->financialReport($idList, $start, $end, false); - - } - /** * @param Carbon $start * @param Carbon $end @@ -190,35 +161,6 @@ class AccountTasker implements AccountTaskerInterface return $object; } - /** - * @param Collection $accounts - * @param Collection $excluded - * @param Carbon $start - * @param Carbon $end - * - * @see AccountTasker::financialReport() - * - * @return Collection - * - */ - public function incomeReport(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): Collection - { - $idList = [ - 'accounts' => $accounts->pluck('id')->toArray(), - 'exclude' => $excluded->pluck('id')->toArray(), - ]; - - Log::debug( - 'Now calling expenseReport.', - ['accounts' => $idList['accounts'], 'excluded' => $idList['exclude'], - 'start' => $start->format('Y-m-d'), - 'end' => $end->format('Y-m-d'), - ] - ); - - return $this->financialReport($idList, $start, $end, true); - } - /** * Will return how much money has been going out (ie. spent) by the given account(s). * Alternatively, will return how much money has been coming in (ie. earned) by the given accounts. @@ -278,92 +220,4 @@ class AccountTasker implements AccountTaskerInterface return $sum; } - /** - * - * This method will determin how much has flown (in the given period) from OR to $accounts to/from anywhere else, - * except $excluded. This could be a list of incomes, or a list of expenses. This method shows - * the name, the amount and the number of transactions. It is a summary, and only used in some reports. - * - * $incoming=true a list of incoming money (earnings) - * $incoming=false a list of outgoing money (expenses). - * - * @param array $accounts - * @param Carbon $start - * @param Carbon $end - * @param bool $incoming - * - * Opening balances are ignored. - * - * @return Collection - */ - protected function financialReport(array $accounts, Carbon $start, Carbon $end, bool $incoming): Collection - { - $collection = new Collection; - $joinModifier = $incoming ? '<' : '>'; - $selection = $incoming ? '>' : '<'; - $query = Transaction::distinct() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->leftJoin('transaction_types', 'transaction_journals.transaction_type_id', '=', 'transaction_types.id') - ->leftJoin( - 'transactions as other_side', function (JoinClause $join) use ($joinModifier) { - $join->on('transaction_journals.id', '=', 'other_side.transaction_journal_id')->where( - 'other_side.amount', $joinModifier, 0 - ); - } - ) - ->leftJoin('accounts as other_account', 'other_account.id', '=', 'other_side.account_id') - ->where('transaction_types.type', '!=', TransactionType::OPENING_BALANCE) - ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) - ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) - ->where('transaction_journals.user_id', $this->user->id) - ->whereNull('transactions.deleted_at') - ->whereNull('other_side.deleted_at') - ->whereNull('transaction_journals.deleted_at') - ->whereIn('transactions.account_id', $accounts['accounts']) - ->where('other_side.amount', '=', DB::raw('transactions.amount * -1')) - ->where('transactions.amount', $selection, 0) - ->orderBy('transactions.amount'); - - if (count($accounts['exclude']) > 0) { - $query->whereNotIn('other_side.account_id', $accounts['exclude']); - } - $set = $query->get( - [ - 'transaction_journals.id', - 'other_side.account_id', - 'other_account.name', - 'other_account.encrypted', - 'transactions.amount', - ] - ); - // summarize ourselves: - $temp = []; - foreach ($set as $entry) { - // save into $temp: - $id = intval($entry->account_id); - if (isset($temp[$id])) { - $temp[$id]['count']++; - $temp[$id]['amount'] = bcadd($temp[$id]['amount'], $entry->amount); - } - if (!isset($temp[$id])) { - $temp[$id] = [ - 'name' => intval($entry->encrypted) === 1 ? Crypt::decrypt($entry->name) : $entry->name, - 'amount' => $entry->amount, - 'count' => 1, - ]; - } - } - - // loop $temp and create collection: - foreach ($temp as $key => $entry) { - $object = new stdClass(); - $object->id = $key; - $object->name = $entry['name']; - $object->count = $entry['count']; - $object->amount = $entry['amount']; - $collection->push($object); - } - - return $collection; - } } diff --git a/app/Repositories/Account/AccountTaskerInterface.php b/app/Repositories/Account/AccountTaskerInterface.php index dbf1892667..4e023abeac 100644 --- a/app/Repositories/Account/AccountTaskerInterface.php +++ b/app/Repositories/Account/AccountTaskerInterface.php @@ -49,19 +49,6 @@ interface AccountTaskerInterface */ public function amountOutInPeriod(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): string; - /** - * @param Collection $accounts - * @param Collection $excluded - * @param Carbon $start - * @param Carbon $end - * - * @see AccountTasker::financialReport() - * - * @return Collection - * - */ - public function expenseReport(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): Collection; - /** * @param Carbon $start * @param Carbon $end @@ -71,17 +58,4 @@ interface AccountTaskerInterface */ public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection; - /** - * @param Collection $accounts - * @param Collection $excluded - * @param Carbon $start - * @param Carbon $end - * - * @see AccountTasker::financialReport() - * - * @return Collection - * - */ - public function incomeReport(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): Collection; - } From 6b56c2bf7cc3154c24e658f6d7e505878e7c819d Mon Sep 17 00:00:00 2001 From: James Cole Date: Mon, 5 Dec 2016 21:58:23 +0100 Subject: [PATCH 072/110] Many new renamed routes that will break half of Firefly. --- app/Helpers/Collector/JournalCollector.php | 10 + .../Controllers/PreferencesController.php | 6 +- app/Http/Controllers/ProfileController.php | 2 +- app/Http/breadcrumbs.php | 14 +- ...10_09_150037_expand_transactions_table.php | 9 + .../2016_10_22_075804_changes_for_v410.php | 9 + .../2016_11_24_210552_changes_for_v420.php | 9 + resources/views/partials/menu-sidebar.twig | 4 +- resources/views/transactions/create.twig | 2 +- resources/views/transactions/edit-split.twig | 2 +- resources/views/transactions/edit.twig | 2 +- routes/web.php | 539 ++++++++++-------- tests/ExampleTest.php | 9 + tests/TestCase.php | 9 + 14 files changed, 358 insertions(+), 268 deletions(-) diff --git a/app/Helpers/Collector/JournalCollector.php b/app/Helpers/Collector/JournalCollector.php index c4b3e8d3aa..eafacdc363 100644 --- a/app/Helpers/Collector/JournalCollector.php +++ b/app/Helpers/Collector/JournalCollector.php @@ -1,4 +1,14 @@ parent('home'); - $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences')); + $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences.index')); } ); @@ -414,7 +414,7 @@ Breadcrumbs::register( Breadcrumbs::register( 'preferences.code', function (BreadCrumbGenerator $breadcrumbs) { $breadcrumbs->parent('home'); - $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences')); + $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences.index')); } ); @@ -423,22 +423,22 @@ Breadcrumbs::register( * PROFILE */ Breadcrumbs::register( - 'profile', function (BreadCrumbGenerator $breadcrumbs) { + 'profile.index', function (BreadCrumbGenerator $breadcrumbs) { $breadcrumbs->parent('home'); - $breadcrumbs->push(trans('breadcrumbs.profile'), route('profile')); + $breadcrumbs->push(trans('breadcrumbs.profile'), route('profile.index')); } ); Breadcrumbs::register( 'profile.change-password', function (BreadCrumbGenerator $breadcrumbs) { - $breadcrumbs->parent('profile'); + $breadcrumbs->parent('profile.index'); $breadcrumbs->push(trans('breadcrumbs.changePassword'), route('profile.change-password')); } ); Breadcrumbs::register( 'profile.delete-account', function (BreadCrumbGenerator $breadcrumbs) { - $breadcrumbs->parent('profile'); + $breadcrumbs->parent('profile.index'); $breadcrumbs->push(trans('firefly.delete_account'), route('profile.delete-account')); } diff --git a/database/migrations/2016_10_09_150037_expand_transactions_table.php b/database/migrations/2016_10_09_150037_expand_transactions_table.php index ca363bc451..933bca5545 100644 --- a/database/migrations/2016_10_09_150037_expand_transactions_table.php +++ b/database/migrations/2016_10_09_150037_expand_transactions_table.php @@ -1,4 +1,13 @@
  • - {{ 'profile'|_ }} + {{ 'profile'|_ }}
  • - {{ 'preferences'|_ }} + {{ 'preferences'|_ }}
  • {{ 'currencies'|_ }} diff --git a/resources/views/transactions/create.twig b/resources/views/transactions/create.twig index 38c961ccc0..ac232f8b0b 100644 --- a/resources/views/transactions/create.twig +++ b/resources/views/transactions/create.twig @@ -94,7 +94,7 @@ not optionalFields.notes or not optionalFields.attachments %}

    - {{ trans('firefly.hidden_fields_preferences', {link: route('preferences')})|raw }}

    + {{ trans('firefly.hidden_fields_preferences', {link: route('preferences.index')})|raw }}

    {% endif %} diff --git a/resources/views/transactions/edit-split.twig b/resources/views/transactions/edit-split.twig index 1ceb75baf3..b43d250629 100644 --- a/resources/views/transactions/edit-split.twig +++ b/resources/views/transactions/edit-split.twig @@ -95,7 +95,7 @@ not optionalFields.notes or not optionalFields.attachments %}

    - {{ trans('firefly.hidden_fields_preferences', {link: route('preferences')})|raw }}

    + {{ trans('firefly.hidden_fields_preferences', {link: route('preferences.index')})|raw }}

    {% endif %} {# BOX FOR DATES #} diff --git a/resources/views/transactions/edit.twig b/resources/views/transactions/edit.twig index edf11ef10b..2c167d078e 100644 --- a/resources/views/transactions/edit.twig +++ b/resources/views/transactions/edit.twig @@ -100,7 +100,7 @@ not optionalFields.notes or not optionalFields.attachments %}

    - {{ trans('firefly.hidden_fields_preferences', {link: route('preferences')})|raw }}

    + {{ trans('firefly.hidden_fields_preferences', {link: route('preferences.index')})|raw }}

    {% endif %} diff --git a/routes/web.php b/routes/web.php index 2185355826..6017f45300 100755 --- a/routes/web.php +++ b/routes/web.php @@ -1,10 +1,12 @@ 'user-logged-in-2fa-no-activation'], function () { - // Route::get('/confirm-your-account', ['uses' => 'Auth\ConfirmationController@confirmationError', 'as' => 'confirmation_error']); Route::get('/resend-confirmation', ['uses' => 'Auth\ConfirmationController@resendConfirmation', 'as' => 'resend_confirmation']); Route::get('/confirmation/{code}', ['uses' => 'Auth\ConfirmationController@doConfirmation', 'as' => 'do_confirm_account']); @@ -73,12 +74,12 @@ Route::group( /** * For all other routes, the user must be fully authenticated and have an activated account. */ + +/** + * Home Controller + */ Route::group( ['middleware' => ['user-full-auth']], function () { - - /** - * Home Controller - */ Route::get('/', ['uses' => 'HomeController@index', 'as' => 'index']); Route::get('/flash', ['uses' => 'HomeController@testFlash', 'as' => 'testFlash']); Route::get('/home', ['uses' => 'HomeController@index', 'as' => 'home']); @@ -92,12 +93,11 @@ Route::group( */ Route::group( ['middleware' => 'user-full-auth', 'prefix' => 'accounts', 'as' => 'accounts.'], function () { - Route::get('{what}', ['uses' => 'AccountController@index', 'as' => 'index'])->where('what', 'revenue|asset|expense'); Route::get('create/{what}', ['uses' => 'AccountController@create', 'as' => 'create'])->where('what', 'revenue|asset|expense'); Route::get('edit/{account}', ['uses' => 'AccountController@edit', 'as' => 'edit']); Route::get('delete/{account}', ['uses' => 'AccountController@delete', 'as' => 'delete']); - Route::get('show/{account}', ['uses' => 'AccountController@show', 'as' => 'show']); // consistent + Route::get('show/{account}', ['uses' => 'AccountController@show', 'as' => 'show']); Route::get('show/{account}/all', ['uses' => 'AccountController@showAll', 'as' => 'show.all']); Route::get('show/{account}/{date}', ['uses' => 'AccountController@showWithDate', 'as' => 'show.date']); @@ -128,8 +128,7 @@ Route::group( * Bills Controller */ Route::group( - ['middleware' => 'user-full-auth', 'prefix' => 'bills','as' => 'bills.'], function () { - + ['middleware' => 'user-full-auth', 'prefix' => 'bills', 'as' => 'bills.'], function () { Route::get('', ['uses' => 'BillController@index', 'as' => 'index']); Route::get('rescan/{bill}', ['uses' => 'BillController@rescan', 'as' => 'rescan']); Route::get('create', ['uses' => 'BillController@create', 'as' => 'create']); @@ -140,59 +139,58 @@ Route::group( Route::post('update/{bill}', ['uses' => 'BillController@update', 'as' => 'update']); Route::post('destroy/{bill}', ['uses' => 'BillController@destroy', 'as' => 'destroy']); -}); +} +); /** * Budget Controller */ Route::group( - ['middleware' => 'user-full-auth', 'prefix' => 'budgets','as' => 'budgets.'], function () { - + ['middleware' => 'user-full-auth', 'prefix' => 'budgets', 'as' => 'budgets.'], function () { Route::get('', ['uses' => 'BudgetController@index', 'as' => 'index']); Route::get('income', ['uses' => 'BudgetController@updateIncome', 'as' => 'income']); Route::get('create', ['uses' => 'BudgetController@create', 'as' => 'create']); Route::get('edit/{budget}', ['uses' => 'BudgetController@edit', 'as' => 'edit']); Route::get('delete/{budget}', ['uses' => 'BudgetController@delete', 'as' => 'delete']); - - Route::get('show/{budget}', ['uses' => 'BudgetController@show', 'as' => 'show']); // consistent + Route::get('show/{budget}', ['uses' => 'BudgetController@show', 'as' => 'show']); Route::get('show/{budget}/{limitrepetition}', ['uses' => 'BudgetController@showWithRepetition', 'as' => 'showWithRepetition']); Route::get('list/noBudget', ['uses' => 'BudgetController@noBudget', 'as' => 'noBudget']); - Route::post('income', ['uses' => 'BudgetController@postUpdateIncome', 'as' => 'postIncome']); // consistent + Route::post('income', ['uses' => 'BudgetController@postUpdateIncome', 'as' => 'postIncome']); Route::post('store', ['uses' => 'BudgetController@store', 'as' => 'store']); Route::post('update/{budget}', ['uses' => 'BudgetController@update', 'as' => 'update']); Route::post('destroy/{budget}', ['uses' => 'BudgetController@destroy', 'as' => 'destroy']); Route::post('amount/{budget}', ['uses' => 'BudgetController@amount']); -}); +} +); /** * Category Controller */ Route::group( - ['middleware' => 'user-full-auth', 'prefix' => 'categories','as' => 'categories.'], function () { - + ['middleware' => 'user-full-auth', 'prefix' => 'categories', 'as' => 'categories.'], function () { Route::get('', ['uses' => 'CategoryController@index', 'as' => 'index']); Route::get('create', ['uses' => 'CategoryController@create', 'as' => 'create']); Route::get('edit/{category}', ['uses' => 'CategoryController@edit', 'as' => 'edit']); Route::get('delete/{category}', ['uses' => 'CategoryController@delete', 'as' => 'delete']); - Route::get('show/{category}', ['uses' => 'CategoryController@show', 'as' => 'show']); // consistent + Route::get('show/{category}', ['uses' => 'CategoryController@show', 'as' => 'show']); Route::get('show/{category}/{date}', ['uses' => 'CategoryController@showWithDate', 'as' => 'show.date']); Route::get('list/noCategory', ['uses' => 'CategoryController@noCategory', 'as' => 'noCategory']); Route::post('store', ['uses' => 'CategoryController@store', 'as' => 'store']); Route::post('update/{category}', ['uses' => 'CategoryController@update', 'as' => 'update']); Route::post('destroy/{category}', ['uses' => 'CategoryController@destroy', 'as' => 'destroy']); -}); +} +); /** * Currency Controller */ Route::group( - ['middleware' => 'user-full-auth', 'prefix' => 'currencies','as' => 'currencies.'], function () { - + ['middleware' => 'user-full-auth', 'prefix' => 'currencies', 'as' => 'currencies.'], function () { Route::get('', ['uses' => 'CurrencyController@index', 'as' => 'index']); Route::get('create', ['uses' => 'CurrencyController@create', 'as' => 'create']); Route::get('edit/{currency}', ['uses' => 'CurrencyController@edit', 'as' => 'edit']); @@ -203,238 +201,285 @@ Route::group( Route::post('update/{currency}', ['uses' => 'CurrencyController@update', 'as' => 'update']); Route::post('destroy/{currency}', ['uses' => 'CurrencyController@destroy', 'as' => 'destroy']); -}); +} +); /** * Export Controller */ Route::group( - ['middleware' => 'user-full-auth', 'prefix' => 'export','as' => 'export.'], function () { - + ['middleware' => 'user-full-auth', 'prefix' => 'export', 'as' => 'export.'], function () { Route::get('', ['uses' => 'ExportController@index', 'as' => 'index']); Route::get('status/{jobKey}', ['uses' => 'ExportController@getStatus', 'as' => 'status']); Route::get('download/{jobKey}', ['uses' => 'ExportController@download', 'as' => 'download']); Route::post('submit', ['uses' => 'ExportController@postIndex', 'as' => 'export']); -}); +} +); + +/** + * Chart\Account Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/account', 'as' => 'chart.account.'], function () { + Route::get('frontpage', ['uses' => 'AccountController@frontpage', 'as' => 'frontpage']); + Route::get('expense', ['uses' => 'AccountController@expenseAccounts', 'as' => 'expense']); + Route::get('revenue', ['uses' => 'AccountController@revenueAccounts', 'as' => 'revenue']); + Route::get('report/default/{start_date}/{end_date}/{accountList}', ['uses' => 'AccountController@report', 'as' => 'report']); + Route::get('{account}', ['uses' => 'AccountController@single', 'as' => 'single']); + Route::get('{account}/{date}', ['uses' => 'AccountController@specificPeriod', 'as' => 'specific-period']); + + Route::get('income-by-category/{account}/{start_date}/{end_date}', ['uses' => 'AccountController@incomeByCategory', 'as' => 'incomeByCategory']); + Route::get('expense-by-category/{account}/{start_date}/{end_date}', ['uses' => 'AccountController@expenseByCategory', 'as' => 'expenseByCategory']); + Route::get('expense-by-budget/{account}/{start_date}/{end_date}', ['uses' => 'AccountController@expenseByBudget', 'as' => 'expenseByBudget']); + +} +); + +/** + * Chart\Bill Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/bill'], function () { + Route::get('frontpage', ['uses' => 'BillController@frontpage']); + Route::get('{bill}', ['uses' => 'BillController@single']); + +} +); + +/** + * Chart\Budget Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/budget'], function () { + Route::get('frontpage', ['uses' => 'BudgetController@frontpage']); + Route::get('period/0/default/{start_date}/{end_date}/{accountList}', ['uses' => 'BudgetController@periodNoBudget']); + Route::get('period/{budget}/default/{start_date}/{end_date}/{accountList}', ['uses' => 'BudgetController@period']); + Route::get('{budget}/{limitrepetition}', ['uses' => 'BudgetController@budgetLimit']); + Route::get('{budget}', ['uses' => 'BudgetController@budget']); + +} +); + +/** + * Chart\Category Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/category'], function () { + Route::get('frontpage', ['uses' => 'CategoryController@frontpage']); + Route::get('{category}/period', ['uses' => 'CategoryController@currentPeriod']); + Route::get('{category}/period/{date}', ['uses' => 'CategoryController@specificPeriod']); + Route::get('{category}/all', ['uses' => 'CategoryController@all']); + Route::get('{category}/report-period/{start_date}/{end_date}/{accountList}', ['uses' => 'CategoryController@reportPeriod']); + + // these charts are used in reports (category reports): + Route::get('{accountList}/{categoryList}/{start_date}/{end_date}/{others}/income', ['uses' => 'CategoryReportController@categoryIncome']); + Route::get('{accountList}/{categoryList}/{start_date}/{end_date}/{others}/expense', ['uses' => 'CategoryReportController@categoryExpense']); + Route::get('{accountList}/{categoryList}/{start_date}/{end_date}/{others}/income', ['uses' => 'CategoryReportController@accountIncome']); + Route::get('{accountList}/{categoryList}/{start_date}/{end_date}/{others}/expense', ['uses' => 'CategoryReportController@accountExpense']); + Route::get('report-in-out/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryReportController@mainChart']); + +} +); + +/** + * Chart\PiggyBank Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/piggy-bank'], function () { + Route::get('{piggyBank}', ['uses' => 'PiggyBankController@history']); +} +); + +/** + * Chart\Report Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/report'], function () { + Route::get('in-out/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@yearInOut']); + Route::get('in-out-sum/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@yearInOutSummarized']); + Route::get('net-worth/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@netWorth']); + +} +); + +/** + * Import Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'import', 'as' => 'import.'], function () { + Route::get('', ['uses' => 'ImportController@index', 'as' => 'index']); + Route::get('configure/{importJob}', ['uses' => 'ImportController@configure', 'as' => 'configure']); + Route::get('settings/{importJob}', ['uses' => 'ImportController@settings', 'as' => 'settings']); + Route::get('complete/{importJob}', ['uses' => 'ImportController@complete', 'as' => 'complete']); + Route::get('download/{importJob}', ['uses' => 'ImportController@download', 'as' => 'download']); + Route::get('status/{importJob}', ['uses' => 'ImportController@status', 'as' => 'status']); + Route::get('json/{importJob}', ['uses' => 'ImportController@json', 'as' => 'json']); + Route::get('finished/{importJob}', ['uses' => 'ImportController@finished', 'as' => 'finished']); + + Route::post('upload', ['uses' => 'ImportController@upload', 'as' => 'upload']); + Route::post('configure/{importJob}', ['uses' => 'ImportController@postConfigure', 'as' => 'process_configuration']); + Route::post('settings/{importJob}', ['uses' => 'ImportController@postSettings', 'as' => 'postSettings']); + Route::post('start/{importJob}', ['uses' => 'ImportController@start', 'as' => 'start']); + + +} +); + +/** + * Help Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'help', 'as' => 'help.'], function () { + Route::get('{route}', ['uses' => 'HelpController@show', 'as' => 'show']); + +} +); + +/** + * JSON Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'json', 'as' => 'admin.'], function () { + Route::get('expense-accounts', ['uses' => 'JsonController@expenseAccounts', 'as' => 'expense-accounts']); + Route::get('revenue-accounts', ['uses' => 'JsonController@revenueAccounts', 'as' => 'revenue-accounts']); + Route::get('categories', ['uses' => 'JsonController@categories', 'as' => 'categories']); + Route::get('tags', ['uses' => 'JsonController@tags', 'as' => 'tags']); + Route::get('tour', ['uses' => 'JsonController@tour', 'as' => 'tour']); + Route::get('box/in', ['uses' => 'JsonController@boxIn', 'as' => 'box.in']); + Route::get('box/out', ['uses' => 'JsonController@boxOut', 'as' => 'box.out']); + Route::get('box/bills-unpaid', ['uses' => 'JsonController@boxBillsUnpaid', 'as' => 'box.paid']); + Route::get('box/bills-paid', ['uses' => 'JsonController@boxBillsPaid', 'as' => 'box.unpaid']); + Route::get('transaction-journals/{what}', 'JsonController@transactionJournals'); + Route::get('trigger', ['uses' => 'JsonController@trigger', 'as' => 'trigger']); + Route::get('action', ['uses' => 'JsonController@action', 'as' => 'action']); + + Route::post('end-tour', ['uses' => 'JsonController@endTour']); + +} +); + + +/** + * NewUser Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'new-user', 'as' => 'new-user.'], function () { + Route::get('', ['uses' => 'NewUserController@index', 'as' => 'index']); + Route::post('submit', ['uses' => 'NewUserController@submit', 'as' => 'submit']); +} +); + +/** + * Piggy Bank Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'piggy-banks', 'as' => 'piggy-banks.'], function () { + Route::get('', ['uses' => 'PiggyBankController@index', 'as' => 'index']); + Route::get('add/{piggyBank}', ['uses' => 'PiggyBankController@add', 'as' => 'addMoney']); + Route::get('remove/{piggyBank}', ['uses' => 'PiggyBankController@remove', 'as' => 'removeMoney']); + Route::get('add-money/{piggyBank}', ['uses' => 'PiggyBankController@addMobile', 'as' => 'add-money-mobile']); + Route::get('remove-money/{piggyBank}', ['uses' => 'PiggyBankController@removeMobile', 'as' => 'remove-money-mobile']); + Route::get('create', ['uses' => 'PiggyBankController@create', 'as' => 'create']); + Route::get('edit/{piggyBank}', ['uses' => 'PiggyBankController@edit', 'as' => 'edit']); + Route::get('delete/{piggyBank}', ['uses' => 'PiggyBankController@delete', 'as' => 'delete']); + Route::get('show/{piggyBank}', ['uses' => 'PiggyBankController@show', 'as' => 'show']); + Route::post('store', ['uses' => 'PiggyBankController@store', 'as' => 'store']); + Route::post('update/{piggyBank}', ['uses' => 'PiggyBankController@update', 'as' => 'update']); + Route::post('destroy/{piggyBank}', ['uses' => 'PiggyBankController@destroy', 'as' => 'destroy']); + Route::post('add/{piggyBank}', ['uses' => 'PiggyBankController@postAdd', 'as' => 'add']); + Route::post('remove/{piggyBank}', ['uses' => 'PiggyBankController@postRemove', 'as' => 'remove']); + Route::post('sort', ['uses' => 'PiggyBankController@order', 'as' => 'order']); + + +} +); + + +/** + * Name Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'preferences', 'as' => 'preferences.'], function () { + Route::get('', ['uses' => 'PreferencesController@index', 'as' => 'index']); + Route::get('/code', ['uses' => 'PreferencesController@code', 'as' => 'code']); + Route::get('/delete-code', ['uses' => 'PreferencesController@deleteCode', 'as' => 'delete-code']); + Route::post('', ['uses' => 'PreferencesController@postIndex', 'as' => 'update']); + Route::post('/code', ['uses' => 'PreferencesController@postCode', 'as' => 'code.store']); + +} +); + +/** + * Profile Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'profile', 'as' => 'profile.'], function () { + + Route::get('', ['uses' => 'ProfileController@index', 'as' => 'index']); + Route::get('change-password', ['uses' => 'ProfileController@changePassword', 'as' => 'change-password']); + Route::get('delete-account', ['uses' => 'ProfileController@deleteAccount', 'as' => 'delete-account']); + Route::post('delete-account', ['uses' => 'ProfileController@postDeleteAccount', 'as' => 'delete-account.post']); + Route::post('change-password', ['uses' => 'ProfileController@postChangePassword', 'as' => 'change-password.store']); +} +); + +/** + * Name Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'reports', 'as' => 'reports.'], function () { + + Route::get('', ['uses' => 'ReportController@index', 'as' => 'index']); + + + Route::get('options/{reportType}', ['uses' => 'ReportController@options', 'as' => 'options']); + Route::get('default/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@default', 'as' => 'report.default']); + Route::get('audit/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@audit', 'as' => 'report.audit']); + Route::get('category/{start_date}/{end_date}/{accountList}/{categoryList}', ['uses' => 'ReportController@category', 'as' => 'report.category']); + + Route::post('', ['uses' => 'ReportController@postIndex', 'as' => 'index.post']); +} +); + +/** + * Report Data AccountController + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/account', 'as' => 'report-data.account'], function () { + Route::get('general/{start_date}/{end_date}/{accountList}', ['uses' => 'AccountController@general', 'as' => 'general']); +} +); + +/** + * Report Data Income/Expenses Controller (called financial operations) + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/operations', 'as' => 'report-data.operations'], function () { + Route::get('operations/{start_date}/{end_date}/{accountList}', ['uses' => 'OperationsController@operations', 'as' => 'operations']); + Route::get('income/{start_date}/{end_date}/{accountList}', ['uses' => 'OperationsController@income', 'as' => 'income']); + Route::get('expenses/{start_date}/{end_date}/{accountList}', ['uses' => 'OperationsController@expenses', 'as' => 'expenses']); + +} +); + +/** + * Report Data Category Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/category', 'as' => 'report-data.category.'], function () { + Route::get('operations/{start_date}/{end_date}/{accountList}', ['uses' => 'CategoryController@operations', 'as' => 'operations']); + Route::get('income/{start_date}/{end_date}/{accountList}', ['uses' => 'CategoryController@income', 'as' => 'income']); + Route::get('expenses/{start_date}/{end_date}/{accountList}', ['uses' => 'CategoryController@expenses', 'as' => 'expense']); + +} +); + Route::group( ['middleware' => ['user-full-auth']], function () { - /** - * ALL CHART Controllers - */ - // accounts: - Route::get('/chart/account/frontpage', ['uses' => 'Chart\AccountController@frontpage']); - Route::get('/chart/account/expense', ['uses' => 'Chart\AccountController@expenseAccounts']); - Route::get('/chart/account/revenue', ['uses' => 'Chart\AccountController@revenueAccounts']); - Route::get('/chart/account/report/default/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\AccountController@report']); - Route::get('/chart/account/{account}', ['uses' => 'Chart\AccountController@single']); - Route::get('/chart/account/{account}/{date}', ['uses' => 'Chart\AccountController@specificPeriod']); - - Route::get( - '/chart/account/income-by-category/{account}/{start_date}/{end_date}', - ['uses' => 'Chart\AccountController@incomeByCategory', 'as' => 'chart.account.incomeByCategory'] - ); - Route::get( - '/chart/account/expense-by-category/{account}/{start_date}/{end_date}', - ['uses' => 'Chart\AccountController@expenseByCategory', 'as' => 'chart.account.expenseByCategory'] - ); - Route::get( - '/chart/account/expense-by-budget/{account}/{start_date}/{end_date}', - ['uses' => 'Chart\AccountController@expenseByBudget', 'as' => 'chart.account.expenseByBudget'] - ); - - - // bills: - Route::get('/chart/bill/frontpage', ['uses' => 'Chart\BillController@frontpage']); - Route::get('/chart/bill/{bill}', ['uses' => 'Chart\BillController@single']); - - // budgets: - Route::get('/chart/budget/frontpage', ['uses' => 'Chart\BudgetController@frontpage']); - Route::get('/chart/budget/period/0/default/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\BudgetController@periodNoBudget']); - Route::get('/chart/budget/period/{budget}/default/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\BudgetController@period']); - - // this chart is used in reports: - Route::get('/chart/budget/{budget}/{limitrepetition}', ['uses' => 'Chart\BudgetController@budgetLimit']); - Route::get('/chart/budget/{budget}', ['uses' => 'Chart\BudgetController@budget']); - - // categories: - Route::get('/chart/category/frontpage', ['uses' => 'Chart\CategoryController@frontpage']); - Route::get('/chart/category/{category}/period', ['uses' => 'Chart\CategoryController@currentPeriod']); - Route::get('/chart/category/{category}/period/{date}', ['uses' => 'Chart\CategoryController@specificPeriod']); - Route::get('/chart/category/{category}/all', ['uses' => 'Chart\CategoryController@all']); - Route::get('/chart/category/{category}/report-period/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\CategoryController@reportPeriod']); - - // these charts are used in reports (category reports): - Route::get( - '/chart/category/{accountList}/{categoryList}/{start_date}/{end_date}/{others}/income', - ['uses' => 'Chart\CategoryReportController@categoryIncome'] - ); - Route::get( - '/chart/category/{accountList}/{categoryList}/{start_date}/{end_date}/{others}/expense', - ['uses' => 'Chart\CategoryReportController@categoryExpense'] - ); - - Route::get( - '/chart/account/{accountList}/{categoryList}/{start_date}/{end_date}/{others}/income', - ['uses' => 'Chart\CategoryReportController@accountIncome'] - ); - Route::get( - '/chart/account/{accountList}/{categoryList}/{start_date}/{end_date}/{others}/expense', - ['uses' => 'Chart\CategoryReportController@accountExpense'] - ); - Route::get( - '/chart/category-report-in-out/{accountList}/{categoryList}/{start_date}/{end_date}', - ['uses' => 'Chart\CategoryReportController@mainChart'] - ); - - // piggy banks: - Route::get('/chart/piggy-bank/{piggyBank}', ['uses' => 'Chart\PiggyBankController@history']); - - // reports: - Route::get('/chart/report/in-out/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@yearInOut']); - Route::get('/chart/report/in-out-sum/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@yearInOutSummarized']); - Route::get('/chart/report/net-worth/{start_date}/{end_date}/{accountList}', ['uses' => 'Chart\ReportController@netWorth']); - - - /** - * IMPORT CONTROLLER - */ - Route::get('/import', ['uses' => 'ImportController@index', 'as' => 'import.index']); - Route::post('/import/upload', ['uses' => 'ImportController@upload', 'as' => 'import.upload']); - Route::get('/import/configure/{importJob}', ['uses' => 'ImportController@configure', 'as' => 'import.configure']); - Route::post('/import/configure/{importJob}', ['uses' => 'ImportController@postConfigure', 'as' => 'import.process_configuration']); - Route::get('/import/settings/{importJob}', ['uses' => 'ImportController@settings', 'as' => 'import.settings']); - Route::post('/import/settings/{importJob}', ['uses' => 'ImportController@postSettings', 'as' => 'import.postSettings']); - Route::get('/import/complete/{importJob}', ['uses' => 'ImportController@complete', 'as' => 'import.complete']); - Route::get('/import/download/{importJob}', ['uses' => 'ImportController@download', 'as' => 'import.download']); - - Route::get('/import/status/{importJob}', ['uses' => 'ImportController@status', 'as' => 'import.status']); - Route::get('/import/json/{importJob}', ['uses' => 'ImportController@json', 'as' => 'import.json']); - - Route::post('/import/start/{importJob}', ['uses' => 'ImportController@start', 'as' => 'import.start']); - Route::get('/import/finished/{importJob}', ['uses' => 'ImportController@finished', 'as' => 'import.finished']); - - /** - * Help Controller - */ - Route::get('/help/{route}', ['uses' => 'HelpController@show', 'as' => 'help.show']); - - /** - * JSON Controller - */ - Route::get('/json/expense-accounts', ['uses' => 'JsonController@expenseAccounts', 'as' => 'json.expense-accounts']); - Route::get('/json/revenue-accounts', ['uses' => 'JsonController@revenueAccounts', 'as' => 'json.revenue-accounts']); - Route::get('/json/categories', ['uses' => 'JsonController@categories', 'as' => 'json.categories']); - Route::get('/json/tags', ['uses' => 'JsonController@tags', 'as' => 'json.tags']); - Route::get('/json/tour', ['uses' => 'JsonController@tour', 'as' => 'json.tour']); - Route::post('/json/end-tour', ['uses' => 'JsonController@endTour']); - - Route::get('/json/box/in', ['uses' => 'JsonController@boxIn', 'as' => 'json.box.in']); - Route::get('/json/box/out', ['uses' => 'JsonController@boxOut', 'as' => 'json.box.out']); - Route::get('/json/box/bills-unpaid', ['uses' => 'JsonController@boxBillsUnpaid', 'as' => 'json.box.paid']); - Route::get('/json/box/bills-paid', ['uses' => 'JsonController@boxBillsPaid', 'as' => 'json.box.unpaid']); - Route::get('/json/transaction-journals/{what}', 'JsonController@transactionJournals'); - - Route::get('/json/trigger', ['uses' => 'JsonController@trigger', 'as' => 'json.trigger']); - Route::get('/json/action', ['uses' => 'JsonController@action', 'as' => 'json.action']); - - /** - * New user Controller - */ - Route::get('/new-user', ['uses' => 'NewUserController@index', 'as' => 'new-user.index']); - Route::post('/new-user/submit', ['uses' => 'NewUserController@submit', 'as' => 'new-user.submit']); - - /** - * Piggy Bank Controller - */ - Route::get('/piggy-banks', ['uses' => 'PiggyBankController@index', 'as' => 'piggy-banks.index']); - Route::get('/piggy-banks/add/{piggyBank}', ['uses' => 'PiggyBankController@add', 'as' => 'piggy-banks.addMoney']); - Route::get('/piggy-banks/remove/{piggyBank}', ['uses' => 'PiggyBankController@remove', 'as' => 'piggy-banks.removeMoney']); - Route::get('/piggy-banks/add-money/{piggyBank}', ['uses' => 'PiggyBankController@addMobile', 'as' => 'piggy-banks.add-money-mobile']); - Route::get('/piggy-banks/remove-money/{piggyBank}', ['uses' => 'PiggyBankController@removeMobile', 'as' => 'piggy-banks.remove-money-mobile']); - Route::get('/piggy-banks/create', ['uses' => 'PiggyBankController@create', 'as' => 'piggy-banks.create']); - Route::get('/piggy-banks/edit/{piggyBank}', ['uses' => 'PiggyBankController@edit', 'as' => 'piggy-banks.edit']); - Route::get('/piggy-banks/delete/{piggyBank}', ['uses' => 'PiggyBankController@delete', 'as' => 'piggy-banks.delete']); - Route::get('/piggy-banks/show/{piggyBank}', ['uses' => 'PiggyBankController@show', 'as' => 'piggy-banks.show']); - Route::post('/piggy-banks/store', ['uses' => 'PiggyBankController@store', 'as' => 'piggy-banks.store']); - Route::post('/piggy-banks/update/{piggyBank}', ['uses' => 'PiggyBankController@update', 'as' => 'piggy-banks.update']); - Route::post('/piggy-banks/destroy/{piggyBank}', ['uses' => 'PiggyBankController@destroy', 'as' => 'piggy-banks.destroy']); - Route::post('/piggy-banks/add/{piggyBank}', ['uses' => 'PiggyBankController@postAdd', 'as' => 'piggy-banks.add']); - Route::post('/piggy-banks/remove/{piggyBank}', ['uses' => 'PiggyBankController@postRemove', 'as' => 'piggy-banks.remove']); - Route::post('/piggy-banks/sort', ['uses' => 'PiggyBankController@order', 'as' => 'piggy-banks.order']); - - /** - * Preferences Controller - */ - Route::get('/preferences', ['uses' => 'PreferencesController@index', 'as' => 'preferences']); - Route::post('/preferences', ['uses' => 'PreferencesController@postIndex', 'as' => 'preferences.update']); - Route::get('/preferences/code', ['uses' => 'PreferencesController@code', 'as' => 'preferences.code']); - Route::get('/preferences/delete-code', ['uses' => 'PreferencesController@deleteCode', 'as' => 'preferences.delete-code']); - Route::post('/preferences/code', ['uses' => 'PreferencesController@postCode', 'as' => 'preferences.code.store']); - - /** - * Profile Controller - */ - Route::get('/profile', ['uses' => 'ProfileController@index', 'as' => 'profile']); - Route::get('/profile/change-password', ['uses' => 'ProfileController@changePassword', 'as' => 'profile.change-password']); - Route::get('/profile/delete-account', ['uses' => 'ProfileController@deleteAccount', 'as' => 'profile.delete-account']); - Route::post('/profile/delete-account', ['uses' => 'ProfileController@postDeleteAccount', 'as' => 'profile.delete-account.post']); - Route::post('/profile/change-password', ['uses' => 'ProfileController@postChangePassword', 'as' => 'profile.change-password.store']); - - /** - * Report Controller - */ - Route::get('/reports', ['uses' => 'ReportController@index', 'as' => 'reports.index']); - Route::post('/reports', ['uses' => 'ReportController@postIndex', 'as' => 'reports.index.post']); - - // default report: - Route::get('/reports/default/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@defaultReport', 'as' => 'reports.report.default']); - - // audit report: - Route::get('/reports/audit/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@auditReport', 'as' => 'reports.report.audit']); - - // category report: - Route::get( - '/reports/category/{start_date}/{end_date}/{accountList}/{categoryList}', - ['uses' => 'ReportController@categoryReport', 'as' => 'reports.report.category'] - ); - - - Route::get('/reports/options/{reportType}', ['uses' => 'ReportController@options', 'as' => 'reports.options']); - - /** - * Report AJAX data Controller: - */ - // account report - Route::get( - '/reports/data/account-report/{start_date}/{end_date}/{accountList}', - ['uses' => 'Report\AccountController@accountReport', 'as' => 'reports.data.accountReport'] - ); - - // income and expenses report - Route::get( - '/reports/data/inc-exp-report/{start_date}/{end_date}/{accountList}', - ['uses' => 'Report\InOutController@incExpReport', 'as' => 'reports.data.incExpReport'] - ); - // income report: - Route::get( - '/reports/data/income-report/{start_date}/{end_date}/{accountList}', - ['uses' => 'Report\InOutController@incomeReport', 'as' => 'reports.data.incomeReport'] - ); - // expense report: - Route::get( - '/reports/data/expense-report/{start_date}/{end_date}/{accountList}', - ['uses' => 'Report\InOutController@expenseReport', 'as' => 'reports.data.expenseReport'] - ); - - // category report: - Route::get( - '/reports/data/category-report/{start_date}/{end_date}/{accountList}', - ['uses' => 'Report\CategoryController@categoryReport', 'as' => 'reports.data.categoryReport'] - ); // balance report: Route::get( @@ -454,16 +499,6 @@ Route::group( ['uses' => 'Report\BudgetController@budgetPeriodReport', 'as' => 'reports.data.budgetPeriodReport'] ); - // category period overview (expense and income) - Route::get( - '/reports/data/category-expense/{start_date}/{end_date}/{accountList}', - ['uses' => 'Report\CategoryController@expenseReport', 'as' => 'reports.data.categoryExpense'] - ); - Route::get( - '/reports/data/category-income/{start_date}/{end_date}/{accountList}', - ['uses' => 'Report\CategoryController@incomeReport', 'as' => 'reports.data.categoryIncome'] - ); - /** * Rules Controller diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php index 5f8b620794..74a0a460d6 100755 --- a/tests/ExampleTest.php +++ b/tests/ExampleTest.php @@ -1,4 +1,13 @@ Date: Mon, 5 Dec 2016 22:19:24 +0100 Subject: [PATCH 073/110] Cleaned up a lot of routes [skip ci] --- app/Http/breadcrumbs.php | 4 +- routes/web.php | 262 +++++++++++++++++++++------------------ 2 files changed, 145 insertions(+), 121 deletions(-) diff --git a/app/Http/breadcrumbs.php b/app/Http/breadcrumbs.php index 5c77839084..abf249d27a 100644 --- a/app/Http/breadcrumbs.php +++ b/app/Http/breadcrumbs.php @@ -529,9 +529,9 @@ Breadcrumbs::register( * SEARCH */ Breadcrumbs::register( - 'search', function (BreadCrumbGenerator $breadcrumbs, $query) { + 'search.index', function (BreadCrumbGenerator $breadcrumbs, $query) { $breadcrumbs->parent('home'); - $breadcrumbs->push(trans('breadcrumbs.searchResult', ['query' => e($query)]), route('search')); + $breadcrumbs->push(trans('breadcrumbs.searchResult', ['query' => e($query)]), route('search.index')); } ); diff --git a/routes/web.php b/routes/web.php index 6017f45300..b5089e42bd 100755 --- a/routes/web.php +++ b/routes/web.php @@ -476,143 +476,167 @@ Route::group( } ); - +/** + * Report Data Balance Controller + */ Route::group( - ['middleware' => ['user-full-auth']], function () { + ['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/balance', 'as' => 'report-data.balance.'], function () { - - // balance report: Route::get( - '/reports/data/balance-report/{start_date}/{end_date}/{accountList}', - ['uses' => 'Report\BalanceController@balanceReport', 'as' => 'reports.data.balanceReport'] + 'general/{start_date}/{end_date}/{accountList}', ['uses' => 'BalanceController@general', 'as' => 'general'] ); +} +); - // budget report: - Route::get( - '/reports/data/budget-report/{start_date}/{end_date}/{accountList}', - ['uses' => 'Report\BudgetController@budgetReport', 'as' => 'reports.data.budgetReport'] - ); +/** + * Report Data Budget Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/budget', 'as' => 'report-data.budget.'], function () { + Route::get('general/{start_date}/{end_date}/{accountList}', ['uses' => 'BudgetController@general', 'as' => 'general']); + Route::get('period/{start_date}/{end_date}/{accountList}', ['uses' => 'BudgetController@period', 'as' => 'period']); - // budget period overview - Route::get( - '/reports/data/budget-period/{start_date}/{end_date}/{accountList}', - ['uses' => 'Report\BudgetController@budgetPeriodReport', 'as' => 'reports.data.budgetPeriodReport'] - ); +} +); + +/** + * Rules Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'rules', 'as' => 'rules.'], function () { + + Route::get('', ['uses' => 'RuleController@index', 'as' => 'index']); + Route::get('create/{ruleGroup}', ['uses' => 'RuleController@create', 'as' => 'rule.create']); + Route::get('up/{rule}', ['uses' => 'RuleController@up', 'as' => 'rule.up']); + Route::get('down/{rule}', ['uses' => 'RuleController@down', 'as' => 'rule.down']); + Route::get('edit/{rule}', ['uses' => 'RuleController@edit', 'as' => 'rule.edit']); + Route::get('delete/{rule}', ['uses' => 'RuleController@delete', 'as' => 'rule.delete']); + Route::get('test', ['uses' => 'RuleController@testTriggers', 'as' => 'rule.test-triggers']); + + Route::post('trigger/order/{rule}', ['uses' => 'RuleController@reorderRuleTriggers']); + Route::post('action/order/{rule}', ['uses' => 'RuleController@reorderRuleActions']); + Route::post('store/{ruleGroup}', ['uses' => 'RuleController@store', 'as' => 'rule.store']); + Route::post('update/{rule}', ['uses' => 'RuleController@update', 'as' => 'rule.update']); + Route::post('destroy/{rule}', ['uses' => 'RuleController@destroy', 'as' => 'rule.destroy']); + +} +); + +/** + * Rule Groups Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'rule-groups', 'as' => 'rule-groups.'], function () { + Route::get('create', ['uses' => 'RuleGroupController@create', 'as' => 'create']); + Route::get('edit/{ruleGroup}', ['uses' => 'RuleGroupController@edit', 'as' => 'edit']); + Route::get('delete/{ruleGroup}', ['uses' => 'RuleGroupController@delete', 'as' => 'delete']); + Route::get('up/{ruleGroup}', ['uses' => 'RuleGroupController@up', 'as' => 'up']); + Route::get('down/{ruleGroup}', ['uses' => 'RuleGroupController@down', 'as' => 'down']); + Route::get('select/{ruleGroup}', ['uses' => 'RuleGroupController@selectTransactions', 'as' => 'select-transactions']); + + Route::post('store', ['uses' => 'RuleGroupController@store', 'as' => 'store']); + Route::post('update/{ruleGroup}', ['uses' => 'RuleGroupController@update', 'as' => 'update']); + Route::post('destroy/{ruleGroup}', ['uses' => 'RuleGroupController@destroy', 'as' => 'destroy']); + Route::post('execute/{ruleGroup}', ['uses' => 'RuleGroupController@execute', 'as' => 'execute']); +} +); + +/** + * Search Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'search', 'as' => 'search.'], function () { + Route::get('', ['uses' => 'SearchController@index', 'as' => 'index']); + +} +); - /** - * Rules Controller - */ - // index - Route::get('/rules', ['uses' => 'RuleController@index', 'as' => 'rules.index']); +/** + * Name Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'tags', 'as' => 'tags.'], function () { - // rules GET: - Route::get('/rules/create/{ruleGroup}', ['uses' => 'RuleController@create', 'as' => 'rules.rule.create']); - Route::get('/rules/up/{rule}', ['uses' => 'RuleController@up', 'as' => 'rules.rule.up']); - Route::get('/rules/down/{rule}', ['uses' => 'RuleController@down', 'as' => 'rules.rule.down']); - Route::get('/rules/edit/{rule}', ['uses' => 'RuleController@edit', 'as' => 'rules.rule.edit']); - Route::get('/rules/delete/{rule}', ['uses' => 'RuleController@delete', 'as' => 'rules.rule.delete']); - Route::get('/rules/test', ['uses' => 'RuleController@testTriggers', 'as' => 'rules.rule.test_triggers']); + Route::get('', ['uses' => 'TagController@index', 'as' => 'index']); + Route::get('create', ['uses' => 'TagController@create', 'as' => 'create']); + Route::get('show/{tag}', ['uses' => 'TagController@show', 'as' => 'show']); + Route::get('edit/{tag}', ['uses' => 'TagController@edit', 'as' => 'edit']); + Route::get('delete/{tag}', ['uses' => 'TagController@delete', 'as' => 'delete']); - // rules POST: - Route::post('/rules/trigger/order/{rule}', ['uses' => 'RuleController@reorderRuleTriggers']); - Route::post('/rules/action/order/{rule}', ['uses' => 'RuleController@reorderRuleActions']); - Route::post('/rules/store/{ruleGroup}', ['uses' => 'RuleController@store', 'as' => 'rules.rule.store']); - Route::post('/rules/update/{rule}', ['uses' => 'RuleController@update', 'as' => 'rules.rule.update']); - Route::post('/rules/destroy/{rule}', ['uses' => 'RuleController@destroy', 'as' => 'rules.rule.destroy']); + Route::post('store', ['uses' => 'TagController@store', 'as' => 'store']); + Route::post('update/{tag}', ['uses' => 'TagController@update', 'as' => 'update']); + Route::post('destroy/{tag}', ['uses' => 'TagController@destroy', 'as' => 'destroy']); +} +); +/** + * Transaction Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'prefix' => 'transactions', 'as' => 'transactions.'], function () { + Route::get('{what}', ['uses' => 'TransactionController@index', 'as' => 'index'])->where(['what' => 'withdrawal|deposit|transfers']); + Route::get('{what}/all', ['uses' => 'TransactionController@indexAll', 'as' => 'index.all'])->where(['what' => 'withdrawal|deposit|transfers']); + Route::get('{what}/{date}', ['uses' => 'TransactionController@indexDate', 'as' => 'index.date'])->where(['what' => 'withdrawal|deposit|transfers']); + Route::get('show/{tj}', ['uses' => 'TransactionController@show', 'as' => 'show']); + Route::post('reorder', ['uses' => 'TransactionController@reorder', 'as' => 'reorder']); +} +); - // rule groups GET - Route::get('/rule-groups/create', ['uses' => 'RuleGroupController@create', 'as' => 'rules.rule-group.create']); - Route::get('/rule-groups/edit/{ruleGroup}', ['uses' => 'RuleGroupController@edit', 'as' => 'rules.rule-group.edit']); - Route::get('/rule-groups/delete/{ruleGroup}', ['uses' => 'RuleGroupController@delete', 'as' => 'rules.rule-group.delete']); - Route::get('/rule-groups/up/{ruleGroup}', ['uses' => 'RuleGroupController@up', 'as' => 'rules.rule-group.up']); - Route::get('/rule-groups/down/{ruleGroup}', ['uses' => 'RuleGroupController@down', 'as' => 'rules.rule-group.down']); - Route::get('/rule-groups/select/{ruleGroup}', ['uses' => 'RuleGroupController@selectTransactions', 'as' => 'rules.rule-group.select_transactions']); +/** + * Transaction Single Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Transaction', 'prefix' => 'transactions', 'as' => 'transactions.'], function () { + Route::get('create/{what}', ['uses' => 'SingleController@create', 'as' => 'create'])->where(['what' => 'withdrawal|deposit|transfers']); + Route::get('edit/{tj}', ['uses' => 'SingleController@edit', 'as' => 'edit']); + Route::get('delete/{tj}', ['uses' => 'SingleController@delete', 'as' => 'delete']); + Route::post('store/{what}', ['uses' => 'SingleController@store', 'as' => 'store'])->where(['what' => 'withdrawal|deposit|transfers']); + Route::post('update/{tj}', ['uses' => 'SingleController@update', 'as' => 'update']); + Route::post('destroy/{tj}', ['uses' => 'SingleController@destroy', 'as' => 'destroy']); +} +); - // rule groups POST - Route::post('/rule-groups/store', ['uses' => 'RuleGroupController@store', 'as' => 'rules.rule-group.store']); - Route::post('/rule-groups/update/{ruleGroup}', ['uses' => 'RuleGroupController@update', 'as' => 'rules.rule-group.update']); - Route::post('/rule-groups/destroy/{ruleGroup}', ['uses' => 'RuleGroupController@destroy', 'as' => 'rules.rule-group.destroy']); - Route::post('/rule-groups/execute/{ruleGroup}', ['uses' => 'RuleGroupController@execute', 'as' => 'rules.rule-group.execute']); +/** + * Transaction Mass Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Transaction', 'prefix' => 'transactions/mass', 'as' => 'transactions.mass'], function () { + Route::get('edit/{journalList}', ['uses' => 'MassController@edit', 'as' => 'edit']); + Route::get('delete/{journalList}', ['uses' => 'MassController@delete', 'as' => 'delete']); + Route::post('update', ['uses' => 'MassController@update', 'as' => 'update']); + Route::post('destroy', ['uses' => 'MassController@destroy', 'as' => 'destroy']); +} +); - /** - * Search Controller - */ - Route::get('/search', ['uses' => 'SearchController@index', 'as' => 'search']); +/** + * Transaction Split Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Transaction', 'prefix' => 'transactions/split', 'as' => 'transactions.split.'], function () { + Route::get('edit/{tj}', ['uses' => 'SplitController@edit', 'as' => 'edit']); + Route::post('update/{tj}', ['uses' => 'SplitController@update', 'as' => 'update']); - /** - * Tag Controller - */ - Route::get('/tags', ['uses' => 'TagController@index', 'as' => 'tags.index']); - Route::get('/tags/create', ['uses' => 'TagController@create', 'as' => 'tags.create']); - Route::get('/tags/show/{tag}', ['uses' => 'TagController@show', 'as' => 'tags.show']); - Route::get('/tags/edit/{tag}', ['uses' => 'TagController@edit', 'as' => 'tags.edit']); - Route::get('/tags/delete/{tag}', ['uses' => 'TagController@delete', 'as' => 'tags.delete']); +} +); - Route::post('/tags/store', ['uses' => 'TagController@store', 'as' => 'tags.store']); - Route::post('/tags/update/{tag}', ['uses' => 'TagController@update', 'as' => 'tags.update']); - Route::post('/tags/destroy/{tag}', ['uses' => 'TagController@destroy', 'as' => 'tags.destroy']); +/** + * Name Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Transaction', 'prefix' => 'transactions/convert', 'as' => 'transactions.convert.'], function () { + Route::get('{transaction_type}/{tj}', ['uses' => 'ConvertController@index', 'as' => 'index']); + Route::post('{transaction_type}/{tj}', ['uses' => 'ConvertController@indexPost', 'as' => 'index.post']); - Route::post('/tags/hideTagHelp/{state}', ['uses' => 'TagController@hideTagHelp', 'as' => 'tags.hideTagHelp']); +} +); - - /** - * Transaction Controller - */ - - // normal controller: index for session range - Route::get('/transactions/{what}', ['uses' => 'TransactionController@index', 'as' => 'transactions.index'])->where( - ['what' => 'expenses|revenue|withdrawal|deposit|transfer|transfers'] - ); - - // normal controller: index showing ALL: - Route::get('/transactions/{what}/all', ['uses' => 'TransactionController@indexAll', 'as' => 'transactions.index.all'])->where( - ['what' => 'expenses|revenue|withdrawal|deposit|transfer|transfers'] - ); - - // normal controller: index for specific date range: - Route::get('/transactions/{what}/{date}', ['uses' => 'TransactionController@indexDate', 'as' => 'transactions.index.date'])->where( - ['what' => 'expenses|revenue|withdrawal|deposit|transfer|transfers'] - ); - - - Route::get('/transaction/show/{tj}', ['uses' => 'TransactionController@show', 'as' => 'transactions.show']); - Route::post('/transaction/reorder', ['uses' => 'TransactionController@reorder', 'as' => 'transactions.reorder']); - - // single controller - Route::get('/transactions/create/{what}', ['uses' => 'Transaction\SingleController@create', 'as' => 'transactions.create'])->where( - ['what' => 'expenses|revenue|withdrawal|deposit|transfer|transfers'] - ); - Route::get('/transaction/edit/{tj}', ['uses' => 'Transaction\SingleController@edit', 'as' => 'transactions.edit']); - Route::get('/transaction/delete/{tj}', ['uses' => 'Transaction\SingleController@delete', 'as' => 'transactions.delete']); - Route::post('/transactions/store/{what}', ['uses' => 'Transaction\SingleController@store', 'as' => 'transactions.store'])->where( - ['what' => 'expenses|revenue|withdrawal|deposit|transfer|transfers'] - ); - Route::post('/transaction/update/{tj}', ['uses' => 'Transaction\SingleController@update', 'as' => 'transactions.update']); - Route::post('/transaction/destroy/{tj}', ['uses' => 'Transaction\SingleController@destroy', 'as' => 'transactions.destroy']); - - // mass controller: - Route::get('/transactions/mass-edit/{journalList}', ['uses' => 'Transaction\MassController@massEdit', 'as' => 'transactions.mass-edit']); - Route::get('/transactions/mass-delete/{journalList}', ['uses' => 'Transaction\MassController@massDelete', 'as' => 'transactions.mass-delete']); - Route::post('/transactions/mass-update', ['uses' => 'Transaction\MassController@massUpdate', 'as' => 'transactions.mass-update']); - Route::post('/transactions/mass-destroy', ['uses' => 'Transaction\MassController@massDestroy', 'as' => 'transactions.mass-destroy']); - - // split (will be here): - Route::get('/transaction/split/edit/{tj}', ['uses' => 'Transaction\SplitController@edit', 'as' => 'transactions.edit-split']); - Route::post('/transaction/split/update/{tj}', ['uses' => 'Transaction\SplitController@update', 'as' => 'split.journal.update']); - - // convert controller: - Route::get('transactions/convert/{transaction_type}/{tj}', ['uses' => 'Transaction\ConvertController@convert', 'as' => 'transactions.convert']); - Route::post('transactions/convert/{transaction_type}/{tj}', ['uses' => 'Transaction\ConvertController@submit', 'as' => 'transactions.convert.post']); - - /** - * POPUP Controllers - */ - /** - * Report popup - */ - Route::get('/popup/report', ['uses' => 'Popup\ReportController@info', 'as' => 'popup.report']); +/** + * Name Controller + */ +Route::group( + ['middleware' => 'user-full-auth', 'namespace' => 'Popup', 'prefix' => 'popup', 'as' => 'popup.'], function () { + Route::get('general', ['uses' => 'ReportController@general', 'as' => 'general']); } ); From 9cb3bfaa57999e96efaa379a7ccc848419067b27 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 06:15:42 +0100 Subject: [PATCH 074/110] Clean up routes --- ...{show_with_date.twig => show-by-date.twig} | 0 routes/web.php | 111 +++++++++--------- 2 files changed, 56 insertions(+), 55 deletions(-) rename resources/views/accounts/{show_with_date.twig => show-by-date.twig} (100%) diff --git a/resources/views/accounts/show_with_date.twig b/resources/views/accounts/show-by-date.twig similarity index 100% rename from resources/views/accounts/show_with_date.twig rename to resources/views/accounts/show-by-date.twig diff --git a/routes/web.php b/routes/web.php index b5089e42bd..ab84d24292 100755 --- a/routes/web.php +++ b/routes/web.php @@ -23,13 +23,13 @@ Route::group( Route::post('login', 'Auth\LoginController@login'); // Registration Routes... - Route::get('/register', ['uses' => 'Auth\RegisterController@showRegistrationForm', 'as' => 'register']); - Route::post('/register', 'Auth\RegisterController@register'); + Route::get('register', ['uses' => 'Auth\RegisterController@showRegistrationForm', 'as' => 'register']); + Route::post('register', 'Auth\RegisterController@register'); // Password Reset Routes... Route::get('password/reset/{token}', ['uses' => 'Auth\ResetPasswordController@showResetForm', 'as' => 'password.reset']); - Route::post('/password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail'); - Route::post('/password/reset', 'Auth\ResetPasswordController@reset'); + Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail'); + Route::post('password/reset', 'Auth\ResetPasswordController@reset'); Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm'); @@ -41,9 +41,9 @@ Route::group( */ Route::group( ['middleware' => 'user-simple-auth'], function () { - Route::get('/error', ['uses' => 'HomeController@displayError', 'as' => 'displayError']); + Route::get('error', ['uses' => 'HomeController@displayError', 'as' => 'error']); Route::any('logout', ['uses' => 'Auth\LoginController@logout', 'as' => 'logout']); - Route::get('/flush', ['uses' => 'HomeController@flush', 'as' => 'flush']); + Route::get('flush', ['uses' => 'HomeController@flush', 'as' => 'flush']); } ); @@ -51,10 +51,10 @@ Route::group( * For the two factor routes, the user must be logged in, but NOT 2FA. Account confirmation does not matter here. */ Route::group( - ['middleware' => 'user-logged-in-no-2fa'], function () { - Route::get('/two-factor', ['uses' => 'Auth\TwoFactorController@index', 'as' => 'two-factor']); - Route::get('/lost-two-factor', ['uses' => 'Auth\TwoFactorController@lostTwoFactor', 'as' => 'lost-two-factor']); - Route::post('/two-factor', ['uses' => 'Auth\TwoFactorController@postIndex', 'as' => 'two-factor-post']); + ['middleware' => 'user-logged-in-no-2fa', 'prefix' => 'two-factor', 'as' => 'two-factor.', 'namespace' => 'Auth'], function () { + Route::get('', ['uses' => 'TwoFactorController@index', 'as' => 'index']); + Route::get('lost', ['uses' => 'TwoFactorController@lostTwoFactor', 'as' => 'lost']); + Route::post('', ['uses' => 'TwoFactorController@postIndex', 'as' => 'post']); } ); @@ -63,10 +63,10 @@ Route::group( * For the confirmation routes, the user must be logged in, also 2FA, but his account must not be confirmed. */ Route::group( - ['middleware' => 'user-logged-in-2fa-no-activation'], function () { - Route::get('/confirm-your-account', ['uses' => 'Auth\ConfirmationController@confirmationError', 'as' => 'confirmation_error']); - Route::get('/resend-confirmation', ['uses' => 'Auth\ConfirmationController@resendConfirmation', 'as' => 'resend_confirmation']); - Route::get('/confirmation/{code}', ['uses' => 'Auth\ConfirmationController@doConfirmation', 'as' => 'do_confirm_account']); + ['middleware' => 'user-logged-in-2fa-no-activation', 'namespace' => 'Auth'], function () { + Route::get('/confirm-your-account', ['uses' => 'ConfirmationController@confirmationError', 'as' => 'confirmation_error']); + Route::get('/resend-confirmation', ['uses' => 'ConfirmationController@resendConfirmation', 'as' => 'resend_confirmation']); + Route::get('/confirmation/{code}', ['uses' => 'ConfirmationController@doConfirmation', 'as' => 'do_confirm_account']); } ); @@ -97,9 +97,10 @@ Route::group( Route::get('create/{what}', ['uses' => 'AccountController@create', 'as' => 'create'])->where('what', 'revenue|asset|expense'); Route::get('edit/{account}', ['uses' => 'AccountController@edit', 'as' => 'edit']); Route::get('delete/{account}', ['uses' => 'AccountController@delete', 'as' => 'delete']); + Route::get('show/{account}', ['uses' => 'AccountController@show', 'as' => 'show']); Route::get('show/{account}/all', ['uses' => 'AccountController@showAll', 'as' => 'show.all']); - Route::get('show/{account}/{date}', ['uses' => 'AccountController@showWithDate', 'as' => 'show.date']); + Route::get('show/{account}/{date}', ['uses' => 'AccountController@showByDate', 'as' => 'show.date']); Route::post('store', ['uses' => 'AccountController@store', 'as' => 'store']); Route::post('update/{account}', ['uses' => 'AccountController@update', 'as' => 'update']); @@ -154,10 +155,10 @@ Route::group( Route::get('edit/{budget}', ['uses' => 'BudgetController@edit', 'as' => 'edit']); Route::get('delete/{budget}', ['uses' => 'BudgetController@delete', 'as' => 'delete']); Route::get('show/{budget}', ['uses' => 'BudgetController@show', 'as' => 'show']); - Route::get('show/{budget}/{limitrepetition}', ['uses' => 'BudgetController@showWithRepetition', 'as' => 'showWithRepetition']); - Route::get('list/noBudget', ['uses' => 'BudgetController@noBudget', 'as' => 'noBudget']); + Route::get('show/{budget}/{limitrepetition}', ['uses' => 'BudgetController@showByRepetition', 'as' => 'show.repetition']); + Route::get('list/noBudget', ['uses' => 'BudgetController@noBudget', 'as' => 'no-budget']); - Route::post('income', ['uses' => 'BudgetController@postUpdateIncome', 'as' => 'postIncome']); + Route::post('income', ['uses' => 'BudgetController@postUpdateIncome', 'as' => 'income.post']); Route::post('store', ['uses' => 'BudgetController@store', 'as' => 'store']); Route::post('update/{budget}', ['uses' => 'BudgetController@update', 'as' => 'update']); Route::post('destroy/{budget}', ['uses' => 'BudgetController@destroy', 'as' => 'destroy']); @@ -176,8 +177,8 @@ Route::group( Route::get('delete/{category}', ['uses' => 'CategoryController@delete', 'as' => 'delete']); Route::get('show/{category}', ['uses' => 'CategoryController@show', 'as' => 'show']); - Route::get('show/{category}/{date}', ['uses' => 'CategoryController@showWithDate', 'as' => 'show.date']); - Route::get('list/noCategory', ['uses' => 'CategoryController@noCategory', 'as' => 'noCategory']); + Route::get('show/{category}/{date}', ['uses' => 'CategoryController@showByDate', 'as' => 'show.date']); + Route::get('list/noCategory', ['uses' => 'CategoryController@noCategory', 'as' => 'no-category']); Route::post('store', ['uses' => 'CategoryController@store', 'as' => 'store']); Route::post('update/{category}', ['uses' => 'CategoryController@update', 'as' => 'update']); @@ -226,13 +227,13 @@ Route::group( Route::get('frontpage', ['uses' => 'AccountController@frontpage', 'as' => 'frontpage']); Route::get('expense', ['uses' => 'AccountController@expenseAccounts', 'as' => 'expense']); Route::get('revenue', ['uses' => 'AccountController@revenueAccounts', 'as' => 'revenue']); - Route::get('report/default/{start_date}/{end_date}/{accountList}', ['uses' => 'AccountController@report', 'as' => 'report']); - Route::get('{account}', ['uses' => 'AccountController@single', 'as' => 'single']); - Route::get('{account}/{date}', ['uses' => 'AccountController@specificPeriod', 'as' => 'specific-period']); + Route::get('report/default/{accountList}/{start_date}/{end_date}', ['uses' => 'AccountController@report', 'as' => 'report']); + Route::get('single/{account}', ['uses' => 'AccountController@single', 'as' => 'single']); + Route::get('period/{account}/{date}', ['uses' => 'AccountController@period', 'as' => 'period']); - Route::get('income-by-category/{account}/{start_date}/{end_date}', ['uses' => 'AccountController@incomeByCategory', 'as' => 'incomeByCategory']); - Route::get('expense-by-category/{account}/{start_date}/{end_date}', ['uses' => 'AccountController@expenseByCategory', 'as' => 'expenseByCategory']); - Route::get('expense-by-budget/{account}/{start_date}/{end_date}', ['uses' => 'AccountController@expenseByBudget', 'as' => 'expenseByBudget']); + Route::get('income-category/{account}/{start_date}/{end_date}', ['uses' => 'AccountController@incomeCategory', 'as' => 'income-category']); + Route::get('expense-category/{account}/{start_date}/{end_date}', ['uses' => 'AccountController@expenseCategory', 'as' => 'expense-category']); + Route::get('expense-budget/{account}/{start_date}/{end_date}', ['uses' => 'AccountController@expenseBudget', 'as' => 'expense-budget']); } ); @@ -243,7 +244,7 @@ Route::group( Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/bill'], function () { Route::get('frontpage', ['uses' => 'BillController@frontpage']); - Route::get('{bill}', ['uses' => 'BillController@single']); + Route::get('single/{bill}', ['uses' => 'BillController@single']); } ); @@ -254,10 +255,10 @@ Route::group( Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/budget'], function () { Route::get('frontpage', ['uses' => 'BudgetController@frontpage']); - Route::get('period/0/default/{start_date}/{end_date}/{accountList}', ['uses' => 'BudgetController@periodNoBudget']); - Route::get('period/{budget}/default/{start_date}/{end_date}/{accountList}', ['uses' => 'BudgetController@period']); - Route::get('{budget}/{limitrepetition}', ['uses' => 'BudgetController@budgetLimit']); - Route::get('{budget}', ['uses' => 'BudgetController@budget']); + Route::get('period/0/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@periodNoBudget']); + Route::get('period/{budget}/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period']); + Route::get('budget/{budget}/{limitrepetition}', ['uses' => 'BudgetController@budgetLimit']); + Route::get('budget/{budget}', ['uses' => 'BudgetController@budget']); } ); @@ -268,16 +269,16 @@ Route::group( Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/category'], function () { Route::get('frontpage', ['uses' => 'CategoryController@frontpage']); - Route::get('{category}/period', ['uses' => 'CategoryController@currentPeriod']); - Route::get('{category}/period/{date}', ['uses' => 'CategoryController@specificPeriod']); - Route::get('{category}/all', ['uses' => 'CategoryController@all']); - Route::get('{category}/report-period/{start_date}/{end_date}/{accountList}', ['uses' => 'CategoryController@reportPeriod']); + Route::get('period/{category}', ['uses' => 'CategoryController@currentPeriod']); + Route::get('period/{category}/{date}', ['uses' => 'CategoryController@specificPeriod']); + Route::get('all/{category}', ['uses' => 'CategoryController@all']); + Route::get('report-period/{category}/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@reportPeriod']); // these charts are used in reports (category reports): - Route::get('{accountList}/{categoryList}/{start_date}/{end_date}/{others}/income', ['uses' => 'CategoryReportController@categoryIncome']); - Route::get('{accountList}/{categoryList}/{start_date}/{end_date}/{others}/expense', ['uses' => 'CategoryReportController@categoryExpense']); - Route::get('{accountList}/{categoryList}/{start_date}/{end_date}/{others}/income', ['uses' => 'CategoryReportController@accountIncome']); - Route::get('{accountList}/{categoryList}/{start_date}/{end_date}/{others}/expense', ['uses' => 'CategoryReportController@accountExpense']); + Route::get('category/income/{accountList}/{categoryList}/{start_date}/{end_date}/{others}', ['uses' => 'CategoryReportController@categoryIncome']); + Route::get('category/expense/{accountList}/{categoryList}/{start_date}/{end_date}/{others}', ['uses' => 'CategoryReportController@categoryExpense']); + Route::get('account/income/{accountList}/{categoryList}/{start_date}/{end_date}/{others}', ['uses' => 'CategoryReportController@accountIncome']); + Route::get('account/income/{accountList}/{categoryList}/{start_date}/{end_date}/{others}', ['uses' => 'CategoryReportController@accountExpense']); Route::get('report-in-out/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'CategoryReportController@mainChart']); } @@ -297,9 +298,9 @@ Route::group( */ Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/report'], function () { - Route::get('in-out/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@yearInOut']); - Route::get('in-out-sum/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@yearInOutSummarized']); - Route::get('net-worth/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@netWorth']); + Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'ReportController@operations']); + Route::get('operations-sum/{accountList}/{start_date}/{end_date}/', ['uses' => 'ReportController@operationsSum']); + Route::get('net-worth/{accountList}/{start_date}/{end_date}/', ['uses' => 'ReportController@netWorth']); } ); @@ -435,9 +436,9 @@ Route::group( Route::get('options/{reportType}', ['uses' => 'ReportController@options', 'as' => 'options']); - Route::get('default/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@default', 'as' => 'report.default']); - Route::get('audit/{start_date}/{end_date}/{accountList}', ['uses' => 'ReportController@audit', 'as' => 'report.audit']); - Route::get('category/{start_date}/{end_date}/{accountList}/{categoryList}', ['uses' => 'ReportController@category', 'as' => 'report.category']); + Route::get('default/{accountList}/{start_date}/{end_date}', ['uses' => 'ReportController@default', 'as' => 'report.default']); + Route::get('audit/{accountList}/{start_date}/{end_date}', ['uses' => 'ReportController@audit', 'as' => 'report.audit']); + Route::get('category/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'ReportController@category', 'as' => 'report.category']); Route::post('', ['uses' => 'ReportController@postIndex', 'as' => 'index.post']); } @@ -448,7 +449,7 @@ Route::group( */ Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/account', 'as' => 'report-data.account'], function () { - Route::get('general/{start_date}/{end_date}/{accountList}', ['uses' => 'AccountController@general', 'as' => 'general']); + Route::get('general/{accountList}/{start_date}/{end_date}', ['uses' => 'AccountController@general', 'as' => 'general']); } ); @@ -457,9 +458,9 @@ Route::group( */ Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/operations', 'as' => 'report-data.operations'], function () { - Route::get('operations/{start_date}/{end_date}/{accountList}', ['uses' => 'OperationsController@operations', 'as' => 'operations']); - Route::get('income/{start_date}/{end_date}/{accountList}', ['uses' => 'OperationsController@income', 'as' => 'income']); - Route::get('expenses/{start_date}/{end_date}/{accountList}', ['uses' => 'OperationsController@expenses', 'as' => 'expenses']); + Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'OperationsController@operations', 'as' => 'operations']); + Route::get('income/{accountList}/{start_date}/{end_date}', ['uses' => 'OperationsController@income', 'as' => 'income']); + Route::get('expenses/{accountList}/{start_date}/{end_date}', ['uses' => 'OperationsController@expenses', 'as' => 'expenses']); } ); @@ -469,9 +470,9 @@ Route::group( */ Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/category', 'as' => 'report-data.category.'], function () { - Route::get('operations/{start_date}/{end_date}/{accountList}', ['uses' => 'CategoryController@operations', 'as' => 'operations']); - Route::get('income/{start_date}/{end_date}/{accountList}', ['uses' => 'CategoryController@income', 'as' => 'income']); - Route::get('expenses/{start_date}/{end_date}/{accountList}', ['uses' => 'CategoryController@expenses', 'as' => 'expense']); + Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@operations', 'as' => 'operations']); + Route::get('income/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@income', 'as' => 'income']); + Route::get('expenses/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@expenses', 'as' => 'expense']); } ); @@ -483,7 +484,7 @@ Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/balance', 'as' => 'report-data.balance.'], function () { Route::get( - 'general/{start_date}/{end_date}/{accountList}', ['uses' => 'BalanceController@general', 'as' => 'general'] + 'general/{accountList}/{start_date}/{end_date}', ['uses' => 'BalanceController@general', 'as' => 'general'] ); } ); @@ -493,8 +494,8 @@ Route::group( */ Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/budget', 'as' => 'report-data.budget.'], function () { - Route::get('general/{start_date}/{end_date}/{accountList}', ['uses' => 'BudgetController@general', 'as' => 'general']); - Route::get('period/{start_date}/{end_date}/{accountList}', ['uses' => 'BudgetController@period', 'as' => 'period']); + Route::get('general/{accountList}/{start_date}/{end_date}/', ['uses' => 'BudgetController@general', 'as' => 'general']); + Route::get('period/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period', 'as' => 'period']); } ); From bebfbf0b901e306a0c10a319c19b312ea8cf861b Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 06:52:17 +0100 Subject: [PATCH 075/110] Fixing routes --- app/Http/Controllers/AccountController.php | 4 +-- .../Controllers/Auth/TwoFactorController.php | 10 ++++-- .../Controllers/Chart/AccountController.php | 16 +++++----- app/Http/Controllers/ReportController.php | 23 ++++++-------- app/Http/Middleware/AuthenticateTwoFactor.php | 2 +- .../{show_with_date.js => show-by-date.js} | 11 +++---- public/js/ff/accounts/show.js | 8 ++--- public/js/ff/bills/show.js | 4 +-- public/js/ff/index.js | 6 ++-- public/js/ff/reports/default/all.js | 2 +- public/js/ff/reports/default/month.js | 2 +- resources/views/accounts/edit.twig | 4 +++ resources/views/accounts/show-by-date.twig | 9 +++--- resources/views/accounts/show.twig | 7 +++-- resources/views/auth/two-factor.twig | 4 +-- resources/views/bills/show.twig | 2 +- resources/views/budgets/income.twig | 2 +- resources/views/budgets/index.twig | 4 +-- ...{show_with_date.twig => show-by-date.twig} | 0 resources/views/index.twig | 5 +++ resources/views/layout/default.twig | 2 +- resources/views/list/categories.twig | 2 +- resources/views/reports/default/month.twig | 19 +++++++----- resources/views/reports/default/year.twig | 15 +++++---- routes/web.php | 31 ++++++++++--------- 25 files changed, 103 insertions(+), 91 deletions(-) rename public/js/ff/accounts/{show_with_date.js => show-by-date.js} (88%) rename resources/views/categories/{show_with_date.twig => show-by-date.twig} (100%) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index e129fc9128..1d26e17f43 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -282,7 +282,7 @@ class AccountController extends Controller * * @return View */ - public function showWithDate(Account $account, string $date) + public function showByDate(Account $account, string $date) { $carbon = new Carbon($date); $range = Preferences::get('viewRange', '1M')->data; @@ -298,7 +298,7 @@ class AccountController extends Controller $journals = $collector->getPaginatedJournals(); $journals->setPath('accounts/show/' . $account->id . '/' . $date); - return view('accounts.show_with_date', compact('category', 'date', 'account', 'journals', 'subTitle', 'carbon', 'start', 'end')); + return view('accounts.show-by-date', compact('category', 'date', 'account', 'journals', 'subTitle', 'carbon', 'start', 'end')); } /** diff --git a/app/Http/Controllers/Auth/TwoFactorController.php b/app/Http/Controllers/Auth/TwoFactorController.php index d310cc3bd7..ae1af3c066 100644 --- a/app/Http/Controllers/Auth/TwoFactorController.php +++ b/app/Http/Controllers/Auth/TwoFactorController.php @@ -38,10 +38,16 @@ class TwoFactorController extends Controller $user = auth()->user(); // to make sure the validator in the next step gets the secret, we push it in session - $secret = Preferences::get('twoFactorAuthSecret', '')->data; + $secret = Preferences::get('twoFactorAuthSecret', null)->data; $title = strval(trans('firefly.two_factor_title')); - if (strlen($secret) === 0) { + // make sure the user has two factor configured: + $has2FA = Preferences::get('twoFactorAuthEnabled', null)->data; + if (is_null($has2FA) || $has2FA === false) { + return redirect(route('index')); + } + + if (strlen(strval($secret)) === 0) { throw new FireflyException('Your two factor authentication secret is empty, which it cannot be at this point. Please check the log files.'); } Session::flash('two-factor-secret', $secret); diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php index c0e8071327..fb586715de 100644 --- a/app/Http/Controllers/Chart/AccountController.php +++ b/app/Http/Controllers/Chart/AccountController.php @@ -112,7 +112,7 @@ class AccountController extends Controller * * @return \Illuminate\Http\JsonResponse */ - public function expenseByBudget(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end) + public function expenseBudget(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end) { $cache = new CacheProperties; $cache->addProperty($account->id); @@ -153,7 +153,7 @@ class AccountController extends Controller * * @return \Illuminate\Http\JsonResponse */ - public function expenseByCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end) + public function expenseCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end) { $cache = new CacheProperties; $cache->addProperty($account->id); @@ -199,7 +199,7 @@ class AccountController extends Controller $frontPage = Preferences::get('frontPageAccounts', $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray()); $accounts = $repository->getAccountsById($frontPage->data); - return Response::json($this->accountBalanceChart($start, $end, $accounts)); + return Response::json($this->accountBalanceChart($accounts, $start, $end)); } /** @@ -210,7 +210,7 @@ class AccountController extends Controller * * @return \Illuminate\Http\JsonResponse */ - public function incomeByCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end) + public function incomeCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end) { $cache = new CacheProperties; $cache->addProperty($account->id); @@ -251,9 +251,9 @@ class AccountController extends Controller * * @return \Illuminate\Http\JsonResponse */ - public function report(Carbon $start, Carbon $end, Collection $accounts) + public function report(Collection $accounts, Carbon $start, Carbon $end) { - return Response::json($this->accountBalanceChart($start, $end, $accounts)); + return Response::json($this->accountBalanceChart($accounts, $start, $end)); } /** @@ -406,13 +406,13 @@ class AccountController extends Controller } /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * * @return array */ - private function accountBalanceChart(Carbon $start, Carbon $end, Collection $accounts): array + private function accountBalanceChart(Collection $accounts, Carbon $start, Carbon $end): array { // chart properties for cache: $cache = new CacheProperties(); diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 71089f6b81..655c3b2a22 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -61,14 +61,13 @@ class ReportController extends Controller } /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * * @return string - * @throws FireflyException */ - public function auditReport(Carbon $start, Carbon $end, Collection $accounts) + public function auditReport(Collection $accounts, Carbon $start, Carbon $end) { if ($end < $start) { return view('error')->with('message', trans('firefly.end_after_start_date')); @@ -97,15 +96,14 @@ class ReportController extends Controller } /** + * @param Collection $accounts + * @param Collection $categories * @param Carbon $start * @param Carbon $end - * @param Collection $accounts - * - * @param Collection $categories * * @return string */ - public function categoryReport(Carbon $start, Carbon $end, Collection $accounts, Collection $categories) + public function categoryReport(Collection $accounts, Collection $categories, Carbon $start, Carbon $end) { if ($end < $start) { return view('error')->with('message', trans('firefly.end_after_start_date')); @@ -134,14 +132,13 @@ class ReportController extends Controller } /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * * @return string - * @throws FireflyException */ - public function defaultReport(Carbon $start, Carbon $end, Collection $accounts) + public function defaultReport(Collection $accounts, Carbon $start, Carbon $end) { if ($end < $start) { return view('error')->with('message', trans('firefly.end_after_start_date')); @@ -246,13 +243,13 @@ class ReportController extends Controller default: throw new FireflyException(sprintf('Firefly does not support the "%s"-report yet.', $reportType)); case 'category': - $uri = route('reports.report.category', [$start, $end, $accounts, $categories]); + $uri = route('reports.report.category', [$accounts, $categories, $start, $end]); break; case 'default': - $uri = route('reports.report.default', [$start, $end, $accounts]); + $uri = route('reports.report.default', [$accounts, $start, $end]); break; case 'audit': - $uri = route('reports.report.audit', [$start, $end, $accounts]); + $uri = route('reports.report.audit', [$accounts, $start, $end]); break; } diff --git a/app/Http/Middleware/AuthenticateTwoFactor.php b/app/Http/Middleware/AuthenticateTwoFactor.php index 7dbaa77505..4f9f1f5542 100644 --- a/app/Http/Middleware/AuthenticateTwoFactor.php +++ b/app/Http/Middleware/AuthenticateTwoFactor.php @@ -57,7 +57,7 @@ class AuthenticateTwoFactor $has2faSecret = !is_null(Preferences::get('twoFactorAuthSecret')); $is2faAuthed = Session::get('twofactor-authenticated'); if ($is2faEnabled && $has2faSecret && !$is2faAuthed) { - return redirect(route('two-factor')); + return redirect(route('two-factor.index')); } return $next($request); diff --git a/public/js/ff/accounts/show_with_date.js b/public/js/ff/accounts/show-by-date.js similarity index 88% rename from public/js/ff/accounts/show_with_date.js rename to public/js/ff/accounts/show-by-date.js index c34d4ce952..4e1768daf4 100644 --- a/public/js/ff/accounts/show_with_date.js +++ b/public/js/ff/accounts/show-by-date.js @@ -6,9 +6,6 @@ * of the MIT license. See the LICENSE file for details. */ -/* global $, lineChart, dateString, accountID, token, incomeByCategoryUri, expenseByCategoryUri, expenseByBudgetUri */ - - // Return a helper with preserved width of cells var fixHelper = function (e, tr) { "use strict"; @@ -24,11 +21,11 @@ var fixHelper = function (e, tr) { $(function () { "use strict"; - lineChart('chart/account/' + accountID + '/' + dateString, 'period-specific-account'); + lineChart(periodUri, 'period-specific-account'); - pieChart(incomeByCategoryUri, 'account-cat-in'); - pieChart(expenseByCategoryUri, 'account-cat-out'); - pieChart(expenseByBudgetUri, 'account-budget-out'); + pieChart(incomeCategoryUri, 'account-cat-in'); + pieChart(expenseCategoryUri, 'account-cat-out'); + pieChart(expenseBudgetUri, 'account-budget-out'); // sortable! diff --git a/public/js/ff/accounts/show.js b/public/js/ff/accounts/show.js index 4de17eddb5..5875c0da90 100644 --- a/public/js/ff/accounts/show.js +++ b/public/js/ff/accounts/show.js @@ -15,10 +15,10 @@ var fixHelper = function (e, tr) { $(function () { "use strict"; - lineChart('chart/account/' + accountID, 'overview-chart'); - pieChart(incomeByCategoryUri, 'account-cat-in'); - pieChart(expenseByCategoryUri, 'account-cat-out'); - pieChart(expenseByBudgetUri, 'account-budget-out'); + lineChart(singleUri, 'overview-chart'); + pieChart(incomeCategoryUri, 'account-cat-in'); + pieChart(expenseCategoryUri, 'account-cat-out'); + pieChart(expenseBudgetUri, 'account-budget-out'); // sortable! diff --git a/public/js/ff/bills/show.js b/public/js/ff/bills/show.js index d383023ead..ba12284cd3 100644 --- a/public/js/ff/bills/show.js +++ b/public/js/ff/bills/show.js @@ -2,8 +2,6 @@ $(function () { "use strict"; - if (typeof(columnChart) === 'function' && typeof(billID) !== 'undefined') { - columnChart('chart/bill/' + billID, 'bill-overview'); - } + columnChart(billUri, 'bill-overview'); } ); \ No newline at end of file diff --git a/public/js/ff/index.js b/public/js/ff/index.js index f797dcf142..b0cc90b70f 100644 --- a/public/js/ff/index.js +++ b/public/js/ff/index.js @@ -32,14 +32,14 @@ function endTheTour() { function drawChart() { "use strict"; - lineChart('chart/account/frontpage', 'accounts-chart'); + lineChart(accountFrontpageUri, 'accounts-chart'); if (billCount > 0) { pieChart('chart/bill/frontpage', 'bills-chart'); } stackedColumnChart('chart/budget/frontpage', 'budgets-chart'); columnChart('chart/category/frontpage', 'categories-chart'); - columnChart('chart/account/expense', 'expense-accounts-chart'); - columnChart('chart/account/revenue', 'revenue-accounts-chart'); + columnChart(accountExpenseUri, 'expense-accounts-chart'); + columnChart(accountRevenueUri, 'revenue-accounts-chart'); getBoxAmounts(); diff --git a/public/js/ff/reports/default/all.js b/public/js/ff/reports/default/all.js index 0d3f056e2b..939b0462e0 100644 --- a/public/js/ff/reports/default/all.js +++ b/public/js/ff/reports/default/all.js @@ -98,7 +98,7 @@ function displayAjaxPartial(data, holder) { function failAjaxPartial(uri, holder) { "use strict"; - console.log('Failed to load' + uri); + console.log('Failed to load: ' + uri); $('#' + holder).removeClass('loading').addClass('general-chart-error'); } diff --git a/public/js/ff/reports/default/month.js b/public/js/ff/reports/default/month.js index 4e34d95032..a150da25cc 100644 --- a/public/js/ff/reports/default/month.js +++ b/public/js/ff/reports/default/month.js @@ -15,5 +15,5 @@ function drawChart() { // month view: // draw account chart - lineChart('chart/account/report/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds, 'account-balances-chart'); + lineChart(accountChartUri, 'account-balances-chart'); } \ No newline at end of file diff --git a/resources/views/accounts/edit.twig b/resources/views/accounts/edit.twig index d849fa50d4..0b76b53819 100644 --- a/resources/views/accounts/edit.twig +++ b/resources/views/accounts/edit.twig @@ -77,3 +77,7 @@
  • {{ Form.close|raw }} {% endblock %} + +{% block scripts %} + +{% endblock %} \ No newline at end of file diff --git a/resources/views/accounts/show-by-date.twig b/resources/views/accounts/show-by-date.twig index e872140108..fbe746b110 100644 --- a/resources/views/accounts/show-by-date.twig +++ b/resources/views/accounts/show-by-date.twig @@ -94,9 +94,10 @@ var dateString = "{{ date|escape }}"; // uri's for charts: - var incomeByCategoryUri = '{{ route('chart.account.incomeByCategory', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; - var expenseByCategoryUri = '{{ route('chart.account.expenseByCategory', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; - var expenseByBudgetUri = '{{ route('chart.account.expenseByBudget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; + var periodUri = '{{ route('chart.account.single', [account.id, date]) }}'; + var incomeCategoryUri = '{{ route('chart.account.income-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; + var expenseCategoryUri = '{{ route('chart.account.expense-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; + var expenseBudgetUri = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; @@ -104,6 +105,6 @@ - + {% endblock %} diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twig index 28f1b770b0..9826d1f358 100644 --- a/resources/views/accounts/show.twig +++ b/resources/views/accounts/show.twig @@ -123,9 +123,10 @@ diff --git a/resources/views/auth/two-factor.twig b/resources/views/auth/two-factor.twig index 65a29bed85..ea4275aae2 100644 --- a/resources/views/auth/two-factor.twig +++ b/resources/views/auth/two-factor.twig @@ -18,7 +18,7 @@ - +
    @@ -33,7 +33,7 @@
    - {{ 'two_factor_forgot'|_ }} + {{ 'two_factor_forgot'|_ }}
    {% endblock %} diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig index f2db32ebf2..9227d99d46 100644 --- a/resources/views/bills/show.twig +++ b/resources/views/bills/show.twig @@ -116,7 +116,7 @@ {% block scripts %} diff --git a/resources/views/budgets/income.twig b/resources/views/budgets/income.twig index aef412667c..f78cb2c255 100644 --- a/resources/views/budgets/income.twig +++ b/resources/views/budgets/income.twig @@ -8,7 +8,7 @@
    -
    +

    - + {{ trans('firefly.transactions_no_budget', {start: periodStart, end: periodEnd }) }}

    @@ -91,7 +91,7 @@

    {% if budget.currentRep.id %} - {{ budget.name }} {% else %} {{ budget.name }} diff --git a/resources/views/categories/show_with_date.twig b/resources/views/categories/show-by-date.twig similarity index 100% rename from resources/views/categories/show_with_date.twig rename to resources/views/categories/show-by-date.twig diff --git a/resources/views/index.twig b/resources/views/index.twig index a1443b6e18..07450afebb 100644 --- a/resources/views/index.twig +++ b/resources/views/index.twig @@ -143,6 +143,11 @@ showTour = false; {% endif %} var billCount = {{ billCount }}; + + // uri's of charts: + var accountFrontpageUri = '{{ route('chart.account.frontpage') }}'; + var accountRevenueUri = '{{ route('chart.account.revenue') }}'; + var accountExpenseUri = '{{ route('chart.account.expense') }}'; diff --git a/resources/views/layout/default.twig b/resources/views/layout/default.twig index bf006c8696..54dd27bce6 100644 --- a/resources/views/layout/default.twig +++ b/resources/views/layout/default.twig @@ -91,7 +91,7 @@

    - + diff --git a/resources/views/import/csv/roles.twig b/resources/views/import/csv/roles.twig index aad820fbbd..74cf95b948 100644 --- a/resources/views/import/csv/roles.twig +++ b/resources/views/import/csv/roles.twig @@ -21,7 +21,7 @@
    - + diff --git a/resources/views/reports/default/year.twig b/resources/views/reports/default/year.twig index e6d0ac3637..e6438a7531 100644 --- a/resources/views/reports/default/year.twig +++ b/resources/views/reports/default/year.twig @@ -170,6 +170,12 @@ var reportType = '{{ reportType }}'; var accountIds = '{{ accountIds }}'; + // report uri's + var opChartUri ='{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var sumChartUri='{{ route('chart.report.sum', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var netWorthUri ='{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + + // data uri's var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var incomeReportUri = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; var expenseReportUri = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; diff --git a/routes/web.php b/routes/web.php index e3014bd0b6..f7ad436d8f 100755 --- a/routes/web.php +++ b/routes/web.php @@ -317,10 +317,10 @@ Route::group( * Chart\Report Controller */ Route::group( - ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/report'], function () { - Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'ReportController@operations']); - Route::get('operations-sum/{accountList}/{start_date}/{end_date}/', ['uses' => 'ReportController@operationsSum']); - Route::get('net-worth/{accountList}/{start_date}/{end_date}/', ['uses' => 'ReportController@netWorth']); + ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/report', 'as' => 'chart.report.'], function () { + Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'ReportController@operations' ,'as' => 'operations']); + Route::get('operations-sum/{accountList}/{start_date}/{end_date}/', ['uses' => 'ReportController@sum', 'as' => 'sum']); + Route::get('net-worth/{accountList}/{start_date}/{end_date}/', ['uses' => 'ReportController@netWorth', 'as' => 'net-worth']); } ); @@ -340,8 +340,8 @@ Route::group( Route::get('finished/{importJob}', ['uses' => 'ImportController@finished', 'as' => 'finished']); Route::post('upload', ['uses' => 'ImportController@upload', 'as' => 'upload']); - Route::post('configure/{importJob}', ['uses' => 'ImportController@postConfigure', 'as' => 'process_configuration']); - Route::post('settings/{importJob}', ['uses' => 'ImportController@postSettings', 'as' => 'postSettings']); + Route::post('configure/{importJob}', ['uses' => 'ImportController@postConfigure', 'as' => 'process-configuration']); + Route::post('settings/{importJob}', ['uses' => 'ImportController@postSettings', 'as' => 'post-settings']); Route::post('start/{importJob}', ['uses' => 'ImportController@start', 'as' => 'start']); From 628c7cd05592568dd5c5dcefeb55b6f1b85ad90e Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 08:59:08 +0100 Subject: [PATCH 079/110] Many more route fixes. --- app/Helpers/Report/BalanceReportHelper.php | 4 +- .../Report/BalanceReportHelperInterface.php | 4 +- app/Helpers/Report/ReportHelper.php | 2 +- app/Helpers/Report/ReportHelperInterface.php | 2 +- .../Controllers/Report/AccountController.php | 10 +-- .../Controllers/Report/BalanceController.php | 8 +-- .../Controllers/Report/CategoryController.php | 69 +++++++++++-------- ...ontroller.php => OperationsController.php} | 36 +++++----- .../Transaction/ConvertController.php | 4 +- .../Transaction/SingleController.php | 4 +- .../Transaction/SplitController.php | 2 +- .../Controllers/TransactionController.php | 2 +- app/Repositories/Account/AccountTasker.php | 4 +- .../Account/AccountTaskerInterface.php | 4 +- ...ncome-vs-expenses.twig => operations.twig} | 0 resources/views/rules/rule-group/create.twig | 2 +- resources/views/rules/rule-group/delete.twig | 2 +- resources/views/rules/rule-group/edit.twig | 2 +- .../rules/rule-group/select-transactions.twig | 2 +- resources/views/rules/rule/edit.twig | 2 +- resources/views/transactions/convert.twig | 2 +- resources/views/transactions/edit-split.twig | 2 +- resources/views/transactions/edit.twig | 2 +- resources/views/transactions/show.twig | 6 +- routes/web.php | 46 ++++++------- 25 files changed, 112 insertions(+), 111 deletions(-) rename app/Http/Controllers/Report/{InOutController.php => OperationsController.php} (87%) rename resources/views/reports/partials/{income-vs-expenses.twig => operations.twig} (100%) diff --git a/app/Helpers/Report/BalanceReportHelper.php b/app/Helpers/Report/BalanceReportHelper.php index 4210cc66fe..acd623a2a9 100644 --- a/app/Helpers/Report/BalanceReportHelper.php +++ b/app/Helpers/Report/BalanceReportHelper.php @@ -51,13 +51,13 @@ class BalanceReportHelper implements BalanceReportHelperInterface /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * * @return Balance */ - public function getBalanceReport(Carbon $start, Carbon $end, Collection $accounts): Balance + public function getBalanceReport(Collection $accounts, Carbon $start, Carbon $end): Balance { $balance = new Balance; $header = new BalanceHeader; diff --git a/app/Helpers/Report/BalanceReportHelperInterface.php b/app/Helpers/Report/BalanceReportHelperInterface.php index 5aa14d09cb..6687eb6cf6 100644 --- a/app/Helpers/Report/BalanceReportHelperInterface.php +++ b/app/Helpers/Report/BalanceReportHelperInterface.php @@ -26,11 +26,11 @@ use Illuminate\Support\Collection; interface BalanceReportHelperInterface { /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * * @return Balance */ - public function getBalanceReport(Carbon $start, Carbon $end, Collection $accounts): Balance; + public function getBalanceReport(Collection $accounts, Carbon $start, Carbon $end): Balance; } diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index e75c49ae79..4644407497 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -118,7 +118,7 @@ class ReportHelper implements ReportHelperInterface * * @return CategoryCollection */ - public function getCategoryReport(Carbon $start, Carbon $end, Collection $accounts): CategoryCollection + public function getCategoryReport(Collection $accounts, Carbon $start, Carbon $end): CategoryCollection { $object = new CategoryCollection; /** @var CategoryRepositoryInterface $repository */ diff --git a/app/Helpers/Report/ReportHelperInterface.php b/app/Helpers/Report/ReportHelperInterface.php index a4ec6ad874..6e7343629d 100644 --- a/app/Helpers/Report/ReportHelperInterface.php +++ b/app/Helpers/Report/ReportHelperInterface.php @@ -49,7 +49,7 @@ interface ReportHelperInterface * * @return CategoryCollection */ - public function getCategoryReport(Carbon $start, Carbon $end, Collection $accounts): CategoryCollection; + public function getCategoryReport(Collection $accounts, Carbon $start, Carbon $end): CategoryCollection; /** * @param Carbon $date diff --git a/app/Http/Controllers/Report/AccountController.php b/app/Http/Controllers/Report/AccountController.php index 85da130558..c36c6c7aea 100644 --- a/app/Http/Controllers/Report/AccountController.php +++ b/app/Http/Controllers/Report/AccountController.php @@ -29,13 +29,13 @@ class AccountController extends Controller { /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * - * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View + * @return mixed|string */ - public function accountReport(Carbon $start, Carbon $end, Collection $accounts) + public function general(Collection $accounts, Carbon $start, Carbon $end) { // chart properties for cache: $cache = new CacheProperties; @@ -47,9 +47,9 @@ class AccountController extends Controller return $cache->get(); } - + /** @var AccountTaskerInterface $accountTasker */ $accountTasker = app(AccountTaskerInterface::class); - $accountReport = $accountTasker->getAccountReport($start, $end, $accounts); + $accountReport = $accountTasker->getAccountReport($accounts, $start, $end); $result = view('reports.partials.accounts', compact('accountReport'))->render(); $cache->store($result); diff --git a/app/Http/Controllers/Report/BalanceController.php b/app/Http/Controllers/Report/BalanceController.php index 74c1d393fb..905aa429c4 100644 --- a/app/Http/Controllers/Report/BalanceController.php +++ b/app/Http/Controllers/Report/BalanceController.php @@ -30,13 +30,13 @@ class BalanceController extends Controller /** * @param BalanceReportHelperInterface $helper + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * - * @return string + * @return mixed|string */ - public function balanceReport(BalanceReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) + public function general(BalanceReportHelperInterface $helper,Collection $accounts, Carbon $start, Carbon $end) { @@ -50,7 +50,7 @@ class BalanceController extends Controller return $cache->get(); } - $balance = $helper->getBalanceReport($start, $end, $accounts); + $balance = $helper->getBalanceReport($accounts, $start, $end); $result = view('reports.partials.balance', compact('balance'))->render(); $cache->store($result); diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index 7d6405d494..fd56bead5f 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -31,34 +31,6 @@ use Navigation; */ class CategoryController extends Controller { - /** - * @param ReportHelperInterface $helper - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View - */ - public function categoryReport(ReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) - { - // chart properties for cache: - $cache = new CacheProperties; - $cache->addProperty($start); - $cache->addProperty($end); - $cache->addProperty('category-report'); - $cache->addProperty($accounts->pluck('id')->toArray()); - if ($cache->has()) { - return $cache->get(); - } - - $categories = $helper->getCategoryReport($start, $end, $accounts); - - $result = view('reports.partials.categories', compact('categories'))->render(); - $cache->store($result); - - return $result; - } - /** * @param Collection $accounts * @param Carbon $start @@ -75,6 +47,7 @@ class CategoryController extends Controller $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { Log::debug('Return report from cache'); + return $cache->get(); } /** @var CategoryRepositoryInterface $repository */ @@ -84,7 +57,7 @@ class CategoryController extends Controller $data[0] = $repository->periodExpensesNoCategory($accounts, $start, $end); $report = $this->filterReport($data); $periods = Navigation::listOfPeriods($start, $end); - $result = view('reports.partials.category-period', compact('report', 'periods'))->render(); + $result = view('reports.partials.category-period', compact('report', 'periods'))->render(); $cache->store($result); @@ -108,6 +81,7 @@ class CategoryController extends Controller $cache->addProperty($accounts->pluck('id')->toArray()); if ($cache->has()) { Log::debug('Return report from cache'); + return $cache->get(); } /** @var CategoryRepositoryInterface $repository */ @@ -117,13 +91,48 @@ class CategoryController extends Controller $data[0] = $repository->periodIncomeNoCategory($accounts, $start, $end); $report = $this->filterReport($data); $periods = Navigation::listOfPeriods($start, $end); - $result = view('reports.partials.category-period', compact('report', 'periods'))->render(); + $result = view('reports.partials.category-period', compact('report', 'periods'))->render(); $cache->store($result); return $result; } + /** + * @param ReportHelperInterface $helper + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return mixed|string + */ + public function operations(Collection $accounts, Carbon $start, Carbon $end) + { + // chart properties for cache: + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('category-report'); + $cache->addProperty($accounts->pluck('id')->toArray()); + if ($cache->has()) { + return $cache->get(); + } + + /** @var CategoryRepositoryInterface $repository */ + $repository = app(CategoryRepositoryInterface::class); + $categories = $repository->getCategories(); + $report = []; + /** @var Category $category */ + foreach ($categories as $category) { + $spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $end); + $report[$category->id] = ['name' => $category->name, 'spent' => $spent]; + } + + $result = view('reports.partials.categories', compact('report'))->render(); + $cache->store($result); + + return $result; + } /** * Filters empty results from category period report diff --git a/app/Http/Controllers/Report/InOutController.php b/app/Http/Controllers/Report/OperationsController.php similarity index 87% rename from app/Http/Controllers/Report/InOutController.php rename to app/Http/Controllers/Report/OperationsController.php index 7e5ee6bc95..817d008001 100644 --- a/app/Http/Controllers/Report/InOutController.php +++ b/app/Http/Controllers/Report/OperationsController.php @@ -1,6 +1,6 @@ render(); + $result = view('reports.partials.operations', compact('incomeSum', 'expensesSum'))->render(); $cache->store($result); return $result; @@ -103,14 +102,13 @@ class InOutController extends Controller } /** - * @param ReportHelperInterface $helper - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end * - * @return \Illuminate\Http\JsonResponse + * @return string */ - public function incomeReport(ReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) + public function income(Collection $accounts, Carbon $start, Carbon $end) { // chart properties for cache: $cache = new CacheProperties; diff --git a/app/Http/Controllers/Transaction/ConvertController.php b/app/Http/Controllers/Transaction/ConvertController.php index 434300face..c06fa91ff4 100644 --- a/app/Http/Controllers/Transaction/ConvertController.php +++ b/app/Http/Controllers/Transaction/ConvertController.php @@ -62,7 +62,7 @@ class ConvertController extends Controller * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|View */ - public function convert(TransactionType $destinationType, TransactionJournal $journal) + public function index(TransactionType $destinationType, TransactionJournal $journal) { if ($this->isOpeningBalance($journal)) { return $this->redirectToAccount($journal); @@ -115,7 +115,7 @@ class ConvertController extends Controller * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ - public function submit(Request $request, JournalRepositoryInterface $repository, TransactionType $destinationType, TransactionJournal $journal) + public function postIndex(Request $request, JournalRepositoryInterface $repository, TransactionType $destinationType, TransactionJournal $journal) { if ($this->isOpeningBalance($journal)) { return $this->redirectToAccount($journal); diff --git a/app/Http/Controllers/Transaction/SingleController.php b/app/Http/Controllers/Transaction/SingleController.php index ae3481bfcd..ddf9115e9a 100644 --- a/app/Http/Controllers/Transaction/SingleController.php +++ b/app/Http/Controllers/Transaction/SingleController.php @@ -179,7 +179,7 @@ class SingleController extends Controller $count = $journal->transactions()->count(); if ($count > 2) { - return redirect(route('transactions.edit-split', [$journal->id])); + return redirect(route('transactions.split.edit', [$journal->id])); } $what = strtolower(TransactionJournal::transactionTypeStr($journal)); @@ -286,7 +286,7 @@ class SingleController extends Controller if ($doSplit === true) { // redirect to edit screen: - return redirect(route('transactions.edit-split', [$journal->id])); + return redirect(route('transactions.split.edit', [$journal->id])); } diff --git a/app/Http/Controllers/Transaction/SplitController.php b/app/Http/Controllers/Transaction/SplitController.php index 38c40f3f40..595fb2ddbe 100644 --- a/app/Http/Controllers/Transaction/SplitController.php +++ b/app/Http/Controllers/Transaction/SplitController.php @@ -157,7 +157,7 @@ class SplitController extends Controller // set value so edit routine will not overwrite URL: Session::put('transactions.edit-split.fromUpdate', true); - return redirect(route('transactions.edit-split', [$journal->id]))->withInput(['return_to_edit' => 1]); + return redirect(route('transactions.split.edit', [$journal->id]))->withInput(['return_to_edit' => 1]); } // redirect to previous URL. diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.php index 36214cf76c..3a1c4415e7 100644 --- a/app/Http/Controllers/TransactionController.php +++ b/app/Http/Controllers/TransactionController.php @@ -146,7 +146,7 @@ class TransactionController extends Controller * * @return View */ - public function indexDate(Request $request, string $what, string $date) + public function indexByDate(Request $request, string $what, string $date) { $carbon = new Carbon($date); $range = Preferences::get('viewRange', '1M')->data; diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index b485fed700..0a892dd5b2 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -106,13 +106,13 @@ class AccountTasker implements AccountTaskerInterface } /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * * @return AccountCollection */ - public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection + public function getAccountReport(Collection $accounts, Carbon $start, Carbon $end): AccountCollection { $startAmount = '0'; $endAmount = '0'; diff --git a/app/Repositories/Account/AccountTaskerInterface.php b/app/Repositories/Account/AccountTaskerInterface.php index 4e023abeac..67ab246ed9 100644 --- a/app/Repositories/Account/AccountTaskerInterface.php +++ b/app/Repositories/Account/AccountTaskerInterface.php @@ -50,12 +50,12 @@ interface AccountTaskerInterface public function amountOutInPeriod(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): string; /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * * @return AccountCollection */ - public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection; + public function getAccountReport(Collection $accounts, Carbon $start, Carbon $end): AccountCollection; } diff --git a/resources/views/reports/partials/income-vs-expenses.twig b/resources/views/reports/partials/operations.twig similarity index 100% rename from resources/views/reports/partials/income-vs-expenses.twig rename to resources/views/reports/partials/operations.twig diff --git a/resources/views/rules/rule-group/create.twig b/resources/views/rules/rule-group/create.twig index e8243d4d4c..bdd99103d2 100644 --- a/resources/views/rules/rule-group/create.twig +++ b/resources/views/rules/rule-group/create.twig @@ -5,7 +5,7 @@ {% endblock %} {% block content %} - +
    diff --git a/resources/views/rules/rule-group/delete.twig b/resources/views/rules/rule-group/delete.twig index 6690c83efc..6b7e838576 100644 --- a/resources/views/rules/rule-group/delete.twig +++ b/resources/views/rules/rule-group/delete.twig @@ -6,7 +6,7 @@ {% block content %} - +
    diff --git a/resources/views/rules/rule-group/edit.twig b/resources/views/rules/rule-group/edit.twig index e556feabb5..bb9fe698b2 100644 --- a/resources/views/rules/rule-group/edit.twig +++ b/resources/views/rules/rule-group/edit.twig @@ -5,7 +5,7 @@ {% endblock %} {% block content %} - {{ Form.model(ruleGroup, {'class' : 'form-horizontal','id' : 'update','url' : route('rules.rule-group.update',ruleGroup.id) } ) }} + {{ Form.model(ruleGroup, {'class' : 'form-horizontal','id' : 'update','url' : route('rule-groups.update',ruleGroup.id) } ) }}
    diff --git a/resources/views/rules/rule-group/select-transactions.twig b/resources/views/rules/rule-group/select-transactions.twig index 90a85ee0d7..6fc61bf15e 100644 --- a/resources/views/rules/rule-group/select-transactions.twig +++ b/resources/views/rules/rule-group/select-transactions.twig @@ -6,7 +6,7 @@ {% block content %} - +
    diff --git a/resources/views/rules/rule/edit.twig b/resources/views/rules/rule/edit.twig index 1260c34b52..0887615600 100644 --- a/resources/views/rules/rule/edit.twig +++ b/resources/views/rules/rule/edit.twig @@ -5,7 +5,7 @@ {% endblock %} {% block content %} - {{ Form.model(rule, {'class' : 'form-horizontal','id' : 'store','url' : route('rules.rule.update', rule.id)}) }} + {{ Form.model(rule, {'class' : 'form-horizontal','id' : 'store','url' : route('rules.update', rule.id)}) }}
    diff --git a/resources/views/transactions/convert.twig b/resources/views/transactions/convert.twig index 40c8429b71..b56227497a 100644 --- a/resources/views/transactions/convert.twig +++ b/resources/views/transactions/convert.twig @@ -5,7 +5,7 @@ {% endblock %} {% block content %} -
    diff --git a/resources/views/transactions/edit-split.twig b/resources/views/transactions/edit-split.twig index b43d250629..f47ec11af3 100644 --- a/resources/views/transactions/edit-split.twig +++ b/resources/views/transactions/edit-split.twig @@ -4,7 +4,7 @@ {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, journal) }} {% endblock %} {% block content %} - diff --git a/resources/views/transactions/edit.twig b/resources/views/transactions/edit.twig index 2c167d078e..b3e3a37326 100644 --- a/resources/views/transactions/edit.twig +++ b/resources/views/transactions/edit.twig @@ -211,7 +211,7 @@
    diff --git a/resources/views/transactions/show.twig b/resources/views/transactions/show.twig index 82bba01b45..d9b8242094 100644 --- a/resources/views/transactions/show.twig +++ b/resources/views/transactions/show.twig @@ -217,7 +217,7 @@ {% if journal.transactionType.type != "Withdrawal" %}

    - + {{ ('convert_'~journal.transactionType.type~'_to_withdrawal')|_ }}

    @@ -225,7 +225,7 @@ {% if journal.transactionType.type != "Deposit" %}

    - + {{ ('convert_'~journal.transactionType.type~'_to_deposit')|_ }}

    @@ -234,7 +234,7 @@ {% if journal.transactionType.type != "Transfer" %}

    - + {{ ('convert_'~journal.transactionType.type~'_to_transfer')|_ }}

    diff --git a/routes/web.php b/routes/web.php index f7ad436d8f..1165efc8cc 100755 --- a/routes/web.php +++ b/routes/web.php @@ -308,7 +308,6 @@ Route::group( */ Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/piggy-bank'], function () { - // continue here. Route::get('{piggyBank}', ['uses' => 'PiggyBankController@history']); } ); @@ -398,8 +397,8 @@ Route::group( Route::group( ['middleware' => 'user-full-auth', 'prefix' => 'piggy-banks', 'as' => 'piggy-banks.'], function () { Route::get('', ['uses' => 'PiggyBankController@index', 'as' => 'index']); - Route::get('add/{piggyBank}', ['uses' => 'PiggyBankController@add', 'as' => 'addMoney']); - Route::get('remove/{piggyBank}', ['uses' => 'PiggyBankController@remove', 'as' => 'removeMoney']); + Route::get('add/{piggyBank}', ['uses' => 'PiggyBankController@add', 'as' => 'add-money']); + Route::get('remove/{piggyBank}', ['uses' => 'PiggyBankController@remove', 'as' => 'remove-money']); Route::get('add-money/{piggyBank}', ['uses' => 'PiggyBankController@addMobile', 'as' => 'add-money-mobile']); Route::get('remove-money/{piggyBank}', ['uses' => 'PiggyBankController@removeMobile', 'as' => 'remove-money-mobile']); Route::get('create', ['uses' => 'PiggyBankController@create', 'as' => 'create']); @@ -442,7 +441,7 @@ Route::group( Route::get('change-password', ['uses' => 'ProfileController@changePassword', 'as' => 'change-password']); Route::get('delete-account', ['uses' => 'ProfileController@deleteAccount', 'as' => 'delete-account']); Route::post('delete-account', ['uses' => 'ProfileController@postDeleteAccount', 'as' => 'delete-account.post']); - Route::post('change-password', ['uses' => 'ProfileController@postChangePassword', 'as' => 'change-password.store']); + Route::post('change-password', ['uses' => 'ProfileController@postChangePassword', 'as' => 'change-password.post']); } ); @@ -453,8 +452,6 @@ Route::group( ['middleware' => 'user-full-auth', 'prefix' => 'reports', 'as' => 'reports.'], function () { Route::get('', ['uses' => 'ReportController@index', 'as' => 'index']); - - Route::get('options/{reportType}', ['uses' => 'ReportController@options', 'as' => 'options']); Route::get('default/{accountList}/{start_date}/{end_date}', ['uses' => 'ReportController@defaultReport', 'as' => 'report.default']); Route::get('audit/{accountList}/{start_date}/{end_date}', ['uses' => 'ReportController@auditReport', 'as' => 'report.audit']); @@ -490,8 +487,6 @@ Route::group( */ Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/category', 'as' => 'report-data.category.'], function () { - - Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@operations', 'as' => 'operations']); Route::get('income/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@income', 'as' => 'income']); Route::get('expenses/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@expenses', 'as' => 'expenses']); @@ -505,9 +500,7 @@ Route::group( Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/balance', 'as' => 'report-data.balance.'], function () { - Route::get( - 'general/{accountList}/{start_date}/{end_date}', ['uses' => 'BalanceController@general', 'as' => 'general'] - ); + Route::get('general/{accountList}/{start_date}/{end_date}', ['uses' => 'BalanceController@general', 'as' => 'general']); } ); @@ -516,6 +509,7 @@ Route::group( */ Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/budget', 'as' => 'report-data.budget.'], function () { + Route::get('general/{accountList}/{start_date}/{end_date}/', ['uses' => 'BudgetController@general', 'as' => 'general']); Route::get('period/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period', 'as' => 'period']); @@ -529,18 +523,18 @@ Route::group( ['middleware' => 'user-full-auth', 'prefix' => 'rules', 'as' => 'rules.'], function () { Route::get('', ['uses' => 'RuleController@index', 'as' => 'index']); - Route::get('create/{ruleGroup}', ['uses' => 'RuleController@create', 'as' => 'rule.create']); - Route::get('up/{rule}', ['uses' => 'RuleController@up', 'as' => 'rule.up']); - Route::get('down/{rule}', ['uses' => 'RuleController@down', 'as' => 'rule.down']); - Route::get('edit/{rule}', ['uses' => 'RuleController@edit', 'as' => 'rule.edit']); - Route::get('delete/{rule}', ['uses' => 'RuleController@delete', 'as' => 'rule.delete']); - Route::get('test', ['uses' => 'RuleController@testTriggers', 'as' => 'rule.test-triggers']); + Route::get('create/{ruleGroup}', ['uses' => 'RuleController@create', 'as' => 'create']); + Route::get('up/{rule}', ['uses' => 'RuleController@up', 'as' => 'up']); + Route::get('down/{rule}', ['uses' => 'RuleController@down', 'as' => 'down']); + Route::get('edit/{rule}', ['uses' => 'RuleController@edit', 'as' => 'edit']); + Route::get('delete/{rule}', ['uses' => 'RuleController@delete', 'as' => 'delete']); + Route::get('test', ['uses' => 'RuleController@testTriggers', 'as' => 'test-triggers']); - Route::post('trigger/order/{rule}', ['uses' => 'RuleController@reorderRuleTriggers']); - Route::post('action/order/{rule}', ['uses' => 'RuleController@reorderRuleActions']); - Route::post('store/{ruleGroup}', ['uses' => 'RuleController@store', 'as' => 'rule.store']); - Route::post('update/{rule}', ['uses' => 'RuleController@update', 'as' => 'rule.update']); - Route::post('destroy/{rule}', ['uses' => 'RuleController@destroy', 'as' => 'rule.destroy']); + Route::post('trigger/order/{rule}', ['uses' => 'RuleController@reorderRuleTriggers','as' => 'reorder-triggers']); + Route::post('action/order/{rule}', ['uses' => 'RuleController@reorderRuleActions', 'as' => 'reorder-actions']); + Route::post('store/{ruleGroup}', ['uses' => 'RuleController@store', 'as' => 'store']); + Route::post('update/{rule}', ['uses' => 'RuleController@update', 'as' => 'update']); + Route::post('destroy/{rule}', ['uses' => 'RuleController@destroy', 'as' => 'destroy']); } ); @@ -576,7 +570,7 @@ Route::group( /** - * Name Controller + * Tag Controller */ Route::group( ['middleware' => 'user-full-auth', 'prefix' => 'tags', 'as' => 'tags.'], function () { @@ -600,7 +594,7 @@ Route::group( ['middleware' => 'user-full-auth', 'prefix' => 'transactions', 'as' => 'transactions.'], function () { Route::get('{what}', ['uses' => 'TransactionController@index', 'as' => 'index'])->where(['what' => 'withdrawal|deposit|transfers']); Route::get('{what}/all', ['uses' => 'TransactionController@indexAll', 'as' => 'index.all'])->where(['what' => 'withdrawal|deposit|transfers']); - Route::get('{what}/{date}', ['uses' => 'TransactionController@indexDate', 'as' => 'index.date'])->where(['what' => 'withdrawal|deposit|transfers']); + Route::get('{what}/{date}', ['uses' => 'TransactionController@indexByDate', 'as' => 'index.date'])->where(['what' => 'withdrawal|deposit|transfers']); Route::get('show/{tj}', ['uses' => 'TransactionController@show', 'as' => 'show']); Route::post('reorder', ['uses' => 'TransactionController@reorder', 'as' => 'reorder']); } @@ -644,7 +638,7 @@ Route::group( ); /** - * Name Controller + * Convert Controller */ Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Transaction', 'prefix' => 'transactions/convert', 'as' => 'transactions.convert.'], function () { @@ -655,7 +649,7 @@ Route::group( ); /** - * Name Controller + * Report Popup Controller */ Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Popup', 'prefix' => 'popup', 'as' => 'popup.'], function () { From d5ddd447bc33895cf232bf8df659b3848b29da7b Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 09:01:26 +0100 Subject: [PATCH 080/110] Approved. Step name: Proofread --- resources/lang/nl_NL/firefly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.php index 133343784a..d1643ac89f 100644 --- a/resources/lang/nl_NL/firefly.php +++ b/resources/lang/nl_NL/firefly.php @@ -84,7 +84,7 @@ return [ 'destination_accounts' => 'Doelrekening(en)', 'user_id_is' => 'Je gebruikersnummer is :user', 'field_supports_markdown' => 'Dit veld ondersteunt Markdown.', - 'need_more_help' => 'Als je meer hulp nodig hebt met Firefly III, open dan een ticket op Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'Er zijn hier geen transacties te zien', 'show_all_no_filter' => 'Laat alle transacties zien, zonder te groeperen op datum.', 'expenses_by_category' => 'Uitgaven per categorie', From 690b498197ab45a73dca080ebba13efa6d64cbad Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 09:01:47 +0100 Subject: [PATCH 081/110] New translations --- resources/lang/pt_BR/firefly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.php index 6a2fbfb1d3..5368d3515d 100644 --- a/resources/lang/pt_BR/firefly.php +++ b/resources/lang/pt_BR/firefly.php @@ -84,7 +84,7 @@ return [ 'destination_accounts' => 'Conta(s) de destino', 'user_id_is' => 'Seu id de usuário é :user', 'field_supports_markdown' => 'This field supports Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', 'expenses_by_category' => 'Despesa por categoria', From 5849fe2c304a0d8fb399d27e8e0bc0b4d6549e14 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 09:01:55 +0100 Subject: [PATCH 082/110] New translations --- resources/lang/zh_HK/firefly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/zh_HK/firefly.php b/resources/lang/zh_HK/firefly.php index 96d876df40..377f4c2ca3 100644 --- a/resources/lang/zh_HK/firefly.php +++ b/resources/lang/zh_HK/firefly.php @@ -84,7 +84,7 @@ return [ 'destination_accounts' => 'Destination account(s)', 'user_id_is' => 'Your user id is :user', 'field_supports_markdown' => 'This field supports Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', 'expenses_by_category' => 'Expenses by category', From d8e336534598c0e60e2696887f56449e3e740980 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 09:01:58 +0100 Subject: [PATCH 083/110] New translations --- resources/lang/zh_TW/firefly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/zh_TW/firefly.php b/resources/lang/zh_TW/firefly.php index 111ff06b35..9ed680fc3c 100644 --- a/resources/lang/zh_TW/firefly.php +++ b/resources/lang/zh_TW/firefly.php @@ -84,7 +84,7 @@ return [ 'destination_accounts' => '目標帳戶', 'user_id_is' => 'Your user id is :user', 'field_supports_markdown' => 'This field supports Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', 'expenses_by_category' => 'Expenses by category', From ad00bc2806fab520f68f0a050974d42e4eeed025 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 09:02:08 +0100 Subject: [PATCH 084/110] New translations --- resources/lang/fr_FR/firefly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/fr_FR/firefly.php b/resources/lang/fr_FR/firefly.php index a9eef1e64d..cc80087ff2 100644 --- a/resources/lang/fr_FR/firefly.php +++ b/resources/lang/fr_FR/firefly.php @@ -84,7 +84,7 @@ return [ 'destination_accounts' => 'Compte(s) de destination', 'user_id_is' => 'Your user id is :user', 'field_supports_markdown' => 'This field supports Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', 'expenses_by_category' => 'Expenses by category', From 001a6e310e49ba7fb5bd9c8510ebcc30b807e043 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 09:02:13 +0100 Subject: [PATCH 085/110] New translations --- resources/lang/de_DE/firefly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/de_DE/firefly.php b/resources/lang/de_DE/firefly.php index c96d7b44d5..8dde88273d 100644 --- a/resources/lang/de_DE/firefly.php +++ b/resources/lang/de_DE/firefly.php @@ -84,7 +84,7 @@ return [ 'destination_accounts' => 'Zielkonto', 'user_id_is' => 'Ihre Benutzerkennung ist :user', 'field_supports_markdown' => 'This field supports Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', 'expenses_by_category' => 'Ausgaben nach Kategorie', From 27848f55ce3e70209c048975841649eebd198c8f Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 09:02:19 +0100 Subject: [PATCH 086/110] New translations --- resources/lang/hr_HR/firefly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/hr_HR/firefly.php b/resources/lang/hr_HR/firefly.php index 96d876df40..377f4c2ca3 100644 --- a/resources/lang/hr_HR/firefly.php +++ b/resources/lang/hr_HR/firefly.php @@ -84,7 +84,7 @@ return [ 'destination_accounts' => 'Destination account(s)', 'user_id_is' => 'Your user id is :user', 'field_supports_markdown' => 'This field supports Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', 'expenses_by_category' => 'Expenses by category', From c799fc655d852b6e6ec44da2f669e208df7e1d1d Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 09:07:50 +0100 Subject: [PATCH 087/110] Final set of route changes. --- .../Controllers/Popup/ReportController.php | 2 +- public/js/ff/reports/default/all.js | 5 +-- public/js/ff/reports/default/multi-year.js | 12 +++--- resources/views/budgets/index.twig | 2 +- resources/views/list/piggy-banks.twig | 4 +- resources/views/profile/change-password.twig | 2 +- resources/views/reports/default/month.twig | 14 +++---- .../views/reports/default/multi-year.twig | 40 ++++++++++++++----- resources/views/reports/default/year.twig | 1 - resources/views/reports/index.twig | 35 ++++++++++++---- resources/views/reports/partials/budgets.twig | 2 +- .../views/reports/partials/categories.twig | 14 ++++--- resources/views/rules/index.twig | 24 +++++------ resources/views/rules/rule/create.twig | 2 +- resources/views/rules/rule/delete.twig | 2 +- 15 files changed, 99 insertions(+), 62 deletions(-) diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.php index c9fd9afe8c..e10a016495 100644 --- a/app/Http/Controllers/Popup/ReportController.php +++ b/app/Http/Controllers/Popup/ReportController.php @@ -46,7 +46,7 @@ class ReportController extends Controller * @return \Illuminate\Http\JsonResponse * @throws FireflyException */ - public function info(Request $request) + public function general(Request $request) { $attributes = $request->get('attributes') ?? []; $attributes = $this->parseAttributes($attributes); diff --git a/public/js/ff/reports/default/all.js b/public/js/ff/reports/default/all.js index f5c968f05f..b19187497b 100644 --- a/public/js/ff/reports/default/all.js +++ b/public/js/ff/reports/default/all.js @@ -1,4 +1,4 @@ -/* globals startDate, showOnlyTop, showFullList, endDate, reportType, expenseReportUri, accountIds, incExpReportUri,accountReportUri, incomeReportUri */ +/* globals startDate, showOnlyTop, showFullList, endDate, expenseReportUri, accountIds, incExpReportUri,accountReportUri, incomeReportUri */ /* * all.js * Copyright (C) 2016 thegrumpydictator@gmail.com @@ -39,10 +39,9 @@ function clickInfoButton(e) { // add some more elements: attributes.startDate = startDate; attributes.endDate = endDate; - attributes.reportType = reportType; attributes.accounts = accountIds; - $.getJSON('popup/report', {attributes: attributes}).done(respondInfoButton).fail(errorInfoButton); + $.getJSON('popup/general', {attributes: attributes}).done(respondInfoButton).fail(errorInfoButton); } function errorInfoButton(data) { diff --git a/public/js/ff/reports/default/multi-year.js b/public/js/ff/reports/default/multi-year.js index 3988ee298b..b1f755a8f1 100644 --- a/public/js/ff/reports/default/multi-year.js +++ b/public/js/ff/reports/default/multi-year.js @@ -1,19 +1,17 @@ -/* globals budgetMultiUri, accountIds */ - - $(function () { "use strict"; drawChart(); loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUri); - loadAjaxPartial('categoryPeriodReport', categoryPeriodReportUri); + loadAjaxPartial('categoryExpense', categoryExpenseUri); + loadAjaxPartial('categoryIncome', categoryIncomeUri); }); function drawChart() { "use strict"; // income and expense over multi year: - lineChart('chart/report/net-worth/' + startDate + '/' + endDate + '/' + accountIds, 'net-worth'); - columnChart('chart/report/in-out/' + startDate + '/' + endDate + '/' + accountIds, 'income-expenses-chart'); - columnChart('chart/report/in-out-sum/' + startDate + '/' + endDate + '/' + accountIds, 'income-expenses-sum-chart'); + lineChart(netWorthUri, 'net-worth'); + columnChart(opChartUri, 'income-expenses-chart'); + columnChart(sumChartUri, 'income-expenses-sum-chart'); } diff --git a/resources/views/budgets/index.twig b/resources/views/budgets/index.twig index 827cd7d79d..691a92638a 100644 --- a/resources/views/budgets/index.twig +++ b/resources/views/budgets/index.twig @@ -156,7 +156,7 @@ {% for other in budget.otherRepetitions %} {% if other.id != budget.currentRep.id %}
  • Budgeted - {{ other.amount|formatAmountPlain }} + {{ other.amount|formatAmountPlain }} between {{ other.startdate.formatLocalized(monthAndDayFormat) }} and {{ other.enddate.formatLocalized(monthAndDayFormat) }}. diff --git a/resources/views/list/piggy-banks.twig b/resources/views/list/piggy-banks.twig index 3a049b0e1f..269c675dfc 100644 --- a/resources/views/list/piggy-banks.twig +++ b/resources/views/list/piggy-banks.twig @@ -26,7 +26,7 @@ {% if piggyBank.savedSoFar > 0 %} - + {% endif %} @@ -51,7 +51,7 @@ {% if piggyBank.leftToSave > 0 %} - + {% endif %} diff --git a/resources/views/profile/change-password.twig b/resources/views/profile/change-password.twig index d313e31e36..248c51b604 100644 --- a/resources/views/profile/change-password.twig +++ b/resources/views/profile/change-password.twig @@ -5,7 +5,7 @@ {% endblock %} {% block content %} - +
    diff --git a/resources/views/reports/default/month.twig b/resources/views/reports/default/month.twig index f7edc09dac..352f5a2d1c 100644 --- a/resources/views/reports/default/month.twig +++ b/resources/views/reports/default/month.twig @@ -133,13 +133,13 @@ var accountIds = '{{ accountIds }}'; // uri's for data - var categoryReportUri = '{{ route('report-data.category.operations', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var budgetReportUri = '{{ route('report-data.budget.general', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var balanceReportUri = '{{ route('report-data.balance.general', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var accountReportUri = '{{ route('report-data.account.general', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var incomeReportUri = '{{ route('report-data.operations.income', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var expenseReportUri = '{{ route('report-data.operations.expenses', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var incExpReportUri = '{{ route('report-data.operations.operations', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; + var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryReportUri = '{{ route('report-data.category.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var budgetReportUri = '{{ route('report-data.budget.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var balanceReportUri = '{{ route('report-data.balance.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incomeReportUri = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var expenseReportUri = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incExpReportUri = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; // uri's for charts: var accountChartUri = '{{ route('chart.account.report', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; diff --git a/resources/views/reports/default/multi-year.twig b/resources/views/reports/default/multi-year.twig index c92c8f3e91..527eb84740 100644 --- a/resources/views/reports/default/multi-year.twig +++ b/resources/views/reports/default/multi-year.twig @@ -114,14 +114,27 @@
  • - {# same thing but for categories #} + {# same thing but for categories (expenses) #}
    -

    {{ 'categories'|_ }}

    +

    {{ 'categories'|_ }} ({{ 'expenses'|_ }})

    -
    +
    +
    +
    +
    +
    + + {# same thing but for categories (income) #} +
    +
    +
    +
    +

    {{ 'categories'|_ }} ({{ 'income'|_ }})

    +
    +
    @@ -159,17 +172,22 @@ // to report another URL: var startDate = '{{ start.format('Ymd') }}'; var endDate = '{{ end.format('Ymd') }}'; - var reportType = '{{ reportType }}'; var accountIds = '{{ accountIds }}'; - - var accountReportUri = '{{ route('reports.data.accountReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var incomeReportUri = '{{ route('reports.data.incomeReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var expenseReportUri = '{{ route('reports.data.expenseReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var incExpReportUri = '{{ route('reports.data.incExpReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; + // report uri's + var opChartUri ='{{ route('chart.report.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var sumChartUri='{{ route('chart.report.sum', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var netWorthUri ='{{ route('chart.report.net-worth', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; - var budgetPeriodReportUri = '{{ route('reports.data.budgetPeriodReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; - var categoryPeriodReportUri = '{{ route('reports.data.categoryPeriodReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}'; + // data uri's + var accountReportUri = '{{ route('report-data.account.general', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incomeReportUri = '{{ route('report-data.operations.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var expenseReportUri = '{{ route('report-data.operations.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var incExpReportUri = '{{ route('report-data.operations.operations', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + + var budgetPeriodReportUri = '{{ route('report-data.budget.period', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryExpenseUri = '{{ route('report-data.category.expenses', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; + var categoryIncomeUri = '{{ route('report-data.category.income', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}'; diff --git a/resources/views/reports/default/year.twig b/resources/views/reports/default/year.twig index e6438a7531..aad882010d 100644 --- a/resources/views/reports/default/year.twig +++ b/resources/views/reports/default/year.twig @@ -167,7 +167,6 @@ // to report another URL: var startDate = '{{ start.format('Ymd') }}'; var endDate = '{{ end.format('Ymd') }}'; - var reportType = '{{ reportType }}'; var accountIds = '{{ accountIds }}'; // report uri's diff --git a/resources/views/reports/index.twig b/resources/views/reports/index.twig index eec3c8c134..c889d0eee2 100644 --- a/resources/views/reports/index.twig +++ b/resources/views/reports/index.twig @@ -114,17 +114,36 @@
    +

    {{ ('quick_link_default_report')|_ }}

    + + +

    {{ ('quick_link_audit_report')|_ }}

    + + {#

    {{ ('quick_link_category_report')|_ }}

    #} + + + {# + {% for type in ['default','audit'] %} -

    {{ ('quick_link_'~type~'_report')|_ }}

    +
    @@ -190,7 +190,7 @@ diff --git a/resources/views/rules/rule/create.twig b/resources/views/rules/rule/create.twig index 15b80d88af..481473712c 100644 --- a/resources/views/rules/rule/create.twig +++ b/resources/views/rules/rule/create.twig @@ -6,7 +6,7 @@ {% block content %} - + diff --git a/resources/views/rules/rule/delete.twig b/resources/views/rules/rule/delete.twig index 0d01f303b8..befd03a63b 100644 --- a/resources/views/rules/rule/delete.twig +++ b/resources/views/rules/rule/delete.twig @@ -6,7 +6,7 @@ {% block content %} - +
    From 687da83febac9b5b2aca374a9876dab9f6be83b0 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 09:09:05 +0100 Subject: [PATCH 088/110] Remove unused collections [skip ci] --- app/Helpers/Collection/Expense.php | 85 ------------------------------ app/Helpers/Collection/Income.php | 81 ---------------------------- 2 files changed, 166 deletions(-) delete mode 100644 app/Helpers/Collection/Expense.php delete mode 100644 app/Helpers/Collection/Income.php diff --git a/app/Helpers/Collection/Expense.php b/app/Helpers/Collection/Expense.php deleted file mode 100644 index 7a06e4f628..0000000000 --- a/app/Helpers/Collection/Expense.php +++ /dev/null @@ -1,85 +0,0 @@ -expenses = new Collection; - } - - /** - * @param stdClass $entry - */ - public function addOrCreateExpense(stdClass $entry) - { - $this->expenses->put($entry->id, $entry); - } - - /** - * @param string $add - */ - public function addToTotal(string $add) - { - $add = strval(round($add, 2)); - if (bccomp('0', $add) === -1) { - $add = bcmul($add, '-1'); - } - - // if amount is positive, the original transaction - // was a transfer. But since this is an expense report, - // that amount must be negative. - - $this->total = bcadd($this->total, $add); - } - - /** - * @return Collection - */ - public function getExpenses(): Collection - { - $set = $this->expenses->sortBy( - function (stdClass $object) { - return $object->amount; - } - ); - - return $set; - } - - /** - * @return string - */ - public function getTotal(): string - { - return strval(round($this->total, 2)); - } -} diff --git a/app/Helpers/Collection/Income.php b/app/Helpers/Collection/Income.php deleted file mode 100644 index 1bd6036150..0000000000 --- a/app/Helpers/Collection/Income.php +++ /dev/null @@ -1,81 +0,0 @@ -incomes = new Collection; - } - - /** - * @param stdClass $entry - */ - public function addOrCreateIncome(stdClass $entry) - { - $this->incomes->put($entry->id, $entry); - - } - - /** - * @param string $add - */ - public function addToTotal(string $add) - { - $add = strval(round($add, 2)); - $this->total = bcadd($this->total, $add); - } - - /** - * @return Collection - */ - public function getIncomes(): Collection - { - $set = $this->incomes->sortByDesc( - function (stdClass $object) { - return $object->amount; - } - ); - - return $set; - } - - /** - * @return string - */ - public function getTotal(): string - { - return strval(round($this->total, 2)); - } - - -} From 2ca584f097173ff250e508d3713e2149bdee04d6 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 09:12:04 +0100 Subject: [PATCH 089/110] Fix test. --- app/Helpers/Report/ReportHelper.php | 4 ---- tests/acceptance/Controllers/HomeControllerTest.php | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index 4644407497..ae0e4fa800 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -17,19 +17,15 @@ use Carbon\Carbon; use FireflyIII\Helpers\Collection\Bill as BillCollection; use FireflyIII\Helpers\Collection\BillLine; use FireflyIII\Helpers\Collection\Category as CategoryCollection; -use FireflyIII\Helpers\Collection\Expense; -use FireflyIII\Helpers\Collection\Income; use FireflyIII\Helpers\Collector\JournalCollectorInterface; use FireflyIII\Helpers\FiscalHelperInterface; use FireflyIII\Models\Bill; use FireflyIII\Models\Category; use FireflyIII\Models\Transaction; -use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Repositories\Bill\BillRepositoryInterface; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use Illuminate\Support\Collection; -use stdClass; /** * Class ReportHelper diff --git a/tests/acceptance/Controllers/HomeControllerTest.php b/tests/acceptance/Controllers/HomeControllerTest.php index 75e109e2a2..adeace0b8c 100755 --- a/tests/acceptance/Controllers/HomeControllerTest.php +++ b/tests/acceptance/Controllers/HomeControllerTest.php @@ -41,7 +41,7 @@ class HomeControllerTest extends TestCase public function testDisplayError() { $this->be($this->user()); - $this->call('GET', route('displayError')); + $this->call('GET', route('error')); $this->assertResponseStatus(500); } From a05c8ca35151f21537a60136e46a4da387267e54 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 09:16:36 +0100 Subject: [PATCH 090/110] New test files. --- .../Controllers/AccountControllerTest.php | 11 +++++- .../Admin/ConfigurationControllerTest.php | 12 ++++++- .../Admin/DomainControllerTest.php | 12 ++++++- .../Controllers/Admin/HomeControllerTest.php | 12 ++++++- .../Controllers/Admin/UserControllerTest.php | 12 ++++++- .../Controllers/AttachmentControllerTest.php | 11 +++++- .../Auth/ConfirmationControllerTest.php | 12 ++++++- .../Auth/ForgotPasswordControllerTest.php | 12 ++++++- .../Controllers/Auth/LoginControllerTest.php | 12 ++++++- .../Auth/PasswordControllerTest.php | 12 ++++++- .../Auth/RegisterControllerTest.php | 12 ++++++- .../Auth/ResetPasswordControllerTest.php | 12 ++++++- .../Auth/TwoFactorControllerTest.php | 12 ++++++- .../Controllers/BillControllerTest.php | 11 +++++- .../Controllers/BudgetControllerTest.php | 17 ++++++--- .../Controllers/CategoryControllerTest.php | 17 ++++++--- .../Chart/AccountControllerTest.php | 30 ++++++++++------ .../Controllers/Chart/BillControllerTest.php | 12 ++++++- .../Chart/BudgetControllerTest.php | 24 ++++++++++++- .../Chart/CategoryControllerTest.php | 24 ++++++++++++- .../Chart/CategoryReportControllerTest.php | 12 ++++++- .../Chart/PiggyBankControllerTest.php | 12 ++++++- .../Chart/ReportControllerTest.php | 24 +++++++++---- .../acceptance/Controllers/ControllerTest.php | 11 +++++- .../Controllers/CurrencyControllerTest.php | 11 +++++- .../Controllers/ExportControllerTest.php | 11 +++++- .../Controllers/HelpControllerTest.php | 11 +++++- .../Controllers/ImportControllerTest.php | 11 +++++- .../Controllers/JsonControllerTest.php | 11 +++++- .../Controllers/NewUserControllerTest.php | 11 +++++- .../Controllers/PiggyBankControllerTest.php | 11 +++++- .../Popup/ReportControllerTest.php | 18 +++++++--- .../Controllers/PreferencesControllerTest.php | 11 +++++- .../Controllers/ProfileControllerTest.php | 11 +++++- .../Report/AccountControllerTest.php | 18 +++++++--- .../Report/BalanceControllerTest.php | 18 +++++++--- .../Report/BudgetControllerTest.php | 24 +++++++++---- .../Report/CategoryControllerTest.php | 36 +++++++++++++++---- ...rTest.php => OperationsControllerTest.php} | 32 +++++++++++------ .../Controllers/ReportControllerTest.php | 11 +++++- .../Controllers/RuleControllerTest.php | 11 +++++- .../Controllers/RuleGroupControllerTest.php | 11 +++++- .../Controllers/SearchControllerTest.php | 11 +++++- .../Controllers/TagControllerTest.php | 11 +++++- .../Transaction/ConvertControllerTest.php | 24 +++++++++---- .../Transaction/MassControllerTest.php | 12 ++++++- .../Transaction/SingleControllerTest.php | 12 ++++++- .../Transaction/SplitControllerTest.php | 12 ++++++- .../Controllers/TransactionControllerTest.php | 17 ++++++--- 49 files changed, 615 insertions(+), 110 deletions(-) rename tests/acceptance/Controllers/Report/{InOutControllerTest.php => OperationsControllerTest.php} (55%) diff --git a/tests/acceptance/Controllers/AccountControllerTest.php b/tests/acceptance/Controllers/AccountControllerTest.php index b7c59f0868..adf72e3645 100644 --- a/tests/acceptance/Controllers/AccountControllerTest.php +++ b/tests/acceptance/Controllers/AccountControllerTest.php @@ -1,4 +1,13 @@ be($this->user()); $this->changeDateRange($this->user(), $range); diff --git a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php index f26a87346a..ba2cb9b48d 100644 --- a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php +++ b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php @@ -1,10 +1,20 @@ markTestIncomplete( diff --git a/tests/acceptance/Controllers/CategoryControllerTest.php b/tests/acceptance/Controllers/CategoryControllerTest.php index 81ed138644..7af66d728b 100644 --- a/tests/acceptance/Controllers/CategoryControllerTest.php +++ b/tests/acceptance/Controllers/CategoryControllerTest.php @@ -1,8 +1,17 @@ markTestIncomplete( diff --git a/tests/acceptance/Controllers/Chart/AccountControllerTest.php b/tests/acceptance/Controllers/Chart/AccountControllerTest.php index e231c341b0..b7b9cd9f26 100644 --- a/tests/acceptance/Controllers/Chart/AccountControllerTest.php +++ b/tests/acceptance/Controllers/Chart/AccountControllerTest.php @@ -1,10 +1,20 @@ markTestIncomplete( @@ -44,10 +54,10 @@ class AccountControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\AccountController::expenseByCategory - * Implement testExpenseByCategory(). + * @covers FireflyIII\Http\Controllers\Chart\AccountController::expenseCategory + * Implement testExpenseCategory(). */ - public function testExpenseByCategory() + public function testExpenseCategory() { // Remove the following lines when you implement this test. $this->markTestIncomplete( @@ -68,10 +78,10 @@ class AccountControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\AccountController::incomeByCategory - * Implement testIncomeByCategory(). + * @covers FireflyIII\Http\Controllers\Chart\AccountController::incomeCategory + * Implement testIncomeCategory(). */ - public function testIncomeByCategory() + public function testIncomeCategory() { // Remove the following lines when you implement this test. $this->markTestIncomplete( diff --git a/tests/acceptance/Controllers/Chart/BillControllerTest.php b/tests/acceptance/Controllers/Chart/BillControllerTest.php index 7c8e5c5e81..648c913371 100644 --- a/tests/acceptance/Controllers/Chart/BillControllerTest.php +++ b/tests/acceptance/Controllers/Chart/BillControllerTest.php @@ -1,10 +1,20 @@ markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + /** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. diff --git a/tests/acceptance/Controllers/Chart/CategoryControllerTest.php b/tests/acceptance/Controllers/Chart/CategoryControllerTest.php index 164c4995d1..7a5d32c32b 100644 --- a/tests/acceptance/Controllers/Chart/CategoryControllerTest.php +++ b/tests/acceptance/Controllers/Chart/CategoryControllerTest.php @@ -1,10 +1,20 @@ markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + /** * @covers FireflyIII\Http\Controllers\Chart\CategoryController::specificPeriod * Implement testSpecificPeriod(). diff --git a/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php b/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php index 3b6f57f9b8..1852b7df3c 100644 --- a/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php +++ b/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php @@ -1,10 +1,20 @@ markTestIncomplete( @@ -44,10 +54,10 @@ class ReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\ReportController::yearInOutSummarized - * Implement testYearInOutSummarized(). + * @covers FireflyIII\Http\Controllers\Chart\ReportController::sum + * Implement testSum(). */ - public function testYearInOutSummarized() + public function testSum() { // Remove the following lines when you implement this test. $this->markTestIncomplete( diff --git a/tests/acceptance/Controllers/ControllerTest.php b/tests/acceptance/Controllers/ControllerTest.php index 3e6c213205..69ba970d17 100644 --- a/tests/acceptance/Controllers/ControllerTest.php +++ b/tests/acceptance/Controllers/ControllerTest.php @@ -1,8 +1,17 @@ markTestIncomplete( diff --git a/tests/acceptance/Controllers/PreferencesControllerTest.php b/tests/acceptance/Controllers/PreferencesControllerTest.php index 9d3048036b..8601e1f46d 100644 --- a/tests/acceptance/Controllers/PreferencesControllerTest.php +++ b/tests/acceptance/Controllers/PreferencesControllerTest.php @@ -1,8 +1,17 @@ markTestIncomplete( diff --git a/tests/acceptance/Controllers/Report/BalanceControllerTest.php b/tests/acceptance/Controllers/Report/BalanceControllerTest.php index fcae91dc8d..0bc2c214d4 100644 --- a/tests/acceptance/Controllers/Report/BalanceControllerTest.php +++ b/tests/acceptance/Controllers/Report/BalanceControllerTest.php @@ -1,10 +1,20 @@ markTestIncomplete( diff --git a/tests/acceptance/Controllers/Report/BudgetControllerTest.php b/tests/acceptance/Controllers/Report/BudgetControllerTest.php index adc7c4c49b..68dfcbd216 100644 --- a/tests/acceptance/Controllers/Report/BudgetControllerTest.php +++ b/tests/acceptance/Controllers/Report/BudgetControllerTest.php @@ -1,10 +1,20 @@ markTestIncomplete( @@ -32,10 +42,10 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Report\BudgetController::budgetReport - * Implement testBudgetReport(). + * @covers FireflyIII\Http\Controllers\Report\BudgetController::period + * Implement testPeriod(). */ - public function testBudgetReport() + public function testPeriod() { // Remove the following lines when you implement this test. $this->markTestIncomplete( diff --git a/tests/acceptance/Controllers/Report/CategoryControllerTest.php b/tests/acceptance/Controllers/Report/CategoryControllerTest.php index 948b82cf83..2778366960 100644 --- a/tests/acceptance/Controllers/Report/CategoryControllerTest.php +++ b/tests/acceptance/Controllers/Report/CategoryControllerTest.php @@ -1,10 +1,20 @@ markTestIncomplete( @@ -32,10 +42,22 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Report\CategoryController::categoryReport - * Implement testCategoryReport(). + * @covers FireflyIII\Http\Controllers\Report\CategoryController::income + * Implement testIncome(). */ - public function testCategoryReport() + public function testIncome() + { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); + } + + /** + * @covers FireflyIII\Http\Controllers\Report\CategoryController::operations + * Implement testOperations(). + */ + public function testOperations() { // Remove the following lines when you implement this test. $this->markTestIncomplete( diff --git a/tests/acceptance/Controllers/Report/InOutControllerTest.php b/tests/acceptance/Controllers/Report/OperationsControllerTest.php similarity index 55% rename from tests/acceptance/Controllers/Report/InOutControllerTest.php rename to tests/acceptance/Controllers/Report/OperationsControllerTest.php index d8628164c2..3cea11ebc9 100644 --- a/tests/acceptance/Controllers/Report/InOutControllerTest.php +++ b/tests/acceptance/Controllers/Report/OperationsControllerTest.php @@ -1,12 +1,22 @@ markTestIncomplete( @@ -32,10 +42,10 @@ class InOutControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Report\InOutController::incExpReport - * Implement testIncExpReport(). + * @covers FireflyIII\Http\Controllers\Report\OperationsController::income + * Implement testIncome(). */ - public function testIncExpReport() + public function testIncome() { // Remove the following lines when you implement this test. $this->markTestIncomplete( @@ -44,10 +54,10 @@ class InOutControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Report\InOutController::incomeReport - * Implement testIncomeReport(). + * @covers FireflyIII\Http\Controllers\Report\OperationsController::operations + * Implement testOperations(). */ - public function testIncomeReport() + public function testOperations() { // Remove the following lines when you implement this test. $this->markTestIncomplete( diff --git a/tests/acceptance/Controllers/ReportControllerTest.php b/tests/acceptance/Controllers/ReportControllerTest.php index 579e9e6171..d4587bb062 100644 --- a/tests/acceptance/Controllers/ReportControllerTest.php +++ b/tests/acceptance/Controllers/ReportControllerTest.php @@ -1,8 +1,17 @@ markTestIncomplete( @@ -32,10 +42,10 @@ class ConvertControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\ConvertController::submit - * Implement testSubmit(). + * @covers FireflyIII\Http\Controllers\Transaction\ConvertController::postIndex + * Implement testPostIndex(). */ - public function testSubmit() + public function testPostIndex() { // Remove the following lines when you implement this test. $this->markTestIncomplete( diff --git a/tests/acceptance/Controllers/Transaction/MassControllerTest.php b/tests/acceptance/Controllers/Transaction/MassControllerTest.php index d0bc7be105..db76774b1c 100644 --- a/tests/acceptance/Controllers/Transaction/MassControllerTest.php +++ b/tests/acceptance/Controllers/Transaction/MassControllerTest.php @@ -1,10 +1,20 @@ markTestIncomplete( From cdd50dfdd2c4d1f6c9ab251f06965dca28b8dd53 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 10:12:08 +0100 Subject: [PATCH 091/110] Fix decrypt exception. --- app/Generator/Report/Category/MonthReportGenerator.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/Generator/Report/Category/MonthReportGenerator.php b/app/Generator/Report/Category/MonthReportGenerator.php index 6a339b409c..e638b3c6ed 100644 --- a/app/Generator/Report/Category/MonthReportGenerator.php +++ b/app/Generator/Report/Category/MonthReportGenerator.php @@ -148,8 +148,6 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface // is not set? if (!isset($result[$opposingId])) { $name = $transaction->opposing_account_name; - $encrypted = intval($transaction->opposing_account_encrypted); - $name = $encrypted === 1 ? Crypt::decrypt($name) : $name; $result[$opposingId] = [ 'name' => $name, 'count' => 1, From 8a0ac81fd06094968868c4fb7d89c70bc9ebc53c Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 10:13:48 +0100 Subject: [PATCH 092/110] Fix decrypt exception. --- .../Report/Category/MonthReportGenerator.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/app/Generator/Report/Category/MonthReportGenerator.php b/app/Generator/Report/Category/MonthReportGenerator.php index e638b3c6ed..a72eb65f68 100644 --- a/app/Generator/Report/Category/MonthReportGenerator.php +++ b/app/Generator/Report/Category/MonthReportGenerator.php @@ -265,14 +265,6 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface { $transactions = $this->getExpenses()->sortBy('transaction_amount'); - $transactions = $transactions->each( - function (Transaction $transaction) { - if (intval($transaction->opposing_account_encrypted) === 1) { - $transaction->opposing_account_name = Crypt::decrypt($transaction->opposing_account_name); - } - } - ); - return $transactions; } @@ -283,14 +275,6 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface { $transactions = $this->getIncome()->sortByDesc('transaction_amount'); - $transactions = $transactions->each( - function (Transaction $transaction) { - if (intval($transaction->opposing_account_encrypted) === 1) { - $transaction->opposing_account_name = Crypt::decrypt($transaction->opposing_account_name); - } - } - ); - return $transactions; } From 2e1f31a7f86a84bdf9155e6f52ba51e35c1e1ea9 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 10:19:43 +0100 Subject: [PATCH 093/110] Fix sort. --- app/Http/Controllers/Report/OperationsController.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/Http/Controllers/Report/OperationsController.php b/app/Http/Controllers/Report/OperationsController.php index 817d008001..7fb7084906 100644 --- a/app/Http/Controllers/Report/OperationsController.php +++ b/app/Http/Controllers/Report/OperationsController.php @@ -166,8 +166,6 @@ class OperationsController extends Controller $sum[$accountId] = floatval($row['sum']); } - // Sort the data with volume descending, edition ascending - // Add $data as the last parameter, to sort by the common key array_multisort($sum, SORT_ASC, $expenses); return $expenses; @@ -211,9 +209,7 @@ class OperationsController extends Controller $sum[$accountId] = floatval($row['sum']); } - // Sort the data with volume descending, edition ascending - // Add $data as the last parameter, to sort by the common key - array_multisort($sum, SORT_ASC, $income); + array_multisort($sum, SORT_DESC, $income); return $income; } From fbbbcc4e74f5f8222f1603b5664eaaf56c7e3347 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 10:42:13 +0100 Subject: [PATCH 094/110] Fix category report. --- .../Controllers/Report/CategoryController.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index fd56bead5f..067573c4f7 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -124,10 +124,21 @@ class CategoryController extends Controller $report = []; /** @var Category $category */ foreach ($categories as $category) { - $spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $end); - $report[$category->id] = ['name' => $category->name, 'spent' => $spent]; + $spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $end); + if (bccomp($spent, '0') !== 0) { + $report[$category->id] = ['name' => $category->name, 'spent' => $spent]; + } } + // sort the result + // Obtain a list of columns + $sum = []; + foreach ($report as $categoryId => $row) { + $sum[$categoryId] = floatval($row['spent']); + } + + array_multisort($sum, SORT_DESC, $report); + $result = view('reports.partials.categories', compact('report'))->render(); $cache->store($result); From 9daefaaca429e49fa05646bc59389991a4817294 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 10:42:49 +0100 Subject: [PATCH 095/110] Fix sort [skip ci] --- app/Http/Controllers/Report/CategoryController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index 067573c4f7..475e0ce67f 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -137,7 +137,7 @@ class CategoryController extends Controller $sum[$categoryId] = floatval($row['spent']); } - array_multisort($sum, SORT_DESC, $report); + array_multisort($sum, SORT_ASC, $report); $result = view('reports.partials.categories', compact('report'))->render(); $cache->store($result); From 25db11a8c73d83f50f65913dce67097c96f5164e Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 14:22:19 +0100 Subject: [PATCH 096/110] Translated --- resources/lang/de_DE/validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/de_DE/validation.php b/resources/lang/de_DE/validation.php index 2043a1d484..3edaa1a19e 100644 --- a/resources/lang/de_DE/validation.php +++ b/resources/lang/de_DE/validation.php @@ -85,5 +85,5 @@ return [ 'file' => 'Das :attribute muss eine Datei sein.', 'in_array' => ':attribute existiert nicht in :other.', 'present' => 'Das :attribute Feld muss vorhanden sein.', - 'amount_zero' => 'The total amount cannot be zero', + 'amount_zero' => 'Der Gesamtbetrag darf nicht Null sein', ]; \ No newline at end of file From 085eca6c02a5aab0828911f94476c5840cf37b59 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 14:42:07 +0100 Subject: [PATCH 097/110] New translations --- resources/lang/de_DE/firefly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/de_DE/firefly.php b/resources/lang/de_DE/firefly.php index 8dde88273d..996258c4fe 100644 --- a/resources/lang/de_DE/firefly.php +++ b/resources/lang/de_DE/firefly.php @@ -88,7 +88,7 @@ return [ 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', 'expenses_by_category' => 'Ausgaben nach Kategorie', - 'expenses_by_budget' => 'Expenses by budget', + 'expenses_by_budget' => 'Ausgaben nach Budget', 'income_by_category' => 'Einkommen nach Kategorie', 'cannot_redirect_to_account' => 'Firefly III cannot redirect you to the correct page. Apologies.', // repeat frequencies: From 6a58dbb207a2635a6fb5f7914089d0a1804890d7 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 16:44:58 +0100 Subject: [PATCH 098/110] Generic code cleanup. --- app/Http/Controllers/TagController.php | 29 ++++---------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index 7a790c284a..9ad571c091 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -15,14 +15,12 @@ namespace FireflyIII\Http\Controllers; use FireflyIII\Helpers\Collector\JournalCollector; use FireflyIII\Http\Requests\TagFormRequest; -use FireflyIII\Models\Preference; use FireflyIII\Models\Tag; use FireflyIII\Models\Transaction; use FireflyIII\Repositories\Tag\TagRepositoryInterface; use Illuminate\Support\Collection; use Input; use Preferences; -use Response; use Session; use URL; use View; @@ -170,33 +168,14 @@ class TagController extends Controller return view('tags.edit', compact('tag', 'subTitle', 'subTitleIcon', 'tagOptions')); } - /** - * @param $state - * - * @return \Symfony\Component\HttpFoundation\Response - */ - public function hideTagHelp(string $state) - { - - $newState = $state == 'true' ? true : false; - Preferences::set('hideTagHelp', $newState); - - return Response::json([true]); - } - /** * */ public function index() { - /** @var Preference $helpHiddenPref */ - $helpHiddenPref = Preferences::get('hideTagHelp', false); - $title = 'Tags'; - $mainTitleIcon = 'fa-tags'; - $helpHidden = $helpHiddenPref->data; - - // group years. - $types = ['nothing', 'balancingAct', 'advancePayment']; + $title = 'Tags'; + $mainTitleIcon = 'fa-tags'; + $types = ['nothing', 'balancingAct', 'advancePayment']; // loop each types and get the tags, group them by year. $collection = []; @@ -223,7 +202,7 @@ class TagController extends Controller } } - return view('tags.index', compact('title', 'mainTitleIcon', 'types', 'helpHidden', 'collection')); + return view('tags.index', compact('title', 'mainTitleIcon', 'types', 'collection')); } /** From cca2de9f1b182ea165a911123c61d35d1c75c4ce Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 16:55:13 +0100 Subject: [PATCH 099/110] This should remove some issues from scrutinizer. --- app/Handlers/Events/BudgetEventHandler.php | 12 ++++----- .../Events/StoredJournalEventHandler.php | 26 +++++++++---------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/Handlers/Events/BudgetEventHandler.php b/app/Handlers/Events/BudgetEventHandler.php index b82aa6d749..441049526d 100644 --- a/app/Handlers/Events/BudgetEventHandler.php +++ b/app/Handlers/Events/BudgetEventHandler.php @@ -34,25 +34,25 @@ class BudgetEventHandler /** * This method creates a new budget limit repetition when a new budget limit has been created. * - * @param StoredBudgetLimit $event + * @param StoredBudgetLimit $budgetLimitEvent * * @return bool */ - public function storeRepetition(StoredBudgetLimit $event):bool + public function storeRepetition(StoredBudgetLimit $budgetLimitEvent):bool { - return $this->processRepetitionChange($event->budgetLimit, $event->end); + return $this->processRepetitionChange($budgetLimitEvent->budgetLimit, $budgetLimitEvent->end); } /** * Updates, if present the budget limit repetition part of a budget limit. * - * @param UpdatedBudgetLimit $event + * @param UpdatedBudgetLimit $budgetLimitEvent * * @return bool */ - public function updateRepetition(UpdatedBudgetLimit $event): bool + public function updateRepetition(UpdatedBudgetLimit $budgetLimitEvent): bool { - return $this->processRepetitionChange($event->budgetLimit, $event->end); + return $this->processRepetitionChange($budgetLimitEvent->budgetLimit, $budgetLimitEvent->end); } /** diff --git a/app/Handlers/Events/StoredJournalEventHandler.php b/app/Handlers/Events/StoredJournalEventHandler.php index 29f909b928..ade9536765 100644 --- a/app/Handlers/Events/StoredJournalEventHandler.php +++ b/app/Handlers/Events/StoredJournalEventHandler.php @@ -33,15 +33,15 @@ class StoredJournalEventHandler /** * This method connects a new transfer to a piggy bank. * - * @param StoredTransactionJournal $event + * @param StoredTransactionJournal $storedJournalEvent * * @return bool */ - public function connectToPiggyBank(StoredTransactionJournal $event): bool + public function connectToPiggyBank(StoredTransactionJournal $storedJournalEvent): bool { /** @var TransactionJournal $journal */ - $journal = $event->journal; - $piggyBankId = $event->piggyBankId; + $journal = $storedJournalEvent->journal; + $piggyBankId = $storedJournalEvent->piggyBankId; Log::debug(sprintf('Trying to connect journal %d to piggy bank %d.', $journal->id, $piggyBankId)); @@ -101,11 +101,11 @@ class StoredJournalEventHandler $repetition->currentamount = bcadd($repetition->currentamount, $amount); $repetition->save(); - /** @var PiggyBankEvent $event */ - $event = PiggyBankEvent::create( + /** @var PiggyBankEvent $storedJournalEvent */ + $storedJournalEvent = PiggyBankEvent::create( ['piggy_bank_id' => $piggyBank->id, 'transaction_journal_id' => $journal->id, 'date' => $journal->date, 'amount' => $amount] ); - Log::debug(sprintf('Created piggy bank event #%d', $event->id)); + Log::debug(sprintf('Created piggy bank event #%d', $storedJournalEvent->id)); return true; } @@ -113,14 +113,14 @@ class StoredJournalEventHandler /** * This method grabs all the users rules and processes them. * - * @param StoredTransactionJournal $event + * @param StoredTransactionJournal $storedJournalEvent * * @return bool */ - public function processRules(StoredTransactionJournal $event): bool + public function processRules(StoredTransactionJournal $storedJournalEvent): bool { // get all the user's rule groups, with the rules, order by 'order'. - $journal = $event->journal; + $journal = $storedJournalEvent->journal; $groups = $journal->user->ruleGroups()->where('rule_groups.active', 1)->orderBy('order', 'ASC')->get(); // /** @var RuleGroup $group */ @@ -150,13 +150,13 @@ class StoredJournalEventHandler /** * This method calls a special bill scanner that will check if the stored journal is part of a bill. * - * @param StoredTransactionJournal $event + * @param StoredTransactionJournal $storedJournalEvent * * @return bool */ - public function scanBills(StoredTransactionJournal $event): bool + public function scanBills(StoredTransactionJournal $storedJournalEvent): bool { - $journal = $event->journal; + $journal = $storedJournalEvent->journal; BillScanner::scan($journal); return true; From cdd18b229e4e3719d386893e56c68247330d571f Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 6 Dec 2016 16:58:39 +0100 Subject: [PATCH 100/110] Refactor some duplicated code --- .../Events/UpdatedJournalEventHandler.php | 12 ++-- app/Support/ExpandedForm.php | 69 ++++++++----------- 2 files changed, 34 insertions(+), 47 deletions(-) diff --git a/app/Handlers/Events/UpdatedJournalEventHandler.php b/app/Handlers/Events/UpdatedJournalEventHandler.php index 60871ebf08..4528ccf910 100644 --- a/app/Handlers/Events/UpdatedJournalEventHandler.php +++ b/app/Handlers/Events/UpdatedJournalEventHandler.php @@ -31,14 +31,14 @@ class UpdatedJournalEventHandler /** * This method will check all the rules when a journal is updated. * - * @param UpdatedTransactionJournal $event + * @param UpdatedTransactionJournal $updatedJournalEvent * * @return bool */ - public function processRules(UpdatedTransactionJournal $event):bool + public function processRules(UpdatedTransactionJournal $updatedJournalEvent):bool { // get all the user's rule groups, with the rules, order by 'order'. - $journal = $event->journal; + $journal = $updatedJournalEvent->journal; $groups = $journal->user->ruleGroups()->where('rule_groups.active', 1)->orderBy('order', 'ASC')->get(); // /** @var RuleGroup $group */ @@ -67,13 +67,13 @@ class UpdatedJournalEventHandler /** * This method calls a special bill scanner that will check if the updated journal is part of a bill. * - * @param UpdatedTransactionJournal $event + * @param UpdatedTransactionJournal $updatedJournalEvent * * @return bool */ - public function scanBills(UpdatedTransactionJournal $event): bool + public function scanBills(UpdatedTransactionJournal $updatedJournalEvent): bool { - $journal = $event->journal; + $journal = $updatedJournalEvent->journal; BillScanner::scan($journal); return true; diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php index df6257ca06..c0aa1dbc67 100644 --- a/app/Support/ExpandedForm.php +++ b/app/Support/ExpandedForm.php @@ -40,20 +40,7 @@ class ExpandedForm */ public function amount(string $name, $value = null, array $options = []): string { - $label = $this->label($name, $options); - $options = $this->expandOptionArray($name, $label, $options); - $classes = $this->getHolderClasses($name); - $value = $this->fillFieldValue($name, $value); - $options['step'] = 'any'; - $options['min'] = '0.01'; - $defaultCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency(); - $currencies = Amt::getAllCurrencies(); - unset($options['currency']); - unset($options['placeholder']); - $html = view('form.amount', compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render(); - - return $html; - + return $this->currencyField($name, 'amount', $value, $options); } /** @@ -65,20 +52,7 @@ class ExpandedForm */ public function amountSmall(string $name, $value = null, array $options = []): string { - $label = $this->label($name, $options); - $options = $this->expandOptionArray($name, $label, $options); - $classes = $this->getHolderClasses($name); - $value = $this->fillFieldValue($name, $value); - $options['step'] = 'any'; - $options['min'] = '0.01'; - $defaultCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency(); - $currencies = Amt::getAllCurrencies(); - unset($options['currency']); - unset($options['placeholder']); - $html = view('form.amount-small', compact('defaultCurrency', 'currencies', 'classes', 'name', 'value', 'options'))->render(); - - return $html; - + return $this->currencyField($name, 'amount-small', $value, $options); } /** @@ -90,18 +64,7 @@ class ExpandedForm */ public function balance(string $name, $value = null, array $options = []): string { - $label = $this->label($name, $options); - $options = $this->expandOptionArray($name, $label, $options); - $classes = $this->getHolderClasses($name); - $value = round($this->fillFieldValue($name, $value), 2); - $options['step'] = 'any'; - $defaultCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency(); - $currencies = Amt::getAllCurrencies(); - unset($options['currency']); - unset($options['placeholder']); - $html = view('form.balance', compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render(); - - return $html; + return $this->currencyField($name, 'balance', $value, $options); } /** @@ -320,7 +283,6 @@ class ExpandedForm return $html; } - /** * @param $name * @param array $list @@ -500,4 +462,29 @@ class ExpandedForm return strval(trans('form.' . $name)); } + + /** + * @param string $name + * @param string $view + * @param null $value + * @param array $options + * + * @return string + */ + private function currencyField(string $name, string $view, $value = null, array $options = []): string + { + $label = $this->label($name, $options); + $options = $this->expandOptionArray($name, $label, $options); + $classes = $this->getHolderClasses($name); + $value = $this->fillFieldValue($name, $value); + $options['step'] = 'any'; + $options['min'] = '0.01'; + $defaultCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency(); + $currencies = Amt::getAllCurrencies(); + unset($options['currency']); + unset($options['placeholder']); + $html = view('form.' . $view, compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render(); + + return $html; + } } From d79866f1153728256ce3656feaa55b3eb9960375 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 7 Dec 2016 06:27:27 +0100 Subject: [PATCH 101/110] Fix route [skip ci] --- routes/web.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/web.php b/routes/web.php index 1165efc8cc..f26398c16f 100755 --- a/routes/web.php +++ b/routes/web.php @@ -605,10 +605,10 @@ Route::group( */ Route::group( ['middleware' => 'user-full-auth', 'namespace' => 'Transaction', 'prefix' => 'transactions', 'as' => 'transactions.'], function () { - Route::get('create/{what}', ['uses' => 'SingleController@create', 'as' => 'create'])->where(['what' => 'withdrawal|deposit|transfers']); + Route::get('create/{what}', ['uses' => 'SingleController@create', 'as' => 'create'])->where(['what' => 'withdrawal|deposit|transfer']); Route::get('edit/{tj}', ['uses' => 'SingleController@edit', 'as' => 'edit']); Route::get('delete/{tj}', ['uses' => 'SingleController@delete', 'as' => 'delete']); - Route::post('store/{what}', ['uses' => 'SingleController@store', 'as' => 'store'])->where(['what' => 'withdrawal|deposit|transfers']); + Route::post('store/{what}', ['uses' => 'SingleController@store', 'as' => 'store'])->where(['what' => 'withdrawal|deposit|transfer']); Route::post('update/{tj}', ['uses' => 'SingleController@update', 'as' => 'update']); Route::post('destroy/{tj}', ['uses' => 'SingleController@destroy', 'as' => 'destroy']); } From db1a60b6dfc9e3da03b584607104d631869764f9 Mon Sep 17 00:00:00 2001 From: Sander Date: Wed, 7 Dec 2016 07:58:55 +0000 Subject: [PATCH 102/110] Fix display bug --- app/Support/Twig/Transaction.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Support/Twig/Transaction.php b/app/Support/Twig/Transaction.php index ef05c214ad..8e1d1284f8 100644 --- a/app/Support/Twig/Transaction.php +++ b/app/Support/Twig/Transaction.php @@ -192,8 +192,7 @@ class Transaction extends Twig_Extension // name is present in object, use that one: if (bccomp($transaction->transaction_amount, '0') === -1 && !is_null($transaction->opposing_account_id)) { - $name = intval($transaction->opposing_account_encrypted) === 1 ? Crypt::decrypt($transaction->opposing_account_name) - : $transaction->opposing_account_name; + $name = $transaction->opposing_account_name; $id = intval($transaction->opposing_account_id); $type = intval($transaction->opposing_account_type); } From df6f4aecf8443f028e452c07046c814b539f9169 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 7 Dec 2016 19:53:41 +0100 Subject: [PATCH 103/110] Update tests. --- .../Admin/ConfigurationControllerTest.php | 6 +-- .../Admin/DomainControllerTest.php | 8 +-- .../Controllers/Admin/HomeControllerTest.php | 4 +- .../Controllers/Admin/UserControllerTest.php | 8 +-- .../Controllers/AttachmentControllerTest.php | 14 +++--- .../Auth/ConfirmationControllerTest.php | 8 +-- .../Auth/ForgotPasswordControllerTest.php | 8 +-- .../Controllers/Auth/LoginControllerTest.php | 12 ++--- .../Auth/PasswordControllerTest.php | 12 ++--- .../Auth/RegisterControllerTest.php | 8 +-- .../Auth/ResetPasswordControllerTest.php | 10 ++-- .../Auth/TwoFactorControllerTest.php | 8 +-- .../Controllers/BillControllerTest.php | 20 ++++---- .../Controllers/BudgetControllerTest.php | 28 +++++------ .../Controllers/CategoryControllerTest.php | 22 ++++----- .../Chart/AccountControllerTest.php | 20 ++++---- .../Controllers/Chart/BillControllerTest.php | 6 +-- .../Chart/BudgetControllerTest.php | 12 ++--- .../Chart/CategoryControllerTest.php | 14 +++--- .../Chart/CategoryReportControllerTest.php | 12 ++--- .../Chart/PiggyBankControllerTest.php | 4 +- .../Chart/ReportControllerTest.php | 8 +-- .../acceptance/Controllers/ControllerTest.php | 16 +++--- .../Controllers/CurrencyControllerTest.php | 18 +++---- .../Controllers/ExportControllerTest.php | 10 ++-- .../Controllers/HelpControllerTest.php | 4 +- .../Controllers/ImportControllerTest.php | 43 ++++++++-------- .../Controllers/JsonControllerTest.php | 45 ++++++++--------- .../Controllers/NewUserControllerTest.php | 23 ++++----- .../Controllers/PiggyBankControllerTest.php | 49 ++++++++++--------- .../Popup/ReportControllerTest.php | 22 ++++----- .../Controllers/PreferencesControllerTest.php | 29 +++++------ .../Controllers/ProfileControllerTest.php | 29 +++++------ .../Report/AccountControllerTest.php | 22 ++++----- .../Report/BalanceControllerTest.php | 22 ++++----- .../Report/BudgetControllerTest.php | 24 ++++----- .../Report/CategoryControllerTest.php | 26 +++++----- .../Report/OperationsControllerTest.php | 38 +++++++------- .../Controllers/ReportControllerTest.php | 31 ++++++------ .../Controllers/RuleControllerTest.php | 43 ++++++++-------- .../Controllers/RuleGroupControllerTest.php | 39 ++++++++------- .../Controllers/SearchControllerTest.php | 21 ++++---- .../Controllers/TagControllerTest.php | 47 +++++++----------- .../Transaction/ConvertControllerTest.php | 24 ++++----- .../Transaction/MassControllerTest.php | 28 +++++------ .../Transaction/SingleControllerTest.php | 32 ++++++------ .../Transaction/SplitControllerTest.php | 24 ++++----- .../Controllers/TransactionControllerTest.php | 29 +++++------ 48 files changed, 495 insertions(+), 495 deletions(-) diff --git a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php index ba2cb9b48d..7416398bba 100644 --- a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php +++ b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php @@ -14,7 +14,7 @@ namespace Admin; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:31. */ class ConfigurationControllerTest extends TestCase { @@ -30,7 +30,7 @@ class ConfigurationControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Admin\ConfigurationController::index + * @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::index * Implement testIndex(). */ public function testIndex() @@ -42,7 +42,7 @@ class ConfigurationControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Admin\ConfigurationController::store + * @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::store * Implement testStore(). */ public function testStore() diff --git a/tests/acceptance/Controllers/Admin/DomainControllerTest.php b/tests/acceptance/Controllers/Admin/DomainControllerTest.php index dce6d47958..71a17b8e5f 100644 --- a/tests/acceptance/Controllers/Admin/DomainControllerTest.php +++ b/tests/acceptance/Controllers/Admin/DomainControllerTest.php @@ -14,7 +14,7 @@ namespace Admin; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:31. */ class DomainControllerTest extends TestCase { @@ -30,7 +30,7 @@ class DomainControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Admin\DomainController::domains + * @covers \FireflyIII\Http\Controllers\Admin\DomainController::domains * Implement testDomains(). */ public function testDomains() @@ -42,7 +42,7 @@ class DomainControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Admin\DomainController::manual + * @covers \FireflyIII\Http\Controllers\Admin\DomainController::manual * Implement testManual(). */ public function testManual() @@ -54,7 +54,7 @@ class DomainControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Admin\DomainController::toggleDomain + * @covers \FireflyIII\Http\Controllers\Admin\DomainController::toggleDomain * Implement testToggleDomain(). */ public function testToggleDomain() diff --git a/tests/acceptance/Controllers/Admin/HomeControllerTest.php b/tests/acceptance/Controllers/Admin/HomeControllerTest.php index aa5478cdaf..0d5b851fd5 100644 --- a/tests/acceptance/Controllers/Admin/HomeControllerTest.php +++ b/tests/acceptance/Controllers/Admin/HomeControllerTest.php @@ -14,7 +14,7 @@ namespace Admin; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:31. */ class HomeControllerTest extends TestCase { @@ -30,7 +30,7 @@ class HomeControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Admin\HomeController::index + * @covers \FireflyIII\Http\Controllers\Admin\HomeController::index * Implement testIndex(). */ public function testIndex() diff --git a/tests/acceptance/Controllers/Admin/UserControllerTest.php b/tests/acceptance/Controllers/Admin/UserControllerTest.php index b52aa3588a..8c881daf40 100644 --- a/tests/acceptance/Controllers/Admin/UserControllerTest.php +++ b/tests/acceptance/Controllers/Admin/UserControllerTest.php @@ -14,7 +14,7 @@ namespace Admin; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:31. */ class UserControllerTest extends TestCase { @@ -30,7 +30,7 @@ class UserControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Admin\UserController::edit + * @covers \FireflyIII\Http\Controllers\Admin\UserController::edit * Implement testEdit(). */ public function testEdit() @@ -42,7 +42,7 @@ class UserControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Admin\UserController::index + * @covers \FireflyIII\Http\Controllers\Admin\UserController::index * Implement testIndex(). */ public function testIndex() @@ -54,7 +54,7 @@ class UserControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Admin\UserController::show + * @covers \FireflyIII\Http\Controllers\Admin\UserController::show * Implement testShow(). */ public function testShow() diff --git a/tests/acceptance/Controllers/AttachmentControllerTest.php b/tests/acceptance/Controllers/AttachmentControllerTest.php index 6158bfde5c..3835e9a5bc 100644 --- a/tests/acceptance/Controllers/AttachmentControllerTest.php +++ b/tests/acceptance/Controllers/AttachmentControllerTest.php @@ -11,7 +11,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:31. */ class AttachmentControllerTest extends TestCase { @@ -27,7 +27,7 @@ class AttachmentControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\AttachmentController::delete + * @covers \FireflyIII\Http\Controllers\AttachmentController::delete * Implement testDelete(). */ public function testDelete() @@ -39,7 +39,7 @@ class AttachmentControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\AttachmentController::destroy + * @covers \FireflyIII\Http\Controllers\AttachmentController::destroy * Implement testDestroy(). */ public function testDestroy() @@ -51,7 +51,7 @@ class AttachmentControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\AttachmentController::download + * @covers \FireflyIII\Http\Controllers\AttachmentController::download * Implement testDownload(). */ public function testDownload() @@ -63,7 +63,7 @@ class AttachmentControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\AttachmentController::edit + * @covers \FireflyIII\Http\Controllers\AttachmentController::edit * Implement testEdit(). */ public function testEdit() @@ -75,7 +75,7 @@ class AttachmentControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\AttachmentController::preview + * @covers \FireflyIII\Http\Controllers\AttachmentController::preview * Implement testPreview(). */ public function testPreview() @@ -87,7 +87,7 @@ class AttachmentControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\AttachmentController::update + * @covers \FireflyIII\Http\Controllers\AttachmentController::update * Implement testUpdate(). */ public function testUpdate() diff --git a/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php b/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php index 79e3273c90..5039c4cd59 100644 --- a/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php +++ b/tests/acceptance/Controllers/Auth/ConfirmationControllerTest.php @@ -14,7 +14,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:17. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:31. */ class ConfirmationControllerTest extends TestCase { @@ -30,7 +30,7 @@ class ConfirmationControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\ConfirmationController::confirmationError + * @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::confirmationError * Implement testConfirmationError(). */ public function testConfirmationError() @@ -42,7 +42,7 @@ class ConfirmationControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\ConfirmationController::doConfirmation + * @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::doConfirmation * Implement testDoConfirmation(). */ public function testDoConfirmation() @@ -54,7 +54,7 @@ class ConfirmationControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\ConfirmationController::resendConfirmation + * @covers \FireflyIII\Http\Controllers\Auth\ConfirmationController::resendConfirmation * Implement testResendConfirmation(). */ public function testResendConfirmation() diff --git a/tests/acceptance/Controllers/Auth/ForgotPasswordControllerTest.php b/tests/acceptance/Controllers/Auth/ForgotPasswordControllerTest.php index a9fb8fce9a..65ebc3186f 100644 --- a/tests/acceptance/Controllers/Auth/ForgotPasswordControllerTest.php +++ b/tests/acceptance/Controllers/Auth/ForgotPasswordControllerTest.php @@ -14,7 +14,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:31. */ class ForgotPasswordControllerTest extends TestCase { @@ -30,7 +30,7 @@ class ForgotPasswordControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\ForgotPasswordController::broker + * @covers \FireflyIII\Http\Controllers\Auth\ForgotPasswordController::broker * Implement testBroker(). */ public function testBroker() @@ -42,7 +42,7 @@ class ForgotPasswordControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\ForgotPasswordController::sendResetLinkEmail + * @covers \FireflyIII\Http\Controllers\Auth\ForgotPasswordController::sendResetLinkEmail * Implement testSendResetLinkEmail(). */ public function testSendResetLinkEmail() @@ -54,7 +54,7 @@ class ForgotPasswordControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\ForgotPasswordController::showLinkRequestForm + * @covers \FireflyIII\Http\Controllers\Auth\ForgotPasswordController::showLinkRequestForm * Implement testShowLinkRequestForm(). */ public function testShowLinkRequestForm() diff --git a/tests/acceptance/Controllers/Auth/LoginControllerTest.php b/tests/acceptance/Controllers/Auth/LoginControllerTest.php index 5a941cab36..605c0eefda 100644 --- a/tests/acceptance/Controllers/Auth/LoginControllerTest.php +++ b/tests/acceptance/Controllers/Auth/LoginControllerTest.php @@ -14,7 +14,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:32. */ class LoginControllerTest extends TestCase { @@ -30,7 +30,7 @@ class LoginControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\LoginController::login + * @covers \FireflyIII\Http\Controllers\Auth\LoginController::login * Implement testLogin(). */ public function testLogin() @@ -42,7 +42,7 @@ class LoginControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\LoginController::logout + * @covers \FireflyIII\Http\Controllers\Auth\LoginController::logout * Implement testLogout(). */ public function testLogout() @@ -54,7 +54,7 @@ class LoginControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\LoginController::redirectPath + * @covers \FireflyIII\Http\Controllers\Auth\LoginController::redirectPath * Implement testRedirectPath(). */ public function testRedirectPath() @@ -66,7 +66,7 @@ class LoginControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\LoginController::showLoginForm + * @covers \FireflyIII\Http\Controllers\Auth\LoginController::showLoginForm * Implement testShowLoginForm(). */ public function testShowLoginForm() @@ -78,7 +78,7 @@ class LoginControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\LoginController::username + * @covers \FireflyIII\Http\Controllers\Auth\LoginController::username * Implement testUsername(). */ public function testUsername() diff --git a/tests/acceptance/Controllers/Auth/PasswordControllerTest.php b/tests/acceptance/Controllers/Auth/PasswordControllerTest.php index e9184c9d29..65dcc62bc9 100644 --- a/tests/acceptance/Controllers/Auth/PasswordControllerTest.php +++ b/tests/acceptance/Controllers/Auth/PasswordControllerTest.php @@ -14,7 +14,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:32. */ class PasswordControllerTest extends TestCase { @@ -30,7 +30,7 @@ class PasswordControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\PasswordController::broker + * @covers \FireflyIII\Http\Controllers\Auth\PasswordController::broker * Implement testBroker(). */ public function testBroker() @@ -42,7 +42,7 @@ class PasswordControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\PasswordController::redirectPath + * @covers \FireflyIII\Http\Controllers\Auth\PasswordController::redirectPath * Implement testRedirectPath(). */ public function testRedirectPath() @@ -54,7 +54,7 @@ class PasswordControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\PasswordController::reset + * @covers \FireflyIII\Http\Controllers\Auth\PasswordController::reset * Implement testReset(). */ public function testReset() @@ -66,7 +66,7 @@ class PasswordControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\PasswordController::sendResetLinkEmail + * @covers \FireflyIII\Http\Controllers\Auth\PasswordController::sendResetLinkEmail * Implement testSendResetLinkEmail(). */ public function testSendResetLinkEmail() @@ -78,7 +78,7 @@ class PasswordControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\PasswordController::showResetForm + * @covers \FireflyIII\Http\Controllers\Auth\PasswordController::showResetForm * Implement testShowResetForm(). */ public function testShowResetForm() diff --git a/tests/acceptance/Controllers/Auth/RegisterControllerTest.php b/tests/acceptance/Controllers/Auth/RegisterControllerTest.php index fecf29101b..8ed0991a75 100644 --- a/tests/acceptance/Controllers/Auth/RegisterControllerTest.php +++ b/tests/acceptance/Controllers/Auth/RegisterControllerTest.php @@ -14,7 +14,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:32. */ class RegisterControllerTest extends TestCase { @@ -30,7 +30,7 @@ class RegisterControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\RegisterController::redirectPath + * @covers \FireflyIII\Http\Controllers\Auth\RegisterController::redirectPath * Implement testRedirectPath(). */ public function testRedirectPath() @@ -42,7 +42,7 @@ class RegisterControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\RegisterController::register + * @covers \FireflyIII\Http\Controllers\Auth\RegisterController::register * Implement testRegister(). */ public function testRegister() @@ -54,7 +54,7 @@ class RegisterControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\RegisterController::showRegistrationForm + * @covers \FireflyIII\Http\Controllers\Auth\RegisterController::showRegistrationForm * Implement testShowRegistrationForm(). */ public function testShowRegistrationForm() diff --git a/tests/acceptance/Controllers/Auth/ResetPasswordControllerTest.php b/tests/acceptance/Controllers/Auth/ResetPasswordControllerTest.php index 6a37c9e6e5..1ffbbf70d1 100644 --- a/tests/acceptance/Controllers/Auth/ResetPasswordControllerTest.php +++ b/tests/acceptance/Controllers/Auth/ResetPasswordControllerTest.php @@ -14,7 +14,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:32. */ class ResetPasswordControllerTest extends TestCase { @@ -30,7 +30,7 @@ class ResetPasswordControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\ResetPasswordController::broker + * @covers \FireflyIII\Http\Controllers\Auth\ResetPasswordController::broker * Implement testBroker(). */ public function testBroker() @@ -42,7 +42,7 @@ class ResetPasswordControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\ResetPasswordController::redirectPath + * @covers \FireflyIII\Http\Controllers\Auth\ResetPasswordController::redirectPath * Implement testRedirectPath(). */ public function testRedirectPath() @@ -54,7 +54,7 @@ class ResetPasswordControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\ResetPasswordController::reset + * @covers \FireflyIII\Http\Controllers\Auth\ResetPasswordController::reset * Implement testReset(). */ public function testReset() @@ -66,7 +66,7 @@ class ResetPasswordControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\ResetPasswordController::showResetForm + * @covers \FireflyIII\Http\Controllers\Auth\ResetPasswordController::showResetForm * Implement testShowResetForm(). */ public function testShowResetForm() diff --git a/tests/acceptance/Controllers/Auth/TwoFactorControllerTest.php b/tests/acceptance/Controllers/Auth/TwoFactorControllerTest.php index 955a4e6029..33f947109c 100644 --- a/tests/acceptance/Controllers/Auth/TwoFactorControllerTest.php +++ b/tests/acceptance/Controllers/Auth/TwoFactorControllerTest.php @@ -14,7 +14,7 @@ namespace Auth; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:32. */ class TwoFactorControllerTest extends TestCase { @@ -30,7 +30,7 @@ class TwoFactorControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\TwoFactorController::index + * @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::index * Implement testIndex(). */ public function testIndex() @@ -42,7 +42,7 @@ class TwoFactorControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\TwoFactorController::lostTwoFactor + * @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::lostTwoFactor * Implement testLostTwoFactor(). */ public function testLostTwoFactor() @@ -54,7 +54,7 @@ class TwoFactorControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Auth\TwoFactorController::postIndex + * @covers \FireflyIII\Http\Controllers\Auth\TwoFactorController::postIndex * Implement testPostIndex(). */ public function testPostIndex() diff --git a/tests/acceptance/Controllers/BillControllerTest.php b/tests/acceptance/Controllers/BillControllerTest.php index a82797dd27..fe4dda9450 100644 --- a/tests/acceptance/Controllers/BillControllerTest.php +++ b/tests/acceptance/Controllers/BillControllerTest.php @@ -11,7 +11,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:32. */ class BillControllerTest extends TestCase { @@ -27,7 +27,7 @@ class BillControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BillController::create + * @covers \FireflyIII\Http\Controllers\BillController::create * Implement testCreate(). */ public function testCreate() @@ -39,7 +39,7 @@ class BillControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BillController::delete + * @covers \FireflyIII\Http\Controllers\BillController::delete * Implement testDelete(). */ public function testDelete() @@ -51,7 +51,7 @@ class BillControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BillController::destroy + * @covers \FireflyIII\Http\Controllers\BillController::destroy * Implement testDestroy(). */ public function testDestroy() @@ -63,7 +63,7 @@ class BillControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BillController::edit + * @covers \FireflyIII\Http\Controllers\BillController::edit * Implement testEdit(). */ public function testEdit() @@ -75,7 +75,7 @@ class BillControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BillController::index + * @covers \FireflyIII\Http\Controllers\BillController::index * Implement testIndex(). */ public function testIndex() @@ -87,7 +87,7 @@ class BillControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BillController::rescan + * @covers \FireflyIII\Http\Controllers\BillController::rescan * Implement testRescan(). */ public function testRescan() @@ -99,7 +99,7 @@ class BillControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BillController::show + * @covers \FireflyIII\Http\Controllers\BillController::show * Implement testShow(). */ public function testShow() @@ -111,7 +111,7 @@ class BillControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BillController::store + * @covers \FireflyIII\Http\Controllers\BillController::store * Implement testStore(). */ public function testStore() @@ -123,7 +123,7 @@ class BillControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BillController::update + * @covers \FireflyIII\Http\Controllers\BillController::update * Implement testUpdate(). */ public function testUpdate() diff --git a/tests/acceptance/Controllers/BudgetControllerTest.php b/tests/acceptance/Controllers/BudgetControllerTest.php index 02262d6e1c..dcbd2507d4 100644 --- a/tests/acceptance/Controllers/BudgetControllerTest.php +++ b/tests/acceptance/Controllers/BudgetControllerTest.php @@ -11,7 +11,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:32. */ class BudgetControllerTest extends TestCase { @@ -27,7 +27,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BudgetController::amount + * @covers \FireflyIII\Http\Controllers\BudgetController::amount * Implement testAmount(). */ public function testAmount() @@ -39,7 +39,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BudgetController::create + * @covers \FireflyIII\Http\Controllers\BudgetController::create * Implement testCreate(). */ public function testCreate() @@ -51,7 +51,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BudgetController::delete + * @covers \FireflyIII\Http\Controllers\BudgetController::delete * Implement testDelete(). */ public function testDelete() @@ -63,7 +63,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BudgetController::destroy + * @covers \FireflyIII\Http\Controllers\BudgetController::destroy * Implement testDestroy(). */ public function testDestroy() @@ -75,7 +75,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BudgetController::edit + * @covers \FireflyIII\Http\Controllers\BudgetController::edit * Implement testEdit(). */ public function testEdit() @@ -87,7 +87,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BudgetController::index + * @covers \FireflyIII\Http\Controllers\BudgetController::index * Implement testIndex(). */ public function testIndex() @@ -99,7 +99,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BudgetController::noBudget + * @covers \FireflyIII\Http\Controllers\BudgetController::noBudget * Implement testNoBudget(). */ public function testNoBudget() @@ -111,7 +111,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BudgetController::postUpdateIncome + * @covers \FireflyIII\Http\Controllers\BudgetController::postUpdateIncome * Implement testPostUpdateIncome(). */ public function testPostUpdateIncome() @@ -123,7 +123,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BudgetController::show + * @covers \FireflyIII\Http\Controllers\BudgetController::show * Implement testShow(). */ public function testShow() @@ -135,7 +135,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BudgetController::showByRepetition + * @covers \FireflyIII\Http\Controllers\BudgetController::showByRepetition * Implement testShowByRepetition(). */ public function testShowByRepetition() @@ -147,7 +147,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BudgetController::store + * @covers \FireflyIII\Http\Controllers\BudgetController::store * Implement testStore(). */ public function testStore() @@ -159,7 +159,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BudgetController::update + * @covers \FireflyIII\Http\Controllers\BudgetController::update * Implement testUpdate(). */ public function testUpdate() @@ -171,7 +171,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\BudgetController::updateIncome + * @covers \FireflyIII\Http\Controllers\BudgetController::updateIncome * Implement testUpdateIncome(). */ public function testUpdateIncome() diff --git a/tests/acceptance/Controllers/CategoryControllerTest.php b/tests/acceptance/Controllers/CategoryControllerTest.php index 7af66d728b..a1412c141b 100644 --- a/tests/acceptance/Controllers/CategoryControllerTest.php +++ b/tests/acceptance/Controllers/CategoryControllerTest.php @@ -11,7 +11,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:18. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:32. */ class CategoryControllerTest extends TestCase { @@ -27,7 +27,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CategoryController::create + * @covers \FireflyIII\Http\Controllers\CategoryController::create * Implement testCreate(). */ public function testCreate() @@ -39,7 +39,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CategoryController::delete + * @covers \FireflyIII\Http\Controllers\CategoryController::delete * Implement testDelete(). */ public function testDelete() @@ -51,7 +51,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CategoryController::destroy + * @covers \FireflyIII\Http\Controllers\CategoryController::destroy * Implement testDestroy(). */ public function testDestroy() @@ -63,7 +63,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CategoryController::edit + * @covers \FireflyIII\Http\Controllers\CategoryController::edit * Implement testEdit(). */ public function testEdit() @@ -75,7 +75,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CategoryController::index + * @covers \FireflyIII\Http\Controllers\CategoryController::index * Implement testIndex(). */ public function testIndex() @@ -87,7 +87,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CategoryController::noCategory + * @covers \FireflyIII\Http\Controllers\CategoryController::noCategory * Implement testNoCategory(). */ public function testNoCategory() @@ -99,7 +99,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CategoryController::show + * @covers \FireflyIII\Http\Controllers\CategoryController::show * Implement testShow(). */ public function testShow() @@ -111,7 +111,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CategoryController::showByDate + * @covers \FireflyIII\Http\Controllers\CategoryController::showByDate * Implement testShowByDate(). */ public function testShowByDate() @@ -123,7 +123,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CategoryController::store + * @covers \FireflyIII\Http\Controllers\CategoryController::store * Implement testStore(). */ public function testStore() @@ -135,7 +135,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CategoryController::update + * @covers \FireflyIII\Http\Controllers\CategoryController::update * Implement testUpdate(). */ public function testUpdate() diff --git a/tests/acceptance/Controllers/Chart/AccountControllerTest.php b/tests/acceptance/Controllers/Chart/AccountControllerTest.php index b7b9cd9f26..42463ebacf 100644 --- a/tests/acceptance/Controllers/Chart/AccountControllerTest.php +++ b/tests/acceptance/Controllers/Chart/AccountControllerTest.php @@ -14,7 +14,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:19. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:33. */ class AccountControllerTest extends TestCase { @@ -30,7 +30,7 @@ class AccountControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\AccountController::expenseAccounts + * @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseAccounts * Implement testExpenseAccounts(). */ public function testExpenseAccounts() @@ -42,7 +42,7 @@ class AccountControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\AccountController::expenseBudget + * @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseBudget * Implement testExpenseBudget(). */ public function testExpenseBudget() @@ -54,7 +54,7 @@ class AccountControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\AccountController::expenseCategory + * @covers \FireflyIII\Http\Controllers\Chart\AccountController::expenseCategory * Implement testExpenseCategory(). */ public function testExpenseCategory() @@ -66,7 +66,7 @@ class AccountControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\AccountController::frontpage + * @covers \FireflyIII\Http\Controllers\Chart\AccountController::frontpage * Implement testFrontpage(). */ public function testFrontpage() @@ -78,7 +78,7 @@ class AccountControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\AccountController::incomeCategory + * @covers \FireflyIII\Http\Controllers\Chart\AccountController::incomeCategory * Implement testIncomeCategory(). */ public function testIncomeCategory() @@ -90,7 +90,7 @@ class AccountControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\AccountController::report + * @covers \FireflyIII\Http\Controllers\Chart\AccountController::report * Implement testReport(). */ public function testReport() @@ -102,7 +102,7 @@ class AccountControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\AccountController::revenueAccounts + * @covers \FireflyIII\Http\Controllers\Chart\AccountController::revenueAccounts * Implement testRevenueAccounts(). */ public function testRevenueAccounts() @@ -114,7 +114,7 @@ class AccountControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\AccountController::single + * @covers \FireflyIII\Http\Controllers\Chart\AccountController::single * Implement testSingle(). */ public function testSingle() @@ -126,7 +126,7 @@ class AccountControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\AccountController::specificPeriod + * @covers \FireflyIII\Http\Controllers\Chart\AccountController::specificPeriod * Implement testSpecificPeriod(). */ public function testSpecificPeriod() diff --git a/tests/acceptance/Controllers/Chart/BillControllerTest.php b/tests/acceptance/Controllers/Chart/BillControllerTest.php index 648c913371..a97abe06ee 100644 --- a/tests/acceptance/Controllers/Chart/BillControllerTest.php +++ b/tests/acceptance/Controllers/Chart/BillControllerTest.php @@ -14,7 +14,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:19. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:33. */ class BillControllerTest extends TestCase { @@ -30,7 +30,7 @@ class BillControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\BillController::frontpage + * @covers \FireflyIII\Http\Controllers\Chart\BillController::frontpage * Implement testFrontpage(). */ public function testFrontpage() @@ -42,7 +42,7 @@ class BillControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\BillController::single + * @covers \FireflyIII\Http\Controllers\Chart\BillController::single * Implement testSingle(). */ public function testSingle() diff --git a/tests/acceptance/Controllers/Chart/BudgetControllerTest.php b/tests/acceptance/Controllers/Chart/BudgetControllerTest.php index 4b89e475bc..399f4e54ea 100644 --- a/tests/acceptance/Controllers/Chart/BudgetControllerTest.php +++ b/tests/acceptance/Controllers/Chart/BudgetControllerTest.php @@ -14,7 +14,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:19. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:33. */ class BudgetControllerTest extends TestCase { @@ -30,7 +30,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\BudgetController::budget + * @covers \FireflyIII\Http\Controllers\Chart\BudgetController::budget * Implement testBudget(). */ public function testBudget() @@ -42,7 +42,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\BudgetController::budgetLimit + * @covers \FireflyIII\Http\Controllers\Chart\BudgetController::budgetLimit * Implement testBudgetLimit(). */ public function testBudgetLimit() @@ -54,7 +54,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\BudgetController::frontpage + * @covers \FireflyIII\Http\Controllers\Chart\BudgetController::frontpage * Implement testFrontpage(). */ public function testFrontpage() @@ -66,7 +66,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\BudgetController::period + * @covers \FireflyIII\Http\Controllers\Chart\BudgetController::period * Implement testPeriod(). */ public function testPeriod() @@ -78,7 +78,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\BudgetController::periodNoBudget + * @covers \FireflyIII\Http\Controllers\Chart\BudgetController::periodNoBudget * Implement testPeriodNoBudget(). */ public function testPeriodNoBudget() diff --git a/tests/acceptance/Controllers/Chart/CategoryControllerTest.php b/tests/acceptance/Controllers/Chart/CategoryControllerTest.php index 7a5d32c32b..29efb47f0a 100644 --- a/tests/acceptance/Controllers/Chart/CategoryControllerTest.php +++ b/tests/acceptance/Controllers/Chart/CategoryControllerTest.php @@ -14,7 +14,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:19. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:33. */ class CategoryControllerTest extends TestCase { @@ -30,7 +30,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\CategoryController::all + * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::all * Implement testAll(). */ public function testAll() @@ -42,7 +42,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\CategoryController::currentPeriod + * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::currentPeriod * Implement testCurrentPeriod(). */ public function testCurrentPeriod() @@ -54,7 +54,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\CategoryController::frontpage + * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::frontpage * Implement testFrontpage(). */ public function testFrontpage() @@ -66,7 +66,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriod + * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriod * Implement testReportPeriod(). */ public function testReportPeriod() @@ -78,7 +78,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriodNoCategory + * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::reportPeriodNoCategory * Implement testReportPeriodNoCategory(). */ public function testReportPeriodNoCategory() @@ -90,7 +90,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\CategoryController::specificPeriod + * @covers \FireflyIII\Http\Controllers\Chart\CategoryController::specificPeriod * Implement testSpecificPeriod(). */ public function testSpecificPeriod() diff --git a/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php b/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php index 1852b7df3c..4ebab07460 100644 --- a/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php +++ b/tests/acceptance/Controllers/Chart/CategoryReportControllerTest.php @@ -14,7 +14,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:19. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:33. */ class CategoryReportControllerTest extends TestCase { @@ -30,7 +30,7 @@ class CategoryReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\CategoryReportController::accountExpense + * @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::accountExpense * Implement testAccountExpense(). */ public function testAccountExpense() @@ -42,7 +42,7 @@ class CategoryReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\CategoryReportController::accountIncome + * @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::accountIncome * Implement testAccountIncome(). */ public function testAccountIncome() @@ -54,7 +54,7 @@ class CategoryReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryExpense + * @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryExpense * Implement testCategoryExpense(). */ public function testCategoryExpense() @@ -66,7 +66,7 @@ class CategoryReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryIncome + * @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::categoryIncome * Implement testCategoryIncome(). */ public function testCategoryIncome() @@ -78,7 +78,7 @@ class CategoryReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\CategoryReportController::mainChart + * @covers \FireflyIII\Http\Controllers\Chart\CategoryReportController::mainChart * Implement testMainChart(). */ public function testMainChart() diff --git a/tests/acceptance/Controllers/Chart/PiggyBankControllerTest.php b/tests/acceptance/Controllers/Chart/PiggyBankControllerTest.php index 50c7e47a4a..6ada0dc85e 100644 --- a/tests/acceptance/Controllers/Chart/PiggyBankControllerTest.php +++ b/tests/acceptance/Controllers/Chart/PiggyBankControllerTest.php @@ -14,7 +14,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:19. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:33. */ class PiggyBankControllerTest extends TestCase { @@ -30,7 +30,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\PiggyBankController::history + * @covers \FireflyIII\Http\Controllers\Chart\PiggyBankController::history * Implement testHistory(). */ public function testHistory() diff --git a/tests/acceptance/Controllers/Chart/ReportControllerTest.php b/tests/acceptance/Controllers/Chart/ReportControllerTest.php index df60d011f2..793fcf463a 100644 --- a/tests/acceptance/Controllers/Chart/ReportControllerTest.php +++ b/tests/acceptance/Controllers/Chart/ReportControllerTest.php @@ -14,7 +14,7 @@ namespace Chart; use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:19. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:33. */ class ReportControllerTest extends TestCase { @@ -30,7 +30,7 @@ class ReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\ReportController::netWorth + * @covers \FireflyIII\Http\Controllers\Chart\ReportController::netWorth * Implement testNetWorth(). */ public function testNetWorth() @@ -42,7 +42,7 @@ class ReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\ReportController::operations + * @covers \FireflyIII\Http\Controllers\Chart\ReportController::operations * Implement testOperations(). */ public function testOperations() @@ -54,7 +54,7 @@ class ReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Chart\ReportController::sum + * @covers \FireflyIII\Http\Controllers\Chart\ReportController::sum * Implement testSum(). */ public function testSum() diff --git a/tests/acceptance/Controllers/ControllerTest.php b/tests/acceptance/Controllers/ControllerTest.php index 69ba970d17..19c2a69c98 100644 --- a/tests/acceptance/Controllers/ControllerTest.php +++ b/tests/acceptance/Controllers/ControllerTest.php @@ -11,7 +11,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:20. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:34. */ class ControllerTest extends TestCase { @@ -27,7 +27,7 @@ class ControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Controller::authorize + * @covers \FireflyIII\Http\Controllers\Controller::authorize * Implement testAuthorize(). */ public function testAuthorize() @@ -39,7 +39,7 @@ class ControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Controller::authorizeForUser + * @covers \FireflyIII\Http\Controllers\Controller::authorizeForUser * Implement testAuthorizeForUser(). */ public function testAuthorizeForUser() @@ -51,7 +51,7 @@ class ControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Controller::authorizeResource + * @covers \FireflyIII\Http\Controllers\Controller::authorizeResource * Implement testAuthorizeResource(). */ public function testAuthorizeResource() @@ -63,7 +63,7 @@ class ControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Controller::dispatchNow + * @covers \FireflyIII\Http\Controllers\Controller::dispatchNow * Implement testDispatchNow(). */ public function testDispatchNow() @@ -75,7 +75,7 @@ class ControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Controller::validate + * @covers \FireflyIII\Http\Controllers\Controller::validate * Implement testValidate(). */ public function testValidate() @@ -87,7 +87,7 @@ class ControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Controller::validateWith + * @covers \FireflyIII\Http\Controllers\Controller::validateWith * Implement testValidateWith(). */ public function testValidateWith() @@ -99,7 +99,7 @@ class ControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Controller::validateWithBag + * @covers \FireflyIII\Http\Controllers\Controller::validateWithBag * Implement testValidateWithBag(). */ public function testValidateWithBag() diff --git a/tests/acceptance/Controllers/CurrencyControllerTest.php b/tests/acceptance/Controllers/CurrencyControllerTest.php index 3644ceed3f..d9540a684e 100644 --- a/tests/acceptance/Controllers/CurrencyControllerTest.php +++ b/tests/acceptance/Controllers/CurrencyControllerTest.php @@ -11,7 +11,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:20. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:34. */ class CurrencyControllerTest extends TestCase { @@ -27,7 +27,7 @@ class CurrencyControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CurrencyController::create + * @covers \FireflyIII\Http\Controllers\CurrencyController::create * Implement testCreate(). */ public function testCreate() @@ -39,7 +39,7 @@ class CurrencyControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CurrencyController::defaultCurrency + * @covers \FireflyIII\Http\Controllers\CurrencyController::defaultCurrency * Implement testDefaultCurrency(). */ public function testDefaultCurrency() @@ -51,7 +51,7 @@ class CurrencyControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CurrencyController::delete + * @covers \FireflyIII\Http\Controllers\CurrencyController::delete * Implement testDelete(). */ public function testDelete() @@ -63,7 +63,7 @@ class CurrencyControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CurrencyController::destroy + * @covers \FireflyIII\Http\Controllers\CurrencyController::destroy * Implement testDestroy(). */ public function testDestroy() @@ -75,7 +75,7 @@ class CurrencyControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CurrencyController::edit + * @covers \FireflyIII\Http\Controllers\CurrencyController::edit * Implement testEdit(). */ public function testEdit() @@ -87,7 +87,7 @@ class CurrencyControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CurrencyController::index + * @covers \FireflyIII\Http\Controllers\CurrencyController::index * Implement testIndex(). */ public function testIndex() @@ -99,7 +99,7 @@ class CurrencyControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CurrencyController::store + * @covers \FireflyIII\Http\Controllers\CurrencyController::store * Implement testStore(). */ public function testStore() @@ -111,7 +111,7 @@ class CurrencyControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\CurrencyController::update + * @covers \FireflyIII\Http\Controllers\CurrencyController::update * Implement testUpdate(). */ public function testUpdate() diff --git a/tests/acceptance/Controllers/ExportControllerTest.php b/tests/acceptance/Controllers/ExportControllerTest.php index 76effa8c86..04ef3c672e 100644 --- a/tests/acceptance/Controllers/ExportControllerTest.php +++ b/tests/acceptance/Controllers/ExportControllerTest.php @@ -11,7 +11,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:20. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:34. */ class ExportControllerTest extends TestCase { @@ -27,7 +27,7 @@ class ExportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ExportController::download + * @covers \FireflyIII\Http\Controllers\ExportController::download * Implement testDownload(). */ public function testDownload() @@ -39,7 +39,7 @@ class ExportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ExportController::getStatus + * @covers \FireflyIII\Http\Controllers\ExportController::getStatus * Implement testGetStatus(). */ public function testGetStatus() @@ -51,7 +51,7 @@ class ExportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ExportController::index + * @covers \FireflyIII\Http\Controllers\ExportController::index * Implement testIndex(). */ public function testIndex() @@ -63,7 +63,7 @@ class ExportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ExportController::postIndex + * @covers \FireflyIII\Http\Controllers\ExportController::postIndex * Implement testPostIndex(). */ public function testPostIndex() diff --git a/tests/acceptance/Controllers/HelpControllerTest.php b/tests/acceptance/Controllers/HelpControllerTest.php index dda27ef8bd..d9d1d8c6f4 100644 --- a/tests/acceptance/Controllers/HelpControllerTest.php +++ b/tests/acceptance/Controllers/HelpControllerTest.php @@ -11,7 +11,7 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:20. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:34. */ class HelpControllerTest extends TestCase { @@ -27,7 +27,7 @@ class HelpControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\HelpController::show + * @covers \FireflyIII\Http\Controllers\HelpController::show * Implement testShow(). */ public function testShow() diff --git a/tests/acceptance/Controllers/ImportControllerTest.php b/tests/acceptance/Controllers/ImportControllerTest.php index 5989005375..4bd1581260 100644 --- a/tests/acceptance/Controllers/ImportControllerTest.php +++ b/tests/acceptance/Controllers/ImportControllerTest.php @@ -11,11 +11,12 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:20. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:35. */ class ImportControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -27,7 +28,15 @@ class ImportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ImportController::complete + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\ImportController::complete * Implement testComplete(). */ public function testComplete() @@ -39,7 +48,7 @@ class ImportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ImportController::configure + * @covers \FireflyIII\Http\Controllers\ImportController::configure * Implement testConfigure(). */ public function testConfigure() @@ -51,7 +60,7 @@ class ImportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ImportController::download + * @covers \FireflyIII\Http\Controllers\ImportController::download * Implement testDownload(). */ public function testDownload() @@ -63,7 +72,7 @@ class ImportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ImportController::finished + * @covers \FireflyIII\Http\Controllers\ImportController::finished * Implement testFinished(). */ public function testFinished() @@ -75,7 +84,7 @@ class ImportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ImportController::index + * @covers \FireflyIII\Http\Controllers\ImportController::index * Implement testIndex(). */ public function testIndex() @@ -87,7 +96,7 @@ class ImportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ImportController::json + * @covers \FireflyIII\Http\Controllers\ImportController::json * Implement testJson(). */ public function testJson() @@ -99,7 +108,7 @@ class ImportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ImportController::postConfigure + * @covers \FireflyIII\Http\Controllers\ImportController::postConfigure * Implement testPostConfigure(). */ public function testPostConfigure() @@ -111,7 +120,7 @@ class ImportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ImportController::postSettings + * @covers \FireflyIII\Http\Controllers\ImportController::postSettings * Implement testPostSettings(). */ public function testPostSettings() @@ -123,7 +132,7 @@ class ImportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ImportController::settings + * @covers \FireflyIII\Http\Controllers\ImportController::settings * Implement testSettings(). */ public function testSettings() @@ -135,7 +144,7 @@ class ImportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ImportController::start + * @covers \FireflyIII\Http\Controllers\ImportController::start * Implement testStart(). */ public function testStart() @@ -147,7 +156,7 @@ class ImportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ImportController::status + * @covers \FireflyIII\Http\Controllers\ImportController::status * Implement testStatus(). */ public function testStatus() @@ -159,7 +168,7 @@ class ImportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ImportController::upload + * @covers \FireflyIII\Http\Controllers\ImportController::upload * Implement testUpload(). */ public function testUpload() @@ -169,12 +178,4 @@ class ImportControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/JsonControllerTest.php b/tests/acceptance/Controllers/JsonControllerTest.php index 1d81753189..d7c57ced7f 100644 --- a/tests/acceptance/Controllers/JsonControllerTest.php +++ b/tests/acceptance/Controllers/JsonControllerTest.php @@ -11,11 +11,12 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:20. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:35. */ class JsonControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -27,7 +28,15 @@ class JsonControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\JsonController::action + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\JsonController::action * Implement testAction(). */ public function testAction() @@ -39,7 +48,7 @@ class JsonControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\JsonController::boxBillsPaid + * @covers \FireflyIII\Http\Controllers\JsonController::boxBillsPaid * Implement testBoxBillsPaid(). */ public function testBoxBillsPaid() @@ -51,7 +60,7 @@ class JsonControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\JsonController::boxBillsUnpaid + * @covers \FireflyIII\Http\Controllers\JsonController::boxBillsUnpaid * Implement testBoxBillsUnpaid(). */ public function testBoxBillsUnpaid() @@ -63,7 +72,7 @@ class JsonControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\JsonController::boxIn + * @covers \FireflyIII\Http\Controllers\JsonController::boxIn * Implement testBoxIn(). */ public function testBoxIn() @@ -75,7 +84,7 @@ class JsonControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\JsonController::boxOut + * @covers \FireflyIII\Http\Controllers\JsonController::boxOut * Implement testBoxOut(). */ public function testBoxOut() @@ -87,7 +96,7 @@ class JsonControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\JsonController::categories + * @covers \FireflyIII\Http\Controllers\JsonController::categories * Implement testCategories(). */ public function testCategories() @@ -99,7 +108,7 @@ class JsonControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\JsonController::endTour + * @covers \FireflyIII\Http\Controllers\JsonController::endTour * Implement testEndTour(). */ public function testEndTour() @@ -111,7 +120,7 @@ class JsonControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\JsonController::expenseAccounts + * @covers \FireflyIII\Http\Controllers\JsonController::expenseAccounts * Implement testExpenseAccounts(). */ public function testExpenseAccounts() @@ -123,7 +132,7 @@ class JsonControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\JsonController::revenueAccounts + * @covers \FireflyIII\Http\Controllers\JsonController::revenueAccounts * Implement testRevenueAccounts(). */ public function testRevenueAccounts() @@ -135,7 +144,7 @@ class JsonControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\JsonController::tags + * @covers \FireflyIII\Http\Controllers\JsonController::tags * Implement testTags(). */ public function testTags() @@ -147,7 +156,7 @@ class JsonControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\JsonController::tour + * @covers \FireflyIII\Http\Controllers\JsonController::tour * Implement testTour(). */ public function testTour() @@ -159,7 +168,7 @@ class JsonControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\JsonController::transactionJournals + * @covers \FireflyIII\Http\Controllers\JsonController::transactionJournals * Implement testTransactionJournals(). */ public function testTransactionJournals() @@ -171,7 +180,7 @@ class JsonControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\JsonController::trigger + * @covers \FireflyIII\Http\Controllers\JsonController::trigger * Implement testTrigger(). */ public function testTrigger() @@ -181,12 +190,4 @@ class JsonControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/NewUserControllerTest.php b/tests/acceptance/Controllers/NewUserControllerTest.php index 487bd5df33..2248ec46c4 100644 --- a/tests/acceptance/Controllers/NewUserControllerTest.php +++ b/tests/acceptance/Controllers/NewUserControllerTest.php @@ -11,11 +11,12 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:20. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:36. */ class NewUserControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -27,7 +28,15 @@ class NewUserControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\NewUserController::index + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\NewUserController::index * Implement testIndex(). */ public function testIndex() @@ -39,7 +48,7 @@ class NewUserControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\NewUserController::submit + * @covers \FireflyIII\Http\Controllers\NewUserController::submit * Implement testSubmit(). */ public function testSubmit() @@ -49,12 +58,4 @@ class NewUserControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/PiggyBankControllerTest.php b/tests/acceptance/Controllers/PiggyBankControllerTest.php index 69f00d3a27..a0e412ace3 100644 --- a/tests/acceptance/Controllers/PiggyBankControllerTest.php +++ b/tests/acceptance/Controllers/PiggyBankControllerTest.php @@ -11,11 +11,12 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:36. */ class PiggyBankControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -27,7 +28,15 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::add + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\PiggyBankController::add * Implement testAdd(). */ public function testAdd() @@ -39,7 +48,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::addMobile + * @covers \FireflyIII\Http\Controllers\PiggyBankController::addMobile * Implement testAddMobile(). */ public function testAddMobile() @@ -51,7 +60,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::create + * @covers \FireflyIII\Http\Controllers\PiggyBankController::create * Implement testCreate(). */ public function testCreate() @@ -63,7 +72,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::delete + * @covers \FireflyIII\Http\Controllers\PiggyBankController::delete * Implement testDelete(). */ public function testDelete() @@ -75,7 +84,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::destroy + * @covers \FireflyIII\Http\Controllers\PiggyBankController::destroy * Implement testDestroy(). */ public function testDestroy() @@ -87,7 +96,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::edit + * @covers \FireflyIII\Http\Controllers\PiggyBankController::edit * Implement testEdit(). */ public function testEdit() @@ -99,7 +108,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::index + * @covers \FireflyIII\Http\Controllers\PiggyBankController::index * Implement testIndex(). */ public function testIndex() @@ -111,7 +120,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::order + * @covers \FireflyIII\Http\Controllers\PiggyBankController::order * Implement testOrder(). */ public function testOrder() @@ -123,7 +132,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::postAdd + * @covers \FireflyIII\Http\Controllers\PiggyBankController::postAdd * Implement testPostAdd(). */ public function testPostAdd() @@ -135,7 +144,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::postRemove + * @covers \FireflyIII\Http\Controllers\PiggyBankController::postRemove * Implement testPostRemove(). */ public function testPostRemove() @@ -147,7 +156,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::remove + * @covers \FireflyIII\Http\Controllers\PiggyBankController::remove * Implement testRemove(). */ public function testRemove() @@ -159,7 +168,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::removeMobile + * @covers \FireflyIII\Http\Controllers\PiggyBankController::removeMobile * Implement testRemoveMobile(). */ public function testRemoveMobile() @@ -171,7 +180,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::show + * @covers \FireflyIII\Http\Controllers\PiggyBankController::show * Implement testShow(). */ public function testShow() @@ -183,7 +192,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::store + * @covers \FireflyIII\Http\Controllers\PiggyBankController::store * Implement testStore(). */ public function testStore() @@ -195,7 +204,7 @@ class PiggyBankControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PiggyBankController::update + * @covers \FireflyIII\Http\Controllers\PiggyBankController::update * Implement testUpdate(). */ public function testUpdate() @@ -205,12 +214,4 @@ class PiggyBankControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/Popup/ReportControllerTest.php b/tests/acceptance/Controllers/Popup/ReportControllerTest.php index aac3e9d1df..bd92078afe 100644 --- a/tests/acceptance/Controllers/Popup/ReportControllerTest.php +++ b/tests/acceptance/Controllers/Popup/ReportControllerTest.php @@ -10,15 +10,15 @@ */ namespace Popup; - use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:36. */ class ReportControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -30,7 +30,15 @@ class ReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Popup\ReportController::general + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\Popup\ReportController::general * Implement testGeneral(). */ public function testGeneral() @@ -40,12 +48,4 @@ class ReportControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/PreferencesControllerTest.php b/tests/acceptance/Controllers/PreferencesControllerTest.php index 8601e1f46d..52eaf96de0 100644 --- a/tests/acceptance/Controllers/PreferencesControllerTest.php +++ b/tests/acceptance/Controllers/PreferencesControllerTest.php @@ -11,11 +11,12 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:37. */ class PreferencesControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -27,7 +28,15 @@ class PreferencesControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PreferencesController::code + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\PreferencesController::code * Implement testCode(). */ public function testCode() @@ -39,7 +48,7 @@ class PreferencesControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PreferencesController::deleteCode + * @covers \FireflyIII\Http\Controllers\PreferencesController::deleteCode * Implement testDeleteCode(). */ public function testDeleteCode() @@ -51,7 +60,7 @@ class PreferencesControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PreferencesController::index + * @covers \FireflyIII\Http\Controllers\PreferencesController::index * Implement testIndex(). */ public function testIndex() @@ -63,7 +72,7 @@ class PreferencesControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PreferencesController::postCode + * @covers \FireflyIII\Http\Controllers\PreferencesController::postCode * Implement testPostCode(). */ public function testPostCode() @@ -75,7 +84,7 @@ class PreferencesControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\PreferencesController::postIndex + * @covers \FireflyIII\Http\Controllers\PreferencesController::postIndex * Implement testPostIndex(). */ public function testPostIndex() @@ -85,12 +94,4 @@ class PreferencesControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/ProfileControllerTest.php b/tests/acceptance/Controllers/ProfileControllerTest.php index fe46e26fa1..6ddfc8d117 100644 --- a/tests/acceptance/Controllers/ProfileControllerTest.php +++ b/tests/acceptance/Controllers/ProfileControllerTest.php @@ -11,11 +11,12 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:37. */ class ProfileControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -27,7 +28,15 @@ class ProfileControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ProfileController::changePassword + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\ProfileController::changePassword * Implement testChangePassword(). */ public function testChangePassword() @@ -39,7 +48,7 @@ class ProfileControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ProfileController::deleteAccount + * @covers \FireflyIII\Http\Controllers\ProfileController::deleteAccount * Implement testDeleteAccount(). */ public function testDeleteAccount() @@ -51,7 +60,7 @@ class ProfileControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ProfileController::index + * @covers \FireflyIII\Http\Controllers\ProfileController::index * Implement testIndex(). */ public function testIndex() @@ -63,7 +72,7 @@ class ProfileControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ProfileController::postChangePassword + * @covers \FireflyIII\Http\Controllers\ProfileController::postChangePassword * Implement testPostChangePassword(). */ public function testPostChangePassword() @@ -75,7 +84,7 @@ class ProfileControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ProfileController::postDeleteAccount + * @covers \FireflyIII\Http\Controllers\ProfileController::postDeleteAccount * Implement testPostDeleteAccount(). */ public function testPostDeleteAccount() @@ -85,12 +94,4 @@ class ProfileControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/Report/AccountControllerTest.php b/tests/acceptance/Controllers/Report/AccountControllerTest.php index 876943ce29..06179d681b 100644 --- a/tests/acceptance/Controllers/Report/AccountControllerTest.php +++ b/tests/acceptance/Controllers/Report/AccountControllerTest.php @@ -10,15 +10,15 @@ */ namespace Report; - use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:37. */ class AccountControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -30,7 +30,15 @@ class AccountControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Report\AccountController::general + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\Report\AccountController::general * Implement testGeneral(). */ public function testGeneral() @@ -40,12 +48,4 @@ class AccountControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/Report/BalanceControllerTest.php b/tests/acceptance/Controllers/Report/BalanceControllerTest.php index 0bc2c214d4..049227fb6a 100644 --- a/tests/acceptance/Controllers/Report/BalanceControllerTest.php +++ b/tests/acceptance/Controllers/Report/BalanceControllerTest.php @@ -10,15 +10,15 @@ */ namespace Report; - use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:21. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:37. */ class BalanceControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -30,7 +30,15 @@ class BalanceControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Report\BalanceController::general + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\Report\BalanceController::general * Implement testGeneral(). */ public function testGeneral() @@ -40,12 +48,4 @@ class BalanceControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/Report/BudgetControllerTest.php b/tests/acceptance/Controllers/Report/BudgetControllerTest.php index 68dfcbd216..b1b88e675c 100644 --- a/tests/acceptance/Controllers/Report/BudgetControllerTest.php +++ b/tests/acceptance/Controllers/Report/BudgetControllerTest.php @@ -10,15 +10,15 @@ */ namespace Report; - use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:37. */ class BudgetControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -30,7 +30,15 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Report\BudgetController::general + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\Report\BudgetController::general * Implement testGeneral(). */ public function testGeneral() @@ -42,7 +50,7 @@ class BudgetControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Report\BudgetController::period + * @covers \FireflyIII\Http\Controllers\Report\BudgetController::period * Implement testPeriod(). */ public function testPeriod() @@ -52,12 +60,4 @@ class BudgetControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/Report/CategoryControllerTest.php b/tests/acceptance/Controllers/Report/CategoryControllerTest.php index 2778366960..51f3ca5cbf 100644 --- a/tests/acceptance/Controllers/Report/CategoryControllerTest.php +++ b/tests/acceptance/Controllers/Report/CategoryControllerTest.php @@ -10,15 +10,15 @@ */ namespace Report; - use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:37. */ class CategoryControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -30,7 +30,15 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Report\CategoryController::expenses + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\Report\CategoryController::expenses * Implement testExpenses(). */ public function testExpenses() @@ -42,7 +50,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Report\CategoryController::income + * @covers \FireflyIII\Http\Controllers\Report\CategoryController::income * Implement testIncome(). */ public function testIncome() @@ -54,7 +62,7 @@ class CategoryControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Report\CategoryController::operations + * @covers \FireflyIII\Http\Controllers\Report\CategoryController::operations * Implement testOperations(). */ public function testOperations() @@ -64,12 +72,4 @@ class CategoryControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/Report/OperationsControllerTest.php b/tests/acceptance/Controllers/Report/OperationsControllerTest.php index 3cea11ebc9..6a49770447 100644 --- a/tests/acceptance/Controllers/Report/OperationsControllerTest.php +++ b/tests/acceptance/Controllers/Report/OperationsControllerTest.php @@ -10,15 +10,15 @@ */ namespace Report; - use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:37. */ class OperationsControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -30,7 +30,15 @@ class OperationsControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Report\OperationsController::expenses + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\Report\OperationsController::expenses * Implement testExpenses(). */ public function testExpenses() @@ -42,19 +50,7 @@ class OperationsControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Report\OperationsController::income - * Implement testIncome(). - */ - public function testIncome() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers FireflyIII\Http\Controllers\Report\OperationsController::operations + * @covers \FireflyIII\Http\Controllers\Report\OperationsController::operations * Implement testOperations(). */ public function testOperations() @@ -66,10 +62,14 @@ class OperationsControllerTest extends TestCase } /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. + * @covers \FireflyIII\Http\Controllers\Report\OperationsController::income + * Implement testIncome(). */ - protected function tearDown() + public function testIncome() { + // Remove the following lines when you implement this test. + $this->markTestIncomplete( + 'This test has not been implemented yet.' + ); } } diff --git a/tests/acceptance/Controllers/ReportControllerTest.php b/tests/acceptance/Controllers/ReportControllerTest.php index d4587bb062..f5ded1797f 100644 --- a/tests/acceptance/Controllers/ReportControllerTest.php +++ b/tests/acceptance/Controllers/ReportControllerTest.php @@ -11,11 +11,12 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:38. */ class ReportControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -27,7 +28,15 @@ class ReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ReportController::auditReport + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\ReportController::auditReport * Implement testAuditReport(). */ public function testAuditReport() @@ -39,7 +48,7 @@ class ReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ReportController::categoryReport + * @covers \FireflyIII\Http\Controllers\ReportController::categoryReport * Implement testCategoryReport(). */ public function testCategoryReport() @@ -51,7 +60,7 @@ class ReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ReportController::defaultReport + * @covers \FireflyIII\Http\Controllers\ReportController::defaultReport * Implement testDefaultReport(). */ public function testDefaultReport() @@ -63,7 +72,7 @@ class ReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ReportController::index + * @covers \FireflyIII\Http\Controllers\ReportController::index * Implement testIndex(). */ public function testIndex() @@ -75,7 +84,7 @@ class ReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ReportController::options + * @covers \FireflyIII\Http\Controllers\ReportController::options * Implement testOptions(). */ public function testOptions() @@ -87,7 +96,7 @@ class ReportControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\ReportController::postIndex + * @covers \FireflyIII\Http\Controllers\ReportController::postIndex * Implement testPostIndex(). */ public function testPostIndex() @@ -97,12 +106,4 @@ class ReportControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/RuleControllerTest.php b/tests/acceptance/Controllers/RuleControllerTest.php index da58256134..6aa0cfec16 100644 --- a/tests/acceptance/Controllers/RuleControllerTest.php +++ b/tests/acceptance/Controllers/RuleControllerTest.php @@ -11,11 +11,12 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:38. */ class RuleControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -27,7 +28,15 @@ class RuleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleController::create + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\RuleController::create * Implement testCreate(). */ public function testCreate() @@ -39,7 +48,7 @@ class RuleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleController::delete + * @covers \FireflyIII\Http\Controllers\RuleController::delete * Implement testDelete(). */ public function testDelete() @@ -51,7 +60,7 @@ class RuleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleController::destroy + * @covers \FireflyIII\Http\Controllers\RuleController::destroy * Implement testDestroy(). */ public function testDestroy() @@ -63,7 +72,7 @@ class RuleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleController::down + * @covers \FireflyIII\Http\Controllers\RuleController::down * Implement testDown(). */ public function testDown() @@ -75,7 +84,7 @@ class RuleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleController::edit + * @covers \FireflyIII\Http\Controllers\RuleController::edit * Implement testEdit(). */ public function testEdit() @@ -87,7 +96,7 @@ class RuleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleController::index + * @covers \FireflyIII\Http\Controllers\RuleController::index * Implement testIndex(). */ public function testIndex() @@ -99,7 +108,7 @@ class RuleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleController::reorderRuleActions + * @covers \FireflyIII\Http\Controllers\RuleController::reorderRuleActions * Implement testReorderRuleActions(). */ public function testReorderRuleActions() @@ -111,7 +120,7 @@ class RuleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleController::reorderRuleTriggers + * @covers \FireflyIII\Http\Controllers\RuleController::reorderRuleTriggers * Implement testReorderRuleTriggers(). */ public function testReorderRuleTriggers() @@ -123,7 +132,7 @@ class RuleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleController::store + * @covers \FireflyIII\Http\Controllers\RuleController::store * Implement testStore(). */ public function testStore() @@ -135,7 +144,7 @@ class RuleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleController::testTriggers + * @covers \FireflyIII\Http\Controllers\RuleController::testTriggers * Implement testTestTriggers(). */ public function testTestTriggers() @@ -147,7 +156,7 @@ class RuleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleController::up + * @covers \FireflyIII\Http\Controllers\RuleController::up * Implement testUp(). */ public function testUp() @@ -159,7 +168,7 @@ class RuleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleController::update + * @covers \FireflyIII\Http\Controllers\RuleController::update * Implement testUpdate(). */ public function testUpdate() @@ -169,12 +178,4 @@ class RuleControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/RuleGroupControllerTest.php b/tests/acceptance/Controllers/RuleGroupControllerTest.php index 33d7417ab3..ad2e8e9bad 100644 --- a/tests/acceptance/Controllers/RuleGroupControllerTest.php +++ b/tests/acceptance/Controllers/RuleGroupControllerTest.php @@ -11,11 +11,12 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:22. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:38. */ class RuleGroupControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -27,7 +28,15 @@ class RuleGroupControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleGroupController::create + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\RuleGroupController::create * Implement testCreate(). */ public function testCreate() @@ -39,7 +48,7 @@ class RuleGroupControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleGroupController::delete + * @covers \FireflyIII\Http\Controllers\RuleGroupController::delete * Implement testDelete(). */ public function testDelete() @@ -51,7 +60,7 @@ class RuleGroupControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleGroupController::destroy + * @covers \FireflyIII\Http\Controllers\RuleGroupController::destroy * Implement testDestroy(). */ public function testDestroy() @@ -63,7 +72,7 @@ class RuleGroupControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleGroupController::down + * @covers \FireflyIII\Http\Controllers\RuleGroupController::down * Implement testDown(). */ public function testDown() @@ -75,7 +84,7 @@ class RuleGroupControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleGroupController::edit + * @covers \FireflyIII\Http\Controllers\RuleGroupController::edit * Implement testEdit(). */ public function testEdit() @@ -87,7 +96,7 @@ class RuleGroupControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleGroupController::execute + * @covers \FireflyIII\Http\Controllers\RuleGroupController::execute * Implement testExecute(). */ public function testExecute() @@ -99,7 +108,7 @@ class RuleGroupControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleGroupController::selectTransactions + * @covers \FireflyIII\Http\Controllers\RuleGroupController::selectTransactions * Implement testSelectTransactions(). */ public function testSelectTransactions() @@ -111,7 +120,7 @@ class RuleGroupControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleGroupController::store + * @covers \FireflyIII\Http\Controllers\RuleGroupController::store * Implement testStore(). */ public function testStore() @@ -123,7 +132,7 @@ class RuleGroupControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleGroupController::up + * @covers \FireflyIII\Http\Controllers\RuleGroupController::up * Implement testUp(). */ public function testUp() @@ -135,7 +144,7 @@ class RuleGroupControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\RuleGroupController::update + * @covers \FireflyIII\Http\Controllers\RuleGroupController::update * Implement testUpdate(). */ public function testUpdate() @@ -145,12 +154,4 @@ class RuleGroupControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/SearchControllerTest.php b/tests/acceptance/Controllers/SearchControllerTest.php index 7c6679b8e6..de19e0f2aa 100644 --- a/tests/acceptance/Controllers/SearchControllerTest.php +++ b/tests/acceptance/Controllers/SearchControllerTest.php @@ -11,11 +11,12 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:23. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:38. */ class SearchControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -27,7 +28,15 @@ class SearchControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\SearchController::index + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\SearchController::index * Implement testIndex(). */ public function testIndex() @@ -37,12 +46,4 @@ class SearchControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/TagControllerTest.php b/tests/acceptance/Controllers/TagControllerTest.php index 0a91e29d0a..c255f2f49b 100644 --- a/tests/acceptance/Controllers/TagControllerTest.php +++ b/tests/acceptance/Controllers/TagControllerTest.php @@ -11,11 +11,12 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:23. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:38. */ class TagControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -27,7 +28,15 @@ class TagControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\TagController::create + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\TagController::create * Implement testCreate(). */ public function testCreate() @@ -39,7 +48,7 @@ class TagControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\TagController::delete + * @covers \FireflyIII\Http\Controllers\TagController::delete * Implement testDelete(). */ public function testDelete() @@ -51,7 +60,7 @@ class TagControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\TagController::destroy + * @covers \FireflyIII\Http\Controllers\TagController::destroy * Implement testDestroy(). */ public function testDestroy() @@ -63,7 +72,7 @@ class TagControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\TagController::edit + * @covers \FireflyIII\Http\Controllers\TagController::edit * Implement testEdit(). */ public function testEdit() @@ -75,19 +84,7 @@ class TagControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\TagController::hideTagHelp - * Implement testHideTagHelp(). - */ - public function testHideTagHelp() - { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); - } - - /** - * @covers FireflyIII\Http\Controllers\TagController::index + * @covers \FireflyIII\Http\Controllers\TagController::index * Implement testIndex(). */ public function testIndex() @@ -99,7 +96,7 @@ class TagControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\TagController::show + * @covers \FireflyIII\Http\Controllers\TagController::show * Implement testShow(). */ public function testShow() @@ -111,7 +108,7 @@ class TagControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\TagController::store + * @covers \FireflyIII\Http\Controllers\TagController::store * Implement testStore(). */ public function testStore() @@ -123,7 +120,7 @@ class TagControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\TagController::update + * @covers \FireflyIII\Http\Controllers\TagController::update * Implement testUpdate(). */ public function testUpdate() @@ -133,12 +130,4 @@ class TagControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/Transaction/ConvertControllerTest.php b/tests/acceptance/Controllers/Transaction/ConvertControllerTest.php index 0694a3e38a..85c706f9fe 100644 --- a/tests/acceptance/Controllers/Transaction/ConvertControllerTest.php +++ b/tests/acceptance/Controllers/Transaction/ConvertControllerTest.php @@ -10,15 +10,15 @@ */ namespace Transaction; - use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:23. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:38. */ class ConvertControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -30,7 +30,15 @@ class ConvertControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\ConvertController::index + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::index * Implement testIndex(). */ public function testIndex() @@ -42,7 +50,7 @@ class ConvertControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\ConvertController::postIndex + * @covers \FireflyIII\Http\Controllers\Transaction\ConvertController::postIndex * Implement testPostIndex(). */ public function testPostIndex() @@ -52,12 +60,4 @@ class ConvertControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/Transaction/MassControllerTest.php b/tests/acceptance/Controllers/Transaction/MassControllerTest.php index db76774b1c..c6475a6d6c 100644 --- a/tests/acceptance/Controllers/Transaction/MassControllerTest.php +++ b/tests/acceptance/Controllers/Transaction/MassControllerTest.php @@ -10,15 +10,15 @@ */ namespace Transaction; - use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:23. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:38. */ class MassControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -30,7 +30,15 @@ class MassControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\MassController::massDelete + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\Transaction\MassController::massDelete * Implement testMassDelete(). */ public function testMassDelete() @@ -42,7 +50,7 @@ class MassControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\MassController::massDestroy + * @covers \FireflyIII\Http\Controllers\Transaction\MassController::massDestroy * Implement testMassDestroy(). */ public function testMassDestroy() @@ -54,7 +62,7 @@ class MassControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\MassController::massEdit + * @covers \FireflyIII\Http\Controllers\Transaction\MassController::massEdit * Implement testMassEdit(). */ public function testMassEdit() @@ -66,7 +74,7 @@ class MassControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\MassController::massUpdate + * @covers \FireflyIII\Http\Controllers\Transaction\MassController::massUpdate * Implement testMassUpdate(). */ public function testMassUpdate() @@ -76,12 +84,4 @@ class MassControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/Transaction/SingleControllerTest.php b/tests/acceptance/Controllers/Transaction/SingleControllerTest.php index bea6209d68..334151be3a 100644 --- a/tests/acceptance/Controllers/Transaction/SingleControllerTest.php +++ b/tests/acceptance/Controllers/Transaction/SingleControllerTest.php @@ -10,15 +10,15 @@ */ namespace Transaction; - use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:23. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:38. */ class SingleControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -30,7 +30,15 @@ class SingleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\SingleController::create + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\Transaction\SingleController::create * Implement testCreate(). */ public function testCreate() @@ -42,7 +50,7 @@ class SingleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\SingleController::delete + * @covers \FireflyIII\Http\Controllers\Transaction\SingleController::delete * Implement testDelete(). */ public function testDelete() @@ -54,7 +62,7 @@ class SingleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\SingleController::destroy + * @covers \FireflyIII\Http\Controllers\Transaction\SingleController::destroy * Implement testDestroy(). */ public function testDestroy() @@ -66,7 +74,7 @@ class SingleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\SingleController::edit + * @covers \FireflyIII\Http\Controllers\Transaction\SingleController::edit * Implement testEdit(). */ public function testEdit() @@ -78,7 +86,7 @@ class SingleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\SingleController::store + * @covers \FireflyIII\Http\Controllers\Transaction\SingleController::store * Implement testStore(). */ public function testStore() @@ -90,7 +98,7 @@ class SingleControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\SingleController::update + * @covers \FireflyIII\Http\Controllers\Transaction\SingleController::update * Implement testUpdate(). */ public function testUpdate() @@ -100,12 +108,4 @@ class SingleControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/Transaction/SplitControllerTest.php b/tests/acceptance/Controllers/Transaction/SplitControllerTest.php index 0efed7f84b..c89b639d24 100644 --- a/tests/acceptance/Controllers/Transaction/SplitControllerTest.php +++ b/tests/acceptance/Controllers/Transaction/SplitControllerTest.php @@ -10,15 +10,15 @@ */ namespace Transaction; - use TestCase; /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:23. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:39. */ class SplitControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -30,7 +30,15 @@ class SplitControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\SplitController::edit + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\Transaction\SplitController::edit * Implement testEdit(). */ public function testEdit() @@ -42,7 +50,7 @@ class SplitControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\Transaction\SplitController::update + * @covers \FireflyIII\Http\Controllers\Transaction\SplitController::update * Implement testUpdate(). */ public function testUpdate() @@ -52,12 +60,4 @@ class SplitControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } diff --git a/tests/acceptance/Controllers/TransactionControllerTest.php b/tests/acceptance/Controllers/TransactionControllerTest.php index c963e257d7..5eb222d758 100644 --- a/tests/acceptance/Controllers/TransactionControllerTest.php +++ b/tests/acceptance/Controllers/TransactionControllerTest.php @@ -11,11 +11,12 @@ /** - * Generated by PHPUnit_SkeletonGenerator on 2016-12-06 at 08:13:23. + * Generated by PHPUnit_SkeletonGenerator on 2016-12-07 at 18:50:39. */ class TransactionControllerTest extends TestCase { + /** * Sets up the fixture, for example, opens a network connection. @@ -27,7 +28,15 @@ class TransactionControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\TransactionController::index + * Tears down the fixture, for example, closes a network connection. + * This method is called after a test is executed. + */ + protected function tearDown() + { + } + + /** + * @covers \FireflyIII\Http\Controllers\TransactionController::index * Implement testIndex(). */ public function testIndex() @@ -39,7 +48,7 @@ class TransactionControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\TransactionController::indexAll + * @covers \FireflyIII\Http\Controllers\TransactionController::indexAll * Implement testIndexAll(). */ public function testIndexAll() @@ -51,7 +60,7 @@ class TransactionControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\TransactionController::indexByDate + * @covers \FireflyIII\Http\Controllers\TransactionController::indexByDate * Implement testIndexByDate(). */ public function testIndexByDate() @@ -63,7 +72,7 @@ class TransactionControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\TransactionController::reorder + * @covers \FireflyIII\Http\Controllers\TransactionController::reorder * Implement testReorder(). */ public function testReorder() @@ -75,7 +84,7 @@ class TransactionControllerTest extends TestCase } /** - * @covers FireflyIII\Http\Controllers\TransactionController::show + * @covers \FireflyIII\Http\Controllers\TransactionController::show * Implement testShow(). */ public function testShow() @@ -85,12 +94,4 @@ class TransactionControllerTest extends TestCase 'This test has not been implemented yet.' ); } - - /** - * Tears down the fixture, for example, closes a network connection. - * This method is called after a test is executed. - */ - protected function tearDown() - { - } } From da3988cc638bcc957bc599128d6da79e259fd31e Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 7 Dec 2016 20:06:06 +0100 Subject: [PATCH 104/110] New tests --- .../Admin/ConfigurationController.php | 2 +- .../views/admin/configuration/index.twig | 2 +- routes/web.php | 2 +- .../Admin/ConfigurationControllerTest.php | 23 ++++++++++------- .../Admin/DomainControllerTest.php | 25 ++++++++++--------- 5 files changed, 30 insertions(+), 24 deletions(-) diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php index f64c807606..62e5c1298a 100644 --- a/app/Http/Controllers/Admin/ConfigurationController.php +++ b/app/Http/Controllers/Admin/ConfigurationController.php @@ -71,7 +71,7 @@ class ConfigurationController extends Controller * * @return \Illuminate\Http\RedirectResponse */ - public function store(ConfigurationRequest $request) + public function postIndex(ConfigurationRequest $request) { // get config values: $data = $request->getConfigurationData(); diff --git a/resources/views/admin/configuration/index.twig b/resources/views/admin/configuration/index.twig index 0864dfe379..e4d193315f 100644 --- a/resources/views/admin/configuration/index.twig +++ b/resources/views/admin/configuration/index.twig @@ -4,7 +4,7 @@ {{ Breadcrumbs.renderIfExists }} {% endblock %} {% block content %} - +
    diff --git a/routes/web.php b/routes/web.php index f26398c16f..3d9221d2a7 100755 --- a/routes/web.php +++ b/routes/web.php @@ -679,7 +679,7 @@ Route::group( // FF configuration: Route::get('configuration', ['uses' => 'ConfigurationController@index', 'as' => 'configuration.index']); - Route::post('configuration', ['uses' => 'ConfigurationController@store', 'as' => 'configuration.store']); + Route::post('configuration', ['uses' => 'ConfigurationController@postIndex', 'as' => 'configuration.index.post']); } ); diff --git a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php index 7416398bba..d9be6296fe 100644 --- a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php +++ b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php @@ -35,22 +35,27 @@ class ConfigurationControllerTest extends TestCase */ public function testIndex() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); + $this->be($this->user()); + $this->call('GET', route('admin.configuration.index')); + $this->assertResponseStatus(200); } /** * @covers \FireflyIII\Http\Controllers\Admin\ConfigurationController::store * Implement testStore(). */ - public function testStore() + public function testPostIndex() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); + $this->be($this->user()); + $this->call('POST', route('admin.configuration.index.post')); + + // mock FireflyConfig + \FireflyConfig::shouldReceive('get')->withArgs(['single_user_mode', false])->once(); + \FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->once(); + \FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once(); + + $this->assertSessionHas('success'); + $this->assertResponseStatus(302); } /** diff --git a/tests/acceptance/Controllers/Admin/DomainControllerTest.php b/tests/acceptance/Controllers/Admin/DomainControllerTest.php index 71a17b8e5f..80e36fb4ad 100644 --- a/tests/acceptance/Controllers/Admin/DomainControllerTest.php +++ b/tests/acceptance/Controllers/Admin/DomainControllerTest.php @@ -35,10 +35,11 @@ class DomainControllerTest extends TestCase */ public function testDomains() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); + + $this->be($this->user()); + $this->call('GET', route('admin.users.domains')); + $this->assertResponseStatus(200); + } /** @@ -47,10 +48,10 @@ class DomainControllerTest extends TestCase */ public function testManual() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); + $this->be($this->user()); + $this->call('POST', route('admin.users.domains.manual'), ['domain' => 'example2.com']); + $this->assertSessionHas('success'); + $this->assertResponseStatus(302); } /** @@ -59,10 +60,10 @@ class DomainControllerTest extends TestCase */ public function testToggleDomain() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); + $this->be($this->user()); + $this->call('GET', route('admin.users.domains.block-toggle', ['example.com'])); + $this->assertSessionHas('message'); + $this->assertResponseStatus(302); } /** From efe290d96cef4ea2659eec9efbb8f51d0db2048c Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 7 Dec 2016 20:45:26 +0100 Subject: [PATCH 105/110] This fixes the tests. --- app/Http/Middleware/IsConfirmed.php | 7 ++++- .../Admin/ConfigurationControllerTest.php | 26 ++++++++++++++----- .../Controllers/Admin/HomeControllerTest.php | 7 +++-- .../Controllers/Admin/UserControllerTest.php | 21 +++++++-------- 4 files changed, 38 insertions(+), 23 deletions(-) diff --git a/app/Http/Middleware/IsConfirmed.php b/app/Http/Middleware/IsConfirmed.php index ef8e398a9e..1f53e2f41a 100644 --- a/app/Http/Middleware/IsConfirmed.php +++ b/app/Http/Middleware/IsConfirmed.php @@ -46,7 +46,12 @@ class IsConfirmed return redirect()->guest('login'); } // must the user be confirmed in the first place? - $mustConfirmAccount = FireflyConfig::get('must_confirm_account', config('firefly.configuration.must_confirm_account'))->data; + $confirmPreference = FireflyConfig::get('must_confirm_account', config('firefly.configuration.must_confirm_account')); + $mustConfirmAccount = false; + if (!is_null($confirmPreference)) { + $mustConfirmAccount = $confirmPreference->data; + } + // user must be logged in, then continue: $isConfirmed = Preferences::get('user_confirmed', false)->data; diff --git a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php index d9be6296fe..85abca1373 100644 --- a/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php +++ b/tests/acceptance/Controllers/Admin/ConfigurationControllerTest.php @@ -11,6 +11,8 @@ namespace Admin; +use FireflyIII\Models\Configuration; +use FireflyIII\Support\Facades\FireflyConfig; use TestCase; /** @@ -27,6 +29,8 @@ class ConfigurationControllerTest extends TestCase public function setUp() { parent::setUp(); + + FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->once(); } /** @@ -36,6 +40,17 @@ class ConfigurationControllerTest extends TestCase public function testIndex() { $this->be($this->user()); + + $falseConfig = new Configuration; + $falseConfig->data = false; + + $trueConfig = new Configuration; + $trueConfig->data = true; + + FireflyConfig::shouldReceive('get')->withArgs(['single_user_mode', true])->once()->andReturn($trueConfig); + FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->once()->andReturn($falseConfig); + FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once()->andReturn($falseConfig); + $this->call('GET', route('admin.configuration.index')); $this->assertResponseStatus(200); } @@ -46,14 +61,13 @@ class ConfigurationControllerTest extends TestCase */ public function testPostIndex() { + + FireflyConfig::shouldReceive('set')->withArgs(['single_user_mode', false])->once(); + FireflyConfig::shouldReceive('set')->withArgs(['must_confirm_account', false])->once(); + FireflyConfig::shouldReceive('set')->withArgs(['is_demo_site', false])->once(); + $this->be($this->user()); $this->call('POST', route('admin.configuration.index.post')); - - // mock FireflyConfig - \FireflyConfig::shouldReceive('get')->withArgs(['single_user_mode', false])->once(); - \FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->once(); - \FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->once(); - $this->assertSessionHas('success'); $this->assertResponseStatus(302); } diff --git a/tests/acceptance/Controllers/Admin/HomeControllerTest.php b/tests/acceptance/Controllers/Admin/HomeControllerTest.php index 0d5b851fd5..260417cdb2 100644 --- a/tests/acceptance/Controllers/Admin/HomeControllerTest.php +++ b/tests/acceptance/Controllers/Admin/HomeControllerTest.php @@ -35,10 +35,9 @@ class HomeControllerTest extends TestCase */ public function testIndex() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); + $this->be($this->user()); + $this->call('GET', route('admin.index')); + $this->assertResponseStatus(200); } /** diff --git a/tests/acceptance/Controllers/Admin/UserControllerTest.php b/tests/acceptance/Controllers/Admin/UserControllerTest.php index 8c881daf40..0058c92a0d 100644 --- a/tests/acceptance/Controllers/Admin/UserControllerTest.php +++ b/tests/acceptance/Controllers/Admin/UserControllerTest.php @@ -35,10 +35,9 @@ class UserControllerTest extends TestCase */ public function testEdit() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); + $this->be($this->user()); + $this->call('GET', route('admin.users.edit', [1])); + $this->assertResponseStatus(200); } /** @@ -47,10 +46,9 @@ class UserControllerTest extends TestCase */ public function testIndex() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); + $this->be($this->user()); + $this->call('GET', route('admin.users')); + $this->assertResponseStatus(200); } /** @@ -59,10 +57,9 @@ class UserControllerTest extends TestCase */ public function testShow() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); + $this->be($this->user()); + $this->call('GET', route('admin.users.edit', [1])); + $this->assertResponseStatus(200); } /** From 36ebd0f0eed865b69a12e5f110b3cf12bc10f25f Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 7 Dec 2016 21:38:35 +0100 Subject: [PATCH 106/110] Expand view. --- resources/views/reports/partials/budget-period.twig | 5 ++++- resources/views/reports/partials/category-period.twig | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/resources/views/reports/partials/budget-period.twig b/resources/views/reports/partials/budget-period.twig index c9bb1cbd45..e7774f2461 100644 --- a/resources/views/reports/partials/budget-period.twig +++ b/resources/views/reports/partials/budget-period.twig @@ -1,7 +1,7 @@ - + {% for period in periods %} {% endfor %} @@ -11,6 +11,9 @@ {% for id, info in report %} + diff --git a/resources/views/reports/partials/category-period.twig b/resources/views/reports/partials/category-period.twig index ca20b994ff..8c489cc4ce 100644 --- a/resources/views/reports/partials/category-period.twig +++ b/resources/views/reports/partials/category-period.twig @@ -1,7 +1,7 @@
    {{ 'budget'|_ }}{{ 'budget'|_ }}{{ period }}
    + + {{ info.name }}
    - + {% for period in periods %} {% endfor %} @@ -11,10 +11,12 @@ {% for id, info in report %} + - {% for key, period in periods %} {# income first #} {% if(info.entries[key]) %} From 73566e11c0e3cba494153b3c50333ff703852695 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 8 Dec 2016 20:33:41 +0100 Subject: [PATCH 107/110] Removed some JS code that was not necessary. [skip ci] --- public/js/ff/categories/index.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/public/js/ff/categories/index.js b/public/js/ff/categories/index.js index fd6f59934c..6bfe805c1f 100644 --- a/public/js/ff/categories/index.js +++ b/public/js/ff/categories/index.js @@ -1,19 +1,4 @@ /* globals $, categoryID, columnChart, categoryDate */ $(function () { "use strict"; - if (typeof categoryID !== 'undefined') { - // more splits: - if ($('#all').length > 0) { - columnChart('chart/category/' + categoryID + '/all', 'all'); - } - if ($('#period').length > 0) { - columnChart('chart/category/' + categoryID + '/period', 'period'); - } - - } - if (typeof categoryID !== 'undefined' && typeof categoryDate !== 'undefined') { - columnChart('chart/category/' + categoryID + '/period/' + categoryDate, 'period-specific-period'); - } - - }); \ No newline at end of file From d13490cb6e367e8dee281567c3839c031cc88a05 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 8 Dec 2016 20:41:27 +0100 Subject: [PATCH 108/110] Approved. Step name: Proofread --- resources/lang/nl_NL/firefly.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.php index d1643ac89f..133343784a 100644 --- a/resources/lang/nl_NL/firefly.php +++ b/resources/lang/nl_NL/firefly.php @@ -84,7 +84,7 @@ return [ 'destination_accounts' => 'Doelrekening(en)', 'user_id_is' => 'Je gebruikersnummer is :user', 'field_supports_markdown' => 'Dit veld ondersteunt Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', + 'need_more_help' => 'Als je meer hulp nodig hebt met Firefly III, open dan een ticket op Github.', 'nothing_to_display' => 'Er zijn hier geen transacties te zien', 'show_all_no_filter' => 'Laat alle transacties zien, zonder te groeperen op datum.', 'expenses_by_category' => 'Uitgaven per categorie', From ca73ef853137639f5c670773cb4df3571cc60e29 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 8 Dec 2016 20:41:30 +0100 Subject: [PATCH 109/110] Approved. Step name: Proofread --- resources/lang/nl_NL/validation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/lang/nl_NL/validation.php b/resources/lang/nl_NL/validation.php index 6ddaad4ec1..a32fb3024c 100644 --- a/resources/lang/nl_NL/validation.php +++ b/resources/lang/nl_NL/validation.php @@ -85,5 +85,5 @@ return [ 'file' => ':attribute moet een bestand zijn.', 'in_array' => 'Het :attribute veld bestaat niet in :other.', 'present' => 'Het :attribute veld moet aanwezig zijn.', - 'amount_zero' => 'The total amount cannot be zero', + 'amount_zero' => 'Het totaalbedrag kan niet nul zijn', ]; \ No newline at end of file From ab9212a4c9a15de9d3a2c0175c8d368a61304a89 Mon Sep 17 00:00:00 2001 From: James Cole Date: Thu, 8 Dec 2016 21:22:42 +0100 Subject: [PATCH 110/110] last code for 4.2.1 --- CHANGELOG.md | 11 +++++++++++ composer.lock | 14 +++++++------- config/firefly.php | 2 +- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6bacbd88b..4db7ca588f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [4.2.1] - 2015-05-25 +### Added +- BIC support (see #430) +- New category report section and chart (see the general financial report) + + +### Changed +- Date range picker now also available on mobile devices (see #435) +- Extended range of amounts for issue #439 +- Rewrote all routes. Old bookmarks may break. + ## [4.2.0] - 2016-11-27 ### Added - Lots of (empty) tests diff --git a/composer.lock b/composer.lock index d330eb802d..aeb5bf11c3 100644 --- a/composer.lock +++ b/composer.lock @@ -797,20 +797,20 @@ }, { "name": "jeremeamia/SuperClosure", - "version": "2.2.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/jeremeamia/super_closure.git", - "reference": "29a88be2a4846d27c1613aed0c9071dfad7b5938" + "reference": "443c3df3207f176a1b41576ee2a66968a507b3db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/29a88be2a4846d27c1613aed0c9071dfad7b5938", - "reference": "29a88be2a4846d27c1613aed0c9071dfad7b5938", + "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/443c3df3207f176a1b41576ee2a66968a507b3db", + "reference": "443c3df3207f176a1b41576ee2a66968a507b3db", "shasum": "" }, "require": { - "nikic/php-parser": "^1.2|^2.0", + "nikic/php-parser": "^1.2|^2.0|^3.0", "php": ">=5.4", "symfony/polyfill-php56": "^1.0" }, @@ -820,7 +820,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -851,7 +851,7 @@ "serialize", "tokenizer" ], - "time": "2015-12-05 17:17:57" + "time": "2016-12-07 09:37:55" }, { "name": "laravel/framework", diff --git a/config/firefly.php b/config/firefly.php index 6e35a43851..f9e2710a74 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -24,7 +24,7 @@ return [ 'must_confirm_account' => false, ], 'chart' => 'chartjs', - 'version' => '4.2.0', + 'version' => '4.2.1', 'csv_import_enabled' => true, 'maxUploadSize' => 5242880, 'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf'],
    {{ 'category'|_ }}{{ 'category'|_ }}{{ period }}
    + + {{ info.name }}