diff --git a/.env.example b/.env.example index 0a7bd1b7ff..159b802948 100644 --- a/.env.example +++ b/.env.example @@ -3,7 +3,7 @@ APP_DEBUG=false APP_NAME=FireflyIII APP_KEY=SomeRandomStringOf32CharsExactly APP_LOG=daily -APP_LOG_LEVEL=warning +APP_LOG_LEVEL=notice APP_URL=http://localhost TRUSTED_PROXIES= diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index f715742ead..3e3a8de51c 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,7 +4,7 @@ ## Feature requests -I am always interested in expanding Firefly III's many features. If you are requesting a new feature, please check out the list of [often requested features](https://firefly-iii.github.io/requested-features/). +I am always interested in expanding Firefly III's many features. If you are requesting a new feature, please check out the list of [often requested features](https://firefly-iii.org/requested-features/). ## Pull requests diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 5d8fff3583..d1640a0f27 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -8,4 +8,4 @@ I am running Firefly III version x.x.x #### Other important details (log files, system info): -Please visit the /debug page to get extra debug information. \ No newline at end of file +Please click the version number in the right corner of any Firefly III page to get debug information. \ No newline at end of file diff --git a/.github/SUPPORT.md b/.github/SUPPORT.md index 7b7759dcb8..8538d150bd 100644 --- a/.github/SUPPORT.md +++ b/.github/SUPPORT.md @@ -4,8 +4,8 @@ ## Bugs -First of all: thank you for reporting a bug instead of ditching the tool altogether. If you find a bug, please take the time and see if the [demo site](https://firefly-iii.nder.be/) is also suffering from this bug. Include as many log files and details as you think are necessary. Bugs have a lot of priority! +First of all: thank you for reporting a bug instead of ditching the tool altogether. If you find a bug, please take the time and see if the [demo site](https://demo.firefly-iii.org/) is also suffering from this bug. Include as many log files and details as you think are necessary. Bugs have a lot of priority! ## Installation problems -Please take the time to read the [installation guide FAQ](https://firefly-iii.github.io/installation-guide-faq/) and make sure you search through closed issues for the problems other people have had. Your problem may be among them! If not, open an issue and I will help where I can. \ No newline at end of file +Please take the time to read the [installation guide FAQ](https://firefly-iii.org/installation-guide-faq/) and make sure you search through closed issues for the problems other people have had. Your problem may be among them! If not, open an issue and I will help where I can. \ No newline at end of file diff --git a/.sandstorm/changelog.md b/.sandstorm/changelog.md index 5e8bcd510b..7cef1b27c5 100644 --- a/.sandstorm/changelog.md +++ b/.sandstorm/changelog.md @@ -1,5 +1,24 @@ -# 4.6.1.1 +# 4.6.12 +- Support for Indonesian. +- New report, see [issue 384](https://github.com/firefly-iii/firefly-iii/issues/384) +- [Issue 964](https://github.com/firefly-iii/firefly-iii/issues/964) as suggested by [gavu](https://github.com/gavu) +- Greatly improved Docker support and documentation. +- [Issue 1046](https://github.com/firefly-iii/firefly-iii/issues/1046), as reported by [pkoziol](https://github.com/pkoziol) +- [Issue 1047](https://github.com/firefly-iii/firefly-iii/issues/1047), as reported by [pkoziol](https://github.com/pkoziol) +- [Issue 1048](https://github.com/firefly-iii/firefly-iii/issues/1048), as reported by [webence](https://github.com/webence) +- [Issue 1049](https://github.com/firefly-iii/firefly-iii/issues/1049), as reported by [nicoschreiner](https://github.com/nicoschreiner) +- [Issue 1015](https://github.com/firefly-iii/firefly-iii/issues/1015), as reporterd by a user on Tweakers.net +- [Issue 1056](https://github.com/firefly-iii/firefly-iii/issues/1056), as reported by [repercussion](https://github.com/repercussion) +- [Issue 1061](https://github.com/firefly-iii/firefly-iii/issues/1061), as reported by [Meizikyn](https://github.com/Meizikyn) +- [Issue 1045](https://github.com/firefly-iii/firefly-iii/issues/1045), as reported by [gavu](https://github.com/gavu) +- First code for [issue 1040](https://github.com/firefly-iii/firefly-iii/issues/1040) ([simonsmiley](https://github.com/simonsmiley)) +- [Issue 1059](https://github.com/firefly-iii/firefly-iii/issues/1059), as reported by [4oo4](https://github.com/4oo4) +- [Issue 1063](https://github.com/firefly-iii/firefly-iii/issues/1063), as reported by [pkoziol](https://github.com/pkoziol) +- [Issue 1064](https://github.com/firefly-iii/firefly-iii/issues/1064), as reported by [pkoziol](https://github.com/pkoziol) +- [Issue 1066](https://github.com/firefly-iii/firefly-iii/issues/1066), reported by [wtercato](https://github.com/wtercato) + +# 4.6.1.1 - Import routine can scan for matching bills, [issue 956](https://github.com/firefly-iii/firefly-iii/issues/956) - Import will no longer scan for rules, this has become optional. Originally suggested in [issue 956](https://github.com/firefly-iii/firefly-iii/issues/956) by [gavu](https://github.com/gavu) - [Issue 1033](https://github.com/firefly-iii/firefly-iii/issues/1033), as reported by [Jumanjii](https://github.com/Jumanjii) diff --git a/.sandstorm/sandstorm-files.list b/.sandstorm/sandstorm-files.list index f2dd05a521..04910192cc 100644 --- a/.sandstorm/sandstorm-files.list +++ b/.sandstorm/sandstorm-files.list @@ -208,14 +208,6 @@ opt/app/.env.heroku opt/app/.env.sandstorm opt/app/.gitattributes opt/app/.sandstorm/.gitattributes -opt/app/.sandstorm/.vagrant/machines/default/virtualbox/action_provision -opt/app/.sandstorm/.vagrant/machines/default/virtualbox/action_set_name -opt/app/.sandstorm/.vagrant/machines/default/virtualbox/creator_uid -opt/app/.sandstorm/.vagrant/machines/default/virtualbox/id -opt/app/.sandstorm/.vagrant/machines/default/virtualbox/index_uuid -opt/app/.sandstorm/.vagrant/machines/default/virtualbox/private_key -opt/app/.sandstorm/.vagrant/machines/default/virtualbox/synced_folders -opt/app/.sandstorm/.vagrant/machines/default/virtualbox/vagrant_cwd opt/app/.sandstorm/Vagrantfile opt/app/.sandstorm/app-graphics/firefly-iii-128.png opt/app/.sandstorm/app-graphics/firefly-iii-150.png @@ -260,6 +252,7 @@ opt/app/app/Events/AdminRequestedTestMessage.php opt/app/app/Events/Event.php opt/app/app/Events/RegisteredUser.php opt/app/app/Events/RequestedNewPassword.php +opt/app/app/Events/RequestedVersionCheckStatus.php opt/app/app/Events/StoredTransactionJournal.php opt/app/app/Events/UpdatedTransactionJournal.php opt/app/app/Events/UserChangedEmail.php @@ -279,6 +272,9 @@ opt/app/app/Export/Exporter/ExporterInterface.php opt/app/app/Export/ProcessorInterface.php opt/app/app/Generator/Chart/Basic/ChartJsGenerator.php opt/app/app/Generator/Chart/Basic/GeneratorInterface.php +opt/app/app/Generator/Report/Account/MonthReportGenerator.php +opt/app/app/Generator/Report/Account/MultiYearReportGenerator.php +opt/app/app/Generator/Report/Account/YearReportGenerator.php opt/app/app/Generator/Report/Audit/MonthReportGenerator.php opt/app/app/Generator/Report/Audit/MultiYearReportGenerator.php opt/app/app/Generator/Report/Audit/YearReportGenerator.php @@ -301,6 +297,7 @@ opt/app/app/Handlers/Events/AdminEventHandler.php opt/app/app/Handlers/Events/StoredJournalEventHandler.php opt/app/app/Handlers/Events/UpdatedJournalEventHandler.php opt/app/app/Handlers/Events/UserEventHandler.php +opt/app/app/Handlers/Events/VersionCheckEventHandler.php opt/app/app/Helpers/Attachments/AttachmentHelper.php opt/app/app/Helpers/Attachments/AttachmentHelperInterface.php opt/app/app/Helpers/Chart/MetaPieChart.php @@ -339,6 +336,7 @@ opt/app/app/Http/Controllers/AccountController.php opt/app/app/Http/Controllers/Admin/ConfigurationController.php opt/app/app/Http/Controllers/Admin/HomeController.php opt/app/app/Http/Controllers/Admin/LinkController.php +opt/app/app/Http/Controllers/Admin/UpdateController.php opt/app/app/Http/Controllers/Admin/UserController.php opt/app/app/Http/Controllers/AttachmentController.php opt/app/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -355,6 +353,7 @@ opt/app/app/Http/Controllers/Chart/BudgetController.php opt/app/app/Http/Controllers/Chart/BudgetReportController.php opt/app/app/Http/Controllers/Chart/CategoryController.php opt/app/app/Http/Controllers/Chart/CategoryReportController.php +opt/app/app/Http/Controllers/Chart/ExpenseReportController.php opt/app/app/Http/Controllers/Chart/PiggyBankController.php opt/app/app/Http/Controllers/Chart/ReportController.php opt/app/app/Http/Controllers/Chart/TagReportController.php @@ -363,9 +362,10 @@ opt/app/app/Http/Controllers/CurrencyController.php opt/app/app/Http/Controllers/ExportController.php opt/app/app/Http/Controllers/HelpController.php opt/app/app/Http/Controllers/HomeController.php -opt/app/app/Http/Controllers/Import/BankController.php -opt/app/app/Http/Controllers/Import/FileController.php -opt/app/app/Http/Controllers/ImportController.php +opt/app/app/Http/Controllers/Import/ConfigurationController.php +opt/app/app/Http/Controllers/Import/IndexController.php +opt/app/app/Http/Controllers/Import/PrerequisitesController.php +opt/app/app/Http/Controllers/Import/StatusController.php opt/app/app/Http/Controllers/JavascriptController.php opt/app/app/Http/Controllers/Json/AutoCompleteController.php opt/app/app/Http/Controllers/Json/BoxController.php @@ -382,6 +382,7 @@ opt/app/app/Http/Controllers/Report/AccountController.php opt/app/app/Http/Controllers/Report/BalanceController.php opt/app/app/Http/Controllers/Report/BudgetController.php opt/app/app/Http/Controllers/Report/CategoryController.php +opt/app/app/Http/Controllers/Report/ExpenseController.php opt/app/app/Http/Controllers/Report/OperationsController.php opt/app/app/Http/Controllers/ReportController.php opt/app/app/Http/Controllers/RuleController.php @@ -400,7 +401,8 @@ opt/app/app/Http/Middleware/AuthenticateTwoFactor.php opt/app/app/Http/Middleware/Binder.php opt/app/app/Http/Middleware/EncryptCookies.php opt/app/app/Http/Middleware/IsAdmin.php -opt/app/app/Http/Middleware/IsLimitedUser.php +opt/app/app/Http/Middleware/IsDemoUser.php +opt/app/app/Http/Middleware/IsSandStormUser.php opt/app/app/Http/Middleware/Range.php opt/app/app/Http/Middleware/RedirectIfAuthenticated.php opt/app/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php @@ -420,7 +422,6 @@ opt/app/app/Http/Requests/CurrencyFormRequest.php opt/app/app/Http/Requests/DeleteAccountFormRequest.php opt/app/app/Http/Requests/EmailFormRequest.php opt/app/app/Http/Requests/ExportFormRequest.php -opt/app/app/Http/Requests/ImportUploadRequest.php opt/app/app/Http/Requests/JournalFormRequest.php opt/app/app/Http/Requests/JournalLinkRequest.php opt/app/app/Http/Requests/LinkTypeFormRequest.php @@ -441,15 +442,15 @@ opt/app/app/Http/Requests/TestRuleFormRequest.php opt/app/app/Http/Requests/TokenFormRequest.php opt/app/app/Http/Requests/UserFormRequest.php opt/app/app/Http/Requests/UserRegistrationRequest.php -opt/app/app/Http/breadcrumbs.php -opt/app/app/Import/Configurator/ConfiguratorInterface.php -opt/app/app/Import/Configurator/CsvConfigurator.php +opt/app/app/Import/Configuration/ConfiguratorInterface.php +opt/app/app/Import/Configuration/FileConfigurator.php +opt/app/app/Import/Configuration/SpectreConfigurator.php opt/app/app/Import/Converter/Amount.php opt/app/app/Import/Converter/AmountCredit.php -opt/app/app/Import/Converter/AmountDebet.php +opt/app/app/Import/Converter/AmountDebit.php opt/app/app/Import/Converter/ConverterInterface.php -opt/app/app/Import/Converter/INGDebetCredit.php -opt/app/app/Import/Converter/RabobankDebetCredit.php +opt/app/app/Import/Converter/INGDebitCredit.php +opt/app/app/Import/Converter/RabobankDebitCredit.php opt/app/app/Import/FileProcessor/CsvProcessor.php opt/app/app/Import/FileProcessor/FileProcessorInterface.php opt/app/app/Import/Logging/CommandHandler.php @@ -472,7 +473,13 @@ opt/app/app/Import/Object/ImportBudget.php opt/app/app/Import/Object/ImportCategory.php opt/app/app/Import/Object/ImportCurrency.php opt/app/app/Import/Object/ImportJournal.php -opt/app/app/Import/Routine/ImportRoutine.php +opt/app/app/Import/Prerequisites/BunqPrerequisites.php +opt/app/app/Import/Prerequisites/FilePrerequisites.php +opt/app/app/Import/Prerequisites/PrerequisitesInterface.php +opt/app/app/Import/Prerequisites/SpectrePrerequisites.php +opt/app/app/Import/Routine/FileRoutine.php +opt/app/app/Import/Routine/RoutineInterface.php +opt/app/app/Import/Routine/SpectreRoutine.php opt/app/app/Import/Specifics/AbnAmroDescription.php opt/app/app/Import/Specifics/IngDescription.php opt/app/app/Import/Specifics/PresidentsChoice.php @@ -612,8 +619,18 @@ opt/app/app/Services/Bunq/Token/InstallationToken.php opt/app/app/Services/Bunq/Token/SessionToken.php opt/app/app/Services/Currency/ExchangeRateInterface.php opt/app/app/Services/Currency/FixerIO.php +opt/app/app/Services/Github/Object/GithubObject.php +opt/app/app/Services/Github/Object/Release.php +opt/app/app/Services/Github/Request/GithubRequest.php +opt/app/app/Services/Github/Request/UpdateRequest.php opt/app/app/Services/Password/PwndVerifier.php opt/app/app/Services/Password/Verifier.php +opt/app/app/Services/Spectre/Object/Customer.php +opt/app/app/Services/Spectre/Object/SpectreObject.php +opt/app/app/Services/Spectre/Object/Token.php +opt/app/app/Services/Spectre/Request/CreateTokenRequest.php +opt/app/app/Services/Spectre/Request/NewCustomerRequest.php +opt/app/app/Services/Spectre/Request/SpectreRequest.php opt/app/app/Support/Amount.php opt/app/app/Support/Binder/AccountList.php opt/app/app/Support/Binder/BinderInterface.php @@ -637,13 +654,12 @@ opt/app/app/Support/Facades/Preferences.php opt/app/app/Support/Facades/Steam.php opt/app/app/Support/FireflyConfig.php opt/app/app/Support/Import/Configuration/ConfigurationInterface.php -opt/app/app/Support/Import/Configuration/Csv/Initial.php -opt/app/app/Support/Import/Configuration/Csv/Map.php -opt/app/app/Support/Import/Configuration/Csv/Roles.php +opt/app/app/Support/Import/Configuration/File/Initial.php +opt/app/app/Support/Import/Configuration/File/Map.php +opt/app/app/Support/Import/Configuration/File/Roles.php +opt/app/app/Support/Import/Configuration/File/Upload.php opt/app/app/Support/Import/Information/BunqInformation.php opt/app/app/Support/Import/Information/InformationInterface.php -opt/app/app/Support/Import/Prerequisites/BunqPrerequisites.php -opt/app/app/Support/Import/Prerequisites/PrerequisitesInterface.php opt/app/app/Support/Models/TransactionJournalTrait.php opt/app/app/Support/Navigation.php opt/app/app/Support/Preferences.php @@ -730,12 +746,15 @@ opt/app/composer.lock opt/app/composer.phar opt/app/config/app.php opt/app/config/auth.php +opt/app/config/breadcrumbs.php opt/app/config/broadcasting.php opt/app/config/cache.php opt/app/config/csv.php opt/app/config/database.php opt/app/config/filesystems.php opt/app/config/firefly.php +opt/app/config/google2fa.php +opt/app/config/import.php opt/app/config/intro.php opt/app/config/mail.php opt/app/config/queue.php @@ -766,9 +785,6 @@ opt/app/database/seeds/LinkTypeSeeder.php opt/app/database/seeds/PermissionSeeder.php opt/app/database/seeds/TransactionCurrencySeeder.php opt/app/database/seeds/TransactionTypeSeeder.php -opt/app/docker-compose.dockerhub.yml -opt/app/docker-compose.override.yml -opt/app/docker-compose.prod.yml opt/app/docker-compose.yml opt/app/nginx_app.conf opt/app/phpunit.coverage.xml @@ -850,6 +866,10 @@ opt/app/public/images/image.png opt/app/public/images/loading-small.gif opt/app/public/images/loading-wide.gif opt/app/public/images/logos/bunq.png +opt/app/public/images/logos/csv.png +opt/app/public/images/logos/file.png +opt/app/public/images/logos/plaid.png +opt/app/public/images/logos/spectre.png opt/app/public/images/page_green.png opt/app/public/images/page_white_acrobat.png opt/app/public/index.php @@ -858,6 +878,7 @@ opt/app/public/js/ff/accounts/edit-reconciliation.js opt/app/public/js/ff/accounts/edit.js opt/app/public/js/ff/accounts/reconcile.js opt/app/public/js/ff/accounts/show.js +opt/app/public/js/ff/admin/update/index.js opt/app/public/js/ff/bills/create.js opt/app/public/js/ff/bills/edit.js opt/app/public/js/ff/bills/show.js @@ -880,17 +901,16 @@ opt/app/public/js/ff/piggy-banks/edit.js opt/app/public/js/ff/piggy-banks/index.js opt/app/public/js/ff/piggy-banks/show.js opt/app/public/js/ff/preferences/index.js +opt/app/public/js/ff/reports/account/month.js +opt/app/public/js/ff/reports/all.js opt/app/public/js/ff/reports/audit/all.js -opt/app/public/js/ff/reports/budget/all.js opt/app/public/js/ff/reports/budget/month.js -opt/app/public/js/ff/reports/category/all.js opt/app/public/js/ff/reports/category/month.js opt/app/public/js/ff/reports/default/all.js opt/app/public/js/ff/reports/default/month.js opt/app/public/js/ff/reports/default/multi-year.js opt/app/public/js/ff/reports/default/year.js opt/app/public/js/ff/reports/index.js -opt/app/public/js/ff/reports/tag/all.js opt/app/public/js/ff/reports/tag/month.js opt/app/public/js/ff/rules/create-edit.js opt/app/public/js/ff/rules/index.js @@ -975,6 +995,7 @@ opt/app/resources/lang/de_DE/demo.php opt/app/resources/lang/de_DE/firefly.php opt/app/resources/lang/de_DE/form.php opt/app/resources/lang/de_DE/help.php +opt/app/resources/lang/de_DE/import.php opt/app/resources/lang/de_DE/intro.php opt/app/resources/lang/de_DE/list.php opt/app/resources/lang/de_DE/pagination.php @@ -988,6 +1009,7 @@ opt/app/resources/lang/en_US/csv.php opt/app/resources/lang/en_US/demo.php opt/app/resources/lang/en_US/firefly.php opt/app/resources/lang/en_US/form.php +opt/app/resources/lang/en_US/import.php opt/app/resources/lang/en_US/intro.php opt/app/resources/lang/en_US/list.php opt/app/resources/lang/en_US/pagination.php @@ -1002,11 +1024,26 @@ opt/app/resources/lang/fr_FR/demo.php opt/app/resources/lang/fr_FR/firefly.php opt/app/resources/lang/fr_FR/form.php opt/app/resources/lang/fr_FR/help.php +opt/app/resources/lang/fr_FR/import.php opt/app/resources/lang/fr_FR/intro.php opt/app/resources/lang/fr_FR/list.php opt/app/resources/lang/fr_FR/pagination.php opt/app/resources/lang/fr_FR/passwords.php opt/app/resources/lang/fr_FR/validation.php +opt/app/resources/lang/id_ID/auth.php +opt/app/resources/lang/id_ID/bank.php +opt/app/resources/lang/id_ID/breadcrumbs.php +opt/app/resources/lang/id_ID/config.php +opt/app/resources/lang/id_ID/csv.php +opt/app/resources/lang/id_ID/demo.php +opt/app/resources/lang/id_ID/firefly.php +opt/app/resources/lang/id_ID/form.php +opt/app/resources/lang/id_ID/import.php +opt/app/resources/lang/id_ID/intro.php +opt/app/resources/lang/id_ID/list.php +opt/app/resources/lang/id_ID/pagination.php +opt/app/resources/lang/id_ID/passwords.php +opt/app/resources/lang/id_ID/validation.php opt/app/resources/lang/nl_NL/auth.php opt/app/resources/lang/nl_NL/bank.php opt/app/resources/lang/nl_NL/breadcrumbs.php @@ -1016,6 +1053,7 @@ opt/app/resources/lang/nl_NL/demo.php opt/app/resources/lang/nl_NL/firefly.php opt/app/resources/lang/nl_NL/form.php opt/app/resources/lang/nl_NL/help.php +opt/app/resources/lang/nl_NL/import.php opt/app/resources/lang/nl_NL/intro.php opt/app/resources/lang/nl_NL/list.php opt/app/resources/lang/nl_NL/pagination.php @@ -1030,6 +1068,7 @@ opt/app/resources/lang/pl_PL/demo.php opt/app/resources/lang/pl_PL/firefly.php opt/app/resources/lang/pl_PL/form.php opt/app/resources/lang/pl_PL/help.php +opt/app/resources/lang/pl_PL/import.php opt/app/resources/lang/pl_PL/intro.php opt/app/resources/lang/pl_PL/list.php opt/app/resources/lang/pl_PL/pagination.php @@ -1057,6 +1096,7 @@ opt/app/resources/views/admin/link/delete.twig opt/app/resources/views/admin/link/edit.twig opt/app/resources/views/admin/link/index.twig opt/app/resources/views/admin/link/show.twig +opt/app/resources/views/admin/update/index.twig opt/app/resources/views/admin/users/delete.twig opt/app/resources/views/admin/users/edit.twig opt/app/resources/views/admin/users/index.twig @@ -1151,13 +1191,17 @@ opt/app/resources/views/form/text.twig opt/app/resources/views/form/textarea.twig opt/app/resources/views/import/bank/form.twig opt/app/resources/views/import/bunq/prerequisites.twig -opt/app/resources/views/import/csv/initial.twig -opt/app/resources/views/import/csv/map.twig -opt/app/resources/views/import/csv/roles.twig -opt/app/resources/views/import/file/finished.twig -opt/app/resources/views/import/file/index.twig -opt/app/resources/views/import/file/status.twig +opt/app/resources/views/import/file/initial.twig +opt/app/resources/views/import/file/map.twig +opt/app/resources/views/import/file/roles.twig +opt/app/resources/views/import/file/upload.twig opt/app/resources/views/import/index.twig +opt/app/resources/views/import/spectre/input-fields.twig +opt/app/resources/views/import/spectre/prerequisites.twig +opt/app/resources/views/import/spectre/redirect.twig +opt/app/resources/views/import/spectre/select-country.twig +opt/app/resources/views/import/spectre/select-provider.twig +opt/app/resources/views/import/status.twig opt/app/resources/views/index.twig opt/app/resources/views/javascript/accounts.twig opt/app/resources/views/javascript/currencies.twig @@ -1204,6 +1248,7 @@ opt/app/resources/views/profile/change-email.twig opt/app/resources/views/profile/change-password.twig opt/app/resources/views/profile/delete-account.twig opt/app/resources/views/profile/index.twig +opt/app/resources/views/reports/account/report.twig opt/app/resources/views/reports/audit/report.twig opt/app/resources/views/reports/budget/month.twig opt/app/resources/views/reports/category/month.twig @@ -1211,6 +1256,7 @@ opt/app/resources/views/reports/default/month.twig opt/app/resources/views/reports/default/multi-year.twig opt/app/resources/views/reports/default/year.twig opt/app/resources/views/reports/index.twig +opt/app/resources/views/reports/options/account.twig opt/app/resources/views/reports/options/budget.twig opt/app/resources/views/reports/options/category.twig opt/app/resources/views/reports/options/no-options.twig @@ -1222,10 +1268,14 @@ opt/app/resources/views/reports/partials/budget-period.twig opt/app/resources/views/reports/partials/budgets.twig opt/app/resources/views/reports/partials/categories.twig opt/app/resources/views/reports/partials/category-period.twig +opt/app/resources/views/reports/partials/exp-budgets.twig +opt/app/resources/views/reports/partials/exp-categories.twig +opt/app/resources/views/reports/partials/exp-not-grouped.twig opt/app/resources/views/reports/partials/income-expenses.twig opt/app/resources/views/reports/partials/journals-audit.twig opt/app/resources/views/reports/partials/operations.twig opt/app/resources/views/reports/partials/tags.twig +opt/app/resources/views/reports/partials/top-transactions.twig opt/app/resources/views/reports/tag/month.twig opt/app/resources/views/rules/index.twig opt/app/resources/views/rules/partials/action.twig @@ -1246,6 +1296,7 @@ opt/app/resources/views/tags/delete.twig opt/app/resources/views/tags/edit.twig opt/app/resources/views/tags/index.twig opt/app/resources/views/tags/show.twig +opt/app/resources/views/test/test.twig opt/app/resources/views/transactions/convert.twig opt/app/resources/views/transactions/index.twig opt/app/resources/views/transactions/links/delete.twig @@ -1257,6 +1308,7 @@ opt/app/resources/views/transactions/single/delete.twig opt/app/resources/views/transactions/single/edit.twig opt/app/resources/views/transactions/split/edit.twig opt/app/routes/api.php +opt/app/routes/breadcrumbs.php opt/app/routes/channels.php opt/app/routes/console.php opt/app/routes/web.php @@ -1325,14 +1377,6 @@ opt/app/vendor/bacon/bacon-qr-code/tests/BaconQrCode/Renderer/Text/TextTest.php opt/app/vendor/bacon/bacon-qr-code/tests/bootstrap.php opt/app/vendor/bin/commonmark opt/app/vendor/bin/doctrine-dbal -opt/app/vendor/christian-riesen/base32/LICENSE -opt/app/vendor/christian-riesen/base32/README.md -opt/app/vendor/christian-riesen/base32/build.xml -opt/app/vendor/christian-riesen/base32/composer.json -opt/app/vendor/christian-riesen/base32/phpunit.xml.dist -opt/app/vendor/christian-riesen/base32/src/Base32.php -opt/app/vendor/christian-riesen/base32/tests/Base32Test.php -opt/app/vendor/christian-riesen/base32/tests/bootstrap.php opt/app/vendor/composer/ClassLoader.php opt/app/vendor/composer/LICENSE opt/app/vendor/composer/autoload_classmap.php @@ -1342,37 +1386,24 @@ opt/app/vendor/composer/autoload_psr4.php opt/app/vendor/composer/autoload_real.php opt/app/vendor/composer/autoload_static.php opt/app/vendor/composer/installed.json -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/.editorconfig -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/README.md -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/RELEASE-CHECKLIST.md opt/app/vendor/davejamesmiller/laravel-breadcrumbs/composer.json opt/app/vendor/davejamesmiller/laravel-breadcrumbs/config/breadcrumbs.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/scripts/test-coverage.sh -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/CurrentRoute.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/Exception.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/Facade.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/Generator.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/Manager.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/ServiceProvider.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/View.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/TestCase.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/bootstrap.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/fixtures/CustomServiceProvider.html -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/fixtures/DependantServiceProvider.html -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/fixtures/bootstrap2.html -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/fixtures/bootstrap3.html -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/fixtures/integration.html -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/integration/CustomServiceProviderTest.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/integration/DependantServiceProviderErrorTest.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/integration/DependantServiceProviderTest.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/integration/IntegrationTest.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/unit/CurrentRouteTest.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/unit/FacadeTest.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/unit/GeneratorTest.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/unit/ManagerTest.php -opt/app/vendor/davejamesmiller/laravel-breadcrumbs/tests/unit/ViewTest.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/BreadcrumbsException.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/BreadcrumbsGenerator.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/BreadcrumbsManager.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/BreadcrumbsServiceProvider.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/Exceptions/DuplicateBreadcrumbException.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/Exceptions/InvalidBreadcrumbException.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/Exceptions/UnnamedRouteException.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/Exceptions/ViewNotSetException.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/src/Facades/Breadcrumbs.php opt/app/vendor/davejamesmiller/laravel-breadcrumbs/views/bootstrap2.blade.php opt/app/vendor/davejamesmiller/laravel-breadcrumbs/views/bootstrap3.blade.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/views/bootstrap4.blade.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/views/bulma.blade.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/views/foundation6.blade.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/views/json-ld.php +opt/app/vendor/davejamesmiller/laravel-breadcrumbs/views/materialize.blade.php opt/app/vendor/doctrine/annotations/CHANGELOG.md opt/app/vendor/doctrine/annotations/LICENSE opt/app/vendor/doctrine/annotations/README.md @@ -2188,6 +2219,7 @@ opt/app/vendor/laravel/framework/src/Illuminate/Events/CallQueuedListener.php opt/app/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php opt/app/vendor/laravel/framework/src/Illuminate/Events/EventServiceProvider.php opt/app/vendor/laravel/framework/src/Illuminate/Events/composer.json +opt/app/vendor/laravel/framework/src/Illuminate/Filesystem/Cache.php opt/app/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php opt/app/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php opt/app/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php @@ -2663,6 +2695,7 @@ opt/app/vendor/laravel/framework/src/Illuminate/Support/MessageBag.php opt/app/vendor/laravel/framework/src/Illuminate/Support/NamespacedItemResolver.php opt/app/vendor/laravel/framework/src/Illuminate/Support/Optional.php opt/app/vendor/laravel/framework/src/Illuminate/Support/Pluralizer.php +opt/app/vendor/laravel/framework/src/Illuminate/Support/ProcessUtils.php opt/app/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php opt/app/vendor/laravel/framework/src/Illuminate/Support/Str.php opt/app/vendor/laravel/framework/src/Illuminate/Support/Testing/Fakes/BusFake.php @@ -2865,23 +2898,29 @@ opt/app/vendor/league/commonmark/src/Util/Html5Entities.php opt/app/vendor/league/commonmark/src/Util/LinkParserHelper.php opt/app/vendor/league/commonmark/src/Util/RegexHelper.php opt/app/vendor/league/commonmark/src/Util/UrlEncoder.php +opt/app/vendor/league/commonmark/src/Util/Xml.php opt/app/vendor/league/csv/LICENSE opt/app/vendor/league/csv/autoload.php opt/app/vendor/league/csv/composer.json opt/app/vendor/league/csv/src/AbstractCsv.php -opt/app/vendor/league/csv/src/Config/Controls.php -opt/app/vendor/league/csv/src/Config/Output.php -opt/app/vendor/league/csv/src/Exception/InvalidRowException.php -opt/app/vendor/league/csv/src/Modifier/MapIterator.php -opt/app/vendor/league/csv/src/Modifier/QueryFilter.php -opt/app/vendor/league/csv/src/Modifier/RowFilter.php -opt/app/vendor/league/csv/src/Modifier/StreamFilter.php -opt/app/vendor/league/csv/src/Modifier/StreamIterator.php -opt/app/vendor/league/csv/src/Plugin/ColumnConsistencyValidator.php -opt/app/vendor/league/csv/src/Plugin/ForbiddenNullValuesValidator.php -opt/app/vendor/league/csv/src/Plugin/SkipNullValuesFormatter.php +opt/app/vendor/league/csv/src/ByteSequence.php +opt/app/vendor/league/csv/src/CannotInsertRecord.php +opt/app/vendor/league/csv/src/CharsetConverter.php +opt/app/vendor/league/csv/src/ColumnConsistency.php +opt/app/vendor/league/csv/src/EncloseField.php +opt/app/vendor/league/csv/src/EscapeFormula.php +opt/app/vendor/league/csv/src/Exception.php +opt/app/vendor/league/csv/src/HTMLConverter.php +opt/app/vendor/league/csv/src/MapIterator.php +opt/app/vendor/league/csv/src/RFC4180Field.php opt/app/vendor/league/csv/src/Reader.php +opt/app/vendor/league/csv/src/ResultSet.php +opt/app/vendor/league/csv/src/Statement.php +opt/app/vendor/league/csv/src/Stream.php opt/app/vendor/league/csv/src/Writer.php +opt/app/vendor/league/csv/src/XMLConverter.php +opt/app/vendor/league/csv/src/functions.php +opt/app/vendor/league/csv/src/functions_include.php opt/app/vendor/league/flysystem/LICENSE opt/app/vendor/league/flysystem/composer.json opt/app/vendor/league/flysystem/docs/CNAME @@ -3229,6 +3268,31 @@ opt/app/vendor/nesbot/carbon/src/Carbon/Lang/uz.php opt/app/vendor/nesbot/carbon/src/Carbon/Lang/vi.php opt/app/vendor/nesbot/carbon/src/Carbon/Lang/zh.php opt/app/vendor/nesbot/carbon/src/Carbon/Lang/zh_TW.php +opt/app/vendor/paragonie/constant_time_encoding/LICENSE.txt +opt/app/vendor/paragonie/constant_time_encoding/README.md +opt/app/vendor/paragonie/constant_time_encoding/composer.json +opt/app/vendor/paragonie/constant_time_encoding/phpunit.xml.dist +opt/app/vendor/paragonie/constant_time_encoding/psalm.xml +opt/app/vendor/paragonie/constant_time_encoding/src/Base32.php +opt/app/vendor/paragonie/constant_time_encoding/src/Base32Hex.php +opt/app/vendor/paragonie/constant_time_encoding/src/Base64.php +opt/app/vendor/paragonie/constant_time_encoding/src/Base64DotSlash.php +opt/app/vendor/paragonie/constant_time_encoding/src/Base64DotSlashOrdered.php +opt/app/vendor/paragonie/constant_time_encoding/src/Base64UrlSafe.php +opt/app/vendor/paragonie/constant_time_encoding/src/Binary.php +opt/app/vendor/paragonie/constant_time_encoding/src/EncoderInterface.php +opt/app/vendor/paragonie/constant_time_encoding/src/Encoding.php +opt/app/vendor/paragonie/constant_time_encoding/src/Hex.php +opt/app/vendor/paragonie/constant_time_encoding/src/RFC4648.php +opt/app/vendor/paragonie/constant_time_encoding/tests/Base32HexTest.php +opt/app/vendor/paragonie/constant_time_encoding/tests/Base32Test.php +opt/app/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashOrderedTest.php +opt/app/vendor/paragonie/constant_time_encoding/tests/Base64DotSlashTest.php +opt/app/vendor/paragonie/constant_time_encoding/tests/Base64Test.php +opt/app/vendor/paragonie/constant_time_encoding/tests/Base64UrlSafeTest.php +opt/app/vendor/paragonie/constant_time_encoding/tests/EncodingTest.php +opt/app/vendor/paragonie/constant_time_encoding/tests/HexTest.php +opt/app/vendor/paragonie/constant_time_encoding/tests/RFC4648Test.php opt/app/vendor/paragonie/random_compat/LICENSE opt/app/vendor/paragonie/random_compat/build-phar.sh opt/app/vendor/paragonie/random_compat/composer.json @@ -3247,19 +3311,45 @@ opt/app/vendor/paragonie/random_compat/lib/random_int.php opt/app/vendor/paragonie/random_compat/other/build_phar.php opt/app/vendor/paragonie/random_compat/psalm-autoload.php opt/app/vendor/paragonie/random_compat/psalm.xml +opt/app/vendor/pragmarx/google2fa-laravel/LICENSE +opt/app/vendor/pragmarx/google2fa-laravel/changelog.md +opt/app/vendor/pragmarx/google2fa-laravel/composer.json +opt/app/vendor/pragmarx/google2fa-laravel/docs/middleware.jpg +opt/app/vendor/pragmarx/google2fa-laravel/phpspec.yml +opt/app/vendor/pragmarx/google2fa-laravel/readme.md +opt/app/vendor/pragmarx/google2fa-laravel/src/Events/OneTimePasswordRequested.php +opt/app/vendor/pragmarx/google2fa-laravel/src/Exceptions/InvalidOneTimePassword.php +opt/app/vendor/pragmarx/google2fa-laravel/src/Exceptions/InvalidSecretKey.php +opt/app/vendor/pragmarx/google2fa-laravel/src/Facade.php +opt/app/vendor/pragmarx/google2fa-laravel/src/Middleware.php +opt/app/vendor/pragmarx/google2fa-laravel/src/ServiceProvider.php +opt/app/vendor/pragmarx/google2fa-laravel/src/Support/Auth.php +opt/app/vendor/pragmarx/google2fa-laravel/src/Support/Authenticator.php +opt/app/vendor/pragmarx/google2fa-laravel/src/Support/Config.php +opt/app/vendor/pragmarx/google2fa-laravel/src/Support/Constants.php +opt/app/vendor/pragmarx/google2fa-laravel/src/Support/ErrorBag.php +opt/app/vendor/pragmarx/google2fa-laravel/src/Support/Input.php +opt/app/vendor/pragmarx/google2fa-laravel/src/Support/Request.php +opt/app/vendor/pragmarx/google2fa-laravel/src/Support/Response.php +opt/app/vendor/pragmarx/google2fa-laravel/src/Support/Session.php +opt/app/vendor/pragmarx/google2fa-laravel/src/config/config.php +opt/app/vendor/pragmarx/google2fa-laravel/tests/spec/Support/AuthenticatorSpec.php +opt/app/vendor/pragmarx/google2fa-laravel/upgrading.md opt/app/vendor/pragmarx/google2fa/LICENSE opt/app/vendor/pragmarx/google2fa/changelog.md opt/app/vendor/pragmarx/google2fa/composer.json -opt/app/vendor/pragmarx/google2fa/phpspec.yml +opt/app/vendor/pragmarx/google2fa/docs/playground.jpg opt/app/vendor/pragmarx/google2fa/readme.md -opt/app/vendor/pragmarx/google2fa/src/Contracts/Google2FA.php +opt/app/vendor/pragmarx/google2fa/src/Exceptions/IncompatibleWithGoogleAuthenticatorException.php opt/app/vendor/pragmarx/google2fa/src/Exceptions/InvalidCharactersException.php opt/app/vendor/pragmarx/google2fa/src/Exceptions/SecretKeyTooShortException.php opt/app/vendor/pragmarx/google2fa/src/Google2FA.php +opt/app/vendor/pragmarx/google2fa/src/Support/Base32.php +opt/app/vendor/pragmarx/google2fa/src/Support/Constants.php +opt/app/vendor/pragmarx/google2fa/src/Support/QRCode.php opt/app/vendor/pragmarx/google2fa/src/Support/Url.php -opt/app/vendor/pragmarx/google2fa/src/Vendor/Laravel/Facade.php -opt/app/vendor/pragmarx/google2fa/src/Vendor/Laravel/ServiceProvider.php -opt/app/vendor/pragmarx/google2fa/tests/spec/Google2FASpec.php +opt/app/vendor/pragmarx/google2fa/tests/Google2FATest.php +opt/app/vendor/pragmarx/google2fa/tests/bootstrap.php opt/app/vendor/pragmarx/google2fa/upgrading.md opt/app/vendor/psr/container/LICENSE opt/app/vendor/psr/container/README.md @@ -4245,10 +4335,11 @@ opt/app/vendor/symfony/debug/Tests/Fixtures/reallyNotPsr0.php opt/app/vendor/symfony/debug/Tests/Fixtures2/RequiredTwice.php opt/app/vendor/symfony/debug/Tests/HeaderMock.php opt/app/vendor/symfony/debug/Tests/MockExceptionHandler.php +opt/app/vendor/symfony/debug/Tests/phpt/exception_rethrown.phpt +opt/app/vendor/symfony/debug/Tests/phpt/fatal_with_nested_handlers.phpt opt/app/vendor/symfony/debug/composer.json opt/app/vendor/symfony/debug/phpunit.xml.dist opt/app/vendor/symfony/event-dispatcher/CHANGELOG.md -opt/app/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php opt/app/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php opt/app/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcherInterface.php opt/app/vendor/symfony/event-dispatcher/Debug/WrappedListener.php @@ -4262,7 +4353,6 @@ opt/app/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php opt/app/vendor/symfony/event-dispatcher/LICENSE opt/app/vendor/symfony/event-dispatcher/README.md opt/app/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php -opt/app/vendor/symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php opt/app/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php opt/app/vendor/symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php opt/app/vendor/symfony/event-dispatcher/Tests/EventDispatcherTest.php @@ -4453,6 +4543,8 @@ opt/app/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/st opt/app/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/storage.php opt/app/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_cookie.expected opt/app/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_cookie.php +opt/app/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_cookie_and_session.expected +opt/app/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/Fixtures/with_cookie_and_session.php opt/app/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php opt/app/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php opt/app/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php @@ -4529,9 +4621,12 @@ opt/app/vendor/symfony/http-kernel/DependencyInjection/ControllerArgumentValueRe opt/app/vendor/symfony/http-kernel/DependencyInjection/Extension.php opt/app/vendor/symfony/http-kernel/DependencyInjection/FragmentRendererPass.php opt/app/vendor/symfony/http-kernel/DependencyInjection/LazyLoadingFragmentHandler.php +opt/app/vendor/symfony/http-kernel/DependencyInjection/LoggerPass.php opt/app/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php opt/app/vendor/symfony/http-kernel/DependencyInjection/RegisterControllerArgumentLocatorsPass.php opt/app/vendor/symfony/http-kernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php +opt/app/vendor/symfony/http-kernel/DependencyInjection/ResettableServicePass.php +opt/app/vendor/symfony/http-kernel/DependencyInjection/ServicesResetter.php opt/app/vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php opt/app/vendor/symfony/http-kernel/Event/FilterControllerEvent.php opt/app/vendor/symfony/http-kernel/Event/FilterResponseEvent.php @@ -4600,11 +4695,14 @@ opt/app/vendor/symfony/http-kernel/KernelEvents.php opt/app/vendor/symfony/http-kernel/KernelInterface.php opt/app/vendor/symfony/http-kernel/LICENSE opt/app/vendor/symfony/http-kernel/Log/DebugLoggerInterface.php +opt/app/vendor/symfony/http-kernel/Log/Logger.php opt/app/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php opt/app/vendor/symfony/http-kernel/Profiler/Profile.php opt/app/vendor/symfony/http-kernel/Profiler/Profiler.php opt/app/vendor/symfony/http-kernel/Profiler/ProfilerStorageInterface.php opt/app/vendor/symfony/http-kernel/README.md +opt/app/vendor/symfony/http-kernel/RebootableInterface.php +opt/app/vendor/symfony/http-kernel/Resources/welcome.html.php opt/app/vendor/symfony/http-kernel/TerminableInterface.php opt/app/vendor/symfony/http-kernel/Tests/Bundle/BundleTest.php opt/app/vendor/symfony/http-kernel/Tests/CacheClearer/ChainCacheClearerTest.php @@ -4614,11 +4712,13 @@ opt/app/vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerTest.php opt/app/vendor/symfony/http-kernel/Tests/ClientTest.php opt/app/vendor/symfony/http-kernel/Tests/Config/EnvParametersResourceTest.php opt/app/vendor/symfony/http-kernel/Tests/Config/FileLocatorTest.php +opt/app/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php opt/app/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolverTest.php opt/app/vendor/symfony/http-kernel/Tests/Controller/ContainerControllerResolverTest.php opt/app/vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php opt/app/vendor/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php opt/app/vendor/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataTest.php +opt/app/vendor/symfony/http-kernel/Tests/DataCollector/Compiler.log opt/app/vendor/symfony/http-kernel/Tests/DataCollector/ConfigDataCollectorTest.php opt/app/vendor/symfony/http-kernel/Tests/DataCollector/DataCollectorTest.php opt/app/vendor/symfony/http-kernel/Tests/DataCollector/DumpDataCollectorTest.php @@ -4634,9 +4734,13 @@ opt/app/vendor/symfony/http-kernel/Tests/DependencyInjection/AddAnnotatedClasses opt/app/vendor/symfony/http-kernel/Tests/DependencyInjection/ControllerArgumentValueResolverPassTest.php opt/app/vendor/symfony/http-kernel/Tests/DependencyInjection/FragmentRendererPassTest.php opt/app/vendor/symfony/http-kernel/Tests/DependencyInjection/LazyLoadingFragmentHandlerTest.php +opt/app/vendor/symfony/http-kernel/Tests/DependencyInjection/LoggerPassTest.php opt/app/vendor/symfony/http-kernel/Tests/DependencyInjection/MergeExtensionConfigurationPassTest.php opt/app/vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php opt/app/vendor/symfony/http-kernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php +opt/app/vendor/symfony/http-kernel/Tests/DependencyInjection/ResettableServicePassTest.php +opt/app/vendor/symfony/http-kernel/Tests/DependencyInjection/ServicesResetterTest.php +opt/app/vendor/symfony/http-kernel/Tests/Event/FilterControllerArgumentsEventTest.php opt/app/vendor/symfony/http-kernel/Tests/Event/GetResponseForExceptionEventTest.php opt/app/vendor/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php opt/app/vendor/symfony/http-kernel/Tests/EventListener/DebugHandlersListenerTest.php @@ -4676,6 +4780,7 @@ opt/app/vendor/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/foo.txt opt/app/vendor/symfony/http-kernel/Tests/Fixtures/Bundle2Bundle/foo.txt opt/app/vendor/symfony/http-kernel/Tests/Fixtures/ChildBundle/Resources/foo.txt opt/app/vendor/symfony/http-kernel/Tests/Fixtures/ChildBundle/Resources/hide.txt +opt/app/vendor/symfony/http-kernel/Tests/Fixtures/ClearableService.php opt/app/vendor/symfony/http-kernel/Tests/Fixtures/Controller/BasicTypesController.php opt/app/vendor/symfony/http-kernel/Tests/Fixtures/Controller/ExtendingRequest.php opt/app/vendor/symfony/http-kernel/Tests/Fixtures/Controller/ExtendingSession.php @@ -4694,6 +4799,7 @@ opt/app/vendor/symfony/http-kernel/Tests/Fixtures/ExtensionPresentBundle/Extensi opt/app/vendor/symfony/http-kernel/Tests/Fixtures/KernelForOverrideName.php opt/app/vendor/symfony/http-kernel/Tests/Fixtures/KernelForTest.php opt/app/vendor/symfony/http-kernel/Tests/Fixtures/KernelWithoutBundles.php +opt/app/vendor/symfony/http-kernel/Tests/Fixtures/ResettableService.php opt/app/vendor/symfony/http-kernel/Tests/Fixtures/Resources/BaseBundle/hide.txt opt/app/vendor/symfony/http-kernel/Tests/Fixtures/Resources/Bundle1Bundle/foo.txt opt/app/vendor/symfony/http-kernel/Tests/Fixtures/Resources/ChildBundle/foo.txt @@ -4716,6 +4822,7 @@ opt/app/vendor/symfony/http-kernel/Tests/HttpCache/TestHttpKernel.php opt/app/vendor/symfony/http-kernel/Tests/HttpCache/TestMultipleHttpKernel.php opt/app/vendor/symfony/http-kernel/Tests/HttpKernelTest.php opt/app/vendor/symfony/http-kernel/Tests/KernelTest.php +opt/app/vendor/symfony/http-kernel/Tests/Log/LoggerTest.php opt/app/vendor/symfony/http-kernel/Tests/Logger.php opt/app/vendor/symfony/http-kernel/Tests/Profiler/FileProfilerStorageTest.php opt/app/vendor/symfony/http-kernel/Tests/Profiler/ProfilerTest.php @@ -5297,6 +5404,7 @@ opt/app/vendor/twig/twig/lib/Twig/Cache/Null.php opt/app/vendor/twig/twig/lib/Twig/CacheInterface.php opt/app/vendor/twig/twig/lib/Twig/Compiler.php opt/app/vendor/twig/twig/lib/Twig/CompilerInterface.php +opt/app/vendor/twig/twig/lib/Twig/ContainerRuntimeLoader.php opt/app/vendor/twig/twig/lib/Twig/Environment.php opt/app/vendor/twig/twig/lib/Twig/Error.php opt/app/vendor/twig/twig/lib/Twig/Error/Loader.php @@ -5417,6 +5525,7 @@ opt/app/vendor/twig/twig/lib/Twig/Node/SetTemp.php opt/app/vendor/twig/twig/lib/Twig/Node/Spaceless.php opt/app/vendor/twig/twig/lib/Twig/Node/Text.php opt/app/vendor/twig/twig/lib/Twig/Node/With.php +opt/app/vendor/twig/twig/lib/Twig/NodeCaptureInterface.php opt/app/vendor/twig/twig/lib/Twig/NodeInterface.php opt/app/vendor/twig/twig/lib/Twig/NodeOutputInterface.php opt/app/vendor/twig/twig/lib/Twig/NodeTraverser.php @@ -5427,6 +5536,7 @@ opt/app/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php opt/app/vendor/twig/twig/lib/Twig/NodeVisitorInterface.php opt/app/vendor/twig/twig/lib/Twig/Parser.php opt/app/vendor/twig/twig/lib/Twig/ParserInterface.php +opt/app/vendor/twig/twig/lib/Twig/Profiler/Dumper/Base.php opt/app/vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php opt/app/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php opt/app/vendor/twig/twig/lib/Twig/Profiler/Dumper/Text.php @@ -5486,15 +5596,188 @@ opt/app/vendor/twig/twig/lib/Twig/TokenStream.php opt/app/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php opt/app/vendor/twig/twig/lib/Twig/Util/TemplateDirIterator.php opt/app/vendor/twig/twig/phpunit.xml.dist +opt/app/vendor/twig/twig/src/Cache/CacheInterface.php +opt/app/vendor/twig/twig/src/Cache/FilesystemCache.php +opt/app/vendor/twig/twig/src/Cache/NullCache.php +opt/app/vendor/twig/twig/src/Compiler.php +opt/app/vendor/twig/twig/src/Environment.php +opt/app/vendor/twig/twig/src/Error/Error.php +opt/app/vendor/twig/twig/src/Error/LoaderError.php +opt/app/vendor/twig/twig/src/Error/RuntimeError.php +opt/app/vendor/twig/twig/src/Error/SyntaxError.php +opt/app/vendor/twig/twig/src/ExpressionParser.php +opt/app/vendor/twig/twig/src/Extension/AbstractExtension.php +opt/app/vendor/twig/twig/src/Extension/CoreExtension.php +opt/app/vendor/twig/twig/src/Extension/DebugExtension.php +opt/app/vendor/twig/twig/src/Extension/EscaperExtension.php +opt/app/vendor/twig/twig/src/Extension/ExtensionInterface.php +opt/app/vendor/twig/twig/src/Extension/GlobalsInterface.php +opt/app/vendor/twig/twig/src/Extension/InitRuntimeInterface.php +opt/app/vendor/twig/twig/src/Extension/OptimizerExtension.php +opt/app/vendor/twig/twig/src/Extension/ProfilerExtension.php +opt/app/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php +opt/app/vendor/twig/twig/src/Extension/SandboxExtension.php +opt/app/vendor/twig/twig/src/Extension/StagingExtension.php +opt/app/vendor/twig/twig/src/Extension/StringLoaderExtension.php +opt/app/vendor/twig/twig/src/FileExtensionEscapingStrategy.php +opt/app/vendor/twig/twig/src/Lexer.php +opt/app/vendor/twig/twig/src/Loader/ArrayLoader.php +opt/app/vendor/twig/twig/src/Loader/ChainLoader.php +opt/app/vendor/twig/twig/src/Loader/ExistsLoaderInterface.php +opt/app/vendor/twig/twig/src/Loader/FilesystemLoader.php +opt/app/vendor/twig/twig/src/Loader/LoaderInterface.php +opt/app/vendor/twig/twig/src/Loader/SourceContextLoaderInterface.php +opt/app/vendor/twig/twig/src/Markup.php +opt/app/vendor/twig/twig/src/Node/AutoEscapeNode.php +opt/app/vendor/twig/twig/src/Node/BlockNode.php +opt/app/vendor/twig/twig/src/Node/BlockReferenceNode.php +opt/app/vendor/twig/twig/src/Node/BodyNode.php +opt/app/vendor/twig/twig/src/Node/CheckSecurityNode.php +opt/app/vendor/twig/twig/src/Node/DoNode.php +opt/app/vendor/twig/twig/src/Node/EmbedNode.php +opt/app/vendor/twig/twig/src/Node/Expression/AbstractExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/ArrayExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php +opt/app/vendor/twig/twig/src/Node/Expression/BlockReferenceExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/CallExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/ConstantExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php +opt/app/vendor/twig/twig/src/Node/Expression/FilterExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/FunctionExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/GetAttrExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/MethodCallExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/NameExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/ParentExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/TempNameExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php +opt/app/vendor/twig/twig/src/Node/Expression/Test/DefinedTest.php +opt/app/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php +opt/app/vendor/twig/twig/src/Node/Expression/Test/EvenTest.php +opt/app/vendor/twig/twig/src/Node/Expression/Test/NullTest.php +opt/app/vendor/twig/twig/src/Node/Expression/Test/OddTest.php +opt/app/vendor/twig/twig/src/Node/Expression/Test/SameasTest.php +opt/app/vendor/twig/twig/src/Node/Expression/TestExpression.php +opt/app/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php +opt/app/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php +opt/app/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php +opt/app/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php +opt/app/vendor/twig/twig/src/Node/FlushNode.php +opt/app/vendor/twig/twig/src/Node/ForLoopNode.php +opt/app/vendor/twig/twig/src/Node/ForNode.php +opt/app/vendor/twig/twig/src/Node/IfNode.php +opt/app/vendor/twig/twig/src/Node/ImportNode.php +opt/app/vendor/twig/twig/src/Node/IncludeNode.php +opt/app/vendor/twig/twig/src/Node/MacroNode.php +opt/app/vendor/twig/twig/src/Node/ModuleNode.php +opt/app/vendor/twig/twig/src/Node/Node.php +opt/app/vendor/twig/twig/src/Node/NodeCaptureInterface.php +opt/app/vendor/twig/twig/src/Node/NodeOutputInterface.php +opt/app/vendor/twig/twig/src/Node/PrintNode.php +opt/app/vendor/twig/twig/src/Node/SandboxNode.php +opt/app/vendor/twig/twig/src/Node/SandboxedPrintNode.php +opt/app/vendor/twig/twig/src/Node/SetNode.php +opt/app/vendor/twig/twig/src/Node/SetTempNode.php +opt/app/vendor/twig/twig/src/Node/SpacelessNode.php +opt/app/vendor/twig/twig/src/Node/TextNode.php +opt/app/vendor/twig/twig/src/Node/WithNode.php +opt/app/vendor/twig/twig/src/NodeTraverser.php +opt/app/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php +opt/app/vendor/twig/twig/src/NodeVisitor/EscaperNodeVisitor.php +opt/app/vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php +opt/app/vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php +opt/app/vendor/twig/twig/src/NodeVisitor/SafeAnalysisNodeVisitor.php +opt/app/vendor/twig/twig/src/NodeVisitor/SandboxNodeVisitor.php +opt/app/vendor/twig/twig/src/Parser.php +opt/app/vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php +opt/app/vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php +opt/app/vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php +opt/app/vendor/twig/twig/src/Profiler/Dumper/TextDumper.php +opt/app/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php +opt/app/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php +opt/app/vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php +opt/app/vendor/twig/twig/src/Profiler/Profile.php +opt/app/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php +opt/app/vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php +opt/app/vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php +opt/app/vendor/twig/twig/src/Sandbox/SecurityError.php +opt/app/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php +opt/app/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php +opt/app/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php +opt/app/vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php +opt/app/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php +opt/app/vendor/twig/twig/src/Sandbox/SecurityPolicy.php +opt/app/vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php +opt/app/vendor/twig/twig/src/Source.php +opt/app/vendor/twig/twig/src/Template.php +opt/app/vendor/twig/twig/src/TemplateWrapper.php +opt/app/vendor/twig/twig/src/Test/IntegrationTestCase.php +opt/app/vendor/twig/twig/src/Test/NodeTestCase.php +opt/app/vendor/twig/twig/src/Token.php +opt/app/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/BlockTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/DoTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/EmbedTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/FilterTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/FlushTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/ForTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/FromTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/IfTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/ImportTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/MacroTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/SandboxTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/SetTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/SpacelessTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/TokenParserInterface.php +opt/app/vendor/twig/twig/src/TokenParser/UseTokenParser.php +opt/app/vendor/twig/twig/src/TokenParser/WithTokenParser.php +opt/app/vendor/twig/twig/src/TokenStream.php +opt/app/vendor/twig/twig/src/TwigFilter.php +opt/app/vendor/twig/twig/src/TwigFunction.php +opt/app/vendor/twig/twig/src/TwigTest.php +opt/app/vendor/twig/twig/src/Util/DeprecationCollector.php +opt/app/vendor/twig/twig/src/Util/TemplateDirIterator.php opt/app/vendor/twig/twig/test/Twig/Tests/AutoloaderTest.php opt/app/vendor/twig/twig/test/Twig/Tests/Cache/FilesystemTest.php opt/app/vendor/twig/twig/test/Twig/Tests/CompilerTest.php +opt/app/vendor/twig/twig/test/Twig/Tests/ContainerRuntimeLoaderTest.php opt/app/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php opt/app/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php opt/app/vendor/twig/twig/test/Twig/Tests/ErrorTest.php opt/app/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php opt/app/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php opt/app/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php +opt/app/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php opt/app/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php opt/app/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php opt/app/vendor/twig/twig/test/Twig/Tests/FilesystemHelper.php @@ -5561,6 +5844,7 @@ opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/dynamic_filter.test opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape.test opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_html_attr.test +opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_javascript.test opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/first.test opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test @@ -5751,6 +6035,7 @@ opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple_aliases.test opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block.test opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block2.test opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block3.test +opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/use_with_parent.test opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/basic.test opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/mixed_usage_with_raw.test opt/app/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/whitespace_control.test @@ -5851,12 +6136,11 @@ opt/app/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/BlackfireTest.php opt/app/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/HtmlTest.php opt/app/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/TextTest.php opt/app/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php -opt/app/vendor/twig/twig/test/Twig/Tests/RuntimeFactoryLoaderTest.php opt/app/vendor/twig/twig/test/Twig/Tests/TemplateTest.php opt/app/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php opt/app/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php +opt/app/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php opt/app/vendor/twig/twig/test/Twig/Tests/escapingTest.php -opt/app/vendor/twig/twig/test/bootstrap.php opt/app/vendor/vlucas/phpdotenv/LICENSE.txt opt/app/vendor/vlucas/phpdotenv/composer.json opt/app/vendor/vlucas/phpdotenv/src/Dotenv.php @@ -6010,6 +6294,8 @@ usr/lib/x86_64-linux-gnu/libxml2.so.2 usr/lib/x86_64-linux-gnu/libxml2.so.2.9.1 usr/lib/x86_64-linux-gnu/libxslt.so.1 usr/lib/x86_64-linux-gnu/libxslt.so.1.1.28 +usr/lib/x86_64-linux-gnu/libzip.so.5 +usr/lib/x86_64-linux-gnu/libzip.so.5.0.0 usr/sbin/mysqld usr/sbin/nginx usr/sbin/php-fpm7.1 diff --git a/.sandstorm/sandstorm-pkgdef.capnp b/.sandstorm/sandstorm-pkgdef.capnp index aa56b258ea..fd65c7f0cd 100644 --- a/.sandstorm/sandstorm-pkgdef.capnp +++ b/.sandstorm/sandstorm-pkgdef.capnp @@ -15,8 +15,8 @@ const pkgdef :Spk.PackageDefinition = ( manifest = ( appTitle = (defaultText = "Firefly III"), - appVersion = 5, - appMarketingVersion = (defaultText = "4.6.11.1"), + appVersion = 6, + appMarketingVersion = (defaultText = "4.6.12"), actions = [ # Define your "new document" handlers here. @@ -41,7 +41,7 @@ const pkgdef :Spk.PackageDefinition = ( market = (png = (dpi1x = embed "app-graphics/firefly-iii-150.png")) ), - website = "https://firefly-iii.github.io/", + website = "https://firefly-iii.org/", codeUrl = "https://github.com/firefly-iii/firefly-iii", license = (openSource = gpl3), # The license this package is distributed under. See diff --git a/.travis.yml b/.travis.yml index a9c7132eaf..3c97ce087a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: php php: - 7.1 + - 7.2 cache: directories: @@ -22,7 +23,7 @@ script: - phpunit -c phpunit.coverage.xml after_success: - - travis_retry php vendor/bin/coveralls -x storage/build/clover-all.xml + - travis_retry php vendor/bin/php-coveralls -x storage/build/clover-all.xml # safelist branches: diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c9fc0a77a..46aee1a99b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,31 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [4.6.12] - 2017-12-31 +### Added +- Support for Indonesian. +- New report, see [issue 384](https://github.com/firefly-iii/firefly-iii/issues/384) +- [Issue 964](https://github.com/firefly-iii/firefly-iii/issues/964) as suggested by [gavu](https://github.com/gavu) + +### Changed +- Greatly improved Docker support and documentation. + +### Fixed +- [Issue 1046](https://github.com/firefly-iii/firefly-iii/issues/1046), as reported by [pkoziol](https://github.com/pkoziol) +- [Issue 1047](https://github.com/firefly-iii/firefly-iii/issues/1047), as reported by [pkoziol](https://github.com/pkoziol) +- [Issue 1048](https://github.com/firefly-iii/firefly-iii/issues/1048), as reported by [webence](https://github.com/webence) +- [Issue 1049](https://github.com/firefly-iii/firefly-iii/issues/1049), as reported by [nicoschreiner](https://github.com/nicoschreiner) +- [Issue 1015](https://github.com/firefly-iii/firefly-iii/issues/1015), as reporterd by a user on Tweakers.net +- [Issue 1056](https://github.com/firefly-iii/firefly-iii/issues/1056), as reported by [repercussion](https://github.com/repercussion) +- [Issue 1061](https://github.com/firefly-iii/firefly-iii/issues/1061), as reported by [Meizikyn](https://github.com/Meizikyn) +- [Issue 1045](https://github.com/firefly-iii/firefly-iii/issues/1045), as reported by [gavu](https://github.com/gavu) +- First code for [issue 1040](https://github.com/firefly-iii/firefly-iii/issues/1040) ([simonsmiley](https://github.com/simonsmiley)) +- [Issue 1059](https://github.com/firefly-iii/firefly-iii/issues/1059), as reported by [4oo4](https://github.com/4oo4) +- [Issue 1063](https://github.com/firefly-iii/firefly-iii/issues/1063), as reported by [pkoziol](https://github.com/pkoziol) +- [Issue 1064](https://github.com/firefly-iii/firefly-iii/issues/1064), as reported by [pkoziol](https://github.com/pkoziol) +- [Issue 1066](https://github.com/firefly-iii/firefly-iii/issues/1066), reported by [wtercato](https://github.com/wtercato) + + ## [4.6.11.1] - 2017-12-08 ### Added - Import routine can scan for matching bills, [issue 956](https://github.com/firefly-iii/firefly-iii/issues/956) diff --git a/Dockerfile b/Dockerfile index 6dcd9cdc2d..37c369df1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,12 @@ +# use PHP 7.1 and Apache as a base. FROM php:7.1-apache +# set working dir +ENV FIREFLY_PATH /var/www/firefly-iii +WORKDIR $FIREFLY_PATH +ADD . $FIREFLY_PATH + +# install packages RUN apt-get update -y && \ apt-get install -y --no-install-recommends libcurl4-openssl-dev \ zlib1g-dev \ @@ -14,14 +21,16 @@ RUN apt-get update -y && \ libbz2-dev \ gettext-base \ locales && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* + apt-get clean && \ + rm -rf /var/lib/apt/lists/* +# Install PHP exentions. RUN docker-php-ext-install -j$(nproc) curl gd intl json readline tidy zip bcmath xml mbstring pdo_sqlite pdo_mysql bz2 pdo_pgsql -# Generate locales supported by firefly -RUN echo "en_US.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8" > /etc/locale.gen && locale-gen +# Generate locales supported by Firefly III +RUN echo "de_DE.UTF-8 UTF-8\nen_US.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nid_ID.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8" > /etc/locale.gen && locale-gen +# copy Apache config to correct spot. COPY ./docker/apache2.conf /etc/apache2/apache2.conf # Enable apache mod rewrite.. @@ -30,23 +39,23 @@ RUN a2enmod rewrite # Enable apache mod ssl.. RUN a2enmod ssl +# Create volumes for several directories: +VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload + # Setup the Composer installer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer -# Copy Apache Configs +# Enable default site (Firefly III) COPY ./docker/apache-firefly.conf /etc/apache2/sites-available/000-default.conf -ENV FIREFLY_PATH /var/www/firefly-iii - -WORKDIR $FIREFLY_PATH - -# The working directory -COPY . $FIREFLY_PATH - +# Make sure we own Firefly III directory RUN chown -R www-data:www-data /var/www && chmod -R 775 $FIREFLY_PATH/storage -RUN composer install --prefer-dist --no-dev --no-scripts +# Run composer +RUN composer install --prefer-dist --no-dev --no-scripts --no-suggest +# Expose port 80 EXPOSE 80 -ENTRYPOINT ["docker/entrypoint.sh"] +# Run entrypoint thing +ENTRYPOINT ["docker/entrypoint.sh"] \ No newline at end of file diff --git a/README.md b/README.md index e6f1882923..f6e51b4e73 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,11 @@ [![Requires PHP7.1](https://img.shields.io/badge/php-7.1-red.svg)](https://secure.php.net/downloads.php) [![Latest Stable Version](https://poser.pugx.org/grumpydictator/firefly-iii/v/stable)](https://packagist.org/packages/grumpydictator/firefly-iii) [![License](https://img.shields.io/badge/license-GPL-lightgrey.svg)](https://www.gnu.org/licenses/gpl.html) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=44UKUT455HUFA) -[![The index of Firefly III](https://i.nder.be/ccynyxy0/400)](https://i.nder.be/h327vx3y) [![The account overview of Firefly III](https://i.nder.be/g8v86y2g/400)](https://i.nder.be/hkpynqr9) +[![The index of Firefly III](https://firefly-iii.org/static/screenshots/4.6.12/tiny/index.png)](https://firefly-iii.org/static/screenshots/4.6.12/index.png) [![The account overview of Firefly III](https://firefly-iii.org/static/screenshots/4.6.12/tiny/account.png)](https://firefly-iii.org/static/screenshots/4.6.12/account.png) -[![The useful financial reports of Firefly III](https://i.nder.be/cs3qx4f3/400)](https://i.nder.be/cwznmryd) [![Saving money is easy!](https://i.nder.be/gpq6ykym/400)](https://i.nder.be/gum2qf8z) +[![Overview of all budgets](https://firefly-iii.org/static/screenshots/4.6.12/tiny/budget.png)](https://firefly-iii.org/static/screenshots/4.6.12/budget.png) [![Overview of a category](https://firefly-iii.org/static/screenshots/4.6.12/tiny/category.png)](https://firefly-iii.org/static/screenshots/4.6.12/category.png) + +[![View of a report](https://firefly-iii.org/static/screenshots/4.6.12/tiny/report1.png)](https://firefly-iii.org/static/screenshots/4.6.12/report1.png) [![View of another report](https://firefly-iii.org/static/screenshots/4.6.12/tiny/report2.png)](https://firefly-iii.org/static/screenshots/4.6.12/report2.png) "Firefly III" is a financial manager for your personal finances. It can help you keep track of your expenses and income. Firefly III supports the use of budgets. You can categorize and tag your transactions. @@ -13,17 +15,17 @@ There are many financial reports available. ## Want to try Firefly III? -There is a **[demo site](https://firefly-iii.nder.be)** with an example financial administration already present. You can use Docker, Heroku or Sandstorm.io (see below) to quickly setup your own instance. +There is a **[demo site](https://demo.firefly-iii.org)** with an example financial administration already present. You can use Docker, Heroku or Sandstorm.io (see below) to quickly setup your own instance. ## Install Firefly III ### Using docker -You can use docker-compose to [set up your personal secure](https://firefly-iii.github.io/using-docker.html) Firefly III environment. Advanced users can use the Dockerfile directly. +You can use docker-compose to [set up your personal secure](https://firefly-iii.org/using-docker.html) Firefly III environment. Advanced users can use the Dockerfile directly. ### Using vagrant (or other VMs) -You can install Firefly III on any Linux or Windows machine. You'll need a web server (preferrably on Linux) and access to the command line. Please read the [installation guide](https://firefly-iii.github.io/using-installing.html). +You can install Firefly III on any Linux or Windows machine. You'll need a web server (preferrably on Linux) and access to the command line. Please read the [installation guide](https://firefly-iii.org/using-installing.html). ### Using Heroku @@ -31,8 +33,6 @@ You can install Firefly III on any Linux or Windows machine. You'll need a web s Register for a free Heroku account and instantly run Firefly III on your very own cloud instance. -_My Heroku configuration is currently broken, but I'm trying to fix it._ - ### Using Sandstorm.io You can find Firefly III in [the Sandstorm.io marketplace](https://apps.sandstorm.io/app/uws252ya9mep4t77tevn85333xzsgrpgth8q4y1rhknn1hammw70). You can run it on your own installation or on Oasis. @@ -53,7 +53,7 @@ Firefly works on the principle that if you know where you're money is going, you - If you feel you're missing something you can just ask me and I'll add it! Firefly III has become pretty awesome over the years! (but please excuse me for bragging, it's just that I'm proud of it). -[You can read more about Firefly III, and its features, on the Github Pages](https://firefly-iii.github.io/). +[You can read more about Firefly III, and its features, on the website](https://firefly-iii.org/). ### Contributing @@ -74,8 +74,12 @@ This work [is licensed](https://github.com/firefly-iii/firefly-iii/blob/master/L ### Other stuff -If you like Firefly and if it helps you save lots of money, why not send me [a dime for every dollar saved](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=44UKUT455HUFA) (this is a joke, although the Paypal form works just fine, try it!) +If you like Firefly III and if it helps you save lots of money, why not send me [a dime for every dollar saved](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=44UKUT455HUFA) (this is a joke, although the Paypal form works just fine, try it!) If you want to contact me, please open an issue or [email me](mailto:thegrumpydictator@gmail.com). +### Alternatives + +If you are looking for alternatives, check out [Kickball's Awesome-Selfhosted list](https://github.com/Kickball/awesome-selfhosted) which features not only Firefly III but also noteworthy alternatives such as [Silverstrike](https://github.com/agstrike/silverstrike). + [![Build Status](https://travis-ci.org/firefly-iii/firefly-iii.svg?branch=master)](https://travis-ci.org/firefly-iii/firefly-iii) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/firefly-iii/firefly-iii/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/firefly-iii/firefly-iii/?branch=master) [![Coverage Status](https://coveralls.io/repos/github/firefly-iii/firefly-iii/badge.svg?branch=master)](https://coveralls.io/github/firefly-iii/firefly-iii?branch=master) diff --git a/app.json b/app.json index 4843baa8d6..82677845eb 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,7 @@ "name": "Firefly III", "description": "A free and open source personal finances manager", "repository": "https://github.com/firefly-iii/firefly-iii", - "website": "https://firefly-iii.github.io/", + "website": "https://firefly-iii.org/", "logo": "https://raw.githubusercontent.com/firefly-iii/firefly-iii/master/public/mstile-150x150.png", "keywords": [ "finance", diff --git a/app/Console/Commands/CreateExport.php b/app/Console/Commands/CreateExport.php index 0d55833af7..c38acfa3b9 100644 --- a/app/Console/Commands/CreateExport.php +++ b/app/Console/Commands/CreateExport.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Console/Commands/CreateImport.php b/app/Console/Commands/CreateImport.php index 69b034ac7d..bfb52735e2 100644 --- a/app/Console/Commands/CreateImport.php +++ b/app/Console/Commands/CreateImport.php @@ -16,15 +16,16 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Console\Commands; use Artisan; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Import\Logging\CommandHandler; -use FireflyIII\Import\Routine\ImportRoutine; +use FireflyIII\Import\Routine\RoutineInterface; use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface; use Illuminate\Console\Command; @@ -54,7 +55,7 @@ class CreateImport extends Command protected $signature = 'firefly:create-import {file : The file to import.} - {configuration : The configuration file to use for the import/} + {configuration : The configuration file to use for the import.} {--type=csv : The file type of the import.} {--user= : The user ID that the import should import for.} {--token= : The user\'s access token.} @@ -73,6 +74,8 @@ class CreateImport extends Command * * @SuppressWarnings(PHPMD.ExcessiveMethodLength) // cannot be helped * @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's five exactly. + * + * @throws FireflyException */ public function handle() { @@ -93,7 +96,7 @@ class CreateImport extends Command return; } - $configurationData = json_decode(file_get_contents($configuration)); + $configurationData = json_decode(file_get_contents($configuration), true); if (null === $configurationData) { $this->error(sprintf('Firefly III cannot read the contents of configuration file "%s" (working directory: "%s").', $configuration, $cwd)); @@ -114,9 +117,8 @@ class CreateImport extends Command Artisan::call('firefly:encrypt-file', ['file' => $file, 'key' => $job->key]); $this->line('Stored import data...'); - $job->configuration = $configurationData; - $job->status = 'configured'; - $job->save(); + $jobRepository->setConfiguration($job, $configurationData); + $jobRepository->updateStatus($job, 'configured'); $this->line('Stored configuration...'); if (true === $this->option('start')) { @@ -131,18 +133,26 @@ class CreateImport extends Command $monolog->pushHandler($handler); // start the actual routine: - /** @var ImportRoutine $routine */ - $routine = app(ImportRoutine::class); + $type = 'csv' === $job->file_type ? 'file' : $job->file_type; + $key = sprintf('import.routine.%s', $type); + $className = config($key); + if (null === $className || !class_exists($className)) { + throw new FireflyException(sprintf('Cannot find import routine class for job of type "%s".', $type)); // @codeCoverageIgnore + } + /** @var RoutineInterface $routine */ + $routine = app($className); $routine->setJob($job); $routine->run(); // give feedback. /** @var MessageBag $error */ - foreach ($routine->errors as $index => $error) { + foreach ($routine->getErrors() as $index => $error) { $this->error(sprintf('Error importing line #%d: %s', $index, $error)); } $this->line( - sprintf('The import has finished. %d transactions have been imported out of %d records.', $routine->journals->count(), $routine->lines) + sprintf( + 'The import has finished. %d transactions have been imported out of %d records.', $routine->getJournals()->count(), $routine->getLines() + ) ); } @@ -166,7 +176,7 @@ class CreateImport extends Command $configuration = $this->argument('configuration'); $user = $userRepository->find(intval($this->option('user'))); $cwd = getcwd(); - $validTypes = array_keys(config('firefly.import_formats')); + $validTypes = config('import.options.file.import_formats'); $type = strtolower($this->option('type')); if (null === $user->id) { $this->error(sprintf('There is no user with ID %d.', $this->option('user'))); diff --git a/app/Console/Commands/DecryptAttachment.php b/app/Console/Commands/DecryptAttachment.php index e574a9cd00..00f30daa5d 100644 --- a/app/Console/Commands/DecryptAttachment.php +++ b/app/Console/Commands/DecryptAttachment.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Console/Commands/EncryptFile.php b/app/Console/Commands/EncryptFile.php index a90d9e819b..97bb228678 100644 --- a/app/Console/Commands/EncryptFile.php +++ b/app/Console/Commands/EncryptFile.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Console/Commands/Import.php b/app/Console/Commands/Import.php index d4208dea70..65ae256332 100644 --- a/app/Console/Commands/Import.php +++ b/app/Console/Commands/Import.php @@ -16,14 +16,15 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Console\Commands; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Import\Logging\CommandHandler; -use FireflyIII\Import\Routine\ImportRoutine; +use FireflyIII\Import\Routine\RoutineInterface; use FireflyIII\Models\ImportJob; use Illuminate\Console\Command; use Illuminate\Support\MessageBag; @@ -58,6 +59,8 @@ class Import extends Command /** * Run the import routine. + * + * @throws FireflyException */ public function handle() { @@ -81,17 +84,27 @@ class Import extends Command $handler = new CommandHandler($this); $monolog->pushHandler($handler); - /** @var ImportRoutine $routine */ - $routine = app(ImportRoutine::class); + // actually start job: + $type = 'csv' === $job->file_type ? 'file' : $job->file_type; + $key = sprintf('import.routine.%s', $type); + $className = config($key); + if (null === $className || !class_exists($className)) { + throw new FireflyException(sprintf('Cannot find import routine class for job of type "%s".', $type)); // @codeCoverageIgnore + } + + /** @var RoutineInterface $routine */ + $routine = app($className); $routine->setJob($job); $routine->run(); /** @var MessageBag $error */ - foreach ($routine->errors as $index => $error) { + foreach ($routine->getErrors() as $index => $error) { $this->error(sprintf('Error importing line #%d: %s', $index, $error)); } - $this->line(sprintf('The import has finished. %d transactions have been imported out of %d records.', $routine->journals->count(), $routine->lines)); + $this->line( + sprintf('The import has finished. %d transactions have been imported out of %d records.', $routine->getJournals()->count(), $routine->getLines()) + ); return; } diff --git a/app/Console/Commands/ScanAttachments.php b/app/Console/Commands/ScanAttachments.php index 53d84e9663..060f3b06a6 100644 --- a/app/Console/Commands/ScanAttachments.php +++ b/app/Console/Commands/ScanAttachments.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Console/Commands/UpgradeDatabase.php b/app/Console/Commands/UpgradeDatabase.php index 5c4633c340..3e29848440 100644 --- a/app/Console/Commands/UpgradeDatabase.php +++ b/app/Console/Commands/UpgradeDatabase.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -26,8 +26,6 @@ use DB; use FireflyIII\Models\Account; use FireflyIII\Models\AccountMeta; use FireflyIII\Models\AccountType; -use FireflyIII\Models\BudgetLimit; -use FireflyIII\Models\LimitRepetition; use FireflyIII\Models\Note; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionCurrency; @@ -75,6 +73,8 @@ class UpgradeDatabase extends Command /** * Execute the console command. + * + * @throws \Exception */ public function handle() { @@ -282,6 +282,8 @@ class UpgradeDatabase extends Command /** * Move all the journal_meta notes to their note object counter parts. + * + * @throws \Exception */ private function migrateNotes(): void { diff --git a/app/Console/Commands/UpgradeFireflyInstructions.php b/app/Console/Commands/UpgradeFireflyInstructions.php index 1daafe93ec..f6acbe9bee 100644 --- a/app/Console/Commands/UpgradeFireflyInstructions.php +++ b/app/Console/Commands/UpgradeFireflyInstructions.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Console/Commands/UseEncryption.php b/app/Console/Commands/UseEncryption.php index 648533fa20..0809ec08b2 100644 --- a/app/Console/Commands/UseEncryption.php +++ b/app/Console/Commands/UseEncryption.php @@ -17,18 +17,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * UseEncryption.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Console\Commands; use Illuminate\Console\Command; @@ -65,6 +57,12 @@ class UseEncryption extends Command */ public function handle() { + if (config('firefly.encryption') === true) { + $this->info('Firefly III configuration calls for encrypted data.'); + } + if (config('firefly.encryption') === false) { + $this->info('Firefly III configuration calls for unencrypted data.'); + } $this->handleObjects('Account', 'name', 'encrypted'); $this->handleObjects('Bill', 'name', 'name_encrypted'); $this->handleObjects('Bill', 'match', 'match_encrypted'); @@ -84,7 +82,7 @@ class UseEncryption extends Command public function handleObjects(string $class, string $field, string $indicator) { $fqn = sprintf('FireflyIII\Models\%s', $class); - $encrypt = config('firefly.encryption') ? 0 : 1; + $encrypt = config('firefly.encryption') === true ? 0 : 1; $set = $fqn::where($indicator, $encrypt)->get(); foreach ($set as $entry) { diff --git a/app/Console/Commands/VerifiesAccessToken.php b/app/Console/Commands/VerifiesAccessToken.php index 15b2ae5658..864c6f784c 100644 --- a/app/Console/Commands/VerifiesAccessToken.php +++ b/app/Console/Commands/VerifiesAccessToken.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -68,6 +68,7 @@ trait VerifiesAccessToken } if (!($accessToken->data === $token)) { Log::error(sprintf('Invalid access token for user #%d.', $userId)); + Log::error(sprintf('Token given is "%s", expected "%s".', $token, $accessToken->data)); return false; } diff --git a/app/Console/Commands/VerifyDatabase.php b/app/Console/Commands/VerifyDatabase.php index 79e07b02ea..e11b69159e 100644 --- a/app/Console/Commands/VerifyDatabase.php +++ b/app/Console/Commands/VerifyDatabase.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Console\Commands; use Crypt; +use DB; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; use FireflyIII\Models\Budget; @@ -93,6 +94,7 @@ class VerifyDatabase extends Command $this->repairPiggyBanks(); $this->createLinkTypes(); $this->createAccessTokens(); + $this->fixDoubleAmounts(); } /** @@ -100,6 +102,7 @@ class VerifyDatabase extends Command */ private function createAccessTokens() { + $count = 0; $users = User::get(); /** @var User $user */ foreach ($users as $user) { @@ -108,8 +111,12 @@ class VerifyDatabase extends Command $token = $user->generateAccessToken(); Preferences::setForUser($user, 'access_token', $token); $this->line(sprintf('Generated access token for user %s', $user->email)); + ++$count; } } + if (0 === $count) { + $this->info('All access tokens OK!'); + } } /** @@ -117,7 +124,8 @@ class VerifyDatabase extends Command */ private function createLinkTypes() { - $set = [ + $count = 0; + $set = [ 'Related' => ['relates to', 'relates to'], 'Refund' => ['(partially) refunds', 'is (partially) refunded by'], 'Paid' => ['(partially) pays for', 'is (partially) paid for by'], @@ -130,10 +138,64 @@ class VerifyDatabase extends Command $link->name = $name; $link->outward = $values[0]; $link->inward = $values[1]; + ++$count; } $link->editable = false; $link->save(); } + if (0 === $count) { + $this->info('All link types OK!'); + } + } + + private function fixDoubleAmounts() + { + $count = 0; + // get invalid journals + $errored = []; + $journals = DB::table('transactions') + ->groupBy('transaction_journal_id') + ->get(['transaction_journal_id', DB::raw('SUM(amount) AS the_sum')]); + /** @var stdClass $entry */ + foreach ($journals as $entry) { + if (0 !== bccomp(strval($entry->the_sum), '0')) { + $errored[] = $entry->transaction_journal_id; + } + } + foreach ($errored as $journalId) { + // select and update: + $res = Transaction::whereNull('deleted_at')->where('transaction_journal_id', $journalId)->groupBy('amount')->get([DB::raw('MIN(id) as first_id')]); + $ids = $res->pluck('first_id')->toArray(); + DB::table('transactions')->whereIn('id', $ids)->update(['amount' => DB::raw('amount * -1')]); + ++$count; + // report about it + /** @var TransactionJournal $journal */ + $journal = TransactionJournal::find($journalId); + if (is_null($journal)) { + continue; + } + if (TransactionType::OPENING_BALANCE === $journal->transactionType->type) { + $this->error( + sprintf( + 'Transaction #%d was stored incorrectly. One of your asset accounts may show the wrong balance. Please visit /transactions/show/%d to verify the opening balance.', + $journalId, $journalId + ) + ); + } + if (TransactionType::OPENING_BALANCE !== $journal->transactionType->type) { + $this->error( + sprintf( + 'Transaction #%d was stored incorrectly. Could be that the transaction shows the wrong amount. Please visit /transactions/show/%d to verify the opening balance.', + $journalId, $journalId + ) + ); + } + } + if (0 === $count) { + $this->info('Amount integrity OK!'); + } + + return; } /** @@ -290,24 +352,29 @@ class VerifyDatabase extends Command */ private function reportJournals() { - $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') - ->get( - [ - 'transaction_journals.id as journal_id', - 'transaction_journals.description', - 'transaction_journals.deleted_at as journal_deleted', - 'transactions.id as transaction_id', - 'transactions.deleted_at as transaction_deleted_at',] - ); + $count = 0; + $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') + ->get( + [ + 'transaction_journals.id as journal_id', + 'transaction_journals.description', + 'transaction_journals.deleted_at as journal_deleted', + 'transactions.id as transaction_id', + 'transactions.deleted_at as transaction_deleted_at',] + ); /** @var stdClass $entry */ foreach ($set as $entry) { $this->error( 'Error: Transaction #' . $entry->transaction_id . ' should have been deleted, but has not.' . ' Find it in the table called "transactions" and change the "deleted_at" field to: "' . $entry->journal_deleted . '"' ); + ++$count; + } + if (0 === $count) { + $this->info('No orphaned transactions!'); } } @@ -316,15 +383,20 @@ class VerifyDatabase extends Command */ private function reportNoTransactions() { - $set = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') - ->groupBy('transaction_journals.id') - ->whereNull('transactions.transaction_journal_id') - ->get(['transaction_journals.id']); + $count = 0; + $set = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + ->groupBy('transaction_journals.id') + ->whereNull('transactions.transaction_journal_id') + ->get(['transaction_journals.id']); foreach ($set as $entry) { $this->error( 'Error: Journal #' . $entry->id . ' has zero transactions. Open table "transaction_journals" and delete the entry with id #' . $entry->id ); + ++$count; + } + if (0 === $count) { + $this->info('No orphaned journals!'); } } @@ -379,6 +451,8 @@ class VerifyDatabase extends Command $sum = strval($user->transactions()->sum('amount')); if (0 !== bccomp($sum, '0')) { $this->error('Error: Transactions for user #' . $user->id . ' (' . $user->email . ') are off by ' . $sum . '!'); + } else { + $this->info(sprintf('Amount integrity OK for user #%d', $user->id)); } } } diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index b444bbef42..316260b8a0 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -16,19 +16,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * Kernel.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Console; use Illuminate\Console\Scheduling\Schedule; diff --git a/app/Events/AdminRequestedTestMessage.php b/app/Events/AdminRequestedTestMessage.php index 5406ca4bc9..c9a9fd5ab4 100644 --- a/app/Events/AdminRequestedTestMessage.php +++ b/app/Events/AdminRequestedTestMessage.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -33,7 +33,13 @@ class AdminRequestedTestMessage extends Event { use SerializesModels; + /** + * @var string + */ public $ipAddress; + /** + * @var User + */ public $user; /** diff --git a/app/Events/Event.php b/app/Events/Event.php index 4efa51dfce..59c1ec66de 100644 --- a/app/Events/Event.php +++ b/app/Events/Event.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Events/RegisteredUser.php b/app/Events/RegisteredUser.php index 3886edd432..027dccf6bc 100644 --- a/app/Events/RegisteredUser.php +++ b/app/Events/RegisteredUser.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -32,7 +32,13 @@ class RegisteredUser extends Event { use SerializesModels; + /** + * @var string + */ public $ipAddress; + /** + * @var User + */ public $user; /** diff --git a/app/Events/RequestedNewPassword.php b/app/Events/RequestedNewPassword.php index e8031e316e..81a7dfc987 100644 --- a/app/Events/RequestedNewPassword.php +++ b/app/Events/RequestedNewPassword.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -32,8 +32,17 @@ class RequestedNewPassword extends Event { use SerializesModels; + /** + * @var string + */ public $ipAddress; + /** + * @var string + */ public $token; + /** + * @var User + */ public $user; /** diff --git a/app/Events/RequestedVersionCheckStatus.php b/app/Events/RequestedVersionCheckStatus.php new file mode 100644 index 0000000000..c87a0b35b8 --- /dev/null +++ b/app/Events/RequestedVersionCheckStatus.php @@ -0,0 +1,52 @@ +. + */ + +declare(strict_types=1); + +namespace FireflyIII\Events; + +use FireflyIII\User; +use Illuminate\Queue\SerializesModels; + + +/** + * Class RequestedVersionCheckStatus + */ +class RequestedVersionCheckStatus extends Event +{ + use SerializesModels; + + /** + * @var User + */ + public $user; + + /** + * Create a new event instance. This event is triggered when Firefly III wants to know + * what the deal is with the version checker. + * + * @param User $user + */ + public function __construct(User $user) + { + $this->user = $user; + } +} \ No newline at end of file diff --git a/app/Events/StoredTransactionJournal.php b/app/Events/StoredTransactionJournal.php index deab148be0..082a092e2b 100644 --- a/app/Events/StoredTransactionJournal.php +++ b/app/Events/StoredTransactionJournal.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Events/UpdatedTransactionJournal.php b/app/Events/UpdatedTransactionJournal.php index 9f365929e8..16b5f0adb0 100644 --- a/app/Events/UpdatedTransactionJournal.php +++ b/app/Events/UpdatedTransactionJournal.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Events/UserChangedEmail.php b/app/Events/UserChangedEmail.php index 2c75145d34..52027b9d70 100644 --- a/app/Events/UserChangedEmail.php +++ b/app/Events/UserChangedEmail.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Exceptions/FireflyException.php b/app/Exceptions/FireflyException.php index 313ea77b7f..538e094b06 100644 --- a/app/Exceptions/FireflyException.php +++ b/app/Exceptions/FireflyException.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 02e1670b03..f5e1097fb7 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -16,19 +16,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * Handler.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Exceptions; use ErrorException; @@ -37,6 +28,9 @@ use FireflyIII\Jobs\MailError; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Request; +/** + * Class Handler + */ class Handler extends ExceptionHandler { /** @@ -87,6 +81,8 @@ class Handler extends ExceptionHandler * @param \Exception $exception * * @return mixed|void + * + * @throws Exception */ public function report(Exception $exception) { diff --git a/app/Exceptions/NotImplementedException.php b/app/Exceptions/NotImplementedException.php index f3fe68d8de..467c5e3bc7 100644 --- a/app/Exceptions/NotImplementedException.php +++ b/app/Exceptions/NotImplementedException.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Exceptions/ValidationException.php b/app/Exceptions/ValidationException.php index dba608fa1a..236c862cc3 100644 --- a/app/Exceptions/ValidationException.php +++ b/app/Exceptions/ValidationException.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Export/Collector/AttachmentCollector.php b/app/Export/Collector/AttachmentCollector.php index c3f76d2274..785adfbd51 100644 --- a/app/Export/Collector/AttachmentCollector.php +++ b/app/Export/Collector/AttachmentCollector.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Export/Collector/BasicCollector.php b/app/Export/Collector/BasicCollector.php index 0aa688ae30..d17cb810fc 100644 --- a/app/Export/Collector/BasicCollector.php +++ b/app/Export/Collector/BasicCollector.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Export/Collector/CollectorInterface.php b/app/Export/Collector/CollectorInterface.php index 362692f247..5aa2d22ca8 100644 --- a/app/Export/Collector/CollectorInterface.php +++ b/app/Export/Collector/CollectorInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Export/Collector/UploadCollector.php b/app/Export/Collector/UploadCollector.php index 9bb5dd20fb..47c7cb8f09 100644 --- a/app/Export/Collector/UploadCollector.php +++ b/app/Export/Collector/UploadCollector.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Export/Entry/Entry.php b/app/Export/Entry/Entry.php index b9b73ac463..63f0c5ea43 100644 --- a/app/Export/Entry/Entry.php +++ b/app/Export/Entry/Entry.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -45,44 +45,131 @@ use FireflyIII\Models\Transaction; final class Entry { // @formatter:off + /** + * @var int + */ public $journal_id; + /** + * @var int + */ public $transaction_id = 0; + /** + * @var string + */ public $date; + /** + * @var string + */ public $description; + /** + * @var string + */ public $currency_code; + /** + * @var string + */ public $amount; + /** + * @var string + */ public $foreign_currency_code = ''; - public $foreign_amount = '0'; + /** + * @var string + */ + public $foreign_amount = '0'; + /** + * @var string + */ public $transaction_type; + /** + * @var string + */ public $asset_account_id; + /** + * @var string + */ public $asset_account_name; + /** + * @var string + */ public $asset_account_iban; + /** + * @var string + */ public $asset_account_bic; + /** + * @var string + */ public $asset_account_number; + /** + * @var string + */ public $asset_currency_code; + /** + * @var string + */ public $opposing_account_id; + /** + * @var string + */ public $opposing_account_name; + /** + * @var string + */ public $opposing_account_iban; + /** + * @var string + */ public $opposing_account_bic; + /** + * @var string + */ public $opposing_account_number; + /** + * @var string + */ public $opposing_currency_code; + /** + * @var string + */ public $budget_id; + /** + * @var string + */ public $budget_name; + /** + * @var string + */ public $category_id; + /** + * @var string + */ public $category_name; + /** + * @var string + */ public $bill_id; + /** + * @var string + */ public $bill_name; + /** + * @var string + */ public $notes; + /** + * @var string + */ public $tags; @@ -116,7 +203,7 @@ final class Entry $entry->description = $transaction->transaction_description . '(' . $transaction->description . ')'; } $entry->currency_code = $transaction->transactionCurrency->code; - $entry->amount = round($transaction->transaction_amount, $transaction->transactionCurrency->decimal_places); + $entry->amount = strval(round($transaction->transaction_amount, $transaction->transactionCurrency->decimal_places)); $entry->foreign_currency_code = null === $transaction->foreign_currency_id ? null : $transaction->foreignCurrency->code; $entry->foreign_amount = null === $transaction->foreign_currency_id @@ -129,14 +216,14 @@ final class Entry ); $entry->transaction_type = $transaction->transaction_type_type; - $entry->asset_account_id = $transaction->account_id; + $entry->asset_account_id = strval($transaction->account_id); $entry->asset_account_name = app('steam')->tryDecrypt($transaction->account_name); $entry->asset_account_iban = $transaction->account_iban; $entry->asset_account_number = $transaction->account_number; $entry->asset_account_bic = $transaction->account_bic; $entry->asset_currency_code = $transaction->account_currency_code; - $entry->opposing_account_id = $transaction->opposing_account_id; + $entry->opposing_account_id = strval($transaction->opposing_account_id); $entry->opposing_account_name = app('steam')->tryDecrypt($transaction->opposing_account_name); $entry->opposing_account_iban = $transaction->opposing_account_iban; $entry->opposing_account_number = $transaction->opposing_account_number; @@ -144,7 +231,7 @@ final class Entry $entry->opposing_currency_code = $transaction->opposing_currency_code; // budget - $entry->budget_id = $transaction->transaction_budget_id; + $entry->budget_id = strval($transaction->transaction_budget_id); $entry->budget_name = app('steam')->tryDecrypt($transaction->transaction_budget_name); if (null === $transaction->transaction_budget_id) { $entry->budget_id = $transaction->transaction_journal_budget_id; @@ -152,7 +239,7 @@ final class Entry } // category - $entry->category_id = $transaction->transaction_category_id; + $entry->category_id = strval($transaction->transaction_category_id); $entry->category_name = app('steam')->tryDecrypt($transaction->transaction_category_name); if (null === $transaction->transaction_category_id) { $entry->category_id = $transaction->transaction_journal_category_id; @@ -160,7 +247,7 @@ final class Entry } // budget - $entry->bill_id = $transaction->bill_id; + $entry->bill_id = strval($transaction->bill_id); $entry->bill_name = app('steam')->tryDecrypt($transaction->bill_name); $entry->tags = $transaction->tags; diff --git a/app/Export/ExpandedProcessor.php b/app/Export/ExpandedProcessor.php index 11504e2267..9539dcc3de 100644 --- a/app/Export/ExpandedProcessor.php +++ b/app/Export/ExpandedProcessor.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -32,8 +32,8 @@ use FireflyIII\Helpers\Collector\JournalCollectorInterface; use FireflyIII\Helpers\Filter\InternalTransferFilter; use FireflyIII\Models\AccountMeta; use FireflyIII\Models\ExportJob; +use FireflyIII\Models\Note; use FireflyIII\Models\Transaction; -use FireflyIII\Models\TransactionJournalMeta; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use Illuminate\Support\Collection; use Log; @@ -114,7 +114,7 @@ class ExpandedProcessor implements ProcessorInterface $notes = $this->getNotes($ids); $tags = $this->getTags($ids); /** @var array $ibans */ - $ibans = $this->getIbans($assetIds) + $this->getIbans($opposingIds); + $ibans = array_merge($this->getIbans($assetIds), $this->getIbans($opposingIds)); $currencies = $this->getAccountCurrencies($ibans); $transactions->each( function (Transaction $transaction) use ($notes, $tags, $ibans, $currencies) { @@ -173,6 +173,7 @@ class ExpandedProcessor implements ProcessorInterface * @return bool * * @throws FireflyException + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function createZipFile(): bool { @@ -309,17 +310,16 @@ class ExpandedProcessor implements ProcessorInterface private function getNotes(array $array): array { $array = array_unique($array); - $set = TransactionJournalMeta::whereIn('journal_meta.transaction_journal_id', $array) - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'journal_meta.transaction_journal_id') - ->where('transaction_journals.user_id', $this->job->user_id) - ->where('journal_meta.name', 'notes')->get( - ['journal_meta.transaction_journal_id', 'journal_meta.data', 'journal_meta.id'] - ); + $notes = Note::where('notes.noteable_type', 'FireflyIII\\Models\\TransactionJournal') + ->whereIn('notes.noteable_id', $array) + ->get(['notes.*']); $return = []; - /** @var TransactionJournalMeta $meta */ - foreach ($set as $meta) { - $id = intval($meta->transaction_journal_id); - $return[$id] = $meta->data; + /** @var Note $note */ + foreach ($notes as $note) { + if (strlen(trim(strval($note->text))) > 0) { + $id = intval($note->noteable_id); + $return[$id] = $note->text; + } } return $return; diff --git a/app/Export/Exporter/BasicExporter.php b/app/Export/Exporter/BasicExporter.php index ece94d3703..be63ba6676 100644 --- a/app/Export/Exporter/BasicExporter.php +++ b/app/Export/Exporter/BasicExporter.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Export/Exporter/CsvExporter.php b/app/Export/Exporter/CsvExporter.php index 2799f7902f..012e4d6e2b 100644 --- a/app/Export/Exporter/CsvExporter.php +++ b/app/Export/Exporter/CsvExporter.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -24,7 +24,7 @@ namespace FireflyIII\Export\Exporter; use FireflyIII\Export\Entry\Entry; use League\Csv\Writer; -use SplFileObject; +use Storage; /** * Class CsvExporter. @@ -52,6 +52,8 @@ class CsvExporter extends BasicExporter implements ExporterInterface /** * @return bool + * + * @throws \TypeError */ public function run(): bool { @@ -60,8 +62,11 @@ class CsvExporter extends BasicExporter implements ExporterInterface // necessary for CSV writer: $fullPath = storage_path('export') . DIRECTORY_SEPARATOR . $this->fileName; - $writer = Writer::createFromPath(new SplFileObject($fullPath, 'a+'), 'w'); - $rows = []; + + + //we create the CSV into memory + $writer = Writer::createFromPath($fullPath); + $rows = []; // get field names for header row: $first = $this->getEntries()->first(); @@ -88,5 +93,8 @@ class CsvExporter extends BasicExporter implements ExporterInterface private function tempFile() { $this->fileName = $this->job->key . '-records.csv'; + // touch file in export directory: + $disk = Storage::disk('export'); + $disk->put($this->fileName, ''); } } diff --git a/app/Export/Exporter/ExporterInterface.php b/app/Export/Exporter/ExporterInterface.php index 50790b3c92..427b5fed85 100644 --- a/app/Export/Exporter/ExporterInterface.php +++ b/app/Export/Exporter/ExporterInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Export/ProcessorInterface.php b/app/Export/ProcessorInterface.php index 3d24a91f1f..106c708c41 100644 --- a/app/Export/ProcessorInterface.php +++ b/app/Export/ProcessorInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Generator/Chart/Basic/ChartJsGenerator.php b/app/Generator/Chart/Basic/ChartJsGenerator.php index e366db9587..52021958d8 100644 --- a/app/Generator/Chart/Basic/ChartJsGenerator.php +++ b/app/Generator/Chart/Basic/ChartJsGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Generator/Chart/Basic/GeneratorInterface.php b/app/Generator/Chart/Basic/GeneratorInterface.php index 68753e1276..5cfdd4d94f 100644 --- a/app/Generator/Chart/Basic/GeneratorInterface.php +++ b/app/Generator/Chart/Basic/GeneratorInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Generator/Report/Account/MonthReportGenerator.php b/app/Generator/Report/Account/MonthReportGenerator.php new file mode 100644 index 0000000000..76ff55629b --- /dev/null +++ b/app/Generator/Report/Account/MonthReportGenerator.php @@ -0,0 +1,146 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Generator\Report\Account; + +use Carbon\Carbon; +use FireflyIII\Generator\Report\ReportGeneratorInterface; +use Illuminate\Support\Collection; + +/** + * Class MonthReportGenerator. + */ +class MonthReportGenerator implements ReportGeneratorInterface +{ + /** @var Collection */ + private $accounts; + /** @var Carbon */ + private $end; + /** @var Collection */ + private $expense; + /** @var Carbon */ + private $start; + + /** + * @return string + * + * @throws \Throwable + */ + public function generate(): string + { + $accountIds = join(',', $this->accounts->pluck('id')->toArray()); + $expenseIds = join(',', $this->expense->pluck('id')->toArray()); + $reportType = 'account'; + $preferredPeriod = $this->preferredPeriod(); + + return view( + 'reports.account.report', + compact('accountIds', 'reportType', 'expenseIds', 'preferredPeriod') + )->with('start', $this->start)->with('end', $this->end)->render(); + } + + /** + * @param Collection $accounts + * + * @return ReportGeneratorInterface + */ + public function setAccounts(Collection $accounts): ReportGeneratorInterface + { + $this->accounts = $accounts; + + return $this; + } + + /** + * @param Collection $budgets + * + * @return ReportGeneratorInterface + */ + public function setBudgets(Collection $budgets): ReportGeneratorInterface + { + return $this; + } + + /** + * @param Collection $categories + * + * @return ReportGeneratorInterface + */ + public function setCategories(Collection $categories): ReportGeneratorInterface + { + return $this; + } + + /** + * @param Carbon $date + * + * @return ReportGeneratorInterface + */ + public function setEndDate(Carbon $date): ReportGeneratorInterface + { + $this->end = $date; + + return $this; + } + + /** + * @param Collection $expense + * + * @return ReportGeneratorInterface + */ + public function setExpense(Collection $expense): ReportGeneratorInterface + { + $this->expense = $expense; + + return $this; + } + + /** + * @param Carbon $date + * + * @return ReportGeneratorInterface + */ + public function setStartDate(Carbon $date): ReportGeneratorInterface + { + $this->start = $date; + + return $this; + } + + /** + * @param Collection $tags + * + * @return ReportGeneratorInterface + */ + public function setTags(Collection $tags): ReportGeneratorInterface + { + return $this; + } + + /** + * @return string + */ + protected function preferredPeriod(): string + { + return 'day'; + } +} diff --git a/app/Generator/Report/Account/MultiYearReportGenerator.php b/app/Generator/Report/Account/MultiYearReportGenerator.php new file mode 100644 index 0000000000..690891b8e1 --- /dev/null +++ b/app/Generator/Report/Account/MultiYearReportGenerator.php @@ -0,0 +1,39 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Generator\Report\Account; + +/** + * Class MultiYearReportGenerator. + */ +class MultiYearReportGenerator extends MonthReportGenerator +{ + // Doesn't do anything different. + + /** + * @return string + */ + protected function preferredPeriod(): string + { + return 'year'; + } +} diff --git a/app/Generator/Report/Account/YearReportGenerator.php b/app/Generator/Report/Account/YearReportGenerator.php new file mode 100644 index 0000000000..f5031da9e2 --- /dev/null +++ b/app/Generator/Report/Account/YearReportGenerator.php @@ -0,0 +1,39 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Generator\Report\Account; + +/** + * Class YearReportGenerator. + */ +class YearReportGenerator extends MonthReportGenerator +{ + // Doesn't do anything different. + + /** + * @return string + */ + protected function preferredPeriod(): string + { + return 'month'; + } +} diff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.php index f944874ea4..d46c872d58 100644 --- a/app/Generator/Report/Audit/MonthReportGenerator.php +++ b/app/Generator/Report/Audit/MonthReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -119,6 +119,16 @@ class MonthReportGenerator implements ReportGeneratorInterface return $this; } + /** + * @param Collection $expense + * + * @return ReportGeneratorInterface + */ + public function setExpense(Collection $expense): ReportGeneratorInterface + { + return $this; + } + /** * @param Carbon $date * diff --git a/app/Generator/Report/Audit/MultiYearReportGenerator.php b/app/Generator/Report/Audit/MultiYearReportGenerator.php index 93629d0c55..00df62d2db 100644 --- a/app/Generator/Report/Audit/MultiYearReportGenerator.php +++ b/app/Generator/Report/Audit/MultiYearReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Generator/Report/Audit/YearReportGenerator.php b/app/Generator/Report/Audit/YearReportGenerator.php index 2cd93c9b01..4855e6aeee 100644 --- a/app/Generator/Report/Audit/YearReportGenerator.php +++ b/app/Generator/Report/Audit/YearReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Generator/Report/Budget/MonthReportGenerator.php b/app/Generator/Report/Budget/MonthReportGenerator.php index 1295061e6b..1ac4532632 100644 --- a/app/Generator/Report/Budget/MonthReportGenerator.php +++ b/app/Generator/Report/Budget/MonthReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -128,6 +128,16 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface return $this; } + /** + * @param Collection $expense + * + * @return ReportGeneratorInterface + */ + public function setExpense(Collection $expense): ReportGeneratorInterface + { + return $this; + } + /** * @param Carbon $date * diff --git a/app/Generator/Report/Budget/MultiYearReportGenerator.php b/app/Generator/Report/Budget/MultiYearReportGenerator.php index 956968075f..13e4fc81b0 100644 --- a/app/Generator/Report/Budget/MultiYearReportGenerator.php +++ b/app/Generator/Report/Budget/MultiYearReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Generator/Report/Budget/YearReportGenerator.php b/app/Generator/Report/Budget/YearReportGenerator.php index 649636f91b..44ff2349b1 100644 --- a/app/Generator/Report/Budget/YearReportGenerator.php +++ b/app/Generator/Report/Budget/YearReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Generator/Report/Category/MonthReportGenerator.php b/app/Generator/Report/Category/MonthReportGenerator.php index 24370c6be0..7977f83d0a 100644 --- a/app/Generator/Report/Category/MonthReportGenerator.php +++ b/app/Generator/Report/Category/MonthReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -146,6 +146,16 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface return $this; } + /** + * @param Collection $expense + * + * @return ReportGeneratorInterface + */ + public function setExpense(Collection $expense): ReportGeneratorInterface + { + return $this; + } + /** * @param Carbon $date * diff --git a/app/Generator/Report/Category/MultiYearReportGenerator.php b/app/Generator/Report/Category/MultiYearReportGenerator.php index d18dc47c0d..1ce99f992f 100644 --- a/app/Generator/Report/Category/MultiYearReportGenerator.php +++ b/app/Generator/Report/Category/MultiYearReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Generator/Report/Category/YearReportGenerator.php b/app/Generator/Report/Category/YearReportGenerator.php index 7a3f15a484..d769979990 100644 --- a/app/Generator/Report/Category/YearReportGenerator.php +++ b/app/Generator/Report/Category/YearReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Generator/Report/ReportGeneratorFactory.php b/app/Generator/Report/ReportGeneratorFactory.php index f6d7956a60..e06cb5b3ac 100644 --- a/app/Generator/Report/ReportGeneratorFactory.php +++ b/app/Generator/Report/ReportGeneratorFactory.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Generator/Report/ReportGeneratorInterface.php b/app/Generator/Report/ReportGeneratorInterface.php index c3752b2739..42d1d158b2 100644 --- a/app/Generator/Report/ReportGeneratorInterface.php +++ b/app/Generator/Report/ReportGeneratorInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -63,6 +63,13 @@ interface ReportGeneratorInterface */ public function setEndDate(Carbon $date): ReportGeneratorInterface; + /** + * @param Collection $expense + * + * @return ReportGeneratorInterface + */ + public function setExpense(Collection $expense): ReportGeneratorInterface; + /** * @param Carbon $date * diff --git a/app/Generator/Report/Standard/MonthReportGenerator.php b/app/Generator/Report/Standard/MonthReportGenerator.php index 74c005b0ab..c8f14e8923 100644 --- a/app/Generator/Report/Standard/MonthReportGenerator.php +++ b/app/Generator/Report/Standard/MonthReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -41,6 +41,8 @@ class MonthReportGenerator implements ReportGeneratorInterface /** * @return string + * + * @throws \Throwable */ public function generate(): string { @@ -101,6 +103,16 @@ class MonthReportGenerator implements ReportGeneratorInterface return $this; } + /** + * @param Collection $expense + * + * @return ReportGeneratorInterface + */ + public function setExpense(Collection $expense): ReportGeneratorInterface + { + return $this; + } + /** * @param Carbon $date * diff --git a/app/Generator/Report/Standard/MultiYearReportGenerator.php b/app/Generator/Report/Standard/MultiYearReportGenerator.php index 7bc83c6dc7..7ddff3dfa5 100644 --- a/app/Generator/Report/Standard/MultiYearReportGenerator.php +++ b/app/Generator/Report/Standard/MultiYearReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -40,6 +40,8 @@ class MultiYearReportGenerator implements ReportGeneratorInterface /** * @return string + * + * @throws \Throwable */ public function generate(): string { @@ -98,6 +100,16 @@ class MultiYearReportGenerator implements ReportGeneratorInterface return $this; } + /** + * @param Collection $expense + * + * @return ReportGeneratorInterface + */ + public function setExpense(Collection $expense): ReportGeneratorInterface + { + return $this; + } + /** * @param Carbon $date * diff --git a/app/Generator/Report/Standard/YearReportGenerator.php b/app/Generator/Report/Standard/YearReportGenerator.php index fc591c0e97..258478c44a 100644 --- a/app/Generator/Report/Standard/YearReportGenerator.php +++ b/app/Generator/Report/Standard/YearReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -40,6 +40,8 @@ class YearReportGenerator implements ReportGeneratorInterface /** * @return string + * + * @throws \Throwable */ public function generate(): string { @@ -98,6 +100,16 @@ class YearReportGenerator implements ReportGeneratorInterface return $this; } + /** + * @param Collection $expense + * + * @return ReportGeneratorInterface + */ + public function setExpense(Collection $expense): ReportGeneratorInterface + { + return $this; + } + /** * @param Carbon $date * diff --git a/app/Generator/Report/Support.php b/app/Generator/Report/Support.php index 71cc298307..328d0addd8 100644 --- a/app/Generator/Report/Support.php +++ b/app/Generator/Report/Support.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Generator/Report/Tag/MonthReportGenerator.php b/app/Generator/Report/Tag/MonthReportGenerator.php index 418b05dd16..e1cdc808fc 100644 --- a/app/Generator/Report/Tag/MonthReportGenerator.php +++ b/app/Generator/Report/Tag/MonthReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -65,6 +65,7 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface /** * @return string + * @throws \Throwable */ public function generate(): string { @@ -141,6 +142,16 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface return $this; } + /** + * @param Collection $expense + * + * @return ReportGeneratorInterface + */ + public function setExpense(Collection $expense): ReportGeneratorInterface + { + return $this; + } + /** * @param Carbon $date * diff --git a/app/Generator/Report/Tag/MultiYearReportGenerator.php b/app/Generator/Report/Tag/MultiYearReportGenerator.php index 7687cf9d0e..1b5aa1993f 100644 --- a/app/Generator/Report/Tag/MultiYearReportGenerator.php +++ b/app/Generator/Report/Tag/MultiYearReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Generator/Report/Tag/YearReportGenerator.php b/app/Generator/Report/Tag/YearReportGenerator.php index 2e72c8d252..abb8dc9efc 100644 --- a/app/Generator/Report/Tag/YearReportGenerator.php +++ b/app/Generator/Report/Tag/YearReportGenerator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Handlers/Events/AdminEventHandler.php b/app/Handlers/Events/AdminEventHandler.php index 79e1cbeb40..4d7dc4101c 100644 --- a/app/Handlers/Events/AdminEventHandler.php +++ b/app/Handlers/Events/AdminEventHandler.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Handlers/Events/StoredJournalEventHandler.php b/app/Handlers/Events/StoredJournalEventHandler.php index e02146f253..b05a4f09c5 100644 --- a/app/Handlers/Events/StoredJournalEventHandler.php +++ b/app/Handlers/Events/StoredJournalEventHandler.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Handlers/Events/UpdatedJournalEventHandler.php b/app/Handlers/Events/UpdatedJournalEventHandler.php index 13f2af4b01..20e446ea5e 100644 --- a/app/Handlers/Events/UpdatedJournalEventHandler.php +++ b/app/Handlers/Events/UpdatedJournalEventHandler.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Handlers/Events/UserEventHandler.php b/app/Handlers/Events/UserEventHandler.php index 1a6e016911..23f09fbfeb 100644 --- a/app/Handlers/Events/UserEventHandler.php +++ b/app/Handlers/Events/UserEventHandler.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -76,6 +76,7 @@ class UserEventHandler { Log::debug('In checkSingleUserIsAdmin'); + /** @var User $user */ $user = $event->user; $count = User::count(); @@ -86,7 +87,7 @@ class UserEventHandler return true; } // user is only user but has admin role - if ($count === 1 && $user->hasRole('owner')) { + if (1 === $count && $user->hasRole('owner')) { Log::debug(sprintf('User #%d is only user but has role owner so all is well.', $user->id)); return true; diff --git a/app/Handlers/Events/VersionCheckEventHandler.php b/app/Handlers/Events/VersionCheckEventHandler.php new file mode 100644 index 0000000000..6753f1d9a6 --- /dev/null +++ b/app/Handlers/Events/VersionCheckEventHandler.php @@ -0,0 +1,78 @@ +. + */ + +declare(strict_types=1); + +namespace FireflyIII\Handlers\Events; + +use FireflyConfig; +use FireflyIII\Events\RequestedVersionCheckStatus; +use FireflyIII\User; +use Log; + +/** + * Class VersionCheckEventHandler + */ +class VersionCheckEventHandler +{ + + /** + * @param RequestedVersionCheckStatus $event + */ + public function checkForUpdates(RequestedVersionCheckStatus $event) + { + // in Sandstorm, cannot check for updates: + $sandstorm = 1 === intval(getenv('SANDSTORM')); + if ($sandstorm === true) { + return; + } + + /** @var User $user */ + $user = $event->user; + if (!$user->hasRole('owner')) { + return; + } + + $permission = FireflyConfig::get('permission_update_check', -1); + $lastCheckTime = FireflyConfig::get('last_update_check', time()); + $now = time(); + if ($now - $lastCheckTime->data < 604800) { + Log::debug('Checked for updates less than a week ago.'); + + return; + + } + // last check time was more than a week ago. + Log::debug('Have not checked for a new version in a week!'); + + // have actual permission? + if ($permission->data === -1) { + // never asked before. + session()->flash('info', strval(trans('firefly.check_for_updates_permission', ['link' => route('admin.update-check')]))); + + return; + } + + // actually check for update and inform the user. + + } + +} \ No newline at end of file diff --git a/app/Helpers/Attachments/AttachmentHelper.php b/app/Helpers/Attachments/AttachmentHelper.php index e71ea6fde3..1e6e0e6986 100644 --- a/app/Helpers/Attachments/AttachmentHelper.php +++ b/app/Helpers/Attachments/AttachmentHelper.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Attachments/AttachmentHelperInterface.php b/app/Helpers/Attachments/AttachmentHelperInterface.php index e292b29539..fc66698573 100644 --- a/app/Helpers/Attachments/AttachmentHelperInterface.php +++ b/app/Helpers/Attachments/AttachmentHelperInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Chart/MetaPieChart.php b/app/Helpers/Chart/MetaPieChart.php index 65d11c52d4..8fccc9d81f 100644 --- a/app/Helpers/Chart/MetaPieChart.php +++ b/app/Helpers/Chart/MetaPieChart.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Chart/MetaPieChartInterface.php b/app/Helpers/Chart/MetaPieChartInterface.php index ee094a2e83..c57fe15ed6 100644 --- a/app/Helpers/Chart/MetaPieChartInterface.php +++ b/app/Helpers/Chart/MetaPieChartInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Collection/Balance.php b/app/Helpers/Collection/Balance.php index b1ecf5c206..14e2f67f2b 100644 --- a/app/Helpers/Collection/Balance.php +++ b/app/Helpers/Collection/Balance.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Collection/BalanceEntry.php b/app/Helpers/Collection/BalanceEntry.php index 5037b3d421..31b7062698 100644 --- a/app/Helpers/Collection/BalanceEntry.php +++ b/app/Helpers/Collection/BalanceEntry.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Collection/BalanceHeader.php b/app/Helpers/Collection/BalanceHeader.php index 84d9844b89..3d5aa6476f 100644 --- a/app/Helpers/Collection/BalanceHeader.php +++ b/app/Helpers/Collection/BalanceHeader.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Collection/BalanceLine.php b/app/Helpers/Collection/BalanceLine.php index 2f8f8f729f..9bbacd7be6 100644 --- a/app/Helpers/Collection/BalanceLine.php +++ b/app/Helpers/Collection/BalanceLine.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -32,9 +32,18 @@ use Illuminate\Support\Collection; */ class BalanceLine { + /** + * + */ const ROLE_DEFAULTROLE = 1; - const ROLE_TAGROLE = 2; - const ROLE_DIFFROLE = 3; + /** + * + */ + const ROLE_TAGROLE = 2; + /** + * + */ + const ROLE_DIFFROLE = 3; /** @var Collection */ protected $balanceEntries; diff --git a/app/Helpers/Collection/Bill.php b/app/Helpers/Collection/Bill.php index 16a4730863..24b7174043 100644 --- a/app/Helpers/Collection/Bill.php +++ b/app/Helpers/Collection/Bill.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Collection/BillLine.php b/app/Helpers/Collection/BillLine.php index 849f14b8a2..180aefa3be 100644 --- a/app/Helpers/Collection/BillLine.php +++ b/app/Helpers/Collection/BillLine.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -41,40 +41,14 @@ class BillLine /** @var string */ protected $min; /** @var Carbon */ + private $endOfPayDate; + /** @var Carbon */ private $lastHitDate; /** @var Carbon */ private $payDate; - /** @var Carbon */ - private $endOfPayDate; /** @var int */ private $transactionJournalId; - /** - * @return Carbon - */ - public function getPayDate(): Carbon - { - return $this->payDate; - } - - /** - * @return Carbon - */ - public function getEndOfPayDate(): Carbon - { - return $this->endOfPayDate; - } - - /** - * @param Carbon $endOfPayDate - */ - public function setEndOfPayDate(Carbon $endOfPayDate): void - { - $this->endOfPayDate = $endOfPayDate; - } - - - /** * BillLine constructor. */ @@ -115,6 +89,22 @@ class BillLine $this->bill = $bill; } + /** + * @return Carbon + */ + public function getEndOfPayDate(): Carbon + { + return $this->endOfPayDate; + } + + /** + * @param Carbon $endOfPayDate + */ + public function setEndOfPayDate(Carbon $endOfPayDate): void + { + $this->endOfPayDate = $endOfPayDate; + } + /** * @return Carbon */ @@ -163,6 +153,22 @@ class BillLine $this->min = $min; } + /** + * @return Carbon + */ + public function getPayDate(): Carbon + { + return $this->payDate; + } + + /** + * @param Carbon $payDate + */ + public function setPayDate(Carbon $payDate): void + { + $this->payDate = $payDate; + } + /** * @return int */ @@ -202,12 +208,4 @@ class BillLine { $this->hit = $hit; } - - /** - * @param Carbon $payDate - */ - public function setPayDate(Carbon $payDate): void - { - $this->payDate = $payDate; - } } diff --git a/app/Helpers/Collection/Category.php b/app/Helpers/Collection/Category.php index 60bd436add..12ed91b8e8 100644 --- a/app/Helpers/Collection/Category.php +++ b/app/Helpers/Collection/Category.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Collector/JournalCollector.php b/app/Helpers/Collector/JournalCollector.php index 33621ad862..76b149f5d7 100644 --- a/app/Helpers/Collector/JournalCollector.php +++ b/app/Helpers/Collector/JournalCollector.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -497,6 +497,20 @@ class JournalCollector implements JournalCollectorInterface return $this; } + /** + * @param Collection $accounts + * + * @return JournalCollectorInterface + */ + public function setOpposingAccounts(Collection $accounts): JournalCollectorInterface + { + $this->withOpposingAccount(); + + $this->query->whereIn('opposing.account_id', $accounts->pluck('id')->toArray()); + + return $this; + } + /** * @param int $page * diff --git a/app/Helpers/Collector/JournalCollectorInterface.php b/app/Helpers/Collector/JournalCollectorInterface.php index 5ac5e90bed..ce0def29a7 100644 --- a/app/Helpers/Collector/JournalCollectorInterface.php +++ b/app/Helpers/Collector/JournalCollectorInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -160,6 +160,13 @@ interface JournalCollectorInterface */ public function setOffset(int $offset): JournalCollectorInterface; + /** + * @param Collection $accounts + * + * @return JournalCollectorInterface + */ + public function setOpposingAccounts(Collection $accounts): JournalCollectorInterface; + /** * @param int $page * @@ -196,6 +203,11 @@ interface JournalCollectorInterface */ public function setTypes(array $types): JournalCollectorInterface; + /** + * @param User $user + * + * @return mixed + */ public function setUser(User $user); /** diff --git a/app/Helpers/Filter/AmountFilter.php b/app/Helpers/Filter/AmountFilter.php index 970bbefa49..5183dbac82 100644 --- a/app/Helpers/Filter/AmountFilter.php +++ b/app/Helpers/Filter/AmountFilter.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -37,6 +37,11 @@ class AmountFilter implements FilterInterface /** @var int */ private $modifier = 0; + /** + * AmountFilter constructor. + * + * @param int $modifier + */ public function __construct(int $modifier) { $this->modifier = $modifier; diff --git a/app/Helpers/Filter/EmptyFilter.php b/app/Helpers/Filter/EmptyFilter.php index 7c8c16313c..60c03d9769 100644 --- a/app/Helpers/Filter/EmptyFilter.php +++ b/app/Helpers/Filter/EmptyFilter.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Filter/FilterInterface.php b/app/Helpers/Filter/FilterInterface.php index 229864ad8f..e1ed2ed163 100644 --- a/app/Helpers/Filter/FilterInterface.php +++ b/app/Helpers/Filter/FilterInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -24,6 +24,9 @@ namespace FireflyIII\Helpers\Filter; use Illuminate\Support\Collection; +/** + * Interface FilterInterface + */ interface FilterInterface { /** diff --git a/app/Helpers/Filter/InternalTransferFilter.php b/app/Helpers/Filter/InternalTransferFilter.php index 1113977ceb..589310d7db 100644 --- a/app/Helpers/Filter/InternalTransferFilter.php +++ b/app/Helpers/Filter/InternalTransferFilter.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Filter/NegativeAmountFilter.php b/app/Helpers/Filter/NegativeAmountFilter.php index 65e95f9fe5..2eb266a07c 100644 --- a/app/Helpers/Filter/NegativeAmountFilter.php +++ b/app/Helpers/Filter/NegativeAmountFilter.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Filter/OpposingAccountFilter.php b/app/Helpers/Filter/OpposingAccountFilter.php index 1539b86bde..890e4793dd 100644 --- a/app/Helpers/Filter/OpposingAccountFilter.php +++ b/app/Helpers/Filter/OpposingAccountFilter.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Filter/PositiveAmountFilter.php b/app/Helpers/Filter/PositiveAmountFilter.php index 1a6b5383d3..67d2f289d0 100644 --- a/app/Helpers/Filter/PositiveAmountFilter.php +++ b/app/Helpers/Filter/PositiveAmountFilter.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Filter/TransferFilter.php b/app/Helpers/Filter/TransferFilter.php index 4d3e6877ef..98efeb473c 100644 --- a/app/Helpers/Filter/TransferFilter.php +++ b/app/Helpers/Filter/TransferFilter.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/FiscalHelper.php b/app/Helpers/FiscalHelper.php index 4624f5aac2..19faa6d579 100644 --- a/app/Helpers/FiscalHelper.php +++ b/app/Helpers/FiscalHelper.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/FiscalHelperInterface.php b/app/Helpers/FiscalHelperInterface.php index c6a4764da0..c7e73d50c5 100644 --- a/app/Helpers/FiscalHelperInterface.php +++ b/app/Helpers/FiscalHelperInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Help/Help.php b/app/Helpers/Help/Help.php index 265a642d5e..fb5cc1f4c9 100644 --- a/app/Helpers/Help/Help.php +++ b/app/Helpers/Help/Help.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -34,6 +34,9 @@ use Route; */ class Help implements HelpInterface { + /** + * + */ const CACHEKEY = 'help_%s_%s'; /** @var string */ protected $userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36'; diff --git a/app/Helpers/Help/HelpInterface.php b/app/Helpers/Help/HelpInterface.php index 4768e3fd40..a74284a078 100644 --- a/app/Helpers/Help/HelpInterface.php +++ b/app/Helpers/Help/HelpInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Report/BalanceReportHelper.php b/app/Helpers/Report/BalanceReportHelper.php index 3222c1f1f5..f44dfc15a4 100644 --- a/app/Helpers/Report/BalanceReportHelper.php +++ b/app/Helpers/Report/BalanceReportHelper.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Report/BalanceReportHelperInterface.php b/app/Helpers/Report/BalanceReportHelperInterface.php index 66e7b23e89..820def7669 100644 --- a/app/Helpers/Report/BalanceReportHelperInterface.php +++ b/app/Helpers/Report/BalanceReportHelperInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Report/BudgetReportHelper.php b/app/Helpers/Report/BudgetReportHelper.php index 995932ce73..4ad44c2a2c 100644 --- a/app/Helpers/Report/BudgetReportHelper.php +++ b/app/Helpers/Report/BudgetReportHelper.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Report/BudgetReportHelperInterface.php b/app/Helpers/Report/BudgetReportHelperInterface.php index 7c4a7ccf2f..4b60e5e18f 100644 --- a/app/Helpers/Report/BudgetReportHelperInterface.php +++ b/app/Helpers/Report/BudgetReportHelperInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Report/PopupReport.php b/app/Helpers/Report/PopupReport.php index 65c9164d0c..c03f1482d1 100644 --- a/app/Helpers/Report/PopupReport.php +++ b/app/Helpers/Report/PopupReport.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Report/PopupReportInterface.php b/app/Helpers/Report/PopupReportInterface.php index 4b19f54661..69efef80e6 100644 --- a/app/Helpers/Report/PopupReportInterface.php +++ b/app/Helpers/Report/PopupReportInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index 6fa664df84..210e4683d4 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -79,12 +79,12 @@ class ReportHelper implements ReportHelperInterface /** @var Bill $bill */ foreach ($bills as $bill) { $expectedDates = $repository->getPayDatesInRange($bill, $start, $end); - foreach($expectedDates as $payDate) { + foreach ($expectedDates as $payDate) { $endOfPayPeriod = app('navigation')->endOfX($payDate, $bill->repeat_freq, null); - $collector = app(JournalCollectorInterface::class); + $collector = app(JournalCollectorInterface::class); $collector->setAccounts($accounts)->setRange($payDate, $endOfPayPeriod)->setBills($bills); - $journals = $collector->getJournals(); + $journals = $collector->getJournals(); $billLine = new BillLine; $billLine->setBill($bill); diff --git a/app/Helpers/Report/ReportHelperInterface.php b/app/Helpers/Report/ReportHelperInterface.php index dafd0105ae..2d182cb6d8 100644 --- a/app/Helpers/Report/ReportHelperInterface.php +++ b/app/Helpers/Report/ReportHelperInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Controllers/Account/ReconcileController.php b/app/Http/Controllers/Account/ReconcileController.php index b5573c83a4..9c810fc77a 100644 --- a/app/Http/Controllers/Account/ReconcileController.php +++ b/app/Http/Controllers/Account/ReconcileController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -37,14 +37,13 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use Illuminate\Http\Request; use Illuminate\Support\Collection; -use Navigation; use Preferences; use Response; use Session; -use View; /** * Class ReconcileController. + * * @SuppressWarnings(PHPMD.CouplingBetweenObjects) */ class ReconcileController extends Controller @@ -59,8 +58,8 @@ class ReconcileController extends Controller // translations: $this->middleware( function ($request, $next) { - View::share('mainTitleIcon', 'fa-credit-card'); - View::share('title', trans('firefly.accounts')); + app('view')->share('mainTitleIcon', 'fa-credit-card'); + app('view')->share('title', trans('firefly.accounts')); return $next($request); } @@ -74,7 +73,7 @@ class ReconcileController extends Controller */ public function edit(TransactionJournal $journal) { - if ($journal->transactionType->type !== TransactionType::RECONCILIATION) { + if (TransactionType::RECONCILIATION !== $journal->transactionType->type) { return redirect(route('transactions.edit', [$journal->id])); } // view related code @@ -90,8 +89,6 @@ class ReconcileController extends Controller ]; Session::flash('preFilled', $preFilled); - Session::flash('gaEventCategory', 'transactions'); - Session::flash('gaEventAction', 'edit-reconciliation'); // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('reconcile.edit.fromUpdate')) { @@ -103,7 +100,6 @@ class ReconcileController extends Controller 'accounts.reconcile.edit', compact('journal', 'subTitle') )->with('data', $preFilled); - } /** @@ -115,6 +111,7 @@ class ReconcileController extends Controller * @return \Illuminate\Http\JsonResponse * * @throws FireflyException + * @throws \Throwable */ public function overview(Request $request, Account $account, Carbon $start, Carbon $end) { @@ -149,9 +146,15 @@ class ReconcileController extends Controller } $difference = bcadd(bcadd(bcsub($startBalance, $endBalance), $clearedAmount), $amount); $diffCompare = bccomp($difference, '0'); - $return = [ + $return = [ 'post_uri' => $route, - 'html' => view('accounts.reconcile.overview', compact('account', 'start', 'diffCompare', 'difference', 'end', 'clearedIds', 'transactionIds', 'clearedAmount', 'startBalance', 'endBalance', 'amount', 'route', 'countCleared'))->render(), + 'html' => view( + 'accounts.reconcile.overview', compact( + 'account', 'start', 'diffCompare', 'difference', 'end', 'clearedIds', 'transactionIds', 'clearedAmount', + 'startBalance', 'endBalance', 'amount', + 'route', 'countCleared' + ) + )->render(), ]; return Response::json($return); @@ -163,6 +166,8 @@ class ReconcileController extends Controller * @param Carbon|null $end * * @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View + * + * @throws FireflyException */ public function reconcile(Account $account, Carbon $start = null, Carbon $end = null) { @@ -179,7 +184,7 @@ class ReconcileController extends Controller $currencyId = intval($account->getMeta('currency_id')); $currency = $currencyRepos->find($currencyId); if (0 === $currencyId) { - $currency = app('amount')->getDefaultCurrency(); + $currency = app('amount')->getDefaultCurrency(); // @codeCoverageIgnore } // no start or end: @@ -187,11 +192,11 @@ class ReconcileController extends Controller // get start and end if (null === $start && null === $end) { - $start = clone session('start', Navigation::startOfPeriod(new Carbon, $range)); - $end = clone session('end', Navigation::endOfPeriod(new Carbon, $range)); + $start = clone session('start', app('navigation')->startOfPeriod(new Carbon, $range)); + $end = clone session('end', app('navigation')->endOfPeriod(new Carbon, $range)); } if (null === $end) { - $end = Navigation::endOfPeriod($start, $range); + $end = app('navigation')->endOfPeriod($start, $range); } $startDate = clone $start; @@ -206,7 +211,12 @@ class ReconcileController extends Controller $overviewUri = route('accounts.reconcile.overview', [$account->id, '%start%', '%end%']); $indexUri = route('accounts.reconcile', [$account->id, '%start%', '%end%']); - return view('accounts.reconcile.index', compact('account', 'currency', 'subTitleIcon', 'start', 'end', 'subTitle', 'startBalance', 'endBalance', 'transactionsUri', 'overviewUri', 'indexUri')); + return view( + 'accounts.reconcile.index', compact( + 'account', 'currency', 'subTitleIcon', 'start', 'end', 'subTitle', 'startBalance', 'endBalance', 'transactionsUri', + 'overviewUri', 'indexUri' + ) + ); } /** @@ -217,16 +227,16 @@ class ReconcileController extends Controller */ public function show(JournalRepositoryInterface $repository, TransactionJournal $journal) { - if ($journal->transactionType->type !== TransactionType::RECONCILIATION) { + if (TransactionType::RECONCILIATION !== $journal->transactionType->type) { return redirect(route('transactions.show', [$journal->id])); } $subTitle = trans('firefly.reconciliation') . ' "' . $journal->description . '"'; // get main transaction: $transaction = $repository->getAssetTransaction($journal); + $account = $transaction->account; - - return view('accounts.reconcile.show', compact('journal', 'subTitle', 'transaction')); + return view('accounts.reconcile.show', compact('journal', 'subTitle', 'transaction', 'account')); } /** @@ -241,7 +251,7 @@ class ReconcileController extends Controller { /** @var JournalRepositoryInterface $repository */ $repository = app(JournalRepositoryInterface::class); - $transactions = $repository->getTransactionsById($request->get('transactions')); + $transactions = $repository->getTransactionsById($request->get('transactions') ?? []); /** @var Transaction $transaction */ foreach ($transactions as $transaction) { $repository->reconcile($transaction); // mark as reconciled. @@ -287,6 +297,9 @@ class ReconcileController extends Controller * @param Carbon $end * * @return mixed + * + * @throws \Throwable + * @throws FireflyException */ public function transactions(Account $account, Carbon $start, Carbon $end) { @@ -302,7 +315,7 @@ class ReconcileController extends Controller $currencyId = intval($account->getMeta('currency_id')); $currency = $currencyRepos->find($currencyId); if (0 === $currencyId) { - $currency = app('amount')->getDefaultCurrency(); + $currency = app('amount')->getDefaultCurrency(); // @codeCoverageIgnore } $startBalance = round(app('steam')->balance($account, $startDate), $currency->decimal_places); @@ -334,10 +347,10 @@ class ReconcileController extends Controller */ public function update(ReconciliationFormRequest $request, AccountRepositoryInterface $repository, TransactionJournal $journal) { - if ($journal->transactionType->type !== TransactionType::RECONCILIATION) { + if (TransactionType::RECONCILIATION !== $journal->transactionType->type) { return redirect(route('transactions.show', [$journal->id])); } - if (bccomp('0', $request->get('amount')) === 0) { + if (0 === bccomp('0', $request->get('amount'))) { Session::flash('error', trans('firefly.amount_cannot_be_zero')); return redirect(route('accounts.reconcile.edit', [$journal->id]))->withInput(); @@ -356,10 +369,8 @@ class ReconcileController extends Controller // redirect to previous URL. return redirect($this->getPreviousUri('reconcile.edit.uri')); - } - /** * @param Account $account * @@ -372,7 +383,7 @@ class ReconcileController extends Controller /** @var Transaction $transaction */ $transaction = $account->transactions()->first(); if (null === $transaction) { - throw new FireflyException('Expected a transaction. This account has none. BEEP, error.'); + throw new FireflyException(sprintf('Expected a transaction. Account #%d has none. BEEP, error.', $account->id)); // @codeCoverageIgnore } $journal = $transaction->transactionJournal; diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index e8dd4be714..421425a835 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -36,9 +36,9 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Http\Request; +use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; use Log; -use Navigation; use Preferences; use Steam; use View; @@ -60,8 +60,8 @@ class AccountController extends Controller // translations: $this->middleware( function ($request, $next) { - View::share('mainTitleIcon', 'fa-credit-card'); - View::share('title', trans('firefly.accounts')); + app('view')->share('mainTitleIcon', 'fa-credit-card'); + app('view')->share('title', trans('firefly.accounts')); return $next($request); } @@ -96,20 +96,17 @@ class AccountController extends Controller $this->rememberPreviousUri('accounts.create.uri'); } $request->session()->forget('accounts.create.fromStore'); - $request->session()->flash('gaEventCategory', 'accounts'); - $request->session()->flash('gaEventAction', 'create-' . $what); return view('accounts.create', compact('subTitleIcon', 'what', 'subTitle', 'currencySelectList', 'allCurrencies', 'roles')); } /** - * @param Request $request * @param AccountRepositoryInterface $repository * @param Account $account * * @return View */ - public function delete(Request $request, AccountRepositoryInterface $repository, Account $account) + public function delete(AccountRepositoryInterface $repository, Account $account) { $typeName = config('firefly.shortNamesByFullName.' . $account->accountType->type); $subTitle = trans('firefly.delete_' . $typeName . '_account', ['name' => $account->name]); @@ -118,8 +115,6 @@ class AccountController extends Controller // put previous url in session $this->rememberPreviousUri('accounts.delete.uri'); - $request->session()->flash('gaEventCategory', 'accounts'); - $request->session()->flash('gaEventAction', 'delete-' . $typeName); return view('accounts.delete', compact('account', 'subTitle', 'accountList')); } @@ -156,6 +151,10 @@ class AccountController extends Controller * @SuppressWarnings(PHPMD.ExcessiveMethodLength) * * @return View + * + * @throws FireflyException + * @throws FireflyException + * @throws FireflyException */ public function edit(Request $request, Account $account) { @@ -198,8 +197,6 @@ class AccountController extends Controller 'currency_id' => $currency->id, ]; $request->session()->flash('preFilled', $preFilled); - $request->session()->flash('gaEventCategory', 'accounts'); - $request->session()->flash('gaEventAction', 'edit-' . $what); return view( 'accounts.edit', @@ -218,18 +215,24 @@ class AccountController extends Controller } /** + * @param Request $request * @param AccountRepositoryInterface $repository * @param string $what * * @return View */ - public function index(AccountRepositoryInterface $repository, string $what) + public function index(Request $request, AccountRepositoryInterface $repository, string $what) { $what = $what ?? 'asset'; $subTitle = trans('firefly.' . $what . '_accounts'); $subTitleIcon = config('firefly.subIconsByIdentifier.' . $what); $types = config('firefly.accountTypesByIdentifier.' . $what); - $accounts = $repository->getAccountsByType($types); + $collection = $repository->getAccountsByType($types); + $total = $collection->count(); + $page = 0 === intval($request->get('page')) ? 1 : intval($request->get('page')); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); + $accounts = $collection->slice(($page - 1) * $pageSize, $pageSize); + unset($collection); /** @var Carbon $start */ $start = clone session('start', Carbon::now()->startOfMonth()); /** @var Carbon $end */ @@ -250,7 +253,11 @@ class AccountController extends Controller } ); - return view('accounts.index', compact('what', 'subTitleIcon', 'subTitle', 'accounts')); + // make paginator: + $accounts = new LengthAwarePaginator($accounts, $total, $pageSize, $page); + $accounts->setPath(route('accounts.index', [$what])); + + return view('accounts.index', compact('what', 'subTitleIcon', 'subTitle', 'page', 'accounts')); } /** @@ -265,6 +272,8 @@ class AccountController extends Controller * * @SuppressWarnings(PHPMD.CyclomaticComplexity) // long and complex but not that excessively so. * @SuppressWarnings(PHPMD.ExcessiveMethodLength) + * + * @throws FireflyException */ public function show(Request $request, JournalRepositoryInterface $repository, Account $account, string $moment = '') { @@ -276,7 +285,7 @@ class AccountController extends Controller $range = Preferences::get('viewRange', '1M')->data; $subTitleIcon = config('firefly.subIconsByIdentifier.' . $account->accountType->type); $page = intval($request->get('page')); - $pageSize = intval(Preferences::get('transactionPageSize', 50)->data); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); $chartUri = route('chart.account.single', [$account->id]); $start = null; $end = null; @@ -299,7 +308,7 @@ class AccountController extends Controller // prep for "specific date" view. if (strlen($moment) > 0 && 'all' !== $moment) { $start = new Carbon($moment); - $end = Navigation::endOfPeriod($start, $range); + $end = app('navigation')->endOfPeriod($start, $range); $fStart = $start->formatLocalized($this->monthAndDayFormat); $fEnd = $end->formatLocalized($this->monthAndDayFormat); $subTitle = trans('firefly.journals_in_period_for_account', ['name' => $account->name, 'start' => $fStart, 'end' => $fEnd]); @@ -309,8 +318,8 @@ class AccountController extends Controller // prep for current period view if (0 === strlen($moment)) { - $start = clone session('start', Navigation::startOfPeriod(new Carbon, $range)); - $end = clone session('end', Navigation::endOfPeriod(new Carbon, $range)); + $start = clone session('start', app('navigation')->startOfPeriod(new Carbon, $range)); + $end = clone session('end', app('navigation')->endOfPeriod(new Carbon, $range)); $fStart = $start->formatLocalized($this->monthAndDayFormat); $fEnd = $end->formatLocalized($this->monthAndDayFormat); $subTitle = trans('firefly.journals_in_period_for_account', ['name' => $account->name, 'start' => $fStart, 'end' => $fEnd]); @@ -423,8 +432,8 @@ class AccountController extends Controller $repository = app(AccountRepositoryInterface::class); $start = $repository->oldestJournalDate($account); $range = Preferences::get('viewRange', '1M')->data; - $start = Navigation::startOfPeriod($start, $range); - $end = Navigation::endOfX(new Carbon, $range, null); + $start = app('navigation')->startOfPeriod($start, $range); + $end = app('navigation')->endOfX(new Carbon, $range, null); $entries = new Collection; $count = 0; // properties for cache @@ -440,8 +449,8 @@ class AccountController extends Controller Log::debug('Going to get period expenses and incomes.'); while ($end >= $start && $count < 90) { - $end = Navigation::startOfPeriod($end, $range); - $currentEnd = Navigation::endOfPeriod($end, $range); + $end = app('navigation')->startOfPeriod($end, $range); + $currentEnd = app('navigation')->endOfPeriod($end, $range); // try a collector for income: /** @var JournalCollectorInterface $collector */ @@ -455,7 +464,7 @@ class AccountController extends Controller $collector->setAccounts(new Collection([$account]))->setRange($end, $currentEnd)->setTypes([TransactionType::WITHDRAWAL])->withOpposingAccount(); $spent = strval($collector->getJournals()->sum('transaction_amount')); $dateStr = $end->format('Y-m-d'); - $dateName = Navigation::periodShow($end, $range); + $dateName = app('navigation')->periodShow($end, $range); $entries->push( [ 'string' => $dateStr, @@ -464,7 +473,7 @@ class AccountController extends Controller 'earned' => $earned, 'date' => clone $end,] ); - $end = Navigation::subtractPeriod($end, $range, 1); + $end = app('navigation')->subtractPeriod($end, $range, 1); ++$count; } $cache->store($entries); diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php index fa4b3ab1d5..8296d41c43 100644 --- a/app/Http/Controllers/Admin/ConfigurationController.php +++ b/app/Http/Controllers/Admin/ConfigurationController.php @@ -16,13 +16,15 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Admin; use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Http\Middleware\IsDemoUser; +use FireflyIII\Http\Middleware\IsSandStormUser; use FireflyIII\Http\Requests\ConfigurationRequest; use FireflyIII\Support\Facades\FireflyConfig; use Preferences; @@ -44,12 +46,14 @@ class ConfigurationController extends Controller $this->middleware( function ($request, $next) { - View::share('title', strval(trans('firefly.administration'))); - View::share('mainTitleIcon', 'fa-hand-spock-o'); + app('view')->share('title', strval(trans('firefly.administration'))); + app('view')->share('mainTitleIcon', 'fa-hand-spock-o'); return $next($request); } ); + $this->middleware(IsDemoUser::class)->except(['index']); + $this->middleware(IsSandStormUser::class); } /** diff --git a/app/Http/Controllers/Admin/HomeController.php b/app/Http/Controllers/Admin/HomeController.php index 4fa7948909..fd4832b7fa 100644 --- a/app/Http/Controllers/Admin/HomeController.php +++ b/app/Http/Controllers/Admin/HomeController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -24,6 +24,8 @@ namespace FireflyIII\Http\Controllers\Admin; use FireflyIII\Events\AdminRequestedTestMessage; use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Http\Middleware\IsDemoUser; +use FireflyIII\Http\Middleware\IsSandStormUser; use Illuminate\Http\Request; use Log; use Session; @@ -33,6 +35,16 @@ use Session; */ class HomeController extends Controller { + /** + * ConfigurationController constructor. + */ + public function __construct() + { + parent::__construct(); + $this->middleware(IsDemoUser::class)->except(['index']); + $this->middleware(IsSandStormUser::class)->except(['index']); + } + /** * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ diff --git a/app/Http/Controllers/Admin/LinkController.php b/app/Http/Controllers/Admin/LinkController.php index 38bf575b7d..0955f00521 100644 --- a/app/Http/Controllers/Admin/LinkController.php +++ b/app/Http/Controllers/Admin/LinkController.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Admin; use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Http\Middleware\IsDemoUser; use FireflyIII\Http\Requests\LinkTypeFormRequest; use FireflyIII\Models\LinkType; use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface; @@ -44,12 +45,13 @@ class LinkController extends Controller $this->middleware( function ($request, $next) { - View::share('title', strval(trans('firefly.administration'))); - View::share('mainTitleIcon', 'fa-hand-spock-o'); + app('view')->share('title', strval(trans('firefly.administration'))); + app('view')->share('mainTitleIcon', 'fa-hand-spock-o'); return $next($request); } ); + $this->middleware(IsDemoUser::class)->except(['index', 'show']); } /** @@ -204,6 +206,13 @@ class LinkController extends Controller return redirect($this->getPreviousUri('link_types.create.uri')); } + /** + * @param LinkTypeFormRequest $request + * @param LinkTypeRepositoryInterface $repository + * @param LinkType $linkType + * + * @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector + */ public function update(LinkTypeFormRequest $request, LinkTypeRepositoryInterface $repository, LinkType $linkType) { if (!$linkType->editable) { diff --git a/app/Http/Controllers/Admin/UpdateController.php b/app/Http/Controllers/Admin/UpdateController.php new file mode 100644 index 0000000000..f8208d659f --- /dev/null +++ b/app/Http/Controllers/Admin/UpdateController.php @@ -0,0 +1,142 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Http\Controllers\Admin; + +use FireflyConfig; +use FireflyIII\Exceptions\FireflyException; +use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Http\Middleware\IsDemoUser; +use FireflyIII\Http\Middleware\IsSandStormUser; +use FireflyIII\Services\Github\Object\Release; +use FireflyIII\Services\Github\Request\UpdateRequest; +use Illuminate\Http\Request; +use Log; +use Response; +use Session; + +/** + * Class HomeController. + */ +class UpdateController extends Controller +{ + + + /** + * ConfigurationController constructor. + */ + public function __construct() + { + parent::__construct(); + $this->middleware( + function ($request, $next) { + app('view')->share('title', strval(trans('firefly.administration'))); + app('view')->share('mainTitleIcon', 'fa-hand-spock-o'); + + return $next($request); + } + ); + $this->middleware(IsDemoUser::class)->except(['index']); + $this->middleware(IsSandStormUser::class)->except(['index']); + } + + /** + * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View + * @throws \Illuminate\Container\EntryNotFoundException + */ + public function index() + { + $subTitle = trans('firefly.update_check_title'); + $subTitleIcon = 'fa-star'; + $permission = app('fireflyconfig')->get('permission_update_check', -1); + $selected = $permission->data; + $options = [ + '-1' => trans('firefly.updates_ask_me_later'), + '0' => trans('firefly.updates_do_not_check'), + '1' => trans('firefly.updates_enable_check'), + ]; + + return view('admin.update.index', compact('subTitle', 'subTitleIcon', 'selected', 'options')); + } + + /** + * @param Request $request + * + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector + */ + public function post(Request $request) + { + $checkForUpdates = intval($request->get('check_for_updates')); + FireflyConfig::set('permission_update_check', $checkForUpdates); + FireflyConfig::set('last_update_check', time()); + Session::flash('success', strval(trans('firefly.configuration_updated'))); + + return redirect(route('admin.update-check')); + } + + /** + * Does a manual update check. + */ + public function updateCheck() + { + $current = config('firefly.version'); + /** @var UpdateRequest $request */ + $request = app(UpdateRequest::class); + $check = -2; + $first = new Release(['id' => '0', 'title' => '0', 'updated' => '2017-01-01', 'content' => '']); + $string = ''; + try { + $request->call(); + $releases = $request->getReleases(); + // first entry should be the latest entry: + /** @var Release $first */ + $first = reset($releases); + $check = version_compare($current, $first->getTitle()); + FireflyConfig::set('last_update_check', time()); + } catch (FireflyException $e) { + Log::error(sprintf('Could not check for updates: %s', $e->getMessage())); + } + if ($check === -2) { + $string = strval(trans('firefly.update_check_error')); + } + + if ($check === -1) { + // there is a new FF version! + $string = strval( + trans( + 'firefly.update_new_version_alert', + ['your_version' => $current, 'new_version' => $first->getTitle(), 'date' => $first->getUpdated()->formatLocalized($this->monthAndDayFormat)] + ) + ); + } + if ($check === 0) { + // you are running the current version! + $string = strval(trans('firefly.update_current_version_alert', ['version' => $current])); + } + if ($check === 1) { + // you are running a newer version! + $string = strval(trans('firefly.update_newer_version_alert', ['your_version' => $current, 'new_version' => $first->getTitle()])); + } + + return Response::json(['result' => $string]); + } +} diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index 8670e95e90..043761a3fd 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -16,13 +16,15 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Admin; use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Http\Middleware\IsDemoUser; +use FireflyIII\Http\Middleware\IsSandStormUser; use FireflyIII\Http\Requests\UserFormRequest; use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\User; @@ -45,12 +47,14 @@ class UserController extends Controller $this->middleware( function ($request, $next) { - View::share('title', strval(trans('firefly.administration'))); - View::share('mainTitleIcon', 'fa-hand-spock-o'); + app('view')->share('title', strval(trans('firefly.administration'))); + app('view')->share('mainTitleIcon', 'fa-hand-spock-o'); return $next($request); } ); + $this->middleware(IsDemoUser::class)->except(['index', 'show']); + $this->middleware(IsSandStormUser::class); } /** diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php index b2ef0b7875..8937027dfd 100644 --- a/app/Http/Controllers/AttachmentController.php +++ b/app/Http/Controllers/AttachmentController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -50,8 +50,8 @@ class AttachmentController extends Controller // translations: $this->middleware( function ($request, $next) { - View::share('mainTitleIcon', 'fa-paperclip'); - View::share('title', trans('firefly.attachments')); + app('view')->share('mainTitleIcon', 'fa-paperclip'); + app('view')->share('title', trans('firefly.attachments')); return $next($request); } @@ -59,19 +59,16 @@ class AttachmentController extends Controller } /** - * @param Request $request * @param Attachment $attachment * * @return View */ - public function delete(Request $request, Attachment $attachment) + public function delete(Attachment $attachment) { $subTitle = trans('firefly.delete_attachment', ['name' => $attachment->filename]); // put previous url in session $this->rememberPreviousUri('attachments.delete.uri'); - $request->session()->flash('gaEventCategory', 'attachments'); - $request->session()->flash('gaEventAction', 'delete-attachment'); return view('attachments.delete', compact('attachment', 'subTitle')); } @@ -151,6 +148,8 @@ class AttachmentController extends Controller * @param Attachment $attachment * * @return \Illuminate\Http\Response + * + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function preview(Attachment $attachment) { diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index e969737770..bda724008f 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -16,24 +16,18 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * ForgotPasswordController.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Http\Controllers\Auth; use FireflyIII\Http\Controllers\Controller; use Illuminate\Foundation\Auth\SendsPasswordResetEmails; +/** + * Class ForgotPasswordController + */ class ForgotPasswordController extends Controller { /* diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index 829915e5ef..e6a4bfcc9b 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -16,19 +16,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * LoginController.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Http\Controllers\Auth; use FireflyConfig; @@ -40,19 +31,16 @@ use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Http\Request; use Schema; +/** + * @codeCoverageIgnore + * Class LoginController + * + * This controller handles authenticating users for the application and + * redirecting them to your home screen. The controller uses a trait + * to conveniently provide its functionality to your applications. + */ class LoginController extends Controller { - /* - |-------------------------------------------------------------------------- - | Login Controller - |-------------------------------------------------------------------------- - | - | This controller handles authenticating users for the application and - | redirecting them to your home screen. The controller uses a trait - | to conveniently provide its functionality to your applications. - | - */ - use AuthenticatesUsers; /** @@ -76,7 +64,9 @@ class LoginController extends Controller * * @param Request $request * - * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response|void + * @return \Illuminate\Http\Response|\Symfony\Component\HttpFoundation\Response + * + * @throws \Illuminate\Validation\ValidationException */ public function login(Request $request) { @@ -112,7 +102,7 @@ class LoginController extends Controller * @param Request $request * @param CookieJar $cookieJar * - * @return $this + * @return $this|\Illuminate\Http\RedirectResponse */ public function logout(Request $request, CookieJar $cookieJar) { @@ -127,7 +117,7 @@ class LoginController extends Controller /** * Show the application's login form. * - * @param Request $request + * @param Request $request * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index 7125a0de68..f2ebccb86e 100644 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -16,19 +16,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * RegisterController.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Http\Controllers\Auth; use FireflyConfig; @@ -40,19 +31,16 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Validator; use Session; +/** + * @codeCoverageIgnore + * Class RegisterController + * + * This controller handles the registration of new users as well as their + * validation and creation. By default this controller uses a trait to + * provide this functionality without requiring any additional code. + */ class RegisterController extends Controller { - /* - |-------------------------------------------------------------------------- - | Register Controller - |-------------------------------------------------------------------------- - | - | This controller handles the registration of new users as well as their - | validation and creation. By default this controller uses a trait to - | provide this functionality without requiring any additional code. - | - */ - use RegistersUsers; /** diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index 9009af2485..d07102819d 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -16,37 +16,25 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * ResetPasswordController.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Http\Controllers\Auth; use FireflyIII\Http\Controllers\Controller; use Illuminate\Foundation\Auth\ResetsPasswords; +/** + * @codeCoverageIgnore + * Class ResetPasswordController + * + * This controller is responsible for handling password reset requests + * and uses a simple trait to include this behavior. You're free to + * explore this trait and override any methods you wish to tweak. + */ class ResetPasswordController extends Controller { - /* - |-------------------------------------------------------------------------- - | Password Reset Controller - |-------------------------------------------------------------------------- - | - | This controller is responsible for handling password reset requests - | and uses a simple trait to include this behavior. You're free to - | explore this trait and override any methods you wish to tweak. - | - */ - use ResetsPasswords; /** diff --git a/app/Http/Controllers/Auth/TwoFactorController.php b/app/Http/Controllers/Auth/TwoFactorController.php index a4cd2711de..d6b984b756 100644 --- a/app/Http/Controllers/Auth/TwoFactorController.php +++ b/app/Http/Controllers/Auth/TwoFactorController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -69,8 +69,6 @@ class TwoFactorController extends Controller /** * @return mixed - * - * @throws FireflyException */ public function lostTwoFactor() { diff --git a/app/Http/Controllers/BillController.php b/app/Http/Controllers/BillController.php index 7aa321d9a8..391749489a 100644 --- a/app/Http/Controllers/BillController.php +++ b/app/Http/Controllers/BillController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -31,6 +31,7 @@ use FireflyIII\Models\Note; use FireflyIII\Models\TransactionJournal; use FireflyIII\Repositories\Bill\BillRepositoryInterface; use Illuminate\Http\Request; +use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; use Preferences; use URL; @@ -58,8 +59,8 @@ class BillController extends Controller $this->middleware( function ($request, $next) { - View::share('title', trans('firefly.bills')); - View::share('mainTitleIcon', 'fa-calendar-o'); + app('view')->share('title', trans('firefly.bills')); + app('view')->share('mainTitleIcon', 'fa-calendar-o'); $this->attachments = app(AttachmentHelperInterface::class); return $next($request); @@ -85,24 +86,19 @@ class BillController extends Controller $this->rememberPreviousUri('bills.create.uri'); } $request->session()->forget('bills.create.fromStore'); - $request->session()->flash('gaEventCategory', 'bills'); - $request->session()->flash('gaEventAction', 'create'); return view('bills.create', compact('periods', 'subTitle')); } /** - * @param Request $request - * @param Bill $bill + * @param Bill $bill * * @return View */ - public function delete(Request $request, Bill $bill) + public function delete(Bill $bill) { // put previous url in session $this->rememberPreviousUri('bills.delete.uri'); - $request->session()->flash('gaEventCategory', 'bills'); - $request->session()->flash('gaEventAction', 'delete'); $subTitle = trans('firefly.delete_bill', ['name' => $bill->name]); return view('bills.delete', compact('bill', 'subTitle')); @@ -162,8 +158,6 @@ class BillController extends Controller $request->session()->flash('preFilled', $preFilled); $request->session()->forget('bills.edit.fromUpdate'); - $request->session()->flash('gaEventCategory', 'bills'); - $request->session()->flash('gaEventAction', 'edit'); return view('bills.edit', compact('subTitle', 'periods', 'bill')); } @@ -173,15 +167,19 @@ class BillController extends Controller * * @return View */ - public function index(BillRepositoryInterface $repository) + public function index(Request $request, BillRepositoryInterface $repository) { /** @var Carbon $start */ $start = session('start'); /** @var Carbon $end */ - $end = session('end'); + $end = session('end'); + $page = 0 === intval($request->get('page')) ? 1 : intval($request->get('page')); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); + $collection = $repository->getBills(); + $total = $collection->count(); + $collection = $collection->slice(($page - 1) * $pageSize, $pageSize); - $bills = $repository->getBills(); - $bills->each( + $collection->each( function (Bill $bill) use ($repository, $start, $end) { // paid in this period? $bill->paidDates = $repository->getPaidDatesInRange($bill, $start, $end); @@ -194,6 +192,9 @@ class BillController extends Controller $bill->nextExpectedMatch = $repository->nextExpectedMatch($bill, $lastPaidDate); } ); + // paginate bills + $bills = new LengthAwarePaginator($collection, $total, $pageSize, $page); + $bills->setPath(route('bills.index')); return view('bills.index', compact('bills')); } @@ -235,12 +236,12 @@ class BillController extends Controller public function show(Request $request, BillRepositoryInterface $repository, Bill $bill) { /** @var Carbon $date */ - $date = session('start'); + $date = session('start'); /** @var Carbon $end */ $end = session('end'); $year = $date->year; $page = intval($request->get('page')); - $pageSize = intval(Preferences::get('transactionPageSize', 50)->data); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); $yearAverage = $repository->getYearAverage($bill, $date); $overallAverage = $repository->getOverallAverage($bill); @@ -252,7 +253,6 @@ class BillController extends Controller $transactions = $collector->getPaginatedJournals(); $transactions->setPath(route('bills.show', [$bill->id])); - $bill->paidDates = $repository->getPaidDatesInRange($bill, $date, $end); $bill->payDates = $repository->getPayDatesInRange($bill, $date, $end); $lastPaidDate = $this->lastPaidDate($repository->getPaidDatesInRange($bill, $date, $end), $date); @@ -280,14 +280,13 @@ class BillController extends Controller $request->session()->flash('success', strval(trans('firefly.stored_new_bill', ['name' => $bill->name]))); Preferences::mark(); - /** @var array $files */ $files = $request->hasFile('attachments') ? $request->file('attachments') : null; $this->attachments->saveAttachmentsForModel($bill, $files); // flash messages if (count($this->attachments->getMessages()->get('attachments')) > 0) { - $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); + $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); // @codeCoverageIgnore } if (1 === intval($request->get('create_another'))) { @@ -323,7 +322,7 @@ class BillController extends Controller // flash messages if (count($this->attachments->getMessages()->get('attachments')) > 0) { - $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); + $request->session()->flash('info', $this->attachments->getMessages()->get('attachments')); // @codeCoverageIgnore } if (1 === intval($request->get('return_to_edit'))) { @@ -347,8 +346,8 @@ class BillController extends Controller */ private function lastPaidDate(Collection $dates, Carbon $default): Carbon { - if ($dates->count() === 0) { - return $default; + if (0 === $dates->count()) { + return $default; // @codeCoverageIgnore } $latest = $dates->first(); /** @var Carbon $date */ @@ -359,6 +358,5 @@ class BillController extends Controller } return $latest; - } } diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.php index 0350973a73..cf5a41bc6f 100644 --- a/app/Http/Controllers/BudgetController.php +++ b/app/Http/Controllers/BudgetController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -35,9 +35,9 @@ use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Http\Request; +use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; use Log; -use Navigation; use Preferences; use Response; use View; @@ -64,8 +64,8 @@ class BudgetController extends Controller $this->middleware( function ($request, $next) { - View::share('title', trans('firefly.budgets')); - View::share('mainTitleIcon', 'fa-tasks'); + app('view')->share('title', trans('firefly.budgets')); + app('view')->share('mainTitleIcon', 'fa-tasks'); $this->repository = app(BudgetRepositoryInterface::class); return $next($request); @@ -74,8 +74,9 @@ class BudgetController extends Controller } /** - * @param Request $request - * @param Budget $budget + * @param Request $request + * @param BudgetRepositoryInterface $repository + * @param Budget $budget * * @return \Illuminate\Http\JsonResponse */ @@ -85,7 +86,7 @@ class BudgetController extends Controller $start = Carbon::createFromFormat('Y-m-d', $request->get('start')); $end = Carbon::createFromFormat('Y-m-d', $request->get('end')); $budgetLimit = $this->repository->updateLimitAmount($budget, $start, $end, $amount); - if (bccomp($amount,'0') === 0) { + if (0 === bccomp($amount, '0')) { $budgetLimit = null; } @@ -111,27 +112,22 @@ class BudgetController extends Controller $this->rememberPreviousUri('budgets.create.uri'); } $request->session()->forget('budgets.create.fromStore'); - $request->session()->flash('gaEventCategory', 'budgets'); - $request->session()->flash('gaEventAction', 'create'); $subTitle = (string)trans('firefly.create_new_budget'); return view('budgets.create', compact('subTitle')); } /** - * @param Request $request - * @param Budget $budget + * @param Budget $budget * * @return View */ - public function delete(Request $request, Budget $budget) + public function delete(Budget $budget) { $subTitle = trans('firefly.delete_budget', ['name' => $budget->name]); // put previous url in session $this->rememberPreviousUri('budgets.delete.uri'); - $request->session()->flash('gaEventCategory', 'budgets'); - $request->session()->flash('gaEventAction', 'delete'); return view('budgets.delete', compact('budget', 'subTitle')); } @@ -167,8 +163,6 @@ class BudgetController extends Controller $this->rememberPreviousUri('budgets.edit.uri'); } $request->session()->forget('budgets.edit.fromUpdate'); - $request->session()->flash('gaEventCategory', 'budgets'); - $request->session()->flash('gaEventAction', 'edit'); return view('budgets.edit', compact('budget', 'subTitle')); } @@ -181,17 +175,19 @@ class BudgetController extends Controller * @SuppressWarnings(PHPMD.CyclomaticComplexity) complex because of while loop * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ - public function index(string $moment = null) + public function index(Request $request, string $moment = null) { - $range = Preferences::get('viewRange', '1M')->data; - $start = session('start', new Carbon); - $end = session('end', new Carbon); + $range = Preferences::get('viewRange', '1M')->data; + $start = session('start', new Carbon); + $end = session('end', new Carbon); + $page = 0 === intval($request->get('page')) ? 1 : intval($request->get('page')); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); // make date if present: if (null !== $moment || 0 !== strlen(strval($moment))) { try { $start = new Carbon($moment); - $end = Navigation::endOfPeriod($start, $range); + $end = app('navigation')->endOfPeriod($start, $range); } catch (Exception $e) { // start and end are already defined. } @@ -200,9 +196,11 @@ class BudgetController extends Controller $next->addDay(); $prev = clone $start; $prev->subDay(); - $prev = Navigation::startOfPeriod($prev, $range); + $prev = app('navigation')->startOfPeriod($prev, $range); $this->repository->cleanupBudgets(); $budgets = $this->repository->getActiveBudgets(); + $total = $budgets->count(); + $budgets = $budgets->slice(($page - 1) * $pageSize, $pageSize); $inactive = $this->repository->getInactiveBudgets(); $periodStart = $start->formatLocalized($this->monthAndDayFormat); $periodEnd = $end->formatLocalized($this->monthAndDayFormat); @@ -212,15 +210,19 @@ class BudgetController extends Controller $spent = array_sum(array_column($budgetInformation, 'spent')); $budgeted = array_sum(array_column($budgetInformation, 'budgeted')); + // paginate budgets + $budgets = new LengthAwarePaginator($budgets, $total, $pageSize, $page); + $budgets->setPath(route('budgets.index')); + // select thing for last 12 periods: $previousLoop = []; $previousDate = clone $start; $count = 0; while ($count < 12) { $previousDate->subDay(); - $previousDate = Navigation::startOfPeriod($previousDate, $range); + $previousDate = app('navigation')->startOfPeriod($previousDate, $range); $format = $previousDate->format('Y-m-d'); - $previousLoop[$format] = Navigation::periodShow($previousDate, $range); + $previousLoop[$format] = app('navigation')->periodShow($previousDate, $range); ++$count; } @@ -232,16 +234,16 @@ class BudgetController extends Controller while ($count < 12) { $format = $nextDate->format('Y-m-d'); - $nextLoop[$format] = Navigation::periodShow($nextDate, $range); - $nextDate = Navigation::endOfPeriod($nextDate, $range); + $nextLoop[$format] = app('navigation')->periodShow($nextDate, $range); + $nextDate = app('navigation')->endOfPeriod($nextDate, $range); ++$count; $nextDate->addDay(); } // display info - $currentMonth = Navigation::periodShow($start, $range); - $nextText = Navigation::periodShow($next, $range); - $prevText = Navigation::periodShow($prev, $range); + $currentMonth = app('navigation')->periodShow($start, $range); + $nextText = app('navigation')->periodShow($next, $range); + $prevText = app('navigation')->periodShow($prev, $range); return view( 'budgets.index', @@ -254,6 +256,7 @@ class BudgetController extends Controller 'prevText', 'periodStart', 'periodEnd', + 'page', 'budgetInformation', 'inactive', 'budgets', @@ -282,10 +285,15 @@ class BudgetController extends Controller $cache->addProperty($end); $cache->addProperty('info-income'); + Log::debug(sprintf('infoIncome start is %s', $start->format('Y-m-d'))); + Log::debug(sprintf('infoIncome end is %s', $end->format('Y-m-d'))); + if ($cache->has()) { - $result = $cache->get(); // @codeCoverageIgnore + // @codeCoverageIgnoreStart + $result = $cache->get(); return view('budgets.info', compact('result', 'begin', 'currentEnd')); + // @codeCoverageIgnoreEnd } $result = [ 'available' => '0', @@ -294,18 +302,27 @@ class BudgetController extends Controller ]; $currency = app('amount')->getDefaultCurrency(); $range = Preferences::get('viewRange', '1M')->data; - $begin = Navigation::subtractPeriod($start, $range, 3); + $begin = app('navigation')->subtractPeriod($start, $range, 3); + + Log::debug(sprintf('Range is %s', $range)); + Log::debug(sprintf('infoIncome begin is %s', $begin->format('Y-m-d'))); // get average amount available. $total = '0'; $count = 0; $currentStart = clone $begin; while ($currentStart < $start) { - $currentEnd = Navigation::endOfPeriod($currentStart, $range); + Log::debug(sprintf('Loop: currentStart is %s', $currentStart->format('Y-m-d'))); + $currentEnd = app('navigation')->endOfPeriod($currentStart, $range); $total = bcadd($total, $this->repository->getAvailableBudget($currency, $currentStart, $currentEnd)); - $currentStart = Navigation::addPeriod($currentStart, $range, 0); + $currentStart = app('navigation')->addPeriod($currentStart, $range, 0); ++$count; } + Log::debug('Loop end'); + + if (0 === $count) { + $count = 1; + } $result['available'] = bcdiv($total, strval($count)); // amount earned in this period: @@ -360,7 +377,7 @@ class BudgetController extends Controller // prep for "specific date" view. if (strlen($moment) > 0 && 'all' !== $moment) { $start = new Carbon($moment); - $end = Navigation::endOfPeriod($start, $range); + $end = app('navigation')->endOfPeriod($start, $range); $subTitle = trans( 'firefly.without_budget_between', ['start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat)] @@ -370,8 +387,8 @@ class BudgetController extends Controller // prep for current period if (0 === strlen($moment)) { - $start = clone session('start', Navigation::startOfPeriod(new Carbon, $range)); - $end = clone session('end', Navigation::endOfPeriod(new Carbon, $range)); + $start = clone session('start', app('navigation')->startOfPeriod(new Carbon, $range)); + $end = clone session('end', app('navigation')->endOfPeriod(new Carbon, $range)); $periods = $this->getPeriodOverview(); $subTitle = trans( 'firefly.without_budget_between', @@ -380,7 +397,7 @@ class BudgetController extends Controller } $page = intval($request->get('page')); - $pageSize = intval(Preferences::get('transactionPageSize', 50)->data); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); /** @var JournalCollectorInterface $collector */ $collector = app(JournalCollectorInterface::class); @@ -422,7 +439,7 @@ class BudgetController extends Controller $start = session('first', Carbon::create()->startOfYear()); $end = new Carbon; $page = intval($request->get('page')); - $pageSize = intval(Preferences::get('transactionPageSize', 50)->data); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); $limits = $this->getLimits($budget, $start, $end); $repetition = null; // collector: @@ -453,7 +470,7 @@ class BudgetController extends Controller } $page = intval($request->get('page')); - $pageSize = intval(Preferences::get('transactionPageSize', 50)->data); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); $subTitle = trans( 'firefly.budget_in_period', [ @@ -583,8 +600,8 @@ class BudgetController extends Controller $first = $repository->first(); $start = $first->date ?? new Carbon; $range = Preferences::get('viewRange', '1M')->data; - $start = Navigation::startOfPeriod($start, $range); - $end = Navigation::endOfX(new Carbon, $range, null); + $start = app('navigation')->startOfPeriod($start, $range); + $end = app('navigation')->endOfX(new Carbon, $range, null); $entries = new Collection; $cache = new CacheProperties; $cache->addProperty($start); @@ -597,8 +614,8 @@ class BudgetController extends Controller Log::debug('Going to get period expenses and incomes.'); while ($end >= $start) { - $end = Navigation::startOfPeriod($end, $range); - $currentEnd = Navigation::endOfPeriod($end, $range); + $end = app('navigation')->startOfPeriod($end, $range); + $currentEnd = app('navigation')->endOfPeriod($end, $range); /** @var JournalCollectorInterface $collector */ $collector = app(JournalCollectorInterface::class); $collector->setAllAssetAccounts()->setRange($end, $currentEnd)->withoutBudget()->withOpposingAccount()->setTypes([TransactionType::WITHDRAWAL]); @@ -606,9 +623,9 @@ class BudgetController extends Controller $sum = strval($set->sum('transaction_amount') ?? '0'); $journals = $set->count(); $dateStr = $end->format('Y-m-d'); - $dateName = Navigation::periodShow($end, $range); + $dateName = app('navigation')->periodShow($end, $range); $entries->push(['string' => $dateStr, 'name' => $dateName, 'count' => $journals, 'sum' => $sum, 'date' => clone $end]); - $end = Navigation::subtractPeriod($end, $range, 1); + $end = app('navigation')->subtractPeriod($end, $range, 1); } $cache->store($entries); diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php index 1ea9509027..0e3013f88a 100644 --- a/app/Http/Controllers/CategoryController.php +++ b/app/Http/Controllers/CategoryController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -34,9 +34,9 @@ use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Http\Request; +use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Support\Collection; use Log; -use Navigation; use Preferences; use Steam; use View; @@ -55,8 +55,8 @@ class CategoryController extends Controller $this->middleware( function ($request, $next) { - View::share('title', trans('firefly.categories')); - View::share('mainTitleIcon', 'fa-bar-chart'); + app('view')->share('title', trans('firefly.categories')); + app('view')->share('mainTitleIcon', 'fa-bar-chart'); return $next($request); } @@ -74,27 +74,22 @@ class CategoryController extends Controller $this->rememberPreviousUri('categories.create.uri'); } $request->session()->forget('categories.create.fromStore'); - $request->session()->flash('gaEventCategory', 'categories'); - $request->session()->flash('gaEventAction', 'create'); $subTitle = trans('firefly.create_new_category'); return view('categories.create', compact('subTitle')); } /** - * @param Request $request * @param Category $category * * @return View */ - public function delete(Request $request, Category $category) + public function delete(Category $category) { $subTitle = trans('firefly.delete_category', ['name' => $category->name]); // put previous url in session $this->rememberPreviousUri('categories.delete.uri'); - $request->session()->flash('gaEventCategory', 'categories'); - $request->session()->flash('gaEventAction', 'delete'); return view('categories.delete', compact('category', 'subTitle')); } @@ -132,8 +127,6 @@ class CategoryController extends Controller $this->rememberPreviousUri('categories.edit.uri'); } $request->session()->forget('categories.edit.fromUpdate'); - $request->session()->flash('gaEventCategory', 'categories'); - $request->session()->flash('gaEventAction', 'edit'); return view('categories.edit', compact('category', 'subTitle')); } @@ -143,16 +136,24 @@ class CategoryController extends Controller * * @return View */ - public function index(CategoryRepositoryInterface $repository) + public function index(Request $request, CategoryRepositoryInterface $repository) { - $categories = $repository->getCategories(); + $page = 0 === intval($request->get('page')) ? 1 : intval($request->get('page')); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); + $collection = $repository->getCategories(); + $total = $collection->count(); + $collection = $collection->slice(($page - 1) * $pageSize, $pageSize); - $categories->each( + $collection->each( function (Category $category) use ($repository) { $category->lastActivity = $repository->lastUseDate($category, new Collection); } ); + // paginate categories + $categories = new LengthAwarePaginator($collection, $total, $pageSize, $page); + $categories->setPath(route('categories.index')); + return view('categories.index', compact('categories')); } @@ -171,7 +172,7 @@ class CategoryController extends Controller $end = null; $periods = new Collection; $page = intval($request->get('page')); - $pageSize = intval(Preferences::get('transactionPageSize', 50)->data); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); // prep for "all" view. if ('all' === $moment) { @@ -184,7 +185,7 @@ class CategoryController extends Controller // prep for "specific date" view. if (strlen($moment) > 0 && 'all' !== $moment) { $start = new Carbon($moment); - $end = Navigation::endOfPeriod($start, $range); + $end = app('navigation')->endOfPeriod($start, $range); $subTitle = trans( 'firefly.without_category_between', ['start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat)] @@ -194,8 +195,8 @@ class CategoryController extends Controller // prep for current period if (0 === strlen($moment)) { - $start = clone session('start', Navigation::startOfPeriod(new Carbon, $range)); - $end = clone session('end', Navigation::endOfPeriod(new Carbon, $range)); + $start = clone session('start', app('navigation')->startOfPeriod(new Carbon, $range)); + $end = clone session('end', app('navigation')->endOfPeriod(new Carbon, $range)); $periods = $this->getNoCategoryPeriodOverview(); $subTitle = trans( 'firefly.without_category_between', @@ -228,11 +229,12 @@ class CategoryController extends Controller $subTitle = $category->name; $subTitleIcon = 'fa-bar-chart'; $page = intval($request->get('page')); - $pageSize = intval(Preferences::get('transactionPageSize', 50)->data); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); $range = Preferences::get('viewRange', '1M')->data; $start = null; $end = null; $periods = new Collection; + $path = route('categories.show', [$category->id]); // prep for "all" view. if ('all' === $moment) { @@ -241,26 +243,28 @@ class CategoryController extends Controller /** @var Carbon $start */ $start = null === $first ? new Carbon : $first; $end = new Carbon; + $path = route('categories.show', [$category->id, 'all']); } // prep for "specific date" view. if (strlen($moment) > 0 && 'all' !== $moment) { $start = new Carbon($moment); - $end = Navigation::endOfPeriod($start, $range); + $end = app('navigation')->endOfPeriod($start, $range); $subTitle = trans( 'firefly.journals_in_period_for_category', ['name' => $category->name, 'start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat),] ); $periods = $this->getPeriodOverview($category); + $path = route('categories.show', [$category->id, $moment]); } // prep for current period if (0 === strlen($moment)) { /** @var Carbon $start */ - $start = clone session('start', Navigation::startOfPeriod(new Carbon, $range)); + $start = clone session('start', app('navigation')->startOfPeriod(new Carbon, $range)); /** @var Carbon $end */ - $end = clone session('end', Navigation::endOfPeriod(new Carbon, $range)); + $end = clone session('end', app('navigation')->endOfPeriod(new Carbon, $range)); $periods = $this->getPeriodOverview($category); $subTitle = trans( 'firefly.journals_in_period_for_category', @@ -275,7 +279,7 @@ class CategoryController extends Controller ->setCategory($category)->withBudgetInformation()->withCategoryInformation(); $collector->removeFilter(InternalTransferFilter::class); $transactions = $collector->getPaginatedJournals(); - $transactions->setPath(route('categories.show', [$category->id])); + $transactions->setPath($path); return view('categories.show', compact('category', 'moment', 'transactions', 'periods', 'subTitle', 'subTitleIcon', 'start', 'end')); } @@ -340,8 +344,8 @@ class CategoryController extends Controller $first = $repository->first(); $start = $first->date ?? new Carbon; $range = Preferences::get('viewRange', '1M')->data; - $start = Navigation::startOfPeriod($start, $range); - $end = Navigation::endOfX(new Carbon, $range, null); + $start = app('navigation')->startOfPeriod($start, $range); + $end = app('navigation')->endOfX(new Carbon, $range, null); $entries = new Collection; // properties for cache @@ -357,8 +361,8 @@ class CategoryController extends Controller Log::debug(sprintf('Going to get period expenses and incomes between %s and %s.', $start->format('Y-m-d'), $end->format('Y-m-d'))); while ($end >= $start) { Log::debug('Loop!'); - $end = Navigation::startOfPeriod($end, $range); - $currentEnd = Navigation::endOfPeriod($end, $range); + $end = app('navigation')->startOfPeriod($end, $range); + $currentEnd = app('navigation')->endOfPeriod($end, $range); // count journals without category in this period: /** @var JournalCollectorInterface $collector */ @@ -389,7 +393,7 @@ class CategoryController extends Controller $earned = $collector->getJournals()->sum('transaction_amount'); $dateStr = $end->format('Y-m-d'); - $dateName = Navigation::periodShow($end, $range); + $dateName = app('navigation')->periodShow($end, $range); $entries->push( [ 'string' => $dateStr, @@ -401,7 +405,7 @@ class CategoryController extends Controller 'date' => clone $end, ] ); - $end = Navigation::subtractPeriod($end, $range, 1); + $end = app('navigation')->subtractPeriod($end, $range, 1); } Log::debug('End of loops'); $cache->store($entries); @@ -423,11 +427,11 @@ class CategoryController extends Controller $accounts = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]); $first = $repository->firstUseDate($category); if (null === $first) { - $first = new Carbon; + $first = new Carbon; // @codeCoverageIgnore } $range = Preferences::get('viewRange', '1M')->data; - $first = Navigation::startOfPeriod($first, $range); - $end = Navigation::endOfX(new Carbon, $range, null); + $first = app('navigation')->startOfPeriod($first, $range); + $end = app('navigation')->endOfX(new Carbon, $range, null); $entries = new Collection; $count = 0; @@ -442,12 +446,12 @@ class CategoryController extends Controller return $cache->get(); // @codeCoverageIgnore } while ($end >= $first && $count < 90) { - $end = Navigation::startOfPeriod($end, $range); - $currentEnd = Navigation::endOfPeriod($end, $range); + $end = app('navigation')->startOfPeriod($end, $range); + $currentEnd = app('navigation')->endOfPeriod($end, $range); $spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $end, $currentEnd); $earned = $repository->earnedInPeriod(new Collection([$category]), $accounts, $end, $currentEnd); $dateStr = $end->format('Y-m-d'); - $dateName = Navigation::periodShow($end, $range); + $dateName = app('navigation')->periodShow($end, $range); // amount transferred /** @var JournalCollectorInterface $collector */ @@ -468,7 +472,7 @@ class CategoryController extends Controller 'date' => clone $end, ] ); - $end = Navigation::subtractPeriod($end, $range, 1); + $end = app('navigation')->subtractPeriod($end, $range, 1); ++$count; } $cache->store($entries); diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php index a814be6e1b..81402b25d9 100644 --- a/app/Http/Controllers/Chart/AccountController.php +++ b/app/Http/Controllers/Chart/AccountController.php @@ -16,14 +16,13 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Controllers\Chart; use Carbon\Carbon; -use FireflyIII\Exceptions\FireflyException; use FireflyIII\Generator\Chart\Basic\GeneratorInterface; use FireflyIII\Helpers\Collector\JournalCollectorInterface; use FireflyIII\Http\Controllers\Controller; @@ -38,7 +37,6 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; use Log; -use Navigation; use Preferences; use Response; use Steam; @@ -342,13 +340,11 @@ class AccountController extends Controller * @param Carbon $start * * @return \Illuminate\Http\JsonResponse - * - * @throws FireflyException */ public function period(Account $account, Carbon $start) { $range = Preferences::get('viewRange', '1M')->data; - $end = Navigation::endOfPeriod($start, $range); + $end = app('navigation')->endOfPeriod($start, $range); $cache = new CacheProperties(); $cache->addProperty($start); $cache->addProperty($end); diff --git a/app/Http/Controllers/Chart/BillController.php b/app/Http/Controllers/Chart/BillController.php index 34e0ca9641..ebf0559d17 100644 --- a/app/Http/Controllers/Chart/BillController.php +++ b/app/Http/Controllers/Chart/BillController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index 0fbc20571a..932e30d797 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -37,7 +37,6 @@ use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; -use Navigation; use Preferences; use Response; use Steam; @@ -81,7 +80,7 @@ class BudgetController extends Controller { $first = $this->repository->firstUseDate($budget); $range = Preferences::get('viewRange', '1M')->data; - $currentStart = Navigation::startOfPeriod($first, $range); + $currentStart = app('navigation')->startOfPeriod($first, $range); $last = session('end', new Carbon); $cache = new CacheProperties(); $cache->addProperty($first); @@ -95,15 +94,15 @@ class BudgetController extends Controller $final = clone $last; $final->addYears(2); $budgetCollection = new Collection([$budget]); - $last = Navigation::endOfX($last, $range, $final); // not to overshoot. + $last = app('navigation')->endOfX($last, $range, $final); // not to overshoot. $entries = []; while ($currentStart < $last) { // periodspecific dates: - $currentEnd = Navigation::endOfPeriod($currentStart, $range); + $currentEnd = app('navigation')->endOfPeriod($currentStart, $range); // sub another day because reasons. $currentEnd->subDay(); $spent = $this->repository->spentInPeriod($budgetCollection, new Collection, $currentStart, $currentEnd); - $format = Navigation::periodShow($currentStart, $range); + $format = app('navigation')->periodShow($currentStart, $range); $entries[$format] = bcmul($spent, '-1'); $currentStart = clone $currentEnd; $currentStart->addDays(2); @@ -374,7 +373,7 @@ class BudgetController extends Controller if ($cache->has()) { return Response::json($cache->get()); // @codeCoverageIgnore } - $periods = Navigation::listOfPeriods($start, $end); + $periods = app('navigation')->listOfPeriods($start, $end); $entries = $this->repository->getBudgetPeriodReport(new Collection([$budget]), $accounts, $start, $end); // get the expenses $budgeted = $this->getBudgetedInPeriod($budget, $start, $end); @@ -417,7 +416,7 @@ class BudgetController extends Controller } // the expenses: - $periods = Navigation::listOfPeriods($start, $end); + $periods = app('navigation')->listOfPeriods($start, $end); $entries = $this->repository->getNoBudgetPeriodReport($accounts, $start, $end); $chartData = []; @@ -464,13 +463,13 @@ class BudgetController extends Controller */ private function getBudgetedInPeriod(Budget $budget, Carbon $start, Carbon $end): array { - $key = Navigation::preferredCarbonFormat($start, $end); - $range = Navigation::preferredRangeFormat($start, $end); + $key = app('navigation')->preferredCarbonFormat($start, $end); + $range = app('navigation')->preferredRangeFormat($start, $end); $current = clone $start; $budgeted = []; while ($current < $end) { - $currentStart = Navigation::startOfPeriod($current, $range); - $currentEnd = Navigation::endOfPeriod($current, $range); + $currentStart = app('navigation')->startOfPeriod($current, $range); + $currentEnd = app('navigation')->endOfPeriod($current, $range); $budgetLimits = $this->repository->getBudgetLimits($budget, $currentStart, $currentEnd); $index = $currentStart->format($key); $budgeted[$index] = $budgetLimits->sum('amount'); diff --git a/app/Http/Controllers/Chart/BudgetReportController.php b/app/Http/Controllers/Chart/BudgetReportController.php index 60ee052df1..fefa1c63e9 100644 --- a/app/Http/Controllers/Chart/BudgetReportController.php +++ b/app/Http/Controllers/Chart/BudgetReportController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -37,7 +37,6 @@ use FireflyIII\Models\TransactionType; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; -use Navigation; use Response; /** @@ -135,8 +134,8 @@ class BudgetReportController extends Controller if ($cache->has()) { return Response::json($cache->get()); // @codeCoverageIgnore } - $format = Navigation::preferredCarbonLocalizedFormat($start, $end); - $function = Navigation::preferredEndOfPeriod($start, $end); + $format = app('navigation')->preferredCarbonLocalizedFormat($start, $end); + $function = app('navigation')->preferredEndOfPeriod($start, $end); $chartData = []; $currentStart = clone $start; diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index f354244d2d..1c0a8ddcac 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -31,7 +31,6 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; -use Navigation; use Preferences; use Response; @@ -74,11 +73,11 @@ class CategoryController extends Controller $start = $repository->firstUseDate($category); if (null === $start) { - $start = new Carbon; + $start = new Carbon; // @codeCoverageIgnore } $range = Preferences::get('viewRange', '1M')->data; - $start = Navigation::startOfPeriod($start, $range); + $start = app('navigation')->startOfPeriod($start, $range); $end = new Carbon; $accounts = $accountRepository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]); $chartData = [ @@ -101,15 +100,15 @@ class CategoryController extends Controller ]; while ($start <= $end) { - $currentEnd = Navigation::endOfPeriod($start, $range); + $currentEnd = app('navigation')->endOfPeriod($start, $range); $spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $currentEnd); $earned = $repository->earnedInPeriod(new Collection([$category]), $accounts, $start, $currentEnd); $sum = bcadd($spent, $earned); - $label = Navigation::periodShow($start, $range); + $label = app('navigation')->periodShow($start, $range); $chartData[0]['entries'][$label] = round(bcmul($spent, '-1'), 12); $chartData[1]['entries'][$label] = round($earned, 12); $chartData[2]['entries'][$label] = round($sum, 12); - $start = Navigation::addPeriod($start, $range, 0); + $start = app('navigation')->addPeriod($start, $range, 0); } $data = $this->generator->multiSet($chartData); @@ -180,7 +179,7 @@ class CategoryController extends Controller } $expenses = $repository->periodExpenses(new Collection([$category]), $accounts, $start, $end); $income = $repository->periodIncome(new Collection([$category]), $accounts, $start, $end); - $periods = Navigation::listOfPeriods($start, $end); + $periods = app('navigation')->listOfPeriods($start, $end); $chartData = [ [ 'label' => strval(trans('firefly.spent')), @@ -236,7 +235,7 @@ class CategoryController extends Controller } $expenses = $repository->periodExpensesNoCategory($accounts, $start, $end); $income = $repository->periodIncomeNoCategory($accounts, $start, $end); - $periods = Navigation::listOfPeriods($start, $end); + $periods = app('navigation')->listOfPeriods($start, $end); $chartData = [ [ 'label' => strval(trans('firefly.spent')), @@ -281,8 +280,8 @@ class CategoryController extends Controller public function specificPeriod(CategoryRepositoryInterface $repository, Category $category, Carbon $date) { $range = Preferences::get('viewRange', '1M')->data; - $start = Navigation::startOfPeriod($date, $range); - $end = Navigation::endOfPeriod($date, $range); + $start = app('navigation')->startOfPeriod($date, $range); + $end = app('navigation')->endOfPeriod($date, $range); $data = $this->makePeriodChart($repository, $category, $start, $end); return Response::json($data); @@ -336,7 +335,7 @@ class CategoryController extends Controller $spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $start); $earned = $repository->earnedInPeriod(new Collection([$category]), $accounts, $start, $start); $sum = bcadd($spent, $earned); - $label = trim(Navigation::periodShow($start, '1D')); + $label = trim(app('navigation')->periodShow($start, '1D')); $chartData[0]['entries'][$label] = round(bcmul($spent, '-1'), 12); $chartData[1]['entries'][$label] = round($earned, 12); diff --git a/app/Http/Controllers/Chart/CategoryReportController.php b/app/Http/Controllers/Chart/CategoryReportController.php index 5c59817706..daa7d1951b 100644 --- a/app/Http/Controllers/Chart/CategoryReportController.php +++ b/app/Http/Controllers/Chart/CategoryReportController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -36,7 +36,6 @@ use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionType; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; -use Navigation; use Response; /** @@ -177,8 +176,8 @@ class CategoryReportController extends Controller return Response::json($cache->get()); // @codeCoverageIgnore } - $format = Navigation::preferredCarbonLocalizedFormat($start, $end); - $function = Navigation::preferredEndOfPeriod($start, $end); + $format = app('navigation')->preferredCarbonLocalizedFormat($start, $end); + $function = app('navigation')->preferredEndOfPeriod($start, $end); $chartData = []; $currentStart = clone $start; diff --git a/app/Http/Controllers/Chart/ExpenseReportController.php b/app/Http/Controllers/Chart/ExpenseReportController.php new file mode 100644 index 0000000000..ed9e3f98ac --- /dev/null +++ b/app/Http/Controllers/Chart/ExpenseReportController.php @@ -0,0 +1,266 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Http\Controllers\Chart; + +use Carbon\Carbon; +use FireflyIII\Generator\Chart\Basic\GeneratorInterface; +use FireflyIII\Helpers\Collector\JournalCollectorInterface; +use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Models\Account; +use FireflyIII\Models\AccountType; +use FireflyIII\Models\Transaction; +use FireflyIII\Models\TransactionType; +use FireflyIII\Repositories\Account\AccountRepositoryInterface; +use FireflyIII\Support\CacheProperties; +use Illuminate\Support\Collection; +use Response; + +/** + * Separate controller because many helper functions are shared. + * + * Class ExpenseReportController + */ +class ExpenseReportController extends Controller +{ + /** @var AccountRepositoryInterface */ + protected $accountRepository; + /** @var GeneratorInterface */ + protected $generator; + + /** + * + */ + public function __construct() + { + parent::__construct(); + $this->middleware( + function ($request, $next) { + $this->generator = app(GeneratorInterface::class); + $this->accountRepository = app(AccountRepositoryInterface::class); + + return $next($request); + } + ); + } + + /** + * @param Collection $accounts + * @param Collection $expense + * @param Carbon $start + * @param Carbon $end + * + * @return \Illuminate\Http\JsonResponse + */ + public function mainChart(Collection $accounts, Collection $expense, Carbon $start, Carbon $end) + { + $cache = new CacheProperties; + $cache->addProperty('chart.expense.report.main'); + $cache->addProperty($accounts); + $cache->addProperty($expense); + $cache->addProperty($start); + $cache->addProperty($end); + if ($cache->has()) { + return Response::json($cache->get()); // @codeCoverageIgnore + } + + $format = app('navigation')->preferredCarbonLocalizedFormat($start, $end); + $function = app('navigation')->preferredEndOfPeriod($start, $end); + $chartData = []; + $currentStart = clone $start; + $combined = $this->combineAccounts($expense); + + // make "all" set: + $all = new Collection; + foreach ($combined as $name => $combi) { + $all = $all->merge($combi); + } + + // prep chart data: + foreach ($combined as $name => $combi) { + // first is always expense account: + /** @var Account $exp */ + $exp = $combi->first(); + $chartData[$exp->id . '-in'] = [ + 'label' => $name . ' (' . strtolower(strval(trans('firefly.income'))) . ')', + 'type' => 'bar', + 'yAxisID' => 'y-axis-0', + 'entries' => [], + ]; + $chartData[$exp->id . '-out'] = [ + 'label' => $name . ' (' . strtolower(strval(trans('firefly.expenses'))) . ')', + 'type' => 'bar', + 'yAxisID' => 'y-axis-0', + 'entries' => [], + ]; + // total in, total out: + $chartData[$exp->id . '-total-in'] = [ + 'label' => $name . ' (' . strtolower(strval(trans('firefly.sum_of_income'))) . ')', + 'type' => 'line', + 'fill' => false, + 'yAxisID' => 'y-axis-1', + 'entries' => [], + ]; + $chartData[$exp->id . '-total-out'] = [ + 'label' => $name . ' (' . strtolower(strval(trans('firefly.sum_of_expenses'))) . ')', + 'type' => 'line', + 'fill' => false, + 'yAxisID' => 'y-axis-1', + 'entries' => [], + ]; + } + + $sumOfIncome = []; + $sumOfExpense = []; + + while ($currentStart < $end) { + $currentEnd = clone $currentStart; + $currentEnd = $currentEnd->$function(); + + // get expenses grouped by opposing name: + $expenses = $this->groupByName($this->getExpenses($accounts, $all, $currentStart, $currentEnd)); + $income = $this->groupByName($this->getIncome($accounts, $all, $currentStart, $currentEnd)); + $label = $currentStart->formatLocalized($format); + + foreach ($combined as $name => $combi) { + // first is always expense account: + /** @var Account $exp */ + $exp = $combi->first(); + $labelIn = $exp->id . '-in'; + $labelOut = $exp->id . '-out'; + $labelSumIn = $exp->id . '-total-in'; + $labelSumOut = $exp->id . '-total-out'; + $currentIncome = $income[$name] ?? '0'; + $currentExpense = $expenses[$name] ?? '0'; + + // add to sum: + $sumOfIncome[$exp->id] = $sumOfIncome[$exp->id] ?? '0'; + $sumOfExpense[$exp->id] = $sumOfExpense[$exp->id] ?? '0'; + $sumOfIncome[$exp->id] = bcadd($sumOfIncome[$exp->id], $currentIncome); + $sumOfExpense[$exp->id] = bcadd($sumOfExpense[$exp->id], $currentExpense); + + // add to chart: + $chartData[$labelIn]['entries'][$label] = $currentIncome; + $chartData[$labelOut]['entries'][$label] = $currentExpense; + $chartData[$labelSumIn]['entries'][$label] = $sumOfIncome[$exp->id]; + $chartData[$labelSumOut]['entries'][$label] = $sumOfExpense[$exp->id]; + } + $currentStart = clone $currentEnd; + $currentStart->addDay(); + } + // remove all empty entries to prevent cluttering: + $newSet = []; + foreach ($chartData as $key => $entry) { + if (0 === !array_sum($entry['entries'])) { + $newSet[$key] = $chartData[$key]; + } + } + if (0 === count($newSet)) { + $newSet = $chartData; // @codeCoverageIgnore + } + $data = $this->generator->multiSet($newSet); + $cache->store($data); + + return Response::json($data); + } + + /** + * @param Collection $accounts + * + * @return array + */ + protected function combineAccounts(Collection $accounts): array + { + $combined = []; + /** @var Account $expenseAccount */ + foreach ($accounts as $expenseAccount) { + $collection = new Collection; + $collection->push($expenseAccount); + + $revenue = $this->accountRepository->findByName($expenseAccount->name, [AccountType::REVENUE]); + if (!is_null($revenue->id)) { + $collection->push($revenue); + } + $combined[$expenseAccount->name] = $collection; + } + + return $combined; + } + + /** + * @param Collection $accounts + * @param Collection $opposing + * @param Carbon $start + * @param Carbon $end + * + * @return Collection + */ + private function getExpenses(Collection $accounts, Collection $opposing, Carbon $start, Carbon $end): Collection + { + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setOpposingAccounts($opposing); + + $transactions = $collector->getJournals(); + + return $transactions; + } + + /** + * @param Collection $accounts + * @param Collection $opposing + * @param Carbon $start + * @param Carbon $end + * + * @return Collection + */ + private function getIncome(Collection $accounts, Collection $opposing, Carbon $start, Carbon $end): Collection + { + /** @var JournalCollectorInterface $collector */ + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end)->setTypes([TransactionType::DEPOSIT])->setOpposingAccounts($opposing); + + $transactions = $collector->getJournals(); + + return $transactions; + } + + /** + * @param Collection $set + * + * @return array + */ + private function groupByName(Collection $set): array + { + // group by opposing account name. + $grouped = []; + /** @var Transaction $transaction */ + foreach ($set as $transaction) { + $name = $transaction->opposing_account_name; + $grouped[$name] = $grouped[$name] ?? '0'; + $grouped[$name] = bcadd($transaction->transaction_amount, $grouped[$name]); + } + + return $grouped; + } +} diff --git a/app/Http/Controllers/Chart/PiggyBankController.php b/app/Http/Controllers/Chart/PiggyBankController.php index 303f239008..3958495261 100644 --- a/app/Http/Controllers/Chart/PiggyBankController.php +++ b/app/Http/Controllers/Chart/PiggyBankController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index d54697bfa5..d8c2736153 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -29,7 +29,6 @@ use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; use Log; -use Navigation; use Response; use Steam; @@ -89,7 +88,7 @@ class ReportController extends Controller } /** - * Shows income and expense, debet/credit: operations. + * Shows income and expense, debit/credit: operations. * * @param Collection $accounts * @param Carbon $start @@ -109,7 +108,7 @@ class ReportController extends Controller return Response::json($cache->get()); // @codeCoverageIgnore } Log::debug('Going to do operations for accounts ', $accounts->pluck('id')->toArray()); - $format = Navigation::preferredCarbonLocalizedFormat($start, $end); + $format = app('navigation')->preferredCarbonLocalizedFormat($start, $end); $source = $this->getChartData($accounts, $start, $end); $chartData = [ [ @@ -144,7 +143,7 @@ class ReportController extends Controller } /** - * Shows sum income and expense, debet/credit: operations. + * Shows sum income and expense, debit/credit: operations. * * @param Carbon $start * @param Carbon $end @@ -256,7 +255,7 @@ class ReportController extends Controller $tasker = app(AccountTaskerInterface::class); while ($currentStart <= $end) { - $currentEnd = Navigation::endOfPeriod($currentStart, '1M'); + $currentEnd = app('navigation')->endOfPeriod($currentStart, '1M'); $earned = strval( array_sum( array_map( @@ -282,7 +281,7 @@ class ReportController extends Controller $label = $currentStart->format('Y-m') . '-01'; $spentArray[$label] = bcmul($spent, '-1'); $earnedArray[$label] = $earned; - $currentStart = Navigation::addPeriod($currentStart, '1M', 0); + $currentStart = app('navigation')->addPeriod($currentStart, '1M', 0); } $result = [ 'spent' => $spentArray, diff --git a/app/Http/Controllers/Chart/TagReportController.php b/app/Http/Controllers/Chart/TagReportController.php index de4daf03dc..0da5c269cb 100644 --- a/app/Http/Controllers/Chart/TagReportController.php +++ b/app/Http/Controllers/Chart/TagReportController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -36,9 +36,11 @@ use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionType; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; -use Navigation; use Response; +/** + * Class TagReportController + */ class TagReportController extends Controller { /** @var GeneratorInterface */ @@ -168,8 +170,8 @@ class TagReportController extends Controller return Response::json($cache->get()); // @codeCoverageIgnore } - $format = Navigation::preferredCarbonLocalizedFormat($start, $end); - $function = Navigation::preferredEndOfPeriod($start, $end); + $format = app('navigation')->preferredCarbonLocalizedFormat($start, $end); + $function = app('navigation')->preferredEndOfPeriod($start, $end); $chartData = []; $currentStart = clone $start; diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 3d08e5d0b0..8f1f4ecd39 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -126,7 +126,7 @@ class Controller extends BaseController $uri = $this->redirectUri; } if (!(false === strpos($uri, 'jscript'))) { - $uri = $this->redirectUri; + $uri = $this->redirectUri; // @codeCoverageIgnore } return $uri; diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php index 911aa55673..4dea312903 100644 --- a/app/Http/Controllers/CurrencyController.php +++ b/app/Http/Controllers/CurrencyController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,7 @@ use FireflyIII\Models\TransactionCurrency; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface; use Illuminate\Http\Request; +use Illuminate\Pagination\LengthAwarePaginator; use Log; use Preferences; use View; @@ -52,8 +53,8 @@ class CurrencyController extends Controller $this->middleware( function ($request, $next) { - View::share('title', trans('firefly.currencies')); - View::share('mainTitleIcon', 'fa-usd'); + app('view')->share('title', trans('firefly.currencies')); + app('view')->share('mainTitleIcon', 'fa-usd'); $this->repository = app(CurrencyRepositoryInterface::class); $this->userRepository = app(UserRepositoryInterface::class); @@ -83,8 +84,6 @@ class CurrencyController extends Controller $this->rememberPreviousUri('currencies.create.uri'); } $request->session()->forget('currencies.create.fromStore'); - $request->session()->flash('gaEventCategory', 'currency'); - $request->session()->flash('gaEventAction', 'create'); return view('currencies.create', compact('subTitleIcon', 'subTitle')); } @@ -131,8 +130,6 @@ class CurrencyController extends Controller // put previous url in session $this->rememberPreviousUri('currencies.delete.uri'); - $request->session()->flash('gaEventCategory', 'currency'); - $request->session()->flash('gaEventAction', 'delete'); $subTitle = trans('form.delete_currency', ['name' => $currency->name]); return view('currencies.delete', compact('currency', 'subTitle')); @@ -191,8 +188,6 @@ class CurrencyController extends Controller $this->rememberPreviousUri('currencies.edit.uri'); } $request->session()->forget('currencies.edit.fromUpdate'); - $request->session()->flash('gaEventCategory', 'currency'); - $request->session()->flash('gaEventAction', 'edit'); return view('currencies.edit', compact('currency', 'subTitle', 'subTitleIcon')); } @@ -204,12 +199,19 @@ class CurrencyController extends Controller */ public function index(Request $request) { - $currencies = $this->repository->get(); - $currencies = $currencies->sortBy( + $page = 0 === intval($request->get('page')) ? 1 : intval($request->get('page')); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); + $collection = $this->repository->get(); + $total = $collection->count(); + $collection = $collection->sortBy( function (TransactionCurrency $currency) { return $currency->name; } ); + $collection = $collection->slice(($page - 1) * $pageSize, $pageSize); + $currencies = new LengthAwarePaginator($collection, $total, $pageSize, $page); + $currencies->setPath(route('currencies.index')); + $defaultCurrency = $this->repository->getCurrencyByPreference(Preferences::get('currencyPreference', config('firefly.default_currency', 'EUR'))); $isOwner = true; if (!$this->userRepository->hasRole(auth()->user(), 'owner')) { diff --git a/app/Http/Controllers/ExportController.php b/app/Http/Controllers/ExportController.php index fa746b8145..51cedfd44c 100644 --- a/app/Http/Controllers/ExportController.php +++ b/app/Http/Controllers/ExportController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -26,6 +26,7 @@ use Carbon\Carbon; use ExpandedForm; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Export\ProcessorInterface; +use FireflyIII\Http\Middleware\IsDemoUser; use FireflyIII\Http\Requests\ExportFormRequest; use FireflyIII\Models\AccountType; use FireflyIII\Models\ExportJob; @@ -50,12 +51,13 @@ class ExportController extends Controller $this->middleware( function ($request, $next) { - View::share('mainTitleIcon', 'fa-file-archive-o'); - View::share('title', trans('firefly.export_and_backup_data')); + app('view')->share('mainTitleIcon', 'fa-file-archive-o'); + app('view')->share('title', trans('firefly.export_and_backup_data')); return $next($request); } ); + $this->middleware(IsDemoUser::class)->except(['index']); } /** diff --git a/app/Http/Controllers/HelpController.php b/app/Http/Controllers/HelpController.php index 94d16bdcaa..b972e5185a 100644 --- a/app/Http/Controllers/HelpController.php +++ b/app/Http/Controllers/HelpController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 0632f35c37..32c2c63a24 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,8 +25,12 @@ namespace FireflyIII\Http\Controllers; use Artisan; use Carbon\Carbon; use DB; +use Exception; +use FireflyIII\Events\RequestedVersionCheckStatus; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Helpers\Collector\JournalCollectorInterface; +use FireflyIII\Http\Middleware\IsDemoUser; +use FireflyIII\Http\Middleware\IsSandStormUser; use FireflyIII\Models\AccountType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Bill\BillRepositoryInterface; @@ -36,8 +40,8 @@ use Illuminate\Support\Collection; use Log; use Monolog\Handler\RotatingFileHandler; use Preferences; +use Response; use Route as RouteFacade; -use Session; use View; /** @@ -51,12 +55,16 @@ class HomeController extends Controller public function __construct() { parent::__construct(); - View::share('title', 'Firefly III'); - View::share('mainTitleIcon', 'fa-fire'); + app('view')->share('title', 'Firefly III'); + app('view')->share('mainTitleIcon', 'fa-fire'); + $this->middleware(IsDemoUser::class)->except(['dateRange', 'index']); + $this->middleware(IsSandStormUser::class)->only('routes'); } /** * @param Request $request + * + * @return \Illuminate\Http\JsonResponse */ public function dateRange(Request $request) { @@ -77,12 +85,17 @@ class HomeController extends Controller $diff = $start->diffInDays($end); if ($diff > 50) { - Session::flash('warning', strval(trans('firefly.warning_much_data', ['days' => $diff]))); + $request->session()->flash('warning', strval(trans('firefly.warning_much_data', ['days' => $diff]))); } - Session::put('is_custom_range', $isCustomRange); - Session::put('start', $start); - Session::put('end', $end); + $request->session()->put('is_custom_range', $isCustomRange); + Log::debug(sprintf('Set is_custom_range to %s', var_export($isCustomRange, true))); + $request->session()->put('start', $start); + Log::debug(sprintf('Set start to %s', $start->format('Y-m-d H:i:s'))); + $request->session()->put('end', $end); + Log::debug(sprintf('Set end to %s', $end->format('Y-m-d H:i:s'))); + + return Response::json(['ok' => 'ok']); } /** @@ -92,7 +105,7 @@ class HomeController extends Controller */ public function displayDebug(Request $request) { - $phpVersion = PHP_VERSION; + $phpVersion = str_replace('~', '\~', PHP_VERSION); $phpOs = php_uname(); $interface = PHP_SAPI; $now = Carbon::create()->format('Y-m-d H:i:s e'); @@ -164,7 +177,21 @@ class HomeController extends Controller { Preferences::mark(); $request->session()->forget(['start', 'end', '_previous', 'viewRange', 'range', 'is_custom_range']); + Log::debug('Call cache:clear...'); Artisan::call('cache:clear'); + Log::debug('Call config:clear...'); + Artisan::call('config:clear'); + Log::debug('Call route:clear...'); + Artisan::call('route:clear'); + Log::debug('Call twig:clean...'); + try { + Artisan::call('twig:clean'); + } catch (Exception $e) { + // dont care + } + Log::debug('Call view:clear...'); + Artisan::call('view:clear'); + Log::debug('Done! Redirecting...'); return redirect(route('index')); } @@ -182,7 +209,6 @@ class HomeController extends Controller if (0 === $count) { return redirect(route('new-user.index')); } - $subTitle = trans('firefly.welcomeBack'); $transactions = []; $frontPage = Preferences::get( @@ -209,12 +235,18 @@ class HomeController extends Controller $transactions[] = [$set, $account]; } + // fire check update event: + event(new RequestedVersionCheckStatus(auth()->user())); + return view( 'index', compact('count', 'subTitle', 'transactions', 'showDeps', 'billCount', 'start', 'end', 'today') ); } + /** + * @return string + */ public function routes() { $set = RouteFacade::getRoutes(); @@ -225,7 +257,7 @@ class HomeController extends Controller 'rules.select', 'search.search', 'test-flash', 'transactions.link.delete', 'transactions.link.switch', 'two-factor.lost', 'report.options', ]; - + $return = ' '; /** @var Route $route */ foreach ($set as $route) { $name = $route->getName(); @@ -237,23 +269,25 @@ class HomeController extends Controller } } if (!$found) { - echo 'touch ' . $route->getName() . '.md;'; + $return .= 'touch ' . $route->getName() . '.md;'; } } } - return ' '; + return $return; } /** + * @param Request $request + * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ - public function testFlash() + public function testFlash(Request $request) { - Session::flash('success', 'This is a success message.'); - Session::flash('info', 'This is an info message.'); - Session::flash('warning', 'This is a warning.'); - Session::flash('error', 'This is an error!'); + $request->session()->flash('success', 'This is a success message.'); + $request->session()->flash('info', 'This is an info message.'); + $request->session()->flash('warning', 'This is a warning.'); + $request->session()->flash('error', 'This is an error!'); return redirect(route('home')); } diff --git a/app/Http/Controllers/Import/BankController.php b/app/Http/Controllers/Import/BankController.php deleted file mode 100644 index 9358481970..0000000000 --- a/app/Http/Controllers/Import/BankController.php +++ /dev/null @@ -1,158 +0,0 @@ -. - */ -declare(strict_types=1); - -namespace FireflyIII\Http\Controllers\Import; - -use FireflyIII\Http\Controllers\Controller; -use FireflyIII\Support\Import\Information\InformationInterface; -use FireflyIII\Support\Import\Prerequisites\PrerequisitesInterface; -use Illuminate\Http\Request; -use Log; -use Session; - -class BankController extends Controller -{ - /** - * This method must ask the user all parameters necessary to start importing data. This may not be enough - * to finish the import itself (ie. mapping) but it should be enough to begin: accounts to import from, - * accounts to import into, data ranges, etc. - * - * @param string $bank - * - * @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View - */ - public function form(string $bank) - { - $class = config(sprintf('firefly.import_pre.%s', $bank)); - /** @var PrerequisitesInterface $object */ - $object = app($class); - $object->setUser(auth()->user()); - - if ($object->hasPrerequisites()) { - return redirect(route('import.bank.prerequisites', [$bank])); - } - $class = config(sprintf('firefly.import_info.%s', $bank)); - /** @var InformationInterface $object */ - $object = app($class); - $object->setUser(auth()->user()); - $remoteAccounts = $object->getAccounts(); - - return view('import.bank.form', compact('remoteAccounts', 'bank')); - } - - /** - * With the information given in the submitted form Firefly III will call upon the bank's classes to return transaction - * information as requested. The user will be able to map unknown data and continue. Or maybe, it's put into some kind of - * fake CSV file and forwarded to the import routine. - * - * @param Request $request - * @param string $bank - * - * @return \Illuminate\Http\RedirectResponse|null - */ - public function postForm(Request $request, string $bank) - { - $class = config(sprintf('firefly.import_pre.%s', $bank)); - /** @var PrerequisitesInterface $object */ - $object = app($class); - $object->setUser(auth()->user()); - - if ($object->hasPrerequisites()) { - return redirect(route('import.bank.prerequisites', [$bank])); - } - $remoteAccounts = $request->get('do_import'); - if (!is_array($remoteAccounts) || 0 === count($remoteAccounts)) { - Session::flash('error', 'Must select accounts'); - - return redirect(route('import.bank.form', [$bank])); - } - $remoteAccounts = array_keys($remoteAccounts); - $class = config(sprintf('firefly.import_pre.%s', $bank)); - // get import file - unset($remoteAccounts, $class); - - // get import config - } - - /** - * This method processes the prerequisites the user has entered in the previous step. - * - * Whatever storePrerequisites does, it should make sure that the system is ready to continue immediately. So - * no extra calls or stuff, except maybe to open a session - * - * @see PrerequisitesInterface::storePrerequisites - * - * @param Request $request - * @param string $bank - * - * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector - */ - public function postPrerequisites(Request $request, string $bank) - { - Log::debug(sprintf('Now in postPrerequisites for %s', $bank)); - $class = config(sprintf('firefly.import_pre.%s', $bank)); - /** @var PrerequisitesInterface $object */ - $object = app($class); - $object->setUser(auth()->user()); - if (!$object->hasPrerequisites()) { - Log::debug(sprintf('No more prerequisites for %s, move to form.', $bank)); - - return redirect(route('import.bank.form', [$bank])); - } - Log::debug('Going to store entered preprerequisites.'); - // store post data - $result = $object->storePrerequisites($request); - - if ($result->count() > 0) { - Session::flash('error', $result->first()); - - return redirect(route('import.bank.prerequisites', [$bank])); - } - - return redirect(route('import.bank.form', [$bank])); - } - - /** - * This method shows you, if necessary, a form that allows you to enter any required values, such as API keys, - * login passwords or other values. - * - * @param string $bank - * - * @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View - */ - public function prerequisites(string $bank) - { - $class = config(sprintf('firefly.import_pre.%s', $bank)); - /** @var PrerequisitesInterface $object */ - $object = app($class); - $object->setUser(auth()->user()); - - if ($object->hasPrerequisites()) { - $view = $object->getView(); - $parameters = $object->getViewParameters(); - - return view($view, $parameters); - } - - return redirect(route('import.bank.form', [$bank])); - } -} diff --git a/app/Http/Controllers/Import/ConfigurationController.php b/app/Http/Controllers/Import/ConfigurationController.php new file mode 100644 index 0000000000..08798efaad --- /dev/null +++ b/app/Http/Controllers/Import/ConfigurationController.php @@ -0,0 +1,144 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Http\Controllers\Import; + +use FireflyIII\Exceptions\FireflyException; +use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Http\Middleware\IsDemoUser; +use FireflyIII\Import\Configuration\ConfiguratorInterface; +use FireflyIII\Models\ImportJob; +use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface; +use Illuminate\Http\Request; +use Log; + +/** + * Class ConfigurationController + */ +class ConfigurationController extends Controller +{ + /** @var ImportJobRepositoryInterface */ + public $repository; + + /** + * + */ + public function __construct() + { + parent::__construct(); + + $this->middleware( + function ($request, $next) { + app('view')->share('mainTitleIcon', 'fa-archive'); + app('view')->share('title', trans('firefly.import_index_title')); + $this->repository = app(ImportJobRepositoryInterface::class); + + return $next($request); + } + ); + $this->middleware(IsDemoUser::class)->except(['index']); + } + + /** + * Configure the job. This method is returned to until job is deemed "configured". + * + * @param ImportJob $job + * + * @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View + * + * @throws FireflyException + */ + public function index(ImportJob $job) + { + // create configuration class: + $configurator = $this->makeConfigurator($job); + + // is the job already configured? + if ($configurator->isJobConfigured()) { + $this->repository->updateStatus($job, 'configured'); + + return redirect(route('import.status', [$job->key])); + } + $this->repository->updateStatus($job, 'configuring'); + $view = $configurator->getNextView(); + $data = $configurator->getNextData(); + $subTitle = trans('firefly.import_config_bread_crumb'); + $subTitleIcon = 'fa-wrench'; + + return view($view, compact('data', 'job', 'subTitle', 'subTitleIcon')); + } + + /** + * Store the configuration. Returns to "configure" method until job is configured. + * + * @param Request $request + * @param ImportJob $job + * + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector + * + * @throws FireflyException + */ + public function post(Request $request, ImportJob $job) + { + Log::debug('Now in postConfigure()', ['job' => $job->key]); + $configurator = $this->makeConfigurator($job); + + // is the job already configured? + if ($configurator->isJobConfigured()) { + return redirect(route('import.status', [$job->key])); + } + $data = $request->all(); + $configurator->configureJob($data); + + // get possible warning from configurator: + $warning = $configurator->getWarningMessage(); + + if (strlen($warning) > 0) { + $request->session()->flash('warning', $warning); + } + + // return to configure + return redirect(route('import.configure', [$job->key])); + } + + /** + * @param ImportJob $job + * + * @return ConfiguratorInterface + * + * @throws FireflyException + */ + private function makeConfigurator(ImportJob $job): ConfiguratorInterface + { + $type = $job->file_type; + $key = sprintf('import.configuration.%s', $type); + $className = config($key); + if (null === $className || !class_exists($className)) { + throw new FireflyException(sprintf('Cannot find configurator class for job of type "%s".', $type)); // @codeCoverageIgnore + } + /** @var ConfiguratorInterface $configurator */ + $configurator = app($className); + $configurator->setJob($job); + + return $configurator; + } +} diff --git a/app/Http/Controllers/Import/FileController.php b/app/Http/Controllers/Import/FileController.php deleted file mode 100644 index ff6c86b48c..0000000000 --- a/app/Http/Controllers/Import/FileController.php +++ /dev/null @@ -1,311 +0,0 @@ -. - */ -declare(strict_types=1); - -namespace FireflyIII\Http\Controllers\Import; - -use FireflyIII\Exceptions\FireflyException; -use FireflyIII\Http\Controllers\Controller; -use FireflyIII\Http\Requests\ImportUploadRequest; -use FireflyIII\Import\Configurator\ConfiguratorInterface; -use FireflyIII\Import\Routine\ImportRoutine; -use FireflyIII\Models\ImportJob; -use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface; -use FireflyIII\Repositories\Tag\TagRepositoryInterface; -use Illuminate\Http\Request; -use Illuminate\Http\Response as LaravelResponse; -use Log; -use Response; -use Session; -use View; - -/** - * Class FileController. - */ -class FileController extends Controller -{ - /** @var ImportJobRepositoryInterface */ - public $repository; - - /** - * - */ - public function __construct() - { - parent::__construct(); - - $this->middleware( - function ($request, $next) { - View::share('mainTitleIcon', 'fa-archive'); - View::share('title', trans('firefly.import_index_title')); - $this->repository = app(ImportJobRepositoryInterface::class); - - return $next($request); - } - ); - } - - /** - * This is step 3. This repeats until the job is configured. - * - * @param ImportJob $job - * - * @return View - * - * @throws FireflyException - */ - public function configure(ImportJob $job) - { - // create configuration class: - $configurator = $this->makeConfigurator($job); - - // is the job already configured? - if ($configurator->isJobConfigured()) { - $this->repository->updateStatus($job, 'configured'); - - return redirect(route('import.file.status', [$job->key])); - } - $view = $configurator->getNextView(); - $data = $configurator->getNextData(); - $subTitle = trans('firefly.import_config_bread_crumb'); - $subTitleIcon = 'fa-wrench'; - - return view($view, compact('data', 'job', 'subTitle', 'subTitleIcon')); - } - - /** - * Generate a JSON file of the job's configuration and send it to the user. - * - * @param ImportJob $job - * - * @return LaravelResponse - */ - public function download(ImportJob $job) - { - Log::debug('Now in download()', ['job' => $job->key]); - $config = $job->configuration; - - // This is CSV import specific: - $config['column-roles-complete'] = false; - $config['column-mapping-complete'] = false; - $config['initial-config-complete'] = false; - $config['delimiter'] = "\t" === $config['delimiter'] ? 'tab' : $config['delimiter']; - - $result = json_encode($config, JSON_PRETTY_PRINT); - $name = sprintf('"%s"', addcslashes('import-configuration-' . date('Y-m-d') . '.json', '"\\')); - - /** @var LaravelResponse $response */ - $response = response($result, 200); - $response->header('Content-disposition', 'attachment; filename=' . $name) - ->header('Content-Type', 'application/json') - ->header('Content-Description', 'File Transfer') - ->header('Connection', 'Keep-Alive') - ->header('Expires', '0') - ->header('Cache-Control', 'must-revalidate, post-check=0, pre-check=0') - ->header('Pragma', 'public') - ->header('Content-Length', strlen($result)); - - return $response; - } - - /** - * This is step 1. Upload a file. - * - * @return View - */ - public function index() - { - $subTitle = trans('firefly.import_index_sub_title'); - $subTitleIcon = 'fa-home'; - $importFileTypes = []; - $defaultImportType = config('firefly.default_import_format'); - - foreach (array_keys(config('firefly.import_formats')) as $type) { - $importFileTypes[$type] = trans('firefly.import_file_type_' . $type); - } - - return view('import.file.index', compact('subTitle', 'subTitleIcon', 'importFileTypes', 'defaultImportType')); - } - - /** - * This is step 2. It creates an Import Job. Stores the import. - * - * @param ImportUploadRequest $request - * - * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector - */ - public function initialize(ImportUploadRequest $request) - { - Log::debug('Now in initialize()'); - - // create import job: - $type = $request->get('import_file_type'); - $job = $this->repository->create($type); - Log::debug('Created new job', ['key' => $job->key, 'id' => $job->id]); - - // process file: - $this->repository->processFile($job, $request->files->get('import_file')); - - // process config, if present: - if ($request->files->has('configuration_file')) { - $this->repository->processConfiguration($job, $request->files->get('configuration_file')); - } - - $this->repository->updateStatus($job, 'initialized'); - - return redirect(route('import.file.configure', [$job->key])); - } - - /** - * Show status of import job in JSON. - * - * @param ImportJob $job - * - * @return \Illuminate\Http\JsonResponse - */ - public function json(ImportJob $job) - { - $result = [ - 'started' => false, - 'finished' => false, - 'running' => false, - 'errors' => array_values($job->extended_status['errors']), - 'percentage' => 0, - 'show_percentage' => false, - 'steps' => $job->extended_status['steps'], - 'done' => $job->extended_status['done'], - 'statusText' => trans('firefly.import_status_job_' . $job->status), - 'status' => $job->status, - 'finishedText' => '', - ]; - - if (0 !== $job->extended_status['steps']) { - $result['percentage'] = round(($job->extended_status['done'] / $job->extended_status['steps']) * 100, 0); - $result['show_percentage'] = true; - } - - if ('finished' === $job->status) { - $tagId = $job->extended_status['tag']; - /** @var TagRepositoryInterface $repository */ - $repository = app(TagRepositoryInterface::class); - $tag = $repository->find($tagId); - $result['finished'] = true; - $result['finishedText'] = trans('firefly.import_status_finished_job', ['link' => route('tags.show', [$tag->id, 'all']), 'tag' => $tag->tag]); - } - - if ('running' === $job->status) { - $result['started'] = true; - $result['running'] = true; - } - - return Response::json($result); - } - - /** - * Step 4. Save the configuration. - * - * @param Request $request - * @param ImportJob $job - * - * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector - */ - public function postConfigure(Request $request, ImportJob $job) - { - Log::debug('Now in postConfigure()', ['job' => $job->key]); - $configurator = $this->makeConfigurator($job); - - // is the job already configured? - if ($configurator->isJobConfigured()) { - return redirect(route('import.file.status', [$job->key])); - } - $data = $request->all(); - $configurator->configureJob($data); - - // get possible warning from configurator: - $warning = $configurator->getWarningMessage(); - - if (strlen($warning) > 0) { - Session::flash('warning', $warning); - } - - // return to configure - return redirect(route('import.file.configure', [$job->key])); - } - - /** - * @param ImportJob $job - * - * @return \Illuminate\Http\JsonResponse - * - * @throws FireflyException - */ - public function start(ImportJob $job) - { - /** @var ImportRoutine $routine */ - $routine = app(ImportRoutine::class); - $routine->setJob($job); - $result = $routine->run(); - if ($result) { - return Response::json(['run' => 'ok']); - } - - throw new FireflyException('Job did not complete succesfully.'); - } - - /** - * @param ImportJob $job - * - * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|View - */ - public function status(ImportJob $job) - { - $statuses = ['configured', 'running', 'finished']; - if (!in_array($job->status, $statuses)) { - return redirect(route('import.file.configure', [$job->key])); - } - $subTitle = trans('firefly.import_status_sub_title'); - $subTitleIcon = 'fa-star'; - - return view('import.file.status', compact('job', 'subTitle', 'subTitleIcon')); - } - - /** - * @param ImportJob $job - * - * @return ConfiguratorInterface - * - * @throws FireflyException - */ - private function makeConfigurator(ImportJob $job): ConfiguratorInterface - { - $type = $job->file_type; - $key = sprintf('firefly.import_configurators.%s', $type); - $className = config($key); - if (null === $className) { - throw new FireflyException('Cannot find configurator class for this job.'); // @codeCoverageIgnore - } - /** @var ConfiguratorInterface $configurator */ - $configurator = app($className); - $configurator->setJob($job); - - return $configurator; - } -} diff --git a/app/Http/Controllers/Import/IndexController.php b/app/Http/Controllers/Import/IndexController.php new file mode 100644 index 0000000000..b6617e189e --- /dev/null +++ b/app/Http/Controllers/Import/IndexController.php @@ -0,0 +1,162 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Http\Controllers\Import; + +use FireflyIII\Exceptions\FireflyException; +use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Http\Middleware\IsDemoUser; +use FireflyIII\Import\Routine\RoutineInterface; +use FireflyIII\Models\ImportJob; +use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface; +use Illuminate\Http\Response as LaravelResponse; +use Log; +use Response; +use View; + +/** + * Class FileController. + */ +class IndexController extends Controller +{ + /** @var ImportJobRepositoryInterface */ + public $repository; + + /** + * + */ + public function __construct() + { + parent::__construct(); + + $this->middleware( + function ($request, $next) { + app('view')->share('mainTitleIcon', 'fa-archive'); + app('view')->share('title', trans('firefly.import_index_title')); + $this->repository = app(ImportJobRepositoryInterface::class); + + return $next($request); + } + ); + + $this->middleware(IsDemoUser::class)->except(['create', 'index']); + } + + /** + * Creates a new import job for $bank with the default (global) job configuration. + * + * @param string $bank + * + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector + * + * @throws FireflyException + */ + public function create(string $bank) + { + if (true === !(config(sprintf('import.enabled.%s', $bank)))) { + throw new FireflyException(sprintf('Cannot import from "%s" at this time.', $bank)); // @codeCoverageIgnore + } + + $importJob = $this->repository->create($bank); + + // from here, always go to configure step. + return redirect(route('import.configure', [$importJob->key])); + } + + /** + * Generate a JSON file of the job's configuration and send it to the user. + * + * @param ImportJob $job + * + * @return LaravelResponse + */ + public function download(ImportJob $job) + { + Log::debug('Now in download()', ['job' => $job->key]); + $config = $job->configuration; + + // This is CSV import specific: + $config['column-roles-complete'] = false; + $config['column-mapping-complete'] = false; + $config['initial-config-complete'] = false; + $config['has-file-upload'] = false; + $config['delimiter'] = "\t" === $config['delimiter'] ? 'tab' : $config['delimiter']; + + $result = json_encode($config, JSON_PRETTY_PRINT); + $name = sprintf('"%s"', addcslashes('import-configuration-' . date('Y-m-d') . '.json', '"\\')); + + /** @var LaravelResponse $response */ + $response = response($result, 200); + $response->header('Content-disposition', 'attachment; filename=' . $name) + ->header('Content-Type', 'application/json') + ->header('Content-Description', 'File Transfer') + ->header('Connection', 'Keep-Alive') + ->header('Expires', '0') + ->header('Cache-Control', 'must-revalidate, post-check=0, pre-check=0') + ->header('Pragma', 'public') + ->header('Content-Length', strlen($result)); + + return $response; + } + + /** + * General import index. + * + * @return View + */ + public function index() + { + $subTitle = trans('firefly.import_index_sub_title'); + $subTitleIcon = 'fa-home'; + $routines = config('import.enabled'); + + return view('import.index', compact('subTitle', 'subTitleIcon', 'routines')); + } + + /** + * @param ImportJob $job + * + * @return \Illuminate\Http\JsonResponse + * + * @throws FireflyException + */ + public function start(ImportJob $job) + { + $type = $job->file_type; + $key = sprintf('import.routine.%s', $type); + $className = config($key); + if (null === $className || !class_exists($className)) { + throw new FireflyException(sprintf('Cannot find import routine class for job of type "%s".', $type)); // @codeCoverageIgnore + } + + /** @var RoutineInterface $routine */ + $routine = app($className); + $routine->setJob($job); + $result = $routine->run(); + + if ($result) { + return Response::json(['run' => 'ok']); + } + + throw new FireflyException('Job did not complete successfully. Please review the log files.'); + } +} diff --git a/app/Http/Controllers/Import/PrerequisitesController.php b/app/Http/Controllers/Import/PrerequisitesController.php new file mode 100644 index 0000000000..42a7b3d243 --- /dev/null +++ b/app/Http/Controllers/Import/PrerequisitesController.php @@ -0,0 +1,138 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Http\Controllers\Import; + +use FireflyIII\Exceptions\FireflyException; +use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Http\Middleware\IsDemoUser; +use FireflyIII\Import\Prerequisites\PrerequisitesInterface; +use Illuminate\Http\Request; +use Log; + +/** + * Class PrerequisitesController + */ +class PrerequisitesController extends Controller +{ + + /** + * + */ + public function __construct() + { + parent::__construct(); + + $this->middleware( + function ($request, $next) { + app('view')->share('mainTitleIcon', 'fa-archive'); + app('view')->share('title', trans('firefly.import_index_title')); + + return $next($request); + } + ); + $this->middleware(IsDemoUser::class); + } + + /** + * Once there are no prerequisites, this method will create an importjob object and + * redirect the user to a view where this object can be used by a bank specific + * class to process. + * + * @param string $bank + * + * @return \Illuminate\View\View|\Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse + * + * @throws FireflyException + */ + public function index(string $bank) + { + if (true === !(config(sprintf('import.enabled.%s', $bank)))) { + throw new FireflyException(sprintf('Cannot import from "%s" at this time.', $bank)); // @codeCoverageIgnore + } + $class = strval(config(sprintf('import.prerequisites.%s', $bank))); + if (!class_exists($class)) { + throw new FireflyException(sprintf('No class to handle "%s".', $bank)); // @codeCoverageIgnore + } + + /** @var PrerequisitesInterface $object */ + $object = app($class); + $object->setUser(auth()->user()); + + if ($object->hasPrerequisites()) { + $view = $object->getView(); + $parameters = ['title' => strval(trans('firefly.import_index_title')), 'mainTitleIcon' => 'fa-archive']; + $parameters = array_merge($object->getViewParameters(), $parameters); + + return view($view, $parameters); + } + + // if no (more) prerequisites, return to create a job: + return redirect(route('import.create-job', [$bank])); + } + + /** + * This method processes the prerequisites the user has entered in the previous step. + * + * Whatever storePrerequisites does, it should make sure that the system is ready to continue immediately. So + * no extra calls or stuff, except maybe to open a session + * + * @see PrerequisitesInterface::storePrerequisites + * + * @param Request $request + * @param string $bank + * + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector + * + * @throws FireflyException + */ + public function post(Request $request, string $bank) + { + Log::debug(sprintf('Now in postPrerequisites for %s', $bank)); + + if (true === !(config(sprintf('import.enabled.%s', $bank)))) { + throw new FireflyException(sprintf('Cannot import from "%s" at this time.', $bank)); // @codeCoverageIgnore + } + + $class = strval(config(sprintf('import.prerequisites.%s', $bank))); + if (!class_exists($class)) { + throw new FireflyException(sprintf('Cannot find class %s', $class)); // @codeCoverageIgnore + } + /** @var PrerequisitesInterface $object */ + $object = app($class); + $object->setUser(auth()->user()); + if (!$object->hasPrerequisites()) { + Log::debug(sprintf('No more prerequisites for %s, move to form.', $bank)); + + return redirect(route('import.create-job', [$bank])); + } + Log::debug('Going to store entered prerequisites.'); + // store post data + $result = $object->storePrerequisites($request); + + if ($result->count() > 0) { + $request->session()->flash('error', $result->first()); + } + + return redirect(route('import.prerequisites', [$bank])); + } +} diff --git a/app/Http/Controllers/Import/StatusController.php b/app/Http/Controllers/Import/StatusController.php new file mode 100644 index 0000000000..fd54229a95 --- /dev/null +++ b/app/Http/Controllers/Import/StatusController.php @@ -0,0 +1,113 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Http\Controllers\Import; + +use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Models\ImportJob; +use FireflyIII\Repositories\Tag\TagRepositoryInterface; +use Response; + +/** + * Class StatusController + */ +class StatusController extends Controller +{ + /** + * + */ + public function __construct() + { + parent::__construct(); + + $this->middleware( + function ($request, $next) { + app('view')->share('mainTitleIcon', 'fa-archive'); + app('view')->share('title', trans('firefly.import_index_title')); + + return $next($request); + } + ); + } + + /** + * @param ImportJob $job + * + * @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View + */ + public function index(ImportJob $job) + { + $statuses = ['configured', 'running', 'finished', 'error']; + if (!in_array($job->status, $statuses)) { + return redirect(route('import.configure', [$job->key])); + } + $subTitle = trans('import.status_sub_title'); + $subTitleIcon = 'fa-star'; + + return view('import.status', compact('job', 'subTitle', 'subTitleIcon')); + } + + /** + * Show status of import job in JSON. + * + * @param ImportJob $job + * + * @return \Illuminate\Http\JsonResponse + */ + public function json(ImportJob $job) + { + $result = [ + 'started' => false, + 'finished' => false, + 'running' => false, + 'errors' => array_values($job->extended_status['errors']), + 'percentage' => 0, + 'show_percentage' => false, + 'steps' => $job->extended_status['steps'], + 'done' => $job->extended_status['done'], + 'statusText' => trans('import.status_job_' . $job->status), + 'status' => $job->status, + 'finishedText' => '', + ]; + + if (0 !== $job->extended_status['steps']) { + $result['percentage'] = round(($job->extended_status['done'] / $job->extended_status['steps']) * 100, 0); + $result['show_percentage'] = true; + } + + if ('finished' === $job->status) { + $tagId = $job->extended_status['tag']; + /** @var TagRepositoryInterface $repository */ + $repository = app(TagRepositoryInterface::class); + $tag = $repository->find($tagId); + $result['finished'] = true; + $result['finishedText'] = trans('import.status_finished_job', ['link' => route('tags.show', [$tag->id, 'all']), 'tag' => $tag->tag]); + } + + if ('running' === $job->status) { + $result['started'] = true; + $result['running'] = true; + } + + return Response::json($result); + } +} diff --git a/app/Http/Controllers/ImportController.php b/app/Http/Controllers/ImportController.php deleted file mode 100644 index 8d513b1e91..0000000000 --- a/app/Http/Controllers/ImportController.php +++ /dev/null @@ -1,72 +0,0 @@ -. - */ -declare(strict_types=1); - -namespace FireflyIII\Http\Controllers; - -use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface; -use View; - -/** - * Class ImportController. - */ -class ImportController extends Controller -{ - /** @var ImportJobRepositoryInterface */ - public $repository; - - /** - * - */ - public function __construct() - { - parent::__construct(); - - $this->middleware( - function ($request, $next) { - View::share('mainTitleIcon', 'fa-archive'); - View::share('title', trans('firefly.import_index_title')); - $this->repository = app(ImportJobRepositoryInterface::class); - - return $next($request); - } - ); - } - - /** - * General import index. - * - * @return View - */ - public function index() - { - $subTitle = trans('firefly.import_index_sub_title'); - $subTitleIcon = 'fa-home'; - $importFileTypes = []; - $defaultImportType = config('firefly.default_import_format'); - - foreach (array_keys(config('firefly.import_formats')) as $type) { - $importFileTypes[$type] = trans('firefly.import_file_type_' . $type); - } - - return view('import.index', compact('subTitle', 'subTitleIcon', 'importFileTypes', 'defaultImportType')); - } -} diff --git a/app/Http/Controllers/JavascriptController.php b/app/Http/Controllers/JavascriptController.php index 6ec063da76..afdbd59db9 100644 --- a/app/Http/Controllers/JavascriptController.php +++ b/app/Http/Controllers/JavascriptController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -30,7 +30,6 @@ use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use Illuminate\Http\Request; use Log; -use Navigation; use Preferences; /** @@ -88,7 +87,9 @@ class JavascriptController extends Controller } /** - * @param Request $request + * @param Request $request + * @param AccountRepositoryInterface $repository + * @param CurrencyRepositoryInterface $currencyRepository * * @return \Illuminate\Http\Response */ @@ -139,34 +140,43 @@ class JavascriptController extends Controller $end = session('end'); $first = session('first'); $title = sprintf('%s - %s', $start->formatLocalized($this->monthAndDayFormat), $end->formatLocalized($this->monthAndDayFormat)); - $isCustom = session('is_custom_range'); + $isCustom = true === session('is_custom_range', false); + $today = new Carbon; $ranges = [ // first range is the current range: $title => [$start, $end], ]; Log::debug(sprintf('viewRange is %s', $viewRange)); + Log::debug(sprintf('isCustom is %s', var_export($isCustom, true))); // when current range is a custom range, add the current period as the next range. if ($isCustom) { Log::debug('Custom is true.'); - $index = Navigation::periodShow($start, $viewRange); - $customPeriodStart = Navigation::startOfPeriod($start, $viewRange); - $customPeriodEnd = Navigation::endOfPeriod($customPeriodStart, $viewRange); + $index = app('navigation')->periodShow($start, $viewRange); + $customPeriodStart = app('navigation')->startOfPeriod($start, $viewRange); + $customPeriodEnd = app('navigation')->endOfPeriod($customPeriodStart, $viewRange); $ranges[$index] = [$customPeriodStart, $customPeriodEnd]; } // then add previous range and next range - $previousDate = Navigation::subtractPeriod($start, $viewRange); - $index = Navigation::periodShow($previousDate, $viewRange); - $previousStart = Navigation::startOfPeriod($previousDate, $viewRange); - $previousEnd = Navigation::endOfPeriod($previousStart, $viewRange); + $previousDate = app('navigation')->subtractPeriod($start, $viewRange); + $index = app('navigation')->periodShow($previousDate, $viewRange); + $previousStart = app('navigation')->startOfPeriod($previousDate, $viewRange); + $previousEnd = app('navigation')->endOfPeriod($previousStart, $viewRange); $ranges[$index] = [$previousStart, $previousEnd]; - $nextDate = Navigation::addPeriod($start, $viewRange, 0); - $index = Navigation::periodShow($nextDate, $viewRange); - $nextStart = Navigation::startOfPeriod($nextDate, $viewRange); - $nextEnd = Navigation::endOfPeriod($nextStart, $viewRange); + $nextDate = app('navigation')->addPeriod($start, $viewRange, 0); + $index = app('navigation')->periodShow($nextDate, $viewRange); + $nextStart = app('navigation')->startOfPeriod($nextDate, $viewRange); + $nextEnd = app('navigation')->endOfPeriod($nextStart, $viewRange); $ranges[$index] = [$nextStart, $nextEnd]; + // today: + $todayStart = app('navigation')->startOfPeriod($today, $viewRange); + $todayEnd = app('navigation')->endOfPeriod($todayStart, $viewRange); + if ($todayStart->ne($start) || $todayEnd->ne($end)) { + $ranges[ucfirst(strval(trans('firefly.today')))] = [$todayStart, $todayEnd]; + } + // everything $index = strval(trans('firefly.everything')); $ranges[$index] = [$first, new Carbon]; diff --git a/app/Http/Controllers/Json/AutoCompleteController.php b/app/Http/Controllers/Json/AutoCompleteController.php index 1cbd9c26e2..6e28443d54 100644 --- a/app/Http/Controllers/Json/AutoCompleteController.php +++ b/app/Http/Controllers/Json/AutoCompleteController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -81,7 +81,7 @@ class AutoCompleteController extends Controller $set = $repository->getAccountsByType([AccountType::EXPENSE, AccountType::BENEFICIARY]); $filtered = $set->filter( function (Account $account) { - if ($account->active) { + if ($account->active === true) { return $account; } @@ -138,7 +138,7 @@ class AutoCompleteController extends Controller $set = $repository->getAccountsByType([AccountType::REVENUE]); $filtered = $set->filter( function (Account $account) { - if ($account->active) { + if ($account->active === true) { return $account; } diff --git a/app/Http/Controllers/Json/BoxController.php b/app/Http/Controllers/Json/BoxController.php index 29ecc6bdf7..7c6810613e 100644 --- a/app/Http/Controllers/Json/BoxController.php +++ b/app/Http/Controllers/Json/BoxController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Controllers/Json/ExchangeController.php b/app/Http/Controllers/Json/ExchangeController.php index 096398caa8..4fd83001fe 100644 --- a/app/Http/Controllers/Json/ExchangeController.php +++ b/app/Http/Controllers/Json/ExchangeController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Controllers/Json/FrontpageController.php b/app/Http/Controllers/Json/FrontpageController.php index c0390c6ffd..f2d549bf6d 100644 --- a/app/Http/Controllers/Json/FrontpageController.php +++ b/app/Http/Controllers/Json/FrontpageController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -36,6 +36,8 @@ class FrontpageController extends Controller * @param PiggyBankRepositoryInterface $repository * * @return \Illuminate\Http\JsonResponse + * + * @throws \Throwable */ public function piggyBanks(PiggyBankRepositoryInterface $repository) { diff --git a/app/Http/Controllers/Json/IntroController.php b/app/Http/Controllers/Json/IntroController.php index 78f10480a0..ace783ae57 100644 --- a/app/Http/Controllers/Json/IntroController.php +++ b/app/Http/Controllers/Json/IntroController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -32,6 +32,8 @@ use Response; class IntroController { /** + * Get the intro steps. There are currently no specific routes with an outro step. + * * @param string $route * @param string $specificPage * @@ -39,12 +41,16 @@ class IntroController */ public function getIntroSteps(string $route, string $specificPage = '') { + Log::debug(sprintf('getIntroSteps for route "%s" and page "%s"', $route, $specificPage)); $steps = $this->getBasicSteps($route); $specificSteps = $this->getSpecificSteps($route, $specificPage); if (0 === count($specificSteps)) { + Log::debug(sprintf('No specific steps for route "%s" and page "%s"', $route, $specificPage)); + return Response::json($steps); } if ($this->hasOutroStep($route)) { + // @codeCoverageIgnoreStart // save last step: $lastStep = $steps[count($steps) - 1]; // remove last step: @@ -52,6 +58,7 @@ class IntroController // merge arrays and add last step again $steps = array_merge($steps, $specificSteps); $steps[] = $lastStep; + // @codeCoverageIgnoreEnd } if (!$this->hasOutroStep($route)) { $steps = array_merge($steps, $specificSteps); @@ -68,13 +75,16 @@ class IntroController public function hasOutroStep(string $route): bool { $routeKey = str_replace('.', '_', $route); + Log::debug(sprintf('Has outro step for route %s', $routeKey)); $elements = config(sprintf('intro.%s', $routeKey)); if (!is_array($elements)) { return false; } - $keys = array_keys($elements); + Log::debug('Elements is array', $elements); + Log::debug('Keys is', array_keys($elements)); + Log::debug(sprintf('Keys has "outro": %s', var_export(in_array('outro', array_keys($elements)), true))); - return in_array('outro', $keys); + return in_array('outro', array_keys($elements)); } /** @@ -135,6 +145,7 @@ class IntroController $steps[] = $currentStep; } } + Log::debug(sprintf('Total basic steps for %s is %d', $routeKey, count($steps))); return $steps; } @@ -147,7 +158,8 @@ class IntroController */ private function getSpecificSteps(string $route, string $specificPage): array { - $steps = []; + $steps = []; + $routeKey = ''; // user is on page with specific instructions: if (strlen($specificPage) > 0) { @@ -165,6 +177,7 @@ class IntroController } } } + Log::debug(sprintf('Total specific steps for route "%s" and page "%s" (routeKey is "%s") is %d', $route, $specificPage, $routeKey, count($steps))); return $steps; } diff --git a/app/Http/Controllers/JsonController.php b/app/Http/Controllers/JsonController.php index a9239d71c1..98f5ca62b4 100644 --- a/app/Http/Controllers/JsonController.php +++ b/app/Http/Controllers/JsonController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -46,6 +46,8 @@ class JsonController extends Controller * @param Request $request * * @return \Illuminate\Http\JsonResponse + * + * @throws \Throwable */ public function action(Request $request) { @@ -120,6 +122,8 @@ class JsonController extends Controller * @param Request $request * * @return \Illuminate\Http\JsonResponse + * + * @throws \Throwable */ public function trigger(Request $request) { diff --git a/app/Http/Controllers/NewUserController.php b/app/Http/Controllers/NewUserController.php index efa5ae5ab7..be61c563b7 100644 --- a/app/Http/Controllers/NewUserController.php +++ b/app/Http/Controllers/NewUserController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -56,8 +56,8 @@ class NewUserController extends Controller */ public function index(AccountRepositoryInterface $repository) { - View::share('title', trans('firefly.welcome')); - View::share('mainTitleIcon', 'fa-fire'); + app('view')->share('title', trans('firefly.welcome')); + app('view')->share('mainTitleIcon', 'fa-fire'); $types = config('firefly.accountTypesByIdentifier.asset'); $count = $repository->count($types); @@ -114,7 +114,7 @@ class NewUserController extends Controller 'virtualBalance' => 0, 'active' => true, 'accountRole' => 'defaultAsset', - 'openingBalance' => round($request->input('bank_balance'), 12), + 'openingBalance' => $request->input('bank_balance'), 'openingBalanceDate' => new Carbon, 'currency_id' => intval($request->input('amount_currency_id_bank_balance')), ]; @@ -139,7 +139,7 @@ class NewUserController extends Controller 'virtualBalance' => 0, 'active' => true, 'accountRole' => 'savingAsset', - 'openingBalance' => round($request->input('savings_balance'), 12), + 'openingBalance' => $request->input('savings_balance'), 'openingBalanceDate' => new Carbon, 'currency_id' => intval($request->input('amount_currency_id_bank_balance')), ]; diff --git a/app/Http/Controllers/PiggyBankController.php b/app/Http/Controllers/PiggyBankController.php index 875adce839..75ecd6284e 100644 --- a/app/Http/Controllers/PiggyBankController.php +++ b/app/Http/Controllers/PiggyBankController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -30,7 +30,7 @@ use FireflyIII\Models\PiggyBank; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\PiggyBank\PiggyBankRepositoryInterface; use Illuminate\Http\Request; -use Illuminate\Support\Collection; +use Illuminate\Pagination\LengthAwarePaginator; use Log; use Preferences; use Response; @@ -52,8 +52,8 @@ class PiggyBankController extends Controller $this->middleware( function ($request, $next) { - View::share('title', trans('firefly.piggyBanks')); - View::share('mainTitleIcon', 'fa-sort-amount-asc'); + app('view')->share('title', trans('firefly.piggyBanks')); + app('view')->share('mainTitleIcon', 'fa-sort-amount-asc'); return $next($request); } @@ -120,8 +120,6 @@ class PiggyBankController extends Controller $this->rememberPreviousUri('piggy-banks.create.uri'); } Session::forget('piggy-banks.create.fromStore'); - Session::flash('gaEventCategory', 'piggy-banks'); - Session::flash('gaEventAction', 'create'); return view('piggy-banks.create', compact('accounts', 'subTitle', 'subTitleIcon')); } @@ -137,8 +135,6 @@ class PiggyBankController extends Controller // put previous url in session $this->rememberPreviousUri('piggy-banks.delete.uri'); - Session::flash('gaEventCategory', 'piggy-banks'); - Session::flash('gaEventAction', 'delete'); return view('piggy-banks.delete', compact('piggyBank', 'subTitle')); } @@ -188,8 +184,6 @@ class PiggyBankController extends Controller 'note' => null === $note ? '' : $note->text, ]; Session::flash('preFilled', $preFilled); - Session::flash('gaEventCategory', 'piggy-banks'); - Session::flash('gaEventAction', 'edit'); // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('piggy-banks.edit.fromUpdate')) { @@ -205,17 +199,19 @@ class PiggyBankController extends Controller * * @return View */ - public function index(PiggyBankRepositoryInterface $piggyRepository) + public function index(Request $request, PiggyBankRepositoryInterface $piggyRepository) { - /** @var Collection $piggyBanks */ - $piggyBanks = $piggyRepository->getPiggyBanks(); + $collection = $piggyRepository->getPiggyBanks(); + $total = $collection->count(); + $page = 0 === intval($request->get('page')) ? 1 : intval($request->get('page')); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); /** @var Carbon $end */ $end = session('end', Carbon::now()->endOfMonth()); $accounts = []; Log::debug('Looping piggues'); /** @var PiggyBank $piggyBank */ - foreach ($piggyBanks as $piggyBank) { + foreach ($collection as $piggyBank) { $piggyBank->savedSoFar = $piggyBank->currentRelevantRep()->currentamount ?? '0'; $piggyBank->percentage = 0 !== bccomp('0', $piggyBank->savedSoFar) ? intval($piggyBank->savedSoFar / $piggyBank->targetamount * 100) : 0; $piggyBank->leftToSave = bcsub($piggyBank->targetamount, strval($piggyBank->savedSoFar)); @@ -242,6 +238,11 @@ class PiggyBankController extends Controller } } + // paginate piggy banks + $collection = $collection->slice(($page - 1) * $pageSize, $pageSize); + $piggyBanks = new LengthAwarePaginator($collection, $total, $pageSize, $page); + $piggyBanks->setPath(route('piggy-banks.index')); + return view('piggy-banks.index', compact('piggyBanks', 'accounts')); } @@ -401,7 +402,6 @@ class PiggyBankController extends Controller } $piggyBank = $repository->store($data); - Session::flash('success', strval(trans('firefly.stored_piggy_bank', ['name' => $piggyBank->name]))); Preferences::mark(); diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.php index 1b08f49932..b7d3fc7654 100644 --- a/app/Http/Controllers/Popup/ReportController.php +++ b/app/Http/Controllers/Popup/ReportController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -32,6 +32,7 @@ use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Support\Binder\AccountList; use Illuminate\Http\Request; +use Illuminate\Routing\Route; use InvalidArgumentException; use Response; use View; @@ -81,6 +82,11 @@ class ReportController extends Controller * @return \Illuminate\Http\JsonResponse * * @throws FireflyException + * @throws \Throwable + * @throws \Throwable + * @throws \Throwable + * @throws \Throwable + * @throws \Throwable */ public function general(Request $request) { @@ -119,6 +125,7 @@ class ReportController extends Controller * @return string * * @throws FireflyException + * @throws \Throwable */ private function balanceAmount(array $attributes): string { @@ -156,7 +163,7 @@ class ReportController extends Controller * * @return string * - * @throws FireflyException + * @throws \Throwable */ private function budgetSpentAmount(array $attributes): string { @@ -170,11 +177,11 @@ class ReportController extends Controller /** * Returns all expenses in category in range. * - * @param $attributes + * @param array $attributes * * @return string * - * @throws FireflyException + * @throws \Throwable */ private function categoryEntry(array $attributes): string { @@ -188,11 +195,11 @@ class ReportController extends Controller /** * Returns all the expenses that went to the given expense account. * - * @param $attributes + * @param array $attributes * * @return string * - * @throws FireflyException + * @throws \Throwable */ private function expenseEntry(array $attributes): string { @@ -206,11 +213,11 @@ class ReportController extends Controller /** * Returns all the incomes that went to the given asset account. * - * @param $attributes + * @param array $attributes * * @return string * - * @throws FireflyException + * @throws \Throwable */ private function incomeEntry(array $attributes): string { @@ -231,7 +238,7 @@ class ReportController extends Controller private function parseAttributes(array $attributes): array { $attributes['location'] = $attributes['location'] ?? ''; - $attributes['accounts'] = AccountList::routeBinder($attributes['accounts'] ?? '', ''); + $attributes['accounts'] = AccountList::routeBinder($attributes['accounts'] ?? '', new Route('get', '', [])); try { $attributes['startDate'] = Carbon::createFromFormat('Ymd', $attributes['startDate']); } catch (InvalidArgumentException $e) { diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php index f97f87bde5..75e3a70a50 100644 --- a/app/Http/Controllers/PreferencesController.php +++ b/app/Http/Controllers/PreferencesController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -26,8 +26,8 @@ use FireflyIII\Http\Requests\TokenFormRequest; use FireflyIII\Models\AccountType; use FireflyIII\Repositories\Account\AccountRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface; +use Google2FA; use Illuminate\Http\Request; -use PragmaRX\Google2FA\Contracts\Google2FA; use Preferences; use Session; use View; @@ -46,8 +46,8 @@ class PreferencesController extends Controller $this->middleware( function ($request, $next) { - View::share('title', trans('firefly.preferences')); - View::share('mainTitleIcon', 'fa-gear'); + app('view')->share('title', trans('firefly.preferences')); + app('view')->share('mainTitleIcon', 'fa-gear'); return $next($request); } @@ -55,22 +55,23 @@ class PreferencesController extends Controller } /** - * @param Google2FA $google2fa - * * @return View */ - public function code(Google2FA $google2fa) + public function code() { $domain = $this->getDomain(); - $secret = $google2fa->generateSecretKey(); + $secret = Google2FA::generateSecretKey(); Session::flash('two-factor-secret', $secret); - $image = $google2fa->getQRCodeInline($domain, auth()->user()->email, $secret, 200); + $image = Google2FA::getQRCodeInline($domain, auth()->user()->email, $secret, 200); return view('preferences.code', compact('image')); } /** * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector + * + * @throws \Exception + * @throws \Exception */ public function deleteCode() { @@ -89,19 +90,19 @@ class PreferencesController extends Controller */ public function index(AccountRepositoryInterface $repository) { - $accounts = $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]); - $viewRangePref = Preferences::get('viewRange', '1M'); - $viewRange = $viewRangePref->data; - $frontPageAccounts = Preferences::get('frontPageAccounts', []); - $language = Preferences::get('language', config('firefly.default_language', 'en_US'))->data; - $transactionPageSize = Preferences::get('transactionPageSize', 50)->data; - $customFiscalYear = Preferences::get('customFiscalYear', 0)->data; - $showDeps = Preferences::get('showDepositsFrontpage', false)->data; - $fiscalYearStartStr = Preferences::get('fiscalYearStart', '01-01')->data; - $fiscalYearStart = date('Y') . '-' . $fiscalYearStartStr; - $tjOptionalFields = Preferences::get('transaction_journal_optional_fields', [])->data; - $is2faEnabled = Preferences::get('twoFactorAuthEnabled', 0)->data; // twoFactorAuthEnabled - $has2faSecret = null !== Preferences::get('twoFactorAuthSecret'); // hasTwoFactorAuthSecret + $accounts = $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET]); + $viewRangePref = Preferences::get('viewRange', '1M'); + $viewRange = $viewRangePref->data; + $frontPageAccounts = Preferences::get('frontPageAccounts', []); + $language = Preferences::get('language', config('firefly.default_language', 'en_US'))->data; + $listPageSize = Preferences::get('listPageSize', 50)->data; + $customFiscalYear = Preferences::get('customFiscalYear', 0)->data; + $showDeps = Preferences::get('showDepositsFrontpage', false)->data; + $fiscalYearStartStr = Preferences::get('fiscalYearStart', '01-01')->data; + $fiscalYearStart = date('Y') . '-' . $fiscalYearStartStr; + $tjOptionalFields = Preferences::get('transaction_journal_optional_fields', [])->data; + $is2faEnabled = Preferences::get('twoFactorAuthEnabled', 0)->data; // twoFactorAuthEnabled + $has2faSecret = null !== Preferences::get('twoFactorAuthSecret'); // hasTwoFactorAuthSecret return view( 'preferences.index', @@ -112,7 +113,7 @@ class PreferencesController extends Controller 'tjOptionalFields', 'viewRange', 'customFiscalYear', - 'transactionPageSize', + 'listPageSize', 'fiscalYearStart', 'is2faEnabled', 'has2faSecret', @@ -173,10 +174,10 @@ class PreferencesController extends Controller Preferences::set('showDepositsFrontpage', $showDepositsFrontpage); // save page size: - Preferences::set('transactionPageSize', 50); - $transactionPageSize = intval($request->get('transactionPageSize')); - if ($transactionPageSize > 0 && $transactionPageSize < 1337) { - Preferences::set('transactionPageSize', $transactionPageSize); + Preferences::set('listPageSize', 50); + $listPageSize = intval($request->get('listPageSize')); + if ($listPageSize > 0 && $listPageSize < 1337) { + Preferences::set('listPageSize', $listPageSize); } $twoFactorAuthEnabled = false; diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 959b46b342..ceb9ad16ae 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -26,7 +26,8 @@ use Auth; use FireflyIII\Events\UserChangedEmail; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\ValidationException; -use FireflyIII\Http\Middleware\IsLimitedUser; +use FireflyIII\Http\Middleware\IsDemoUser; +use FireflyIII\Http\Middleware\IsSandStormUser; use FireflyIII\Http\Requests\DeleteAccountFormRequest; use FireflyIII\Http\Requests\EmailFormRequest; use FireflyIII\Http\Requests\ProfileFormRequest; @@ -56,13 +57,14 @@ class ProfileController extends Controller $this->middleware( function ($request, $next) { - View::share('title', trans('firefly.profile')); - View::share('mainTitleIcon', 'fa-user'); + app('view')->share('title', trans('firefly.profile')); + app('view')->share('mainTitleIcon', 'fa-user'); return $next($request); } ); - $this->middleware(IsLimitedUser::class)->except(['confirmEmailChange', 'undoEmailChange']); + $this->middleware(IsDemoUser::class)->except(['index']); + $this->middleware(IsSandStormUser::class)->except('index'); } /** @@ -91,30 +93,33 @@ class ProfileController extends Controller } /** - * @param string $token + * @param UserRepositoryInterface $repository + * @param string $token * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector * * @throws FireflyException */ - public function confirmEmailChange(string $token) + public function confirmEmailChange(UserRepositoryInterface $repository, string $token) { // find preference with this token value. $set = Preferences::findByName('email_change_confirm_token'); $user = null; + Log::debug(sprintf('Found %d preferences', $set->count())); /** @var Preference $preference */ foreach ($set as $preference) { if ($preference->data === $token) { + Log::debug('Found user'); $user = $preference->user; } } // update user to clear blocked and blocked_code. if (null === $user) { + Log::debug('Found no user'); throw new FireflyException('Invalid token.'); } - $user->blocked = 0; - $user->blocked_code = ''; - $user->save(); + Log::debug('Will unblock user.'); + $repository->unblockUser($user); // return to login. Session::flash('success', strval(trans('firefly.login_with_new_email'))); @@ -172,7 +177,7 @@ class ProfileController extends Controller $existing = $repository->findByEmail($newEmail); if (null !== $existing) { // force user logout. - $this->guard()->logout(); + Auth::guard()->logout(); $request->session()->invalidate(); Session::flash('success', strval(trans('firefly.email_changed'))); @@ -241,14 +246,11 @@ class ProfileController extends Controller Session::flush(); $repository->destroy($user); - Session::flash('gaEventCategory', 'user'); - Session::flash('gaEventAction', 'delete-account'); - return redirect(route('index')); } /** - * + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ public function regenerate() { @@ -260,14 +262,15 @@ class ProfileController extends Controller } /** - * @param string $token - * @param string $hash + * @param UserRepositoryInterface $repository + * @param string $token + * @param string $hash * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector * * @throws FireflyException */ - public function undoEmailChange(string $token, string $hash) + public function undoEmailChange(UserRepositoryInterface $repository, string $token, string $hash) { // find preference with this token value. $set = Preferences::findByName('email_change_undo_token'); @@ -284,7 +287,8 @@ class ProfileController extends Controller // found user. // which email address to return to? - $set = Preferences::beginsWith($user, 'previous_email_'); + $set = Preferences::beginsWith($user, 'previous_email_'); + /** @var string $match */ $match = null; foreach ($set as $entry) { $hashed = hash('sha256', $entry->data); @@ -297,10 +301,9 @@ class ProfileController extends Controller throw new FireflyException('Invalid token.'); } // change user back - $user->email = $match; - $user->blocked = 0; - $user->blocked_code = ''; - $user->save(); + // now actually update user: + $repository->changeEmail($user, $match); + $repository->unblockUser($user); // return to login. Session::flash('success', strval(trans('firefly.login_with_old_email'))); diff --git a/app/Http/Controllers/Report/AccountController.php b/app/Http/Controllers/Report/AccountController.php index 56215699f4..c7c8ff447f 100644 --- a/app/Http/Controllers/Report/AccountController.php +++ b/app/Http/Controllers/Report/AccountController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -39,6 +39,8 @@ class AccountController extends Controller * @param Carbon $end * * @return mixed|string + * + * @throws \Throwable */ public function general(Collection $accounts, Carbon $start, Carbon $end) { diff --git a/app/Http/Controllers/Report/BalanceController.php b/app/Http/Controllers/Report/BalanceController.php index af4a0a629d..77aec1cc00 100644 --- a/app/Http/Controllers/Report/BalanceController.php +++ b/app/Http/Controllers/Report/BalanceController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -40,6 +40,8 @@ class BalanceController extends Controller * @param Carbon $end * * @return mixed|string + * + * @throws \Throwable */ public function general(BalanceReportHelperInterface $helper, Collection $accounts, Carbon $start, Carbon $end) { diff --git a/app/Http/Controllers/Report/BudgetController.php b/app/Http/Controllers/Report/BudgetController.php index 60532b58fc..09b42e0a5a 100644 --- a/app/Http/Controllers/Report/BudgetController.php +++ b/app/Http/Controllers/Report/BudgetController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,7 +28,6 @@ use FireflyIII\Http\Controllers\Controller; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; -use Navigation; /** * Class BudgetController. @@ -42,6 +41,8 @@ class BudgetController extends Controller * @param Carbon $end * * @return mixed|string + * + * @throws \Throwable */ public function general(BudgetReportHelperInterface $helper, Collection $accounts, Carbon $start, Carbon $end) { @@ -69,6 +70,8 @@ class BudgetController extends Controller * @param Carbon $end * * @return mixed|string + * + * @throws \Throwable */ public function period(Collection $accounts, Carbon $start, Carbon $end) { @@ -88,7 +91,7 @@ class BudgetController extends Controller $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); + $periods = app('navigation')->listOfPeriods($start, $end); $result = view('reports.partials.budget-period', compact('report', 'periods'))->render(); $cache->store($result); diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index 929b9eb0eb..de3f0f57dc 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,7 +28,6 @@ use FireflyIII\Models\Category; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; -use Navigation; /** * Class CategoryController. @@ -41,6 +40,8 @@ class CategoryController extends Controller * @param Carbon $end * * @return mixed|string + * + * @throws \Throwable */ public function expenses(Collection $accounts, Carbon $start, Carbon $end) { @@ -58,7 +59,7 @@ class CategoryController extends Controller $data = $repository->periodExpenses($categories, $accounts, $start, $end); $data[0] = $repository->periodExpensesNoCategory($accounts, $start, $end); $report = $this->filterReport($data); - $periods = Navigation::listOfPeriods($start, $end); + $periods = app('navigation')->listOfPeriods($start, $end); $result = view('reports.partials.category-period', compact('report', 'periods'))->render(); $cache->store($result); @@ -72,6 +73,8 @@ class CategoryController extends Controller * @param Collection $accounts * * @return string + * + * @throws \Throwable */ public function income(Collection $accounts, Carbon $start, Carbon $end) { @@ -89,7 +92,7 @@ class CategoryController extends Controller $data = $repository->periodIncome($categories, $accounts, $start, $end); $data[0] = $repository->periodIncomeNoCategory($accounts, $start, $end); $report = $this->filterReport($data); - $periods = Navigation::listOfPeriods($start, $end); + $periods = app('navigation')->listOfPeriods($start, $end); $result = view('reports.partials.category-period', compact('report', 'periods'))->render(); $cache->store($result); @@ -105,6 +108,8 @@ class CategoryController extends Controller * @return mixed|string * * @internal param ReportHelperInterface $helper + * + * @throws \Throwable */ public function operations(Collection $accounts, Carbon $start, Carbon $end) { diff --git a/app/Http/Controllers/Report/ExpenseController.php b/app/Http/Controllers/Report/ExpenseController.php new file mode 100644 index 0000000000..90dc90a2ea --- /dev/null +++ b/app/Http/Controllers/Report/ExpenseController.php @@ -0,0 +1,591 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Http\Controllers\Report; + +use Carbon\Carbon; +use FireflyIII\Helpers\Collector\JournalCollectorInterface; +use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Models\Account; +use FireflyIII\Models\AccountType; +use FireflyIII\Models\Transaction; +use FireflyIII\Models\TransactionType; +use FireflyIII\Repositories\Account\AccountRepositoryInterface; +use FireflyIII\Support\CacheProperties; +use Illuminate\Support\Collection; + +/** + * Class ExpenseController + */ +class ExpenseController extends Controller +{ + /** @var AccountRepositoryInterface */ + protected $accountRepository; + + /** + * Constructor for ExpenseController + */ + public function __construct() + { + parent::__construct(); + + // translations: + $this->middleware( + function ($request, $next) { + $this->accountRepository = app(AccountRepositoryInterface::class); + + return $next($request); + } + ); + } + + /** + * Generates the overview per budget. + * + * @param Collection $accounts + * @param Collection $expense + * @param Carbon $start + * @param Carbon $end + * + * @return string + * + * @throws \Throwable + */ + public function budget(Collection $accounts, Collection $expense, Carbon $start, Carbon $end) + { + // Properties for cache: + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('expense-budget'); + $cache->addProperty($accounts->pluck('id')->toArray()); + $cache->addProperty($expense->pluck('id')->toArray()); + if ($cache->has()) { + return $cache->get(); // @codeCoverageIgnore + } + $combined = $this->combineAccounts($expense); + $all = new Collection; + foreach ($combined as $name => $combi) { + $all = $all->merge($combi); + } + // now find spent / earned: + $spent = $this->spentByBudget($accounts, $all, $start, $end); + // join arrays somehow: + $together = []; + foreach ($spent as $categoryId => $spentInfo) { + if (!isset($together[$categoryId])) { + $together[$categoryId]['spent'] = $spentInfo; + $together[$categoryId]['budget'] = $spentInfo['name']; + $together[$categoryId]['grand_total'] = '0'; + } + $together[$categoryId]['grand_total'] = bcadd($spentInfo['grand_total'], $together[$categoryId]['grand_total']); + } + unset($spentInfo); + $result = view('reports.partials.exp-budgets', compact('together'))->render(); + $cache->store($result); + + return $result; + } + + /** + * Generates the overview per category (spent and earned). + * + * @param Collection $accounts + * @param Collection $expense + * @param Carbon $start + * @param Carbon $end + * + * @return string + * + * @throws \Throwable + */ + public function category(Collection $accounts, Collection $expense, Carbon $start, Carbon $end) + { + // Properties for cache: + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('expense-category'); + $cache->addProperty($accounts->pluck('id')->toArray()); + $cache->addProperty($expense->pluck('id')->toArray()); + if ($cache->has()) { + return $cache->get(); // @codeCoverageIgnore + } + $combined = $this->combineAccounts($expense); + $all = new Collection; + foreach ($combined as $name => $combi) { + $all = $all->merge($combi); + } + // now find spent / earned: + $spent = $this->spentByCategory($accounts, $all, $start, $end); + $earned = $this->earnedByCategory($accounts, $all, $start, $end); + // join arrays somehow: + $together = []; + foreach ($spent as $categoryId => $spentInfo) { + if (!isset($together[$categoryId])) { + $together[$categoryId]['spent'] = $spentInfo; + $together[$categoryId]['category'] = $spentInfo['name']; + $together[$categoryId]['grand_total'] = '0'; + } + $together[$categoryId]['grand_total'] = bcadd($spentInfo['grand_total'], $together[$categoryId]['grand_total']); + } + unset($spentInfo); + foreach ($earned as $categoryId => $earnedInfo) { + if (!isset($together[$categoryId])) { + $together[$categoryId]['earned'] = $earnedInfo; + $together[$categoryId]['category'] = $earnedInfo['name']; + $together[$categoryId]['grand_total'] = '0'; + } + $together[$categoryId]['grand_total'] = bcadd($earnedInfo['grand_total'], $together[$categoryId]['grand_total']); + } + + $result = view('reports.partials.exp-categories', compact('together'))->render(); + $cache->store($result); + + return $result; + } + + /** + * Overview of spending + * + * @param Collection $accounts + * @param Collection $expense + * @param Carbon $start + * @param Carbon $end + * + * @return array|mixed|string + * + * @throws \Throwable + */ + public function spent(Collection $accounts, Collection $expense, Carbon $start, Carbon $end) + { + // chart properties for cache: + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('expense-spent'); + $cache->addProperty($accounts->pluck('id')->toArray()); + $cache->addProperty($expense->pluck('id')->toArray()); + if ($cache->has()) { + return $cache->get(); // @codeCoverageIgnore + } + + $combined = $this->combineAccounts($expense); + $result = []; + + foreach ($combined as $name => $combi) { + /** + * @var string + * @var Collection $combi + */ + $spent = $this->spentInPeriod($accounts, $combi, $start, $end); + $earned = $this->earnedInPeriod($accounts, $combi, $start, $end); + $result[$name] = [ + 'spent' => $spent, + 'earned' => $earned, + ]; + } + $result = view('reports.partials.exp-not-grouped', compact('result'))->render(); + $cache->store($result); + + return $result; + // for period, get spent and earned for each account (by name) + } + + /** + * @param Collection $accounts + * @param Collection $expense + * @param Carbon $start + * @param Carbon $end + * + * @return string + * + * @throws \Throwable + */ + public function topExpense(Collection $accounts, Collection $expense, Carbon $start, Carbon $end) + { + // Properties for cache: + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('expense-budget'); + $cache->addProperty($accounts->pluck('id')->toArray()); + $cache->addProperty($expense->pluck('id')->toArray()); + if ($cache->has()) { + return $cache->get(); // @codeCoverageIgnore + } + $combined = $this->combineAccounts($expense); + $all = new Collection; + foreach ($combined as $name => $combi) { + $all = $all->merge($combi); + } + // get all expenses in period: + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setAccounts($accounts); + $collector->setOpposingAccounts($all); + $set = $collector->getJournals(); + $sorted = $set->sortBy( + function (Transaction $transaction) { + return floatval($transaction->transaction_amount); + } + ); + $result = view('reports.partials.top-transactions', compact('sorted'))->render(); + $cache->store($result); + + return $result; + } + + /** + * @param Collection $accounts + * @param Collection $expense + * @param Carbon $start + * @param Carbon $end + * + * @return mixed|string + * + * @throws \Throwable + */ + public function topIncome(Collection $accounts, Collection $expense, Carbon $start, Carbon $end) + { + // Properties for cache: + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('expense-budget'); + $cache->addProperty($accounts->pluck('id')->toArray()); + $cache->addProperty($expense->pluck('id')->toArray()); + if ($cache->has()) { + return $cache->get(); // @codeCoverageIgnore + } + $combined = $this->combineAccounts($expense); + $all = new Collection; + foreach ($combined as $name => $combi) { + $all = $all->merge($combi); + } + // get all expenses in period: + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setRange($start, $end)->setTypes([TransactionType::DEPOSIT])->setAccounts($accounts); + $collector->setOpposingAccounts($all); + $set = $collector->getJournals(); + $sorted = $set->sortByDesc( + function (Transaction $transaction) { + return floatval($transaction->transaction_amount); + } + ); + $result = view('reports.partials.top-transactions', compact('sorted'))->render(); + $cache->store($result); + + return $result; + } + + /** + * @param Collection $accounts + * + * @return array + */ + protected function combineAccounts(Collection $accounts): array + { + $combined = []; + /** @var Account $expenseAccount */ + foreach ($accounts as $expenseAccount) { + $collection = new Collection; + $collection->push($expenseAccount); + + $revenue = $this->accountRepository->findByName($expenseAccount->name, [AccountType::REVENUE]); + if (!is_null($revenue->id)) { + $collection->push($revenue); + } + $combined[$expenseAccount->name] = $collection; + } + + return $combined; + } + + /** + * @param Collection $assets + * @param Collection $opposing + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + protected function earnedByCategory(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array + { + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setRange($start, $end)->setTypes([TransactionType::DEPOSIT])->setAccounts($assets); + $collector->setOpposingAccounts($opposing)->withCategoryInformation(); + $set = $collector->getJournals(); + $sum = []; + // loop to support multi currency + foreach ($set as $transaction) { + $currencyId = $transaction->transaction_currency_id; + $categoryName = $transaction->transaction_category_name; + $categoryId = intval($transaction->transaction_category_id); + // if null, grab from journal: + if (0 === $categoryId) { + $categoryName = $transaction->transaction_journal_category_name; + $categoryId = intval($transaction->transaction_journal_category_id); + } + if (0 !== $categoryId) { + $categoryName = app('steam')->tryDecrypt($categoryName); + } + + // if not set, set to zero: + if (!isset($sum[$categoryId][$currencyId])) { + $sum[$categoryId] = [ + 'grand_total' => '0', + 'name' => $categoryName, + 'per_currency' => [ + $currencyId => [ + 'sum' => '0', + 'category' => [ + 'id' => $categoryId, + 'name' => $categoryName, + ], + 'currency' => [ + 'symbol' => $transaction->transaction_currency_symbol, + 'dp' => $transaction->transaction_currency_dp, + ], + ], + ], + ]; + } + + // add amount + $sum[$categoryId]['per_currency'][$currencyId]['sum'] = bcadd( + $sum[$categoryId]['per_currency'][$currencyId]['sum'], $transaction->transaction_amount + ); + $sum[$categoryId]['grand_total'] = bcadd($sum[$categoryId]['grand_total'], $transaction->transaction_amount); + } + + return $sum; + } + + /** + * @param Collection $assets + * @param Collection $opposing + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + protected function earnedInPeriod(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array + { + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setRange($start, $end)->setTypes([TransactionType::DEPOSIT])->setAccounts($assets); + $collector->setOpposingAccounts($opposing); + $set = $collector->getJournals(); + $sum = [ + 'grand_sum' => '0', + 'per_currency' => [], + ]; + // loop to support multi currency + foreach ($set as $transaction) { + $currencyId = $transaction->transaction_currency_id; + + // if not set, set to zero: + if (!isset($sum['per_currency'][$currencyId])) { + $sum['per_currency'][$currencyId] = [ + 'sum' => '0', + 'currency' => [ + 'symbol' => $transaction->transaction_currency_symbol, + 'dp' => $transaction->transaction_currency_dp, + ], + ]; + } + + // add amount + $sum['per_currency'][$currencyId]['sum'] = bcadd($sum['per_currency'][$currencyId]['sum'], $transaction->transaction_amount); + $sum['grand_sum'] = bcadd($sum['grand_sum'], $transaction->transaction_amount); + } + + return $sum; + } + + /** + * @param Collection $assets + * @param Collection $opposing + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + protected function spentByBudget(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array + { + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setAccounts($assets); + $collector->setOpposingAccounts($opposing)->withBudgetInformation(); + $set = $collector->getJournals(); + $sum = []; + // loop to support multi currency + foreach ($set as $transaction) { + $currencyId = $transaction->transaction_currency_id; + $budgetName = $transaction->transaction_budget_name; + $budgetId = intval($transaction->transaction_budget_id); + // if null, grab from journal: + if (0 === $budgetId) { + $budgetName = $transaction->transaction_journal_budget_name; + $budgetId = intval($transaction->transaction_journal_budget_id); + } + if (0 !== $budgetId) { + $budgetName = app('steam')->tryDecrypt($budgetName); + } + + // if not set, set to zero: + if (!isset($sum[$budgetId][$currencyId])) { + $sum[$budgetId] = [ + 'grand_total' => '0', + 'name' => $budgetName, + 'per_currency' => [ + $currencyId => [ + 'sum' => '0', + 'budget' => [ + 'id' => $budgetId, + 'name' => $budgetName, + ], + 'currency' => [ + 'symbol' => $transaction->transaction_currency_symbol, + 'dp' => $transaction->transaction_currency_dp, + ], + ], + ], + ]; + } + + // add amount + $sum[$budgetId]['per_currency'][$currencyId]['sum'] = bcadd( + $sum[$budgetId]['per_currency'][$currencyId]['sum'], $transaction->transaction_amount + ); + $sum[$budgetId]['grand_total'] = bcadd($sum[$budgetId]['grand_total'], $transaction->transaction_amount); + } + + return $sum; + } + + /** + * @param Collection $assets + * @param Collection $opposing + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + protected function spentByCategory(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array + { + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setAccounts($assets); + $collector->setOpposingAccounts($opposing)->withCategoryInformation(); + $set = $collector->getJournals(); + $sum = []; + // loop to support multi currency + foreach ($set as $transaction) { + $currencyId = $transaction->transaction_currency_id; + $categoryName = $transaction->transaction_category_name; + $categoryId = intval($transaction->transaction_category_id); + // if null, grab from journal: + if (0 === $categoryId) { + $categoryName = $transaction->transaction_journal_category_name; + $categoryId = intval($transaction->transaction_journal_category_id); + } + if (0 !== $categoryId) { + $categoryName = app('steam')->tryDecrypt($categoryName); + } + + // if not set, set to zero: + if (!isset($sum[$categoryId][$currencyId])) { + $sum[$categoryId] = [ + 'grand_total' => '0', + 'name' => $categoryName, + 'per_currency' => [ + $currencyId => [ + 'sum' => '0', + 'category' => [ + 'id' => $categoryId, + 'name' => $categoryName, + ], + 'currency' => [ + 'symbol' => $transaction->transaction_currency_symbol, + 'dp' => $transaction->transaction_currency_dp, + ], + ], + ], + ]; + } + + // add amount + $sum[$categoryId]['per_currency'][$currencyId]['sum'] = bcadd( + $sum[$categoryId]['per_currency'][$currencyId]['sum'], $transaction->transaction_amount + ); + $sum[$categoryId]['grand_total'] = bcadd($sum[$categoryId]['grand_total'], $transaction->transaction_amount); + } + + return $sum; + } + + /** + * @param Collection $assets + * @param Collection $opposing + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + protected function spentInPeriod(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array + { + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setAccounts($assets); + $collector->setOpposingAccounts($opposing); + $set = $collector->getJournals(); + $sum = [ + 'grand_sum' => '0', + 'per_currency' => [], + ]; + // loop to support multi currency + foreach ($set as $transaction) { + $currencyId = $transaction->transaction_currency_id; + + // if not set, set to zero: + if (!isset($sum['per_currency'][$currencyId])) { + $sum['per_currency'][$currencyId] = [ + 'sum' => '0', + 'currency' => [ + 'symbol' => $transaction->transaction_currency_symbol, + 'dp' => $transaction->transaction_currency_dp, + ], + ]; + } + + // add amount + $sum['per_currency'][$currencyId]['sum'] = bcadd($sum['per_currency'][$currencyId]['sum'], $transaction->transaction_amount); + $sum['grand_sum'] = bcadd($sum['grand_sum'], $transaction->transaction_amount); + } + + return $sum; + } +} diff --git a/app/Http/Controllers/Report/OperationsController.php b/app/Http/Controllers/Report/OperationsController.php index 860734891a..c86d3c07d2 100644 --- a/app/Http/Controllers/Report/OperationsController.php +++ b/app/Http/Controllers/Report/OperationsController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -40,6 +40,8 @@ class OperationsController extends Controller * @param Carbon $end * * @return mixed|string + * + * @throws \Throwable */ public function expenses(AccountTaskerInterface $tasker, Collection $accounts, Carbon $start, Carbon $end) { @@ -67,6 +69,8 @@ class OperationsController extends Controller * @param Carbon $end * * @return string + * + * @throws \Throwable */ public function income(AccountTaskerInterface $tasker, Collection $accounts, Carbon $start, Carbon $end) { @@ -95,6 +99,8 @@ class OperationsController extends Controller * @param Carbon $end * * @return mixed|string + * + * @throws \Throwable */ public function operations(AccountTaskerInterface $tasker, Collection $accounts, Carbon $start, Carbon $end) { diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 9a6d131f8b..cd27a709ec 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -59,8 +59,8 @@ class ReportController extends Controller $this->middleware( function ($request, $next) { - View::share('title', trans('firefly.reports')); - View::share('mainTitleIcon', 'fa-line-chart'); + app('view')->share('title', trans('firefly.reports')); + app('view')->share('mainTitleIcon', 'fa-line-chart'); View::share('subTitleIcon', 'fa-calendar'); return $next($request); @@ -70,10 +70,47 @@ class ReportController extends Controller /** * @param Collection $accounts + * @param Collection $expense * @param Carbon $start * @param Carbon $end * * @return string + * + * @throws \FireflyIII\Exceptions\FireflyException + */ + public function accountReport(Collection $accounts, Collection $expense, Carbon $start, Carbon $end) + { + if ($end < $start) { + return view('error')->with('message', trans('firefly.end_after_start_date')); // @codeCoverageIgnore + } + + if ($start < session('first')) { + $start = session('first'); + } + + View::share( + 'subTitle', trans( + 'firefly.report_account', + ['start' => $start->formatLocalized($this->monthFormat), 'end' => $end->formatLocalized($this->monthFormat)] + ) + ); + + $generator = ReportGeneratorFactory::reportGenerator('Account', $start, $end); + $generator->setAccounts($accounts); + $generator->setExpense($expense); + $result = $generator->generate(); + + return $result; + } + + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return string + * + * @throws \FireflyIII\Exceptions\FireflyException */ public function auditReport(Collection $accounts, Carbon $start, Carbon $end) { @@ -109,6 +146,8 @@ class ReportController extends Controller * @param Carbon $end * * @return string + * + * @throws \FireflyIII\Exceptions\FireflyException */ public function budgetReport(Collection $accounts, Collection $budgets, Carbon $start, Carbon $end) { @@ -145,6 +184,8 @@ class ReportController extends Controller * @param Carbon $end * * @return string + * + * @throws \FireflyIII\Exceptions\FireflyException */ public function categoryReport(Collection $accounts, Collection $categories, Carbon $start, Carbon $end) { @@ -180,6 +221,8 @@ class ReportController extends Controller * @param Carbon $end * * @return string + * + * @throws \FireflyIII\Exceptions\FireflyException */ public function defaultReport(Collection $accounts, Carbon $start, Carbon $end) { @@ -230,6 +273,8 @@ class ReportController extends Controller * @param string $reportType * * @return mixed + * + * @throws \Throwable */ public function options(string $reportType) { @@ -246,6 +291,9 @@ class ReportController extends Controller case 'tag': $result = $this->tagReportOptions(); break; + case 'account': + $result = $this->accountReportOptions(); + break; } return Response::json(['html' => $result]); @@ -255,6 +303,8 @@ class ReportController extends Controller * @param ReportFormRequest $request * * @return RedirectResponse|\Illuminate\Routing\Redirector + * + * @throws \FireflyIII\Exceptions\FireflyException * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function postIndex(ReportFormRequest $request) @@ -267,6 +317,7 @@ class ReportController extends Controller $categories = join(',', $request->getCategoryList()->pluck('id')->toArray()); $budgets = join(',', $request->getBudgetList()->pluck('id')->toArray()); $tags = join(',', $request->getTagList()->pluck('tag')->toArray()); + $expense = join(',', $request->getExpenseList()->pluck('id')->toArray()); $uri = route('reports.index'); if (0 === $request->getAccountList()->count()) { @@ -314,6 +365,9 @@ class ReportController extends Controller case 'tag': $uri = route('reports.report.tag', [$accounts, $tags, $start, $end]); break; + case 'account': + $uri = route('reports.report.account', [$accounts, $expense, $start, $end]); + break; } return redirect($uri); @@ -326,6 +380,8 @@ class ReportController extends Controller * @param Carbon $end * * @return string + * + * @throws \FireflyIII\Exceptions\FireflyException */ public function tagReport(Collection $accounts, Collection $tags, Carbon $start, Carbon $end) { @@ -357,6 +413,32 @@ class ReportController extends Controller /** * @return string + * + * @throws \Throwable + */ + private function accountReportOptions(): string + { + /** @var AccountRepositoryInterface $repository */ + $repository = app(AccountRepositoryInterface::class); + $expense = $repository->getActiveAccountsByType([AccountType::EXPENSE]); + $revenue = $repository->getActiveAccountsByType([AccountType::REVENUE]); + $set = new Collection; + $names = $revenue->pluck('name')->toArray(); + foreach ($expense as $exp) { + if (in_array($exp->name, $names)) { + $set->push($exp); + } + } + + $result = view('reports.options.account', compact('set'))->render(); + + return $result; + } + + /** + * @return string + * + * @throws \Throwable */ private function budgetReportOptions(): string { @@ -370,6 +452,8 @@ class ReportController extends Controller /** * @return string + * + * @throws \Throwable */ private function categoryReportOptions(): string { @@ -383,6 +467,8 @@ class ReportController extends Controller /** * @return string + * + * @throws \Throwable */ private function noReportOptions(): string { @@ -391,6 +477,8 @@ class ReportController extends Controller /** * @return string + * + * @throws \Throwable */ private function tagReportOptions(): string { diff --git a/app/Http/Controllers/RuleController.php b/app/Http/Controllers/RuleController.php index aeec282409..77cd0cc883 100644 --- a/app/Http/Controllers/RuleController.php +++ b/app/Http/Controllers/RuleController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -57,8 +57,8 @@ class RuleController extends Controller $this->middleware( function ($request, $next) { - View::share('title', trans('firefly.rules')); - View::share('mainTitleIcon', 'fa-random'); + app('view')->share('title', trans('firefly.rules')); + app('view')->share('mainTitleIcon', 'fa-random'); return $next($request); } @@ -72,6 +72,9 @@ class RuleController extends Controller * @param RuleGroup $ruleGroup * * @return View + * + * @throws \Throwable + * @throws \Throwable */ public function create(Request $request, RuleGroup $ruleGroup) { @@ -102,8 +105,6 @@ class RuleController extends Controller $this->rememberPreviousUri('rules.create.uri'); } Session::forget('rules.create.fromStore'); - Session::flash('gaEventCategory', 'rules'); - Session::flash('gaEventAction', 'create-rule'); return view( 'rules.rule.create', @@ -124,8 +125,6 @@ class RuleController extends Controller // put previous url in session $this->rememberPreviousUri('rules.delete.uri'); - Session::flash('gaEventCategory', 'rules'); - Session::flash('gaEventAction', 'delete-rule'); return view('rules.rule.delete', compact('rule', 'subTitle')); } @@ -168,6 +167,11 @@ class RuleController extends Controller * @param Rule $rule * * @return View + * + * @throws \Throwable + * @throws \Throwable + * @throws \Throwable + * @throws \Throwable */ public function edit(Request $request, RuleRepositoryInterface $repository, Rule $rule) { @@ -203,8 +207,6 @@ class RuleController extends Controller $this->rememberPreviousUri('rules.edit.uri'); } Session::forget('rules.edit.fromUpdate'); - Session::flash('gaEventCategory', 'rules'); - Session::flash('gaEventAction', 'edit-rule'); return view( 'rules.rule.edit', @@ -362,6 +364,8 @@ class RuleController extends Controller * @param TestRuleFormRequest $request * * @return \Illuminate\Http\JsonResponse + * + * @throws \Throwable */ public function testTriggers(TestRuleFormRequest $request) { @@ -369,11 +373,11 @@ class RuleController extends Controller $triggers = $this->getValidTriggerList($request); if (0 === count($triggers)) { - return Response::json(['html' => '', 'warning' => trans('firefly.warning_no_valid_triggers')]); + return Response::json(['html' => '', 'warning' => trans('firefly.warning_no_valid_triggers')]); // @codeCoverageIgnore } - $limit = config('firefly.test-triggers.limit'); - $range = config('firefly.test-triggers.range'); + $limit = intval(config('firefly.test-triggers.limit')); + $range = intval(config('firefly.test-triggers.range')); /** @var TransactionMatcher $matcher */ $matcher = app(TransactionMatcher::class); @@ -385,10 +389,10 @@ class RuleController extends Controller // Warn the user if only a subset of transactions is returned $warning = ''; if (count($matchingTransactions) === $limit) { - $warning = trans('firefly.warning_transaction_subset', ['max_num_transactions' => $limit]); + $warning = trans('firefly.warning_transaction_subset', ['max_num_transactions' => $limit]); // @codeCoverageIgnore } if (0 === count($matchingTransactions)) { - $warning = trans('firefly.warning_no_matching_transactions', ['num_transactions' => $range]); + $warning = trans('firefly.warning_no_matching_transactions', ['num_transactions' => $range]); // @codeCoverageIgnore } // Return json response @@ -409,17 +413,19 @@ class RuleController extends Controller * @param Rule $rule * * @return \Illuminate\Http\JsonResponse + * + * @throws \Throwable */ public function testTriggersByRule(Rule $rule) { $triggers = $rule->ruleTriggers; if (0 === count($triggers)) { - return Response::json(['html' => '', 'warning' => trans('firefly.warning_no_valid_triggers')]); + return Response::json(['html' => '', 'warning' => trans('firefly.warning_no_valid_triggers')]); // @codeCoverageIgnore } - $limit = config('firefly.test-triggers.limit'); - $range = config('firefly.test-triggers.range'); + $limit = intval(config('firefly.test-triggers.limit')); + $range = intval(config('firefly.test-triggers.range')); /** @var TransactionMatcher $matcher */ $matcher = app(TransactionMatcher::class); @@ -431,10 +437,10 @@ class RuleController extends Controller // Warn the user if only a subset of transactions is returned $warning = ''; if (count($matchingTransactions) === $limit) { - $warning = trans('firefly.warning_transaction_subset', ['max_num_transactions' => $limit]); + $warning = trans('firefly.warning_transaction_subset', ['max_num_transactions' => $limit]); // @codeCoverageIgnore } if (0 === count($matchingTransactions)) { - $warning = trans('firefly.warning_no_matching_transactions', ['num_transactions' => $range]); + $warning = trans('firefly.warning_no_matching_transactions', ['num_transactions' => $range]); // @codeCoverageIgnore } // Return json response @@ -533,6 +539,8 @@ class RuleController extends Controller * @param Rule $rule * * @return array + * + * @throws \Throwable */ private function getCurrentActions(Rule $rule) { @@ -561,6 +569,8 @@ class RuleController extends Controller * @param Rule $rule * * @return array + * + * @throws \Throwable */ private function getCurrentTriggers(Rule $rule) { @@ -591,6 +601,8 @@ class RuleController extends Controller * @param Request $request * * @return array + * + * @throws \Throwable */ private function getPreviousActions(Request $request) { @@ -620,6 +632,8 @@ class RuleController extends Controller * @param Request $request * * @return array + * + * @throws \Throwable */ private function getPreviousTriggers(Request $request) { diff --git a/app/Http/Controllers/RuleGroupController.php b/app/Http/Controllers/RuleGroupController.php index 0ba9141041..98308933f7 100644 --- a/app/Http/Controllers/RuleGroupController.php +++ b/app/Http/Controllers/RuleGroupController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -50,8 +50,8 @@ class RuleGroupController extends Controller $this->middleware( function ($request, $next) { - View::share('title', trans('firefly.rules')); - View::share('mainTitleIcon', 'fa-random'); + app('view')->share('title', trans('firefly.rules')); + app('view')->share('mainTitleIcon', 'fa-random'); return $next($request); } @@ -71,8 +71,6 @@ class RuleGroupController extends Controller $this->rememberPreviousUri('rule-groups.create.uri'); } Session::forget('rule-groups.create.fromStore'); - Session::flash('gaEventCategory', 'rules'); - Session::flash('gaEventAction', 'create-rule-group'); return view('rules.rule-group.create', compact('subTitleIcon', 'subTitle')); } @@ -92,8 +90,6 @@ class RuleGroupController extends Controller // put previous url in session $this->rememberPreviousUri('rule-groups.delete.uri'); - Session::flash('gaEventCategory', 'rules'); - Session::flash('gaEventAction', 'delete-rule-group'); return view('rules.rule-group.delete', compact('ruleGroup', 'subTitle', 'ruleGroupList')); } @@ -145,8 +141,6 @@ class RuleGroupController extends Controller $this->rememberPreviousUri('rule-groups.edit.uri'); } Session::forget('rule-groups.edit.fromUpdate'); - Session::flash('gaEventCategory', 'rules'); - Session::flash('gaEventAction', 'edit-rule-group'); return view('rules.rule-group.edit', compact('ruleGroup', 'subTitle')); } diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index aebb061620..a2f2663c2e 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -43,8 +43,8 @@ class SearchController extends Controller $this->middleware( function ($request, $next) { - View::share('mainTitleIcon', 'fa-search'); - View::share('title', trans('firefly.search')); + app('view')->share('mainTitleIcon', 'fa-search'); + app('view')->share('title', trans('firefly.search')); return $next($request); } @@ -69,6 +69,14 @@ class SearchController extends Controller return view('search.index', compact('query', 'fullQuery', 'subTitle')); } + /** + * @param Request $request + * @param SearchInterface $searcher + * + * @return \Illuminate\Http\JsonResponse + * + * @throws \Throwable + */ public function search(Request $request, SearchInterface $searcher) { $fullQuery = strval($request->get('query')); @@ -79,7 +87,7 @@ class SearchController extends Controller $cache->addProperty($fullQuery); if ($cache->has()) { - $transactions = $cache->get(); + $transactions = $cache->get(); // @codeCoverageIgnore } if (!$cache->has()) { diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index 550b67574d..5dce01ca3c 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -31,7 +31,6 @@ use FireflyIII\Repositories\Tag\TagRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Http\Request; use Illuminate\Support\Collection; -use Navigation; use Preferences; use Session; use View; @@ -64,8 +63,8 @@ class TagController extends Controller $this->middleware( function ($request, $next) { $this->repository = app(TagRepositoryInterface::class); - View::share('title', strval(trans('firefly.tags'))); - View::share('mainTitleIcon', 'fa-tags'); + app('view')->share('title', strval(trans('firefly.tags'))); + app('view')->share('mainTitleIcon', 'fa-tags'); return $next($request); } @@ -88,8 +87,6 @@ class TagController extends Controller $this->rememberPreviousUri('tags.create.uri'); } Session::forget('tags.create.fromStore'); - Session::flash('gaEventCategory', 'tags'); - Session::flash('gaEventAction', 'create'); return view('tags.create', compact('subTitle', 'subTitleIcon', 'apiKey')); } @@ -107,8 +104,6 @@ class TagController extends Controller // put previous url in session $this->rememberPreviousUri('tags.delete.uri'); - Session::flash('gaEventCategory', 'tags'); - Session::flash('gaEventAction', 'delete'); return view('tags.delete', compact('tag', 'subTitle')); } @@ -147,8 +142,6 @@ class TagController extends Controller $this->rememberPreviousUri('tags.edit.uri'); } Session::forget('tags.edit.fromUpdate'); - Session::flash('gaEventCategory', 'tags'); - Session::flash('gaEventAction', 'edit'); return view('tags.edit', compact('tag', 'subTitle', 'subTitleIcon', 'apiKey')); } @@ -168,7 +161,7 @@ class TagController extends Controller $start = new Carbon; if (null !== $oldestTag) { /** @var Carbon $start */ - $start = $oldestTag->date; + $start = $oldestTag->date; // @codeCoverageIgnore } if (null === $oldestTag) { /** @var Carbon $start */ @@ -203,7 +196,7 @@ class TagController extends Controller $subTitle = $tag->tag; $subTitleIcon = 'fa-tag'; $page = intval($request->get('page')); - $pageSize = intval(Preferences::get('transactionPageSize', 50)->data); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); $range = Preferences::get('viewRange', '1M')->data; $start = null; $end = null; @@ -222,7 +215,7 @@ class TagController extends Controller // prep for "specific date" view. if (strlen($moment) > 0 && 'all' !== $moment) { $start = new Carbon($moment); - $end = Navigation::endOfPeriod($start, $range); + $end = app('navigation')->endOfPeriod($start, $range); $subTitle = trans( 'firefly.journals_in_period_for_tag', ['tag' => $tag->tag, @@ -235,9 +228,9 @@ class TagController extends Controller // prep for current period if (0 === strlen($moment)) { /** @var Carbon $start */ - $start = clone session('start', Navigation::startOfPeriod(new Carbon, $range)); + $start = clone session('start', app('navigation')->startOfPeriod(new Carbon, $range)); /** @var Carbon $end */ - $end = clone session('end', Navigation::endOfPeriod(new Carbon, $range)); + $end = clone session('end', app('navigation')->endOfPeriod(new Carbon, $range)); $periods = $this->getPeriodOverview($tag); $subTitle = trans( 'firefly.journals_in_period_for_tag', @@ -316,8 +309,8 @@ class TagController extends Controller { // get first and last tag date from tag: $range = Preferences::get('viewRange', '1M')->data; - $start = Navigation::startOfPeriod($this->repository->firstUseDate($tag), $range); - $end = Navigation::startOfPeriod($this->repository->lastUseDate($tag), $range); + $start = app('navigation')->startOfPeriod($this->repository->firstUseDate($tag), $range); + $end = app('navigation')->startOfPeriod($this->repository->lastUseDate($tag), $range); // properties for entries with their amounts. $cache = new CacheProperties; $cache->addProperty($start); @@ -333,19 +326,19 @@ class TagController extends Controller // while end larger or equal to start while ($end >= $start) { - $currentEnd = Navigation::endOfPeriod($end, $range); + $currentEnd = app('navigation')->endOfPeriod($end, $range); // get expenses and what-not in this period and this tag. $arr = [ 'string' => $end->format('Y-m-d'), - 'name' => Navigation::periodShow($end, $range), + 'name' => app('navigation')->periodShow($end, $range), 'date' => clone $end, 'spent' => $this->repository->spentInperiod($tag, $end, $currentEnd), 'earned' => $this->repository->earnedInperiod($tag, $end, $currentEnd), ]; $collection->push($arr); - $end = Navigation::subtractPeriod($end, $range, 1); + $end = app('navigation')->subtractPeriod($end, $range, 1); } $cache->store($collection); diff --git a/app/Http/Controllers/Transaction/ConvertController.php b/app/Http/Controllers/Transaction/ConvertController.php index c6c2b62b1f..323334c9fc 100644 --- a/app/Http/Controllers/Transaction/ConvertController.php +++ b/app/Http/Controllers/Transaction/ConvertController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -55,8 +55,8 @@ class ConvertController extends Controller function ($request, $next) { $this->accounts = app(AccountRepositoryInterface::class); - View::share('title', trans('firefly.transactions')); - View::share('mainTitleIcon', 'fa-exchange'); + app('view')->share('title', trans('firefly.transactions')); + app('view')->share('mainTitleIcon', 'fa-exchange'); return $next($request); } @@ -128,6 +128,9 @@ class ConvertController extends Controller * @param TransactionJournal $journal * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector + * + * @throws FireflyException + * @throws FireflyException */ public function postIndex(Request $request, JournalRepositoryInterface $repository, TransactionType $destinationType, TransactionJournal $journal) { diff --git a/app/Http/Controllers/Transaction/LinkController.php b/app/Http/Controllers/Transaction/LinkController.php index 866924014a..28b7b78719 100644 --- a/app/Http/Controllers/Transaction/LinkController.php +++ b/app/Http/Controllers/Transaction/LinkController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -32,7 +32,6 @@ use Log; use Preferences; use Session; use URL; -use View; /** * Class LinkController. @@ -48,8 +47,8 @@ class LinkController extends Controller // some useful repositories: $this->middleware( function ($request, $next) { - View::share('title', trans('firefly.transactions')); - View::share('mainTitleIcon', 'fa-repeat'); + app('view')->share('title', trans('firefly.transactions')); + app('view')->share('mainTitleIcon', 'fa-repeat'); return $next($request); } @@ -100,13 +99,13 @@ class LinkController extends Controller JournalRepositoryInterface $journalRepository, TransactionJournal $journal ) { + Log::debug('We are here (store)'); $linkInfo = $request->getLinkInfo(); if (0 === $linkInfo['transaction_journal_id']) { Session::flash('error', trans('firefly.invalid_link_selection')); return redirect(route('transactions.show', [$journal->id])); } - $linkType = $repository->find($linkInfo['link_type_id']); $other = $journalRepository->find($linkInfo['transaction_journal_id']); $alreadyLinked = $repository->findLink($journal, $other); if ($alreadyLinked) { @@ -116,22 +115,7 @@ class LinkController extends Controller } Log::debug(sprintf('Journal is %d, opposing is %d', $journal->id, $other->id)); - $journalLink = new TransactionJournalLink; - $journalLink->linkType()->associate($linkType); - if ('inward' === $linkInfo['direction']) { - Log::debug(sprintf('Link type is inwards ("%s"), so %d is source and %d is destination.', $linkType->inward, $other->id, $journal->id)); - $journalLink->source()->associate($other); - $journalLink->destination()->associate($journal); - } - - if ('outward' === $linkInfo['direction']) { - Log::debug(sprintf('Link type is inwards ("%s"), so %d is source and %d is destination.', $linkType->outward, $journal->id, $other->id)); - $journalLink->source()->associate($journal); - $journalLink->destination()->associate($other); - } - - $journalLink->comment = $linkInfo['comments']; - $journalLink->save(); + $repository->storeLink($linkInfo, $other, $journal); Session::flash('success', trans('firefly.journals_linked')); return redirect(route('transactions.show', [$journal->id])); diff --git a/app/Http/Controllers/Transaction/MassController.php b/app/Http/Controllers/Transaction/MassController.php index ed25b29bf6..2bb0a44d27 100644 --- a/app/Http/Controllers/Transaction/MassController.php +++ b/app/Http/Controllers/Transaction/MassController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -51,8 +51,8 @@ class MassController extends Controller $this->middleware( function ($request, $next) { - View::share('title', trans('firefly.transactions')); - View::share('mainTitleIcon', 'fa-repeat'); + app('view')->share('title', trans('firefly.transactions')); + app('view')->share('mainTitleIcon', 'fa-repeat'); return $next($request); } @@ -70,8 +70,6 @@ class MassController extends Controller // put previous url in session $this->rememberPreviousUri('transactions.mass-delete.uri'); - Session::flash('gaEventCategory', 'transactions'); - Session::flash('gaEventAction', 'mass-delete'); return view('transactions.mass-delete', compact('journals', 'subTitle')); } @@ -166,8 +164,6 @@ class MassController extends Controller // put previous url in session $this->rememberPreviousUri('transactions.mass-edit.uri'); - Session::flash('gaEventCategory', 'transactions'); - Session::flash('gaEventAction', 'mass-edit'); // collect some useful meta data for the mass edit: $filtered->each( diff --git a/app/Http/Controllers/Transaction/SingleController.php b/app/Http/Controllers/Transaction/SingleController.php index 8e746e85e3..a7f350132d 100644 --- a/app/Http/Controllers/Transaction/SingleController.php +++ b/app/Http/Controllers/Transaction/SingleController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -89,14 +89,19 @@ class SingleController extends Controller $this->currency = app(CurrencyRepositoryInterface::class); $this->repository = app(JournalRepositoryInterface::class); - View::share('title', trans('firefly.transactions')); - View::share('mainTitleIcon', 'fa-repeat'); + app('view')->share('title', trans('firefly.transactions')); + app('view')->share('mainTitleIcon', 'fa-repeat'); return $next($request); } ); } + /** + * @param TransactionJournal $journal + * + * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector + */ public function cloneTransaction(TransactionJournal $journal) { $source = $journal->sourceAccountList()->first(); @@ -138,7 +143,7 @@ class SingleController extends Controller ]; /** @var Note $note */ - $note = $journal->notes()->first(); + $note = $this->repository->getNote($journal); if (null !== $note) { $preFilled['notes'] = $note->text; } @@ -149,7 +154,8 @@ class SingleController extends Controller } /** - * @param string $what + * @param Request $request + * @param string $what * * @return View */ @@ -173,8 +179,6 @@ class SingleController extends Controller $this->rememberPreviousUri('transactions.create.uri'); } Session::forget('transactions.create.fromStore'); - Session::flash('gaEventCategory', 'transactions'); - Session::flash('gaEventAction', 'create-' . $what); asort($piggies); @@ -205,8 +209,6 @@ class SingleController extends Controller // put previous url in session $this->rememberPreviousUri('transactions.delete.uri'); - Session::flash('gaEventCategory', 'transactions'); - Session::flash('gaEventAction', 'delete-' . $what); return view('transactions.single.delete', compact('journal', 'subTitle', 'what')); } @@ -255,7 +257,7 @@ class SingleController extends Controller $assetAccounts = $this->groupedAccountList(); $budgetList = ExpandedForm::makeSelectListWithEmpty($this->budgets->getBudgets()); - if ($journal->transactionType->type === TransactionType::RECONCILIATION) { + if (TransactionType::RECONCILIATION === $journal->transactionType->type) { return redirect(route('accounts.reconcile.edit', [$journal->id])); } @@ -300,7 +302,7 @@ class SingleController extends Controller 'destination_currency' => $foreignCurrency, ]; /** @var Note $note */ - $note = $journal->notes()->first(); + $note = $this->repository->getNote($journal); if (null !== $note) { $preFilled['notes'] = $note->text; } @@ -313,8 +315,6 @@ class SingleController extends Controller } Session::flash('preFilled', $preFilled); - Session::flash('gaEventCategory', 'transactions'); - Session::flash('gaEventAction', 'edit-' . $what); // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('transactions.edit.fromUpdate')) { @@ -443,7 +443,7 @@ class SingleController extends Controller foreach ($accounts as $account) { $type = $account->getMeta('accountRole'); if (0 === strlen($type)) { - $type = 'no_account_type'; + $type = 'no_account_type'; // @codeCoverageIgnore } $key = strval(trans('firefly.opt_group_' . $type)); $return[$key][$account->id] = $account->name; @@ -463,7 +463,7 @@ class SingleController extends Controller foreach ($accounts as $account) { $type = $account->getMeta('accountRole'); if (0 === strlen($type)) { - $type = 'no_account_type'; + $type = 'no_account_type'; // @codeCoverageIgnore } $key = strval(trans('firefly.opt_group_' . $type)); $return[$key][$account->id] = $account->name; @@ -482,7 +482,7 @@ class SingleController extends Controller $count = $this->repository->countTransactions($journal); if ($count > 2) { - return true; + return true; // @codeCoverageIgnore } return false; diff --git a/app/Http/Controllers/Transaction/SplitController.php b/app/Http/Controllers/Transaction/SplitController.php index a5fe0a63ef..d93e431df7 100644 --- a/app/Http/Controllers/Transaction/SplitController.php +++ b/app/Http/Controllers/Transaction/SplitController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -59,7 +59,8 @@ class SplitController extends Controller /** @var CurrencyRepositoryInterface */ private $currencies; - + /** @var JournalRepositoryInterface */ + private $repository; /** @var JournalTaskerInterface */ private $tasker; @@ -78,8 +79,9 @@ class SplitController extends Controller $this->tasker = app(JournalTaskerInterface::class); $this->attachments = app(AttachmentHelperInterface::class); $this->currencies = app(CurrencyRepositoryInterface::class); - View::share('mainTitleIcon', 'fa-share-alt'); - View::share('title', trans('firefly.split-transactions')); + $this->repository = app(JournalRepositoryInterface::class); + app('view')->share('mainTitleIcon', 'fa-share-alt'); + app('view')->share('title', trans('firefly.split-transactions')); return $next($request); } @@ -116,9 +118,6 @@ class SplitController extends Controller $accountArray[$account->id]['currency_id'] = intval($account->getMeta('currency_id')); } - Session::flash('gaEventCategory', 'transactions'); - Session::flash('gaEventAction', 'edit-split-' . $preFilled['what']); - // put previous url in session if not redirect from store (not "return_to_edit"). if (true !== session('transactions.edit-split.fromUpdate')) { $this->rememberPreviousUri('transactions.edit-split.uri'); @@ -144,19 +143,18 @@ class SplitController extends Controller } /** - * @param SplitJournalFormRequest $request - * @param JournalRepositoryInterface $repository - * @param TransactionJournal $journal + * @param SplitJournalFormRequest $request + * @param TransactionJournal $journal * * @return $this|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ - public function update(SplitJournalFormRequest $request, JournalRepositoryInterface $repository, TransactionJournal $journal) + public function update(SplitJournalFormRequest $request, TransactionJournal $journal) { if ($this->isOpeningBalance($journal)) { return $this->redirectToAccount($journal); } $data = $this->arrayFromInput($request); - $journal = $repository->updateSplitJournal($journal, $data); + $journal = $this->repository->updateSplitJournal($journal, $data); /** @var array $files */ $files = $request->hasFile('attachments') ? $request->file('attachments') : null; // save attachments: @@ -232,7 +230,8 @@ class SplitController extends Controller $destinationAccounts = $journal->destinationAccountList(); $notes = ''; /** @var Note $note */ - $note = $journal->notes()->first(); + + $note = $this->repository->getNote($journal); if (null !== $note) { $notes = $note->text; } @@ -262,6 +261,7 @@ class SplitController extends Controller 'transactions' => $this->getTransactionDataFromJournal($journal), ]; // update transactions array with old request data. + $array['transactions'] = $this->updateWithPrevious($array['transactions'], $request->old()); return $array; @@ -349,6 +349,7 @@ class SplitController extends Controller return $array; } $old = $old['transactions']; + foreach ($old as $index => $row) { if (isset($array[$index])) { $array[$index] = array_merge($array[$index], $row); diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.php index 0f48c39b0a..b271a9f4ad 100644 --- a/app/Http/Controllers/TransactionController.php +++ b/app/Http/Controllers/TransactionController.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -36,7 +36,6 @@ use FireflyIII\Support\CacheProperties; use Illuminate\Http\Request; use Illuminate\Support\Collection; use Log; -use Navigation; use Preferences; use Response; use View; @@ -55,8 +54,8 @@ class TransactionController extends Controller $this->middleware( function ($request, $next) { - View::share('title', trans('firefly.transactions')); - View::share('mainTitleIcon', 'fa-repeat'); + app('view')->share('title', trans('firefly.transactions')); + app('view')->share('mainTitleIcon', 'fa-repeat'); return $next($request); } @@ -70,6 +69,8 @@ class TransactionController extends Controller * @param string $moment * * @return View + * + * @throws FireflyException */ public function index(Request $request, JournalRepositoryInterface $repository, string $what, string $moment = '') { @@ -77,7 +78,7 @@ class TransactionController extends Controller $subTitleIcon = config('firefly.transactionIconsByWhat.' . $what); $types = config('firefly.transactionTypesByWhat.' . $what); $page = intval($request->get('page')); - $pageSize = intval(Preferences::get('transactionPageSize', 50)->data); + $pageSize = intval(Preferences::get('listPageSize', 50)->data); $range = Preferences::get('viewRange', '1M')->data; $start = null; $end = null; @@ -96,7 +97,7 @@ class TransactionController extends Controller // prep for "specific date" view. if (strlen($moment) > 0 && 'all' !== $moment) { $start = new Carbon($moment); - $end = Navigation::endOfPeriod($start, $range); + $end = app('navigation')->endOfPeriod($start, $range); $path = route('transactions.index', [$what, $moment]); $subTitle = trans( 'firefly.title_' . $what . '_between', @@ -107,8 +108,8 @@ class TransactionController extends Controller // prep for current period if (0 === strlen($moment)) { - $start = clone session('start', Navigation::startOfPeriod(new Carbon, $range)); - $end = clone session('end', Navigation::endOfPeriod(new Carbon, $range)); + $start = clone session('start', app('navigation')->startOfPeriod(new Carbon, $range)); + $end = clone session('end', app('navigation')->endOfPeriod(new Carbon, $range)); $periods = $this->getPeriodOverview($what); $subTitle = trans( 'firefly.title_' . $what . '_between', @@ -129,6 +130,8 @@ class TransactionController extends Controller /** * @param Request $request * @param JournalRepositoryInterface $repository + * + * @return \Illuminate\Http\JsonResponse */ public function reconcile(Request $request, JournalRepositoryInterface $repository) { @@ -140,6 +143,8 @@ class TransactionController extends Controller $repository->reconcile($transaction); } + + return Response::json(['ok' => 'reconciled']); } /** @@ -180,8 +185,8 @@ class TransactionController extends Controller if ($this->isOpeningBalance($journal)) { return $this->redirectToAccount($journal); } - if ($journal->transactionType->type === TransactionType::RECONCILIATION) { - return redirect(route('accounts.reconcile.show', [$journal->id])); + if (TransactionType::RECONCILIATION === $journal->transactionType->type) { + return redirect(route('accounts.reconcile.show', [$journal->id])); // @codeCoverageIgnore } $linkTypes = $linkTypeRepository->get(); $links = $linkTypeRepository->getLinks($journal); @@ -197,8 +202,6 @@ class TransactionController extends Controller * @param string $what * * @return Collection - * - * @throws FireflyException */ private function getPeriodOverview(string $what): Collection { @@ -206,8 +209,8 @@ class TransactionController extends Controller $first = $repository->first(); $start = $first->date ?? new Carbon; $range = Preferences::get('viewRange', '1M')->data; - $start = Navigation::startOfPeriod($start, $range); - $end = Navigation::endOfX(new Carbon, $range, null); + $start = app('navigation')->startOfPeriod($start, $range); + $end = app('navigation')->endOfX(new Carbon, $range, null); $entries = new Collection; $types = config('firefly.transactionTypesByWhat.' . $what); @@ -225,8 +228,8 @@ class TransactionController extends Controller Log::debug(sprintf('Going to get period expenses and incomes between %s and %s.', $start->format('Y-m-d'), $end->format('Y-m-d'))); while ($end >= $start) { Log::debug('Loop start!'); - $end = Navigation::startOfPeriod($end, $range); - $currentEnd = Navigation::endOfPeriod($end, $range); + $end = app('navigation')->startOfPeriod($end, $range); + $currentEnd = app('navigation')->endOfPeriod($end, $range); // count journals without budget in this period: /** @var JournalCollectorInterface $collector */ @@ -239,7 +242,7 @@ class TransactionController extends Controller // count per currency: $sums = $this->sumPerCurrency($journals); $dateStr = $end->format('Y-m-d'); - $dateName = Navigation::periodShow($end, $range); + $dateName = app('navigation')->periodShow($end, $range); $array = [ 'string' => $dateStr, 'name' => $dateName, @@ -249,9 +252,9 @@ class TransactionController extends Controller ]; Log::debug(sprintf('What is %s', $what)); if ($journals->count() > 0) { - $entries->push($array); + $entries->push($array); // @codeCoverageIgnore } - $end = Navigation::subtractPeriod($end, $range, 1); + $end = app('navigation')->subtractPeriod($end, $range, 1); } Log::debug('End of loop'); $cache->store($entries); diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index d1e66021d3..a2a6205cd8 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -16,19 +16,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * Kernel.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Http; use FireflyIII\Http\Middleware\Authenticate; @@ -51,10 +42,13 @@ use Illuminate\Foundation\Http\Kernel as HttpKernel; use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode; use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull; use Illuminate\Foundation\Http\Middleware\ValidatePostSize; -use Illuminate\Routing\Middleware\SubstituteBindings; use Illuminate\Routing\Middleware\ThrottleRequests; use Illuminate\View\Middleware\ShareErrorsFromSession; +/** + * @codeCoverageIgnore + * Class Kernel + */ class Kernel extends HttpKernel { /** @@ -90,7 +84,7 @@ class Kernel extends HttpKernel StartFireflySession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, - SubstituteBindings::class, + //SubstituteBindings::class, ], // MUST NOT be logged in. Does not care about 2FA or confirmation. @@ -101,7 +95,8 @@ class Kernel extends HttpKernel StartFireflySession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, - SubstituteBindings::class, + //SubstituteBindings::class, + Binder::class, RedirectIfAuthenticated::class, ], // MUST be logged in. @@ -114,7 +109,8 @@ class Kernel extends HttpKernel StartFireflySession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, - SubstituteBindings::class, + //SubstituteBindings::class, + Binder::class, Authenticate::class, RedirectIfTwoFactorAuthenticated::class, ], @@ -129,7 +125,8 @@ class Kernel extends HttpKernel StartFireflySession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, - SubstituteBindings::class, + //SubstituteBindings::class, + Binder::class, Authenticate::class, ], @@ -144,7 +141,7 @@ class Kernel extends HttpKernel StartFireflySession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, - SubstituteBindings::class, + //SubstituteBindings::class, Authenticate::class, AuthenticateTwoFactor::class, Range::class, @@ -162,7 +159,7 @@ class Kernel extends HttpKernel StartFireflySession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class, - SubstituteBindings::class, + //SubstituteBindings::class, Authenticate::class, AuthenticateTwoFactor::class, IsAdmin::class, @@ -187,7 +184,7 @@ class Kernel extends HttpKernel = [ 'auth' => Authenticate::class, 'auth.basic' => AuthenticateWithBasicAuth::class, - 'bindings' => SubstituteBindings::class, + 'bindings' => Binder::class, 'can' => Authorize::class, 'guest' => RedirectIfAuthenticated::class, 'throttle' => ThrottleRequests::class, diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index bd07886e0a..c5d91b1510 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Middleware/AuthenticateTwoFactor.php b/app/Http/Middleware/AuthenticateTwoFactor.php index 840ac16ab1..c2ead8de22 100644 --- a/app/Http/Middleware/AuthenticateTwoFactor.php +++ b/app/Http/Middleware/AuthenticateTwoFactor.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Middleware/Binder.php b/app/Http/Middleware/Binder.php index 056fff3f9a..0a7bfc1bda 100644 --- a/app/Http/Middleware/Binder.php +++ b/app/Http/Middleware/Binder.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -31,6 +31,9 @@ use Illuminate\Http\Request; */ class Binder { + /** + * @var array + */ protected $binders = []; /** diff --git a/app/Http/Middleware/EncryptCookies.php b/app/Http/Middleware/EncryptCookies.php index ef7bcceca5..05f06173fb 100644 --- a/app/Http/Middleware/EncryptCookies.php +++ b/app/Http/Middleware/EncryptCookies.php @@ -16,23 +16,18 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * EncryptCookies.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Http\Middleware; use Illuminate\Cookie\Middleware\EncryptCookies as Middleware; +/** + * @codeCoverageIgnore + * Class EncryptCookies + */ class EncryptCookies extends Middleware { /** diff --git a/app/Http/Middleware/IsAdmin.php b/app/Http/Middleware/IsAdmin.php index 3fb6dbdd8e..e06eecc07b 100644 --- a/app/Http/Middleware/IsAdmin.php +++ b/app/Http/Middleware/IsAdmin.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Middleware/IsLimitedUser.php b/app/Http/Middleware/IsDemoUser.php similarity index 76% rename from app/Http/Middleware/IsLimitedUser.php rename to app/Http/Middleware/IsDemoUser.php index 01fc8163ea..fe5e7f86c1 100644 --- a/app/Http/Middleware/IsLimitedUser.php +++ b/app/Http/Middleware/IsDemoUser.php @@ -1,6 +1,6 @@ . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -29,9 +29,9 @@ use Illuminate\Support\Facades\Auth; use Session; /** - * Class IsAdmin. + * Class IsDemoUser. */ -class IsLimitedUser +class IsDemoUser { /** * Handle an incoming request. May not be a limited user (ie. Sandstorm env. or demo user). @@ -45,11 +45,8 @@ class IsLimitedUser public function handle(Request $request, Closure $next, $guard = null) { if (Auth::guard($guard)->guest()) { - if ($request->ajax()) { - return response('Unauthorized.', 401); - } - - return redirect()->guest('login'); + // don't care when not logged in, usual stuff applies: + return $next($request); } /** @var User $user */ $user = auth()->user(); @@ -59,12 +56,6 @@ class IsLimitedUser return redirect(route('index')); } - if (1 === intval(getenv('SANDSTORM'))) { - Session::flash('warning', strval(trans('firefly.sandstorm_not_available'))); - - return redirect(route('index')); - } - return $next($request); } } diff --git a/app/Http/Middleware/IsSandStormUser.php b/app/Http/Middleware/IsSandStormUser.php new file mode 100644 index 0000000000..aba1be7020 --- /dev/null +++ b/app/Http/Middleware/IsSandStormUser.php @@ -0,0 +1,59 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Http\Middleware; + +use Closure; +use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; +use Session; + +/** + * Class IsSandStormUser. + */ +class IsSandStormUser +{ + /** + * Handle an incoming request. May not be a limited user (ie. Sandstorm env. or demo user). + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @param string|null $guard + * + * @return mixed + */ + public function handle(Request $request, Closure $next, $guard = null) + { + if (Auth::guard($guard)->guest()) { + // don't care when not logged in, usual stuff applies: + return $next($request); + } + + if (1 === intval(getenv('SANDSTORM'))) { + Session::flash('warning', strval(trans('firefly.sandstorm_not_available'))); + + return redirect(route('index')); + } + + return $next($request); + } +} diff --git a/app/Http/Middleware/Range.php b/app/Http/Middleware/Range.php index 8f5a9badcc..11e85836f2 100644 --- a/app/Http/Middleware/Range.php +++ b/app/Http/Middleware/Range.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -29,7 +29,6 @@ use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use Illuminate\Contracts\Auth\Guard; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; -use Navigation; use Preferences; use Session; use View; @@ -90,6 +89,9 @@ class Range View::share('listLength', $pref); } + /** + * + */ private function configureView() { $pref = Preferences::get('language', config('firefly.default_language', 'en_US')); @@ -104,7 +106,7 @@ class Range // send error to view if could not set money format if (false === $moneyResult) { - View::share('invalidMonetaryLocale', true); + View::share('invalidMonetaryLocale', true); // @codeCoverageIgnore } // save some formats: @@ -126,8 +128,8 @@ class Range if (!Session::has('start') && !Session::has('end')) { $viewRange = Preferences::get('viewRange', '1M')->data; $start = new Carbon; - $start = Navigation::updateStartDate($viewRange, $start); - $end = Navigation::updateEndDate($viewRange, $start); + $start = app('navigation')->updateStartDate($viewRange, $start); + $end = app('navigation')->updateEndDate($viewRange, $start); Session::put('start', $start); Session::put('end', $end); diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php index 8b6e5232fb..f318f14d5d 100644 --- a/app/Http/Middleware/RedirectIfAuthenticated.php +++ b/app/Http/Middleware/RedirectIfAuthenticated.php @@ -16,24 +16,19 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * RedirectIfAuthenticated.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Http\Middleware; use Closure; use Illuminate\Support\Facades\Auth; +/** + * @codeCoverageIgnore + * Class RedirectIfAuthenticated + */ class RedirectIfAuthenticated { /** @@ -48,7 +43,7 @@ class RedirectIfAuthenticated public function handle($request, Closure $next, $guard = null) { if (Auth::guard($guard)->check()) { - return redirect('/home'); + return redirect(route('index')); } return $next($request); diff --git a/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php b/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php index dce366ed4c..1827455932 100644 --- a/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php +++ b/app/Http/Middleware/RedirectIfTwoFactorAuthenticated.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -44,13 +44,14 @@ class RedirectIfTwoFactorAuthenticated { if (Auth::guard($guard)->check()) { $is2faEnabled = Preferences::get('twoFactorAuthEnabled', false)->data; + $has2faSecret = null !== Preferences::get('twoFactorAuthSecret'); // grab 2auth information from cookie. $is2faAuthed = 'true' === $request->cookie('twoFactorAuthenticated'); if ($is2faEnabled && $has2faSecret && $is2faAuthed) { - return redirect('/'); + return redirect(route('index')); } } diff --git a/app/Http/Middleware/Sandstorm.php b/app/Http/Middleware/Sandstorm.php index 83759a0c96..c119efcc97 100644 --- a/app/Http/Middleware/Sandstorm.php +++ b/app/Http/Middleware/Sandstorm.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,10 +25,10 @@ namespace FireflyIII\Http\Middleware; use Auth; use Closure; use FireflyIII\Exceptions\FireflyException; -use FireflyIII\Models\Role; use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\User; use Illuminate\Http\Request; +use Log; use View; /** @@ -63,7 +63,8 @@ class Sandstorm /** @var UserRepositoryInterface $repository */ $repository = app(UserRepositoryInterface::class); $userId = strval($request->header('X-Sandstorm-User-Id')); - $count = $repository->count(); + Log::debug(sprintf('Sandstorm user ID is "%s"', $userId)); + $count = $repository->count(); // if there already is one user in this instance, we assume this is // the "main" user. Firefly's nature does not allow other users to @@ -72,7 +73,7 @@ class Sandstorm // and any other differences there may be between these users. if (1 === $count && strlen($userId) > 0) { // login as first user user. - $user = User::first(); + $user = $repository->first(); Auth::guard($guard)->login($user); View::share('SANDSTORM_ANON', false); @@ -92,7 +93,7 @@ class Sandstorm // create new user. $email = $userId . '@firefly'; /** @var User $user */ - $user = User::create( + $user = $repository->store( [ 'email' => $email, 'password' => str_random(16), @@ -101,9 +102,10 @@ class Sandstorm Auth::guard($guard)->login($user); // also make the user an admin - $admin = Role::where('name', 'owner')->first(); - $user->attachRole($admin); - $user->save(); + $repository->attachRole($user, 'owner'); + + // share value. + View::share('SANDSTORM_ANON', false); return $next($request); } @@ -116,6 +118,14 @@ class Sandstorm throw new FireflyException('Your Firefly III installation has more than one user, which is weird.'); } } + // if in Sandstorm, user logged in, still must check if user is anon. + $userId = strval($request->header('X-Sandstorm-User-Id')); + if (strlen($userId) === 0) { + View::share('SANDSTORM_ANON', true); + + return $next($request); + } + View::share('SANDSTORM_ANON', false); return $next($request); } diff --git a/app/Http/Middleware/StartFireflySession.php b/app/Http/Middleware/StartFireflySession.php index 1d9ee97647..4cb809999a 100644 --- a/app/Http/Middleware/StartFireflySession.php +++ b/app/Http/Middleware/StartFireflySession.php @@ -16,17 +16,17 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Middleware; -use Closure; use Illuminate\Http\Request; use Illuminate\Session\Middleware\StartSession; /** + * @codeCoverageIgnore * Class StartFireflySession. */ class StartFireflySession extends StartSession diff --git a/app/Http/Middleware/TrimStrings.php b/app/Http/Middleware/TrimStrings.php index 21d5495130..178685f2e0 100644 --- a/app/Http/Middleware/TrimStrings.php +++ b/app/Http/Middleware/TrimStrings.php @@ -16,23 +16,18 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * TrimStrings.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Http\Middleware; use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware; +/** + * @codeCoverageIgnore + * Class TrimStrings + */ class TrimStrings extends Middleware { /** diff --git a/app/Http/Middleware/TrustProxies.php b/app/Http/Middleware/TrustProxies.php index 62ef14a3f3..2391787dd5 100644 --- a/app/Http/Middleware/TrustProxies.php +++ b/app/Http/Middleware/TrustProxies.php @@ -16,25 +16,20 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * TrustProxies.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Http\Middleware; use Fideloper\Proxy\TrustProxies as Middleware; use Illuminate\Contracts\Config\Repository; use Illuminate\Http\Request; +/** + * @codeCoverageIgnore + * Class TrustProxies + */ class TrustProxies extends Middleware { /** diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index 838f340dcc..f35cb11c61 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -16,23 +16,18 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * VerifyCsrfToken.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Http\Middleware; use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; +/** + * @codeCoverageIgnore + * Class VerifyCsrfToken + */ class VerifyCsrfToken extends Middleware { /** diff --git a/app/Http/Requests/AccountFormRequest.php b/app/Http/Requests/AccountFormRequest.php index 261247f432..9b640d7b08 100644 --- a/app/Http/Requests/AccountFormRequest.php +++ b/app/Http/Requests/AccountFormRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Requests/AttachmentFormRequest.php b/app/Http/Requests/AttachmentFormRequest.php index 7797903735..1e31e6973f 100644 --- a/app/Http/Requests/AttachmentFormRequest.php +++ b/app/Http/Requests/AttachmentFormRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class AttachmentFormRequest. */ class AttachmentFormRequest extends Request diff --git a/app/Http/Requests/BillFormRequest.php b/app/Http/Requests/BillFormRequest.php index 91535dc30e..0012197b44 100644 --- a/app/Http/Requests/BillFormRequest.php +++ b/app/Http/Requests/BillFormRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -64,9 +64,9 @@ class BillFormRequest extends Request { $nameRule = 'required|between:1,255|uniqueObjectForUser:bills,name'; $matchRule = 'required|between:1,255|uniqueObjectForUser:bills,match'; - if (intval($this->get('id')) > 0) { - $nameRule .= ',' . intval($this->get('id')); - $matchRule .= ',' . intval($this->get('id')); + if ($this->integer('id') > 0) { + $nameRule .= ',' . $this->integer('id'); + $matchRule .= ',' . $this->integer('id'); } // is OK $rules = [ diff --git a/app/Http/Requests/BudgetFormRequest.php b/app/Http/Requests/BudgetFormRequest.php index a7f8266aac..2042a32660 100644 --- a/app/Http/Requests/BudgetFormRequest.php +++ b/app/Http/Requests/BudgetFormRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,6 +25,7 @@ namespace FireflyIII\Http\Requests; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; /** + * @codeCoverageIgnore * Class BudgetFormRequest. */ class BudgetFormRequest extends Request diff --git a/app/Http/Requests/BudgetIncomeRequest.php b/app/Http/Requests/BudgetIncomeRequest.php index 94fd15117a..8fbb7a5ed2 100644 --- a/app/Http/Requests/BudgetIncomeRequest.php +++ b/app/Http/Requests/BudgetIncomeRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class BudgetIncomeRequest. */ class BudgetIncomeRequest extends Request diff --git a/app/Http/Requests/CategoryFormRequest.php b/app/Http/Requests/CategoryFormRequest.php index 316076b85f..f48a2d7c21 100644 --- a/app/Http/Requests/CategoryFormRequest.php +++ b/app/Http/Requests/CategoryFormRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -56,8 +56,8 @@ class CategoryFormRequest extends Request /** @var CategoryRepositoryInterface $repository */ $repository = app(CategoryRepositoryInterface::class); $nameRule = 'required|between:1,100|uniqueObjectForUser:categories,name'; - if (null !== $repository->find(intval($this->get('id')))->id) { - $nameRule = 'required|between:1,100|uniqueObjectForUser:categories,name,' . intval($this->get('id')); + if (null !== $repository->find($this->integer('id'))->id) { + $nameRule = 'required|between:1,100|uniqueObjectForUser:categories,name,' . $this->integer('id'); } // fixed diff --git a/app/Http/Requests/ConfigurationRequest.php b/app/Http/Requests/ConfigurationRequest.php index facdf0652d..d6dbe9a490 100644 --- a/app/Http/Requests/ConfigurationRequest.php +++ b/app/Http/Requests/ConfigurationRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class ConfigurationRequest. */ class ConfigurationRequest extends Request diff --git a/app/Http/Requests/CurrencyFormRequest.php b/app/Http/Requests/CurrencyFormRequest.php index 54f0a742de..5e1249bddf 100644 --- a/app/Http/Requests/CurrencyFormRequest.php +++ b/app/Http/Requests/CurrencyFormRequest.php @@ -16,14 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** - * Class BillFormRequest. + * Class CurrencyFormRequest. */ class CurrencyFormRequest extends Request { @@ -61,7 +61,7 @@ class CurrencyFormRequest extends Request 'symbol' => 'required|min:1|max:8|unique:transaction_currencies,symbol', 'decimal_places' => 'required|min:0|max:12|numeric', ]; - if (intval($this->get('id')) > 0) { + if ($this->integer('id') > 0) { $rules = [ 'name' => 'required|max:48|min:1', 'code' => 'required|min:3|max:3', diff --git a/app/Http/Requests/DeleteAccountFormRequest.php b/app/Http/Requests/DeleteAccountFormRequest.php index 091e660feb..34e7494289 100644 --- a/app/Http/Requests/DeleteAccountFormRequest.php +++ b/app/Http/Requests/DeleteAccountFormRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class DeleteAccountFormRequest. */ class DeleteAccountFormRequest extends Request diff --git a/app/Http/Requests/EmailFormRequest.php b/app/Http/Requests/EmailFormRequest.php index 0574e39ac2..6ad6d66fa0 100644 --- a/app/Http/Requests/EmailFormRequest.php +++ b/app/Http/Requests/EmailFormRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class EmailFormRequest. */ class EmailFormRequest extends Request diff --git a/app/Http/Requests/ExportFormRequest.php b/app/Http/Requests/ExportFormRequest.php index 2b1dc46df0..3d60ac7696 100644 --- a/app/Http/Requests/ExportFormRequest.php +++ b/app/Http/Requests/ExportFormRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Requests/JournalFormRequest.php b/app/Http/Requests/JournalFormRequest.php index 56c2836e47..10396f5e50 100644 --- a/app/Http/Requests/JournalFormRequest.php +++ b/app/Http/Requests/JournalFormRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -84,6 +84,8 @@ class JournalFormRequest extends Request /** * @return array + * + * @throws FireflyException */ public function rules() { diff --git a/app/Http/Requests/JournalLinkRequest.php b/app/Http/Requests/JournalLinkRequest.php index 85d8728e5c..5544706986 100644 --- a/app/Http/Requests/JournalLinkRequest.php +++ b/app/Http/Requests/JournalLinkRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Requests/LinkTypeFormRequest.php b/app/Http/Requests/LinkTypeFormRequest.php index b113f24a53..f530fc299f 100644 --- a/app/Http/Requests/LinkTypeFormRequest.php +++ b/app/Http/Requests/LinkTypeFormRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Requests/MassDeleteJournalRequest.php b/app/Http/Requests/MassDeleteJournalRequest.php index dc386dca03..3a52580288 100644 --- a/app/Http/Requests/MassDeleteJournalRequest.php +++ b/app/Http/Requests/MassDeleteJournalRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class MassDeleteJournalRequest. */ class MassDeleteJournalRequest extends Request diff --git a/app/Http/Requests/MassEditJournalRequest.php b/app/Http/Requests/MassEditJournalRequest.php index 0bf81bcfea..e82e243c80 100644 --- a/app/Http/Requests/MassEditJournalRequest.php +++ b/app/Http/Requests/MassEditJournalRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class MassEditJournalRequest. */ class MassEditJournalRequest extends Request diff --git a/app/Http/Requests/NewUserFormRequest.php b/app/Http/Requests/NewUserFormRequest.php index 7cbcf455f2..30289dd69c 100644 --- a/app/Http/Requests/NewUserFormRequest.php +++ b/app/Http/Requests/NewUserFormRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class NewUserFormRequest. */ class NewUserFormRequest extends Request diff --git a/app/Http/Requests/PiggyBankFormRequest.php b/app/Http/Requests/PiggyBankFormRequest.php index 38c209887a..76cd62e376 100644 --- a/app/Http/Requests/PiggyBankFormRequest.php +++ b/app/Http/Requests/PiggyBankFormRequest.php @@ -16,14 +16,12 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; -use Carbon\Carbon; - /** * Class PiggyBankFormRequest. */ @@ -59,8 +57,8 @@ class PiggyBankFormRequest extends Request public function rules() { $nameRule = 'required|between:1,255|uniquePiggyBankForUser'; - if (intval($this->get('id'))) { - $nameRule = 'required|between:1,255|uniquePiggyBankForUser:' . intval($this->get('id')); + if ($this->integer('id')) { + $nameRule = 'required|between:1,255|uniquePiggyBankForUser:' . $this->integer('id'); } $rules = [ diff --git a/app/Http/Requests/ProfileFormRequest.php b/app/Http/Requests/ProfileFormRequest.php index c12219d758..cfa825f247 100644 --- a/app/Http/Requests/ProfileFormRequest.php +++ b/app/Http/Requests/ProfileFormRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class ProfileFormRequest. */ class ProfileFormRequest extends Request diff --git a/app/Http/Requests/ReconciliationFormRequest.php b/app/Http/Requests/ReconciliationFormRequest.php index 1f6f2c6238..c2ea851180 100644 --- a/app/Http/Requests/ReconciliationFormRequest.php +++ b/app/Http/Requests/ReconciliationFormRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class ReconciliationFormRequest. */ class ReconciliationFormRequest extends Request @@ -64,5 +65,4 @@ class ReconciliationFormRequest extends Request return $rules; } - } diff --git a/app/Http/Requests/ReportFormRequest.php b/app/Http/Requests/ReportFormRequest.php index 40eee6037b..728071c7d7 100644 --- a/app/Http/Requests/ReportFormRequest.php +++ b/app/Http/Requests/ReportFormRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -130,6 +130,28 @@ class ReportFormRequest extends Request return $date; } + /** + * @return Collection + */ + public function getExpenseList(): Collection + { + // fixed + /** @var AccountRepositoryInterface $repository */ + $repository = app(AccountRepositoryInterface::class); + $set = $this->get('exp_rev'); + $collection = new Collection; + if (is_array($set)) { + foreach ($set as $accountId) { + $account = $repository->find(intval($accountId)); + if (null !== $account->id) { + $collection->push($account); + } + } + } + + return $collection; + } + /** * @return Carbon * @@ -178,7 +200,7 @@ class ReportFormRequest extends Request public function rules(): array { return [ - 'report_type' => 'in:audit,default,category,budget,tag', + 'report_type' => 'in:audit,default,category,budget,tag,account', ]; } } diff --git a/app/Http/Requests/Request.php b/app/Http/Requests/Request.php index f26c4113d6..92916f77f4 100644 --- a/app/Http/Requests/Request.php +++ b/app/Http/Requests/Request.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Requests/RuleFormRequest.php b/app/Http/Requests/RuleFormRequest.php index eb4453070b..110639df3e 100644 --- a/app/Http/Requests/RuleFormRequest.php +++ b/app/Http/Requests/RuleFormRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Requests/RuleGroupFormRequest.php b/app/Http/Requests/RuleGroupFormRequest.php index 539f647446..25c7bb59da 100644 --- a/app/Http/Requests/RuleGroupFormRequest.php +++ b/app/Http/Requests/RuleGroupFormRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Requests/SelectTransactionsRequest.php b/app/Http/Requests/SelectTransactionsRequest.php index 1c96d0eb83..249613892a 100644 --- a/app/Http/Requests/SelectTransactionsRequest.php +++ b/app/Http/Requests/SelectTransactionsRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,6 +25,7 @@ namespace FireflyIII\Http\Requests; use Carbon\Carbon; /** + * @codeCoverageIgnore * Class ExportFormRequest. */ class SelectTransactionsRequest extends Request diff --git a/app/Http/Requests/SplitJournalFormRequest.php b/app/Http/Requests/SplitJournalFormRequest.php index 0865751fb4..d2c82be9ff 100644 --- a/app/Http/Requests/SplitJournalFormRequest.php +++ b/app/Http/Requests/SplitJournalFormRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Requests/TagFormRequest.php b/app/Http/Requests/TagFormRequest.php index dd835fd9a6..563c920652 100644 --- a/app/Http/Requests/TagFormRequest.php +++ b/app/Http/Requests/TagFormRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Http/Requests/TestRuleFormRequest.php b/app/Http/Requests/TestRuleFormRequest.php index 098315e0f9..4064306cbd 100644 --- a/app/Http/Requests/TestRuleFormRequest.php +++ b/app/Http/Requests/TestRuleFormRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class RuleFormRequest. */ class TestRuleFormRequest extends Request diff --git a/app/Http/Requests/TokenFormRequest.php b/app/Http/Requests/TokenFormRequest.php index e3b2f3819f..cc3aeb4c33 100644 --- a/app/Http/Requests/TokenFormRequest.php +++ b/app/Http/Requests/TokenFormRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class TokenFormRequest. */ class TokenFormRequest extends Request diff --git a/app/Http/Requests/UserFormRequest.php b/app/Http/Requests/UserFormRequest.php index ffb06350ea..a8aea7bc69 100644 --- a/app/Http/Requests/UserFormRequest.php +++ b/app/Http/Requests/UserFormRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class UserFormRequest. */ class UserFormRequest extends Request diff --git a/app/Http/Requests/UserRegistrationRequest.php b/app/Http/Requests/UserRegistrationRequest.php index dffe9a3223..c02a04f481 100644 --- a/app/Http/Requests/UserRegistrationRequest.php +++ b/app/Http/Requests/UserRegistrationRequest.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Http\Requests; /** + * @codeCoverageIgnore * Class UserRegistrationRequest. */ class UserRegistrationRequest extends Request diff --git a/app/Import/Configurator/ConfiguratorInterface.php b/app/Import/Configuration/ConfiguratorInterface.php similarity index 94% rename from app/Import/Configurator/ConfiguratorInterface.php rename to app/Import/Configuration/ConfiguratorInterface.php index a6781310c7..f171044f7c 100644 --- a/app/Import/Configurator/ConfiguratorInterface.php +++ b/app/Import/Configuration/ConfiguratorInterface.php @@ -16,11 +16,11 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -namespace FireflyIII\Import\Configurator; +namespace FireflyIII\Import\Configuration; use FireflyIII\Models\ImportJob; diff --git a/app/Import/Configurator/CsvConfigurator.php b/app/Import/Configuration/FileConfigurator.php similarity index 81% rename from app/Import/Configurator/CsvConfigurator.php rename to app/Import/Configuration/FileConfigurator.php index 79593ca556..8e120c4208 100644 --- a/app/Import/Configurator/CsvConfigurator.php +++ b/app/Import/Configuration/FileConfigurator.php @@ -1,6 +1,6 @@ . + * along with Firefly III. If not, see . */ declare(strict_types=1); -namespace FireflyIII\Import\Configurator; +namespace FireflyIII\Import\Configuration; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\ImportJob; use FireflyIII\Support\Import\Configuration\ConfigurationInterface; -use FireflyIII\Support\Import\Configuration\Csv\Initial; -use FireflyIII\Support\Import\Configuration\Csv\Map; -use FireflyIII\Support\Import\Configuration\Csv\Roles; +use FireflyIII\Support\Import\Configuration\File\Initial; +use FireflyIII\Support\Import\Configuration\File\Map; +use FireflyIII\Support\Import\Configuration\File\Roles; +use FireflyIII\Support\Import\Configuration\File\Upload; use Log; /** - * Class CsvConfigurator. + * Class FileConfigurator. */ -class CsvConfigurator implements ConfiguratorInterface +class FileConfigurator implements ConfiguratorInterface { /** @var ImportJob */ private $job; @@ -95,14 +96,17 @@ class CsvConfigurator implements ConfiguratorInterface */ public function getNextView(): string { + if (!$this->job->configuration['has-file-upload']) { + return 'import.file.upload'; + } if (!$this->job->configuration['initial-config-complete']) { - return 'import.csv.initial'; + return 'import.file.initial'; } if (!$this->job->configuration['column-roles-complete']) { - return 'import.csv.roles'; + return 'import.file.roles'; } if (!$this->job->configuration['column-mapping-complete']) { - return 'import.csv.map'; + return 'import.file.map'; } throw new FireflyException('No view for state'); @@ -124,15 +128,17 @@ class CsvConfigurator implements ConfiguratorInterface public function isJobConfigured(): bool { $config = $this->job->configuration; + $config['has-file-upload'] = $config['has-file-upload'] ?? false; $config['initial-config-complete'] = $config['initial-config-complete'] ?? false; $config['column-roles-complete'] = $config['column-roles-complete'] ?? false; $config['column-mapping-complete'] = $config['column-mapping-complete'] ?? false; $this->job->configuration = $config; $this->job->save(); - if ($this->job->configuration['initial-config-complete'] - && $this->job->configuration['column-roles-complete'] - && $this->job->configuration['column-mapping-complete'] + if ($config['initial-config-complete'] + && $config['column-roles-complete'] + && $config['column-mapping-complete'] + && $config['has-file-upload'] ) { return true; } @@ -162,6 +168,9 @@ class CsvConfigurator implements ConfiguratorInterface { $class = false; switch (true) { + case !$this->job->configuration['has-file-upload']: + $class = Upload::class; + break; case !$this->job->configuration['initial-config-complete']: $class = Initial::class; break; diff --git a/app/Import/Configuration/SpectreConfigurator.php b/app/Import/Configuration/SpectreConfigurator.php new file mode 100644 index 0000000000..125d7e2bd5 --- /dev/null +++ b/app/Import/Configuration/SpectreConfigurator.php @@ -0,0 +1,126 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Import\Configuration; + +use FireflyIII\Models\ImportJob; + +/** + * Class SpectreConfigurator. + */ +class SpectreConfigurator implements ConfiguratorInterface +{ + /** @var ImportJob */ + private $job; + + /** @var string */ + private $warning = ''; + + /** + * ConfiguratorInterface constructor. + */ + public function __construct() + { + } + + /** + * Store any data from the $data array into the job. + * + * @param array $data + * + * @return bool + */ + public function configureJob(array $data): bool + { + die('cannot store config'); + } + + /** + * Return the data required for the next step in the job configuration. + * + * @return array + */ + public function getNextData(): array + { + // update config to tell Firefly we've redirected the user. + $config = $this->job->configuration; + $config['is-redirected'] = true; + $this->job->configuration = $config; + $this->job->status = 'configured'; + $this->job->save(); + + return $this->job->configuration; + } + + /** + * @return string + */ + public function getNextView(): string + { + return 'import.spectre.redirect'; + } + + /** + * Return possible warning to user. + * + * @return string + */ + public function getWarningMessage(): string + { + return $this->warning; + } + + /** + * @return bool + */ + public function isJobConfigured(): bool + { + // job is configured (and can start) when token is empty: + $config = $this->job->configuration; + if ($config['has-token'] === false) { + return true; + } + + return false; + } + + /** + * @param ImportJob $job + */ + public function setJob(ImportJob $job) + { + $defaultConfig = [ + 'has-token' => false, + 'token' => '', + 'token-expires' => 0, + 'token-url' => '', + 'is-redirected' => false, + + ]; + + $config = $job->configuration; + $finalConfig = array_merge($defaultConfig, $config); + $job->configuration = $finalConfig; + $job->save(); + $this->job = $job; + } +} diff --git a/app/Import/Converter/Amount.php b/app/Import/Converter/Amount.php index 0977ccba88..a72065ea49 100644 --- a/app/Import/Converter/Amount.php +++ b/app/Import/Converter/Amount.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,7 +25,7 @@ namespace FireflyIII\Import\Converter; use Log; /** - * Class RabobankDebetCredit. + * Class Amount. */ class Amount implements ConverterInterface { @@ -66,6 +66,18 @@ class Amount implements ConverterInterface Log::debug(sprintf('Alternate search resulted in "%s" for decimal sign.', $decimal)); } + // decimal character still null? Search from the left for '.',',' or ' '. + if (is_null($decimal)) { + Log::debug('Decimal is still NULL, probably number with >2 decimals. Search for a dot.'); + $res = strrpos($value, '.'); + if (!(false === $res)) { + // blandly assume this is the one. + Log::debug(sprintf('Searched from the left for "." in amount "%s", assume this is the decimal sign.', $value)); + $decimal = '.'; + } + unset($options, $res); + } + // if decimal is dot, replace all comma's and spaces with nothing. then parse as float (round to 4 pos) if ('.' === $decimal) { $search = [',', ' ']; diff --git a/app/Import/Converter/AmountCredit.php b/app/Import/Converter/AmountCredit.php index 2e37f42706..f57220860f 100644 --- a/app/Import/Converter/AmountCredit.php +++ b/app/Import/Converter/AmountCredit.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Import/Converter/AmountDebet.php b/app/Import/Converter/AmountDebit.php similarity index 87% rename from app/Import/Converter/AmountDebet.php rename to app/Import/Converter/AmountDebit.php index a890ae3209..46162ec484 100644 --- a/app/Import/Converter/AmountDebet.php +++ b/app/Import/Converter/AmountDebit.php @@ -1,6 +1,6 @@ . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Import\Converter; /** - * Class AmountDebet + * Class AmountDebit */ -class AmountDebet implements ConverterInterface +class AmountDebit implements ConverterInterface { /** * @param $value diff --git a/app/Import/Converter/ConverterInterface.php b/app/Import/Converter/ConverterInterface.php index 20a4ba6411..40c51884cf 100644 --- a/app/Import/Converter/ConverterInterface.php +++ b/app/Import/Converter/ConverterInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Import/Converter/INGDebetCredit.php b/app/Import/Converter/INGDebitCredit.php similarity index 81% rename from app/Import/Converter/INGDebetCredit.php rename to app/Import/Converter/INGDebitCredit.php index 2772100bd7..4779cecca6 100644 --- a/app/Import/Converter/INGDebetCredit.php +++ b/app/Import/Converter/INGDebitCredit.php @@ -1,6 +1,6 @@ . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,9 +25,9 @@ namespace FireflyIII\Import\Converter; use Log; /** - * Class INGDebetCredit. + * Class INGDebitCredit. */ -class INGDebetCredit implements ConverterInterface +class INGDebitCredit implements ConverterInterface { /** * @param $value @@ -36,7 +36,7 @@ class INGDebetCredit implements ConverterInterface */ public function convert($value) { - Log::debug('Going to convert ing debet credit', ['value' => $value]); + Log::debug('Going to convert ing debit credit', ['value' => $value]); if ('Af' === $value) { Log::debug('Return -1'); diff --git a/app/Import/Converter/RabobankDebetCredit.php b/app/Import/Converter/RabobankDebitCredit.php similarity index 85% rename from app/Import/Converter/RabobankDebetCredit.php rename to app/Import/Converter/RabobankDebitCredit.php index 81dbd57f96..242f4ca38f 100644 --- a/app/Import/Converter/RabobankDebetCredit.php +++ b/app/Import/Converter/RabobankDebitCredit.php @@ -1,6 +1,6 @@ . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,9 +25,9 @@ namespace FireflyIII\Import\Converter; use Log; /** - * Class RabobankDebetCredit. + * Class RabobankDebitCredit. */ -class RabobankDebetCredit implements ConverterInterface +class RabobankDebitCredit implements ConverterInterface { /** * @param $value diff --git a/app/Import/FileProcessor/CsvProcessor.php b/app/Import/FileProcessor/CsvProcessor.php index 0b547eb026..1ad9d6b973 100644 --- a/app/Import/FileProcessor/CsvProcessor.php +++ b/app/Import/FileProcessor/CsvProcessor.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -70,6 +70,9 @@ class CsvProcessor implements FileProcessorInterface * Does the actual job. * * @return bool + * + * @throws \League\Csv\Exception + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function run(): bool { @@ -80,6 +83,7 @@ class CsvProcessor implements FileProcessorInterface Log::debug(sprintf('Number of entries: %d', $entries->count())); $notImported = $entries->filter( function (array $row, int $index) { + $row = array_values($row); if ($this->rowAlreadyImported($row)) { $message = sprintf('Row #%d has already been imported.', $index); $this->job->addError($index, $message); @@ -158,6 +162,10 @@ class CsvProcessor implements FileProcessorInterface /** * @return Iterator + * + * @throws \League\Csv\Exception + * @throws \League\Csv\Exception + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ private function getImportArray(): Iterator { @@ -169,9 +177,11 @@ class CsvProcessor implements FileProcessorInterface $delimiter = "\t"; } $reader->setDelimiter($delimiter); - $start = $config['has-headers'] ? 1 : 0; - $results = $reader->setOffset($start)->fetch(); - Log::debug(sprintf('Created a CSV reader starting at offset %d', $start)); + if ($config['has-headers']) { + $reader->setHeaderOffset(0); + } + $results = $reader->getRecords(); + Log::debug('Created a CSV reader.'); return $results; } @@ -239,6 +249,7 @@ class CsvProcessor implements FileProcessorInterface */ private function importRow(int $index, array $row): ImportJournal { + $row = array_values($row); Log::debug(sprintf('Now at row %d', $index)); $row = $this->specifics($row); $hash = $this->getRowHash($row); @@ -252,7 +263,7 @@ class CsvProcessor implements FileProcessorInterface * @var string $value */ foreach ($row as $rowIndex => $value) { - $value = trim($value); + $value = trim(strval($value)); if (strlen($value) > 0) { $annotated = $this->annotateValue($rowIndex, $value); Log::debug('Annotated value', $annotated); @@ -271,6 +282,8 @@ class CsvProcessor implements FileProcessorInterface * @param array $array * * @return bool + * + * @throws FireflyException */ private function rowAlreadyImported(array $array): bool { @@ -299,7 +312,7 @@ class CsvProcessor implements FileProcessorInterface private function specifics(array $row): array { $config = $this->job->configuration; - $names = array_keys($config['specifics']); + $names = array_keys($config['specifics'] ?? []); foreach ($names as $name) { if (!in_array($name, $this->validSpecifics)) { throw new FireflyException(sprintf('"%s" is not a valid class name', $name)); diff --git a/app/Import/FileProcessor/FileProcessorInterface.php b/app/Import/FileProcessor/FileProcessorInterface.php index e8a480176f..7b6de00ade 100644 --- a/app/Import/FileProcessor/FileProcessorInterface.php +++ b/app/Import/FileProcessor/FileProcessorInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Import/Logging/CommandHandler.php b/app/Import/Logging/CommandHandler.php index b55c1f9dc7..c35663e53e 100644 --- a/app/Import/Logging/CommandHandler.php +++ b/app/Import/Logging/CommandHandler.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Import/Mapper/AssetAccountIbans.php b/app/Import/Mapper/AssetAccountIbans.php index 6a53db8941..a782638ca1 100644 --- a/app/Import/Mapper/AssetAccountIbans.php +++ b/app/Import/Mapper/AssetAccountIbans.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -56,7 +56,7 @@ class AssetAccountIbans implements MapperInterface asort($list); $list = $topList + $list; - $list = [0 => trans('csv.map_do_not_map')] + $list; + $list = [0 => trans('import.map_do_not_map')] + $list; return $list; } diff --git a/app/Import/Mapper/AssetAccounts.php b/app/Import/Mapper/AssetAccounts.php index 43188a6833..99b07bd40d 100644 --- a/app/Import/Mapper/AssetAccounts.php +++ b/app/Import/Mapper/AssetAccounts.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -53,7 +53,7 @@ class AssetAccounts implements MapperInterface asort($list); - $list = [0 => trans('csv.map_do_not_map')] + $list; + $list = [0 => trans('import.map_do_not_map')] + $list; return $list; } diff --git a/app/Import/Mapper/Bills.php b/app/Import/Mapper/Bills.php index b758b52dd1..d15544c414 100644 --- a/app/Import/Mapper/Bills.php +++ b/app/Import/Mapper/Bills.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -46,7 +46,7 @@ class Bills implements MapperInterface } asort($list); - $list = [0 => trans('csv.map_do_not_map')] + $list; + $list = [0 => trans('import.map_do_not_map')] + $list; return $list; } diff --git a/app/Import/Mapper/Budgets.php b/app/Import/Mapper/Budgets.php index eb1b73c9d8..f546e68049 100644 --- a/app/Import/Mapper/Budgets.php +++ b/app/Import/Mapper/Budgets.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -46,7 +46,7 @@ class Budgets implements MapperInterface } asort($list); - $list = [0 => trans('csv.map_do_not_map')] + $list; + $list = [0 => trans('import.map_do_not_map')] + $list; return $list; } diff --git a/app/Import/Mapper/Categories.php b/app/Import/Mapper/Categories.php index d6e0bd3d0f..fae3276f94 100644 --- a/app/Import/Mapper/Categories.php +++ b/app/Import/Mapper/Categories.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -46,7 +46,7 @@ class Categories implements MapperInterface } asort($list); - $list = [0 => trans('csv.map_do_not_map')] + $list; + $list = [0 => trans('import.map_do_not_map')] + $list; return $list; } diff --git a/app/Import/Mapper/MapperInterface.php b/app/Import/Mapper/MapperInterface.php index b0ca4803b5..9446babdd2 100644 --- a/app/Import/Mapper/MapperInterface.php +++ b/app/Import/Mapper/MapperInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Import/Mapper/OpposingAccountIbans.php b/app/Import/Mapper/OpposingAccountIbans.php index 894ff7f509..4471dcbf22 100644 --- a/app/Import/Mapper/OpposingAccountIbans.php +++ b/app/Import/Mapper/OpposingAccountIbans.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -62,7 +62,7 @@ class OpposingAccountIbans implements MapperInterface asort($list); $list = $topList + $list; - $list = [0 => trans('csv.map_do_not_map')] + $list; + $list = [0 => trans('import.map_do_not_map')] + $list; return $list; } diff --git a/app/Import/Mapper/OpposingAccounts.php b/app/Import/Mapper/OpposingAccounts.php index c80c1753ab..d524530986 100644 --- a/app/Import/Mapper/OpposingAccounts.php +++ b/app/Import/Mapper/OpposingAccounts.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -59,7 +59,7 @@ class OpposingAccounts implements MapperInterface asort($list); - $list = [0 => trans('csv.map_do_not_map')] + $list; + $list = [0 => trans('import.map_do_not_map')] + $list; return $list; } diff --git a/app/Import/Mapper/Tags.php b/app/Import/Mapper/Tags.php index 8a696ae082..1e36239b0e 100644 --- a/app/Import/Mapper/Tags.php +++ b/app/Import/Mapper/Tags.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -46,7 +46,7 @@ class Tags implements MapperInterface } asort($list); - $list = [0 => trans('csv.map_do_not_map')] + $list; + $list = [0 => trans('import.map_do_not_map')] + $list; return $list; } diff --git a/app/Import/Mapper/TransactionCurrencies.php b/app/Import/Mapper/TransactionCurrencies.php index 0a52533aee..4e58b26285 100644 --- a/app/Import/Mapper/TransactionCurrencies.php +++ b/app/Import/Mapper/TransactionCurrencies.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -42,7 +42,7 @@ class TransactionCurrencies implements MapperInterface asort($list); - $list = [0 => trans('csv.map_do_not_map')] + $list; + $list = [0 => trans('import.map_do_not_map')] + $list; return $list; } diff --git a/app/Import/MapperPreProcess/PreProcessorInterface.php b/app/Import/MapperPreProcess/PreProcessorInterface.php index c8232d0239..5346d5dddc 100644 --- a/app/Import/MapperPreProcess/PreProcessorInterface.php +++ b/app/Import/MapperPreProcess/PreProcessorInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Import/MapperPreProcess/TagsComma.php b/app/Import/MapperPreProcess/TagsComma.php index a7534f0aeb..d3d2e4165a 100644 --- a/app/Import/MapperPreProcess/TagsComma.php +++ b/app/Import/MapperPreProcess/TagsComma.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Import/MapperPreProcess/TagsSpace.php b/app/Import/MapperPreProcess/TagsSpace.php index 02f9bcebe9..cd897e7c67 100644 --- a/app/Import/MapperPreProcess/TagsSpace.php +++ b/app/Import/MapperPreProcess/TagsSpace.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Import/Object/ImportAccount.php b/app/Import/Object/ImportAccount.php index 31786c2be5..ba9330e8f3 100644 --- a/app/Import/Object/ImportAccount.php +++ b/app/Import/Object/ImportAccount.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -359,7 +359,7 @@ class ImportAccount 'name' => $this->accountName['value'] ?? '(no name)', 'iban' => $this->accountIban['value'] ?? null, 'active' => true, - 'virtualBalance' => null, + 'virtualBalance' => '0', ]; $this->account = $this->repository->store($data); diff --git a/app/Import/Object/ImportBill.php b/app/Import/Object/ImportBill.php index 94cacfd7cf..988b7b9574 100644 --- a/app/Import/Object/ImportBill.php +++ b/app/Import/Object/ImportBill.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Import/Object/ImportBudget.php b/app/Import/Object/ImportBudget.php index e8d2a5acf9..a45de9d5d6 100644 --- a/app/Import/Object/ImportBudget.php +++ b/app/Import/Object/ImportBudget.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Import/Object/ImportCategory.php b/app/Import/Object/ImportCategory.php index fca23422ab..3c899f1664 100644 --- a/app/Import/Object/ImportCategory.php +++ b/app/Import/Object/ImportCategory.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,9 @@ use FireflyIII\User; use Illuminate\Support\Collection; use Log; +/** + * Class ImportCategory + */ class ImportCategory { /** @var Category */ diff --git a/app/Import/Object/ImportCurrency.php b/app/Import/Object/ImportCurrency.php index d995d7a2bb..9a459d4c24 100644 --- a/app/Import/Object/ImportCurrency.php +++ b/app/Import/Object/ImportCurrency.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -27,6 +27,9 @@ use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; use FireflyIII\User; use Log; +/** + * Class ImportCurrency + */ class ImportCurrency { /** @var array */ diff --git a/app/Import/Object/ImportJournal.php b/app/Import/Object/ImportJournal.php index 54f194c481..a903ffe7e1 100644 --- a/app/Import/Object/ImportJournal.php +++ b/app/Import/Object/ImportJournal.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -63,7 +63,7 @@ class ImportJournal /** @var array */ private $amountCredit; /** @var array */ - private $amountDebet; + private $amountDebit; /** @var string */ private $convertedAmount = null; /** @var string */ @@ -105,7 +105,7 @@ class ImportJournal { Log::debug('Now in getAmount()'); Log::debug(sprintf('amount is %s', var_export($this->amount, true))); - Log::debug(sprintf('debet amount is %s', var_export($this->amountDebet, true))); + Log::debug(sprintf('debit amount is %s', var_export($this->amountDebit, true))); Log::debug(sprintf('credit amount is %s', var_export($this->amountCredit, true))); if (null === $this->convertedAmount) { @@ -188,8 +188,8 @@ class ImportJournal case 'amount': $this->amount = $array; break; - case 'amount_debet': - $this->amountDebet = $array; + case 'amount_debit': + $this->amountDebit = $array; break; case 'amount_credit': $this->amountCredit = $array; @@ -245,13 +245,17 @@ class ImportJournal $this->notes .= ' ' . $array['value']; $this->notes = trim($this->notes); break; + case 'note': + $this->notes .= ' ' . $array['value']; + $this->notes = trim($this->notes); + break; case 'external-id': $this->externalId = $array['value']; break; case '_ignore': break; - case 'ing-debet-credit': - case 'rabo-debet-credit': + case 'ing-debit-credit': + case 'rabo-debit-credit': $this->addToModifier($array); break; case 'opposing-iban': @@ -284,7 +288,7 @@ class ImportJournal /** * If convertedAmount is NULL, this method will try to calculate the correct amount. - * It starts with amount, but can be overruled by debet and credit amounts. + * It starts with amount, but can be overruled by debit and credit amounts. * * @throws FireflyException */ @@ -326,19 +330,20 @@ class ImportJournal */ private function selectAmountInput() { + $info = []; $converterClass = ''; if (!is_null($this->amount)) { Log::debug('Amount value is not NULL, assume this is the correct value.'); $converterClass = sprintf('FireflyIII\Import\Converter\%s', config(sprintf('csv.import_roles.%s.converter', $this->amount['role']))); $info = $this->amount; } - if (!is_null($this->amountDebet)) { - Log::debug('Amount DEBET value is not NULL, assume this is the correct value (overrules Amount).'); - $converterClass = sprintf('FireflyIII\Import\Converter\%s', config(sprintf('csv.import_roles.%s.converter', $this->amountDebet['role']))); - $info = $this->amountDebet; + if (!is_null($this->amountDebit)) { + Log::debug('Amount DEBIT value is not NULL, assume this is the correct value (overrules Amount).'); + $converterClass = sprintf('FireflyIII\Import\Converter\%s', config(sprintf('csv.import_roles.%s.converter', $this->amountDebit['role']))); + $info = $this->amountDebit; } if (!is_null($this->amountCredit)) { - Log::debug('Amount CREDIT value is not NULL, assume this is the correct value (overrules Amount and AmountDebet).'); + Log::debug('Amount CREDIT value is not NULL, assume this is the correct value (overrules Amount and AmountDebit).'); $converterClass = sprintf('FireflyIII\Import\Converter\%s', config(sprintf('csv.import_roles.%s.converter', $this->amountCredit['role']))); $info = $this->amountCredit; } diff --git a/app/Support/Import/Prerequisites/BunqPrerequisites.php b/app/Import/Prerequisites/BunqPrerequisites.php similarity index 98% rename from app/Support/Import/Prerequisites/BunqPrerequisites.php rename to app/Import/Prerequisites/BunqPrerequisites.php index 75614b3762..a82345c8db 100644 --- a/app/Support/Import/Prerequisites/BunqPrerequisites.php +++ b/app/Import/Prerequisites/BunqPrerequisites.php @@ -16,11 +16,11 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -namespace FireflyIII\Support\Import\Prerequisites; +namespace FireflyIII\Import\Prerequisites; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Services\Bunq\Id\DeviceServerId; @@ -155,6 +155,7 @@ class BunqPrerequisites implements PrerequisitesInterface * @return DeviceServerId * * @throws FireflyException + * @throws \Exception */ private function getExistingDevice(): DeviceServerId { @@ -292,6 +293,10 @@ class BunqPrerequisites implements PrerequisitesInterface * - Use this token to send a device server request * - Store the installation token * - Use the installation token each time we need a session. + * + * @throws FireflyException + * @throws FireflyException + * @throws \Exception */ private function registerDevice(): DeviceServerId { diff --git a/app/Import/Prerequisites/FilePrerequisites.php b/app/Import/Prerequisites/FilePrerequisites.php new file mode 100644 index 0000000000..4f3fc873ab --- /dev/null +++ b/app/Import/Prerequisites/FilePrerequisites.php @@ -0,0 +1,95 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Import\Prerequisites; + +use FireflyIII\User; +use Illuminate\Http\Request; +use Illuminate\Support\MessageBag; + +/** + * This class contains all the routines necessary to import from a file. Hint: there are none. + */ +class FilePrerequisites implements PrerequisitesInterface +{ + /** @var User */ + private $user; + + /** + * Returns view name that allows user to fill in prerequisites. Currently asks for the API key. + * + * @return string + */ + public function getView(): string + { + return ''; + } + + /** + * Returns any values required for the prerequisites-view. + * + * @return array + */ + public function getViewParameters(): array + { + return []; + } + + /** + * Returns if this import method has any special prerequisites such as config + * variables or other things. The only thing we verify is the presence of the API key. Everything else + * tumbles into place: no installation token? Will be requested. No device server? Will be created. Etc. + * + * True if prerequisites. False if not. + * + * @return bool + */ + public function hasPrerequisites(): bool + { + return false; + } + + /** + * Set the user for this Prerequisites-routine. Class is expected to implement and save this. + * + * @param User $user + */ + public function setUser(User $user): void + { + $this->user = $user; + + return; + } + + /** + * This method responds to the user's submission of an API key. It tries to register this instance as a new Firefly III device. + * If this fails, the error is returned in a message bag and the user is notified (this is fairly friendly). + * + * @param Request $request + * + * @return MessageBag + */ + public function storePrerequisites(Request $request): MessageBag + { + return new MessageBag; + } +} diff --git a/app/Support/Import/Prerequisites/PrerequisitesInterface.php b/app/Import/Prerequisites/PrerequisitesInterface.php similarity index 91% rename from app/Support/Import/Prerequisites/PrerequisitesInterface.php rename to app/Import/Prerequisites/PrerequisitesInterface.php index e52fad7d61..699ea43b31 100644 --- a/app/Support/Import/Prerequisites/PrerequisitesInterface.php +++ b/app/Import/Prerequisites/PrerequisitesInterface.php @@ -16,16 +16,19 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -namespace FireflyIII\Support\Import\Prerequisites; +namespace FireflyIII\Import\Prerequisites; use FireflyIII\User; use Illuminate\Http\Request; use Illuminate\Support\MessageBag; +/** + * Interface PrerequisitesInterface + */ interface PrerequisitesInterface { /** diff --git a/app/Import/Prerequisites/SpectrePrerequisites.php b/app/Import/Prerequisites/SpectrePrerequisites.php new file mode 100644 index 0000000000..e59e102ecc --- /dev/null +++ b/app/Import/Prerequisites/SpectrePrerequisites.php @@ -0,0 +1,171 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Import\Prerequisites; + +use FireflyIII\Models\Preference; +use FireflyIII\User; +use Illuminate\Http\Request; +use Illuminate\Support\MessageBag; +use Log; +use Preferences; + +/** + * This class contains all the routines necessary to connect to Spectre. + */ +class SpectrePrerequisites implements PrerequisitesInterface +{ + /** @var User */ + private $user; + + /** + * Returns view name that allows user to fill in prerequisites. Currently asks for the API key. + * + * @return string + */ + public function getView(): string + { + return 'import.spectre.prerequisites'; + } + + /** + * Returns any values required for the prerequisites-view. + * + * @return array + */ + public function getViewParameters(): array + { + $publicKey = $this->getPublicKey(); + $subTitle = strval(trans('import.spectre_title')); + $subTitleIcon = 'fa-archive'; + + return compact('publicKey', 'subTitle', 'subTitleIcon'); + } + + /** + * Returns if this import method has any special prerequisites such as config + * variables or other things. The only thing we verify is the presence of the API key. Everything else + * tumbles into place: no installation token? Will be requested. No device server? Will be created. Etc. + * + * @return bool + */ + public function hasPrerequisites(): bool + { + $values = [ + Preferences::getForUser($this->user, 'spectre_client_id', false), + Preferences::getForUser($this->user, 'spectre_app_secret', false), + Preferences::getForUser($this->user, 'spectre_service_secret', false), + ]; + /** @var Preference $value */ + foreach ($values as $value) { + if (false === $value->data || null === $value->data) { + Log::info(sprintf('Config var "%s" is missing.', $value->name)); + + return true; + } + } + Log::debug('All prerequisites are here!'); + + return false; + } + + /** + * Set the user for this Prerequisites-routine. Class is expected to implement and save this. + * + * @param User $user + */ + public function setUser(User $user): void + { + $this->user = $user; + + return; + } + + /** + * This method responds to the user's submission of an API key. It tries to register this instance as a new Firefly III device. + * If this fails, the error is returned in a message bag and the user is notified (this is fairly friendly). + * + * @param Request $request + * + * @return MessageBag + */ + public function storePrerequisites(Request $request): MessageBag + { + Log::debug('Storing Spectre API keys..'); + Preferences::setForUser($this->user, 'spectre_client_id', $request->get('client_id')); + Preferences::setForUser($this->user, 'spectre_app_secret', $request->get('app_secret')); + Preferences::setForUser($this->user, 'spectre_service_secret', $request->get('service_secret')); + Log::debug('Done!'); + + return new MessageBag; + } + + /** + * This method creates a new public/private keypair for the user. This isn't really secure, since the key is generated on the fly with + * no regards for HSM's, smart cards or other things. It would require some low level programming to get this right. But the private key + * is stored encrypted in the database so it's something. + */ + private function createKeyPair(): void + { + Log::debug('Generate new Spectre key pair for user.'); + $keyConfig = [ + 'digest_alg' => 'sha512', + 'private_key_bits' => 2048, + 'private_key_type' => OPENSSL_KEYTYPE_RSA, + ]; + // Create the private and public key + $res = openssl_pkey_new($keyConfig); + + // Extract the private key from $res to $privKey + $privKey = ''; + openssl_pkey_export($res, $privKey); + + // Extract the public key from $res to $pubKey + $pubKey = openssl_pkey_get_details($res); + + Preferences::setForUser($this->user, 'spectre_private_key', $privKey); + Preferences::setForUser($this->user, 'spectre_public_key', $pubKey['key']); + Log::debug('Created key pair'); + + return; + } + + /** + * Get a public key from the users preferences. + * + * @return string + */ + private function getPublicKey(): string + { + Log::debug('get public key'); + $preference = Preferences::getForUser($this->user, 'spectre_public_key', null); + if (null === $preference) { + Log::debug('public key is null'); + // create key pair + $this->createKeyPair(); + } + $preference = Preferences::getForUser($this->user, 'spectre_public_key', null); + Log::debug('Return public key for user'); + + return $preference->data; + } +} diff --git a/app/Import/Routine/ImportRoutine.php b/app/Import/Routine/FileRoutine.php similarity index 86% rename from app/Import/Routine/ImportRoutine.php rename to app/Import/Routine/FileRoutine.php index 74dc52150c..99f1c14d75 100644 --- a/app/Import/Routine/ImportRoutine.php +++ b/app/Import/Routine/FileRoutine.php @@ -1,6 +1,6 @@ . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -32,7 +32,10 @@ use FireflyIII\Repositories\Tag\TagRepositoryInterface; use Illuminate\Support\Collection; use Log; -class ImportRoutine +/** + * Class FileRoutine + */ +class FileRoutine implements RoutineInterface { /** @var Collection */ public $errors; @@ -52,6 +55,30 @@ class ImportRoutine $this->errors = new Collection; } + /** + * @return Collection + */ + public function getErrors(): Collection + { + return $this->errors; + } + + /** + * @return Collection + */ + public function getJournals(): Collection + { + return $this->journals; + } + + /** + * @return int + */ + public function getLines(): int + { + return $this->lines; + } + /** * */ @@ -106,9 +133,11 @@ class ImportRoutine */ protected function getImportObjects(): Collection { - $objects = new Collection; - $type = $this->job->file_type; - $class = config(sprintf('firefly.import_processors.%s', $type)); + $objects = new Collection; + $config = $this->job->configuration; + $fileType = $config['file-type'] ?? 'csv'; + // will only respond to "file" + $class = config(sprintf('import.options.file.processors.%s', $fileType)); /** @var FileProcessorInterface $processor */ $processor = app($class); $processor->setJob($this->job); @@ -143,7 +172,7 @@ class ImportRoutine $repository = app(TagRepositoryInterface::class); $repository->setUser($this->job->user); $data = [ - 'tag' => trans('firefly.import_with_key', ['key' => $this->job->key]), + 'tag' => trans('import.import_with_key', ['key' => $this->job->key]), 'date' => new Carbon, 'description' => null, 'latitude' => null, diff --git a/app/Http/Requests/ImportUploadRequest.php b/app/Import/Routine/RoutineInterface.php similarity index 53% rename from app/Http/Requests/ImportUploadRequest.php rename to app/Import/Routine/RoutineInterface.php index 1a4ac97c9e..ef2d25515b 100644 --- a/app/Http/Requests/ImportUploadRequest.php +++ b/app/Import/Routine/RoutineInterface.php @@ -1,6 +1,6 @@ . + * along with Firefly III. If not, see . */ declare(strict_types=1); -namespace FireflyIII\Http\Requests; +namespace FireflyIII\Import\Routine; + +use FireflyIII\Models\ImportJob; +use Illuminate\Support\Collection; /** - * Class ImportUploadRequest. + * Interface RoutineInterface */ -class ImportUploadRequest extends Request +interface RoutineInterface { + /** + * @return Collection + */ + public function getErrors(): Collection; + + /** + * @return Collection + */ + public function getJournals(): Collection; + + /** + * @return int + */ + public function getLines(): int; + /** * @return bool */ - public function authorize() - { - // Only allow logged in users - return auth()->check(); - } + public function run(): bool; /** - * @return array + * @param ImportJob $job + * + * @return mixed */ - public function rules() - { - // fixed - $types = array_keys(config('firefly.import_formats')); - - return [ - 'import_file' => 'required|file', - 'import_file_type' => 'required|in:' . join(',', $types), - 'configuration_file' => 'file', - ]; - } + public function setJob(ImportJob $job); } diff --git a/app/Import/Routine/SpectreRoutine.php b/app/Import/Routine/SpectreRoutine.php new file mode 100644 index 0000000000..fbd12ae9c7 --- /dev/null +++ b/app/Import/Routine/SpectreRoutine.php @@ -0,0 +1,194 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Import\Routine; + +use FireflyIII\Exceptions\FireflyException; +use FireflyIII\Models\ImportJob; +use FireflyIII\Services\Spectre\Object\Customer; +use FireflyIII\Services\Spectre\Object\Token; +use FireflyIII\Services\Spectre\Request\CreateTokenRequest; +use FireflyIII\Services\Spectre\Request\NewCustomerRequest; +use Illuminate\Support\Collection; +use Log; +use Preferences; + +/** + * Class FileRoutine + */ +class SpectreRoutine implements RoutineInterface +{ + /** @var Collection */ + public $errors; + /** @var Collection */ + public $journals; + /** @var int */ + public $lines = 0; + /** @var ImportJob */ + private $job; + + /** + * ImportRoutine constructor. + */ + public function __construct() + { + $this->journals = new Collection; + $this->errors = new Collection; + } + + /** + * @return Collection + */ + public function getErrors(): Collection + { + return $this->errors; + } + + /** + * @return Collection + */ + public function getJournals(): Collection + { + return $this->journals; + } + + /** + * @return int + */ + public function getLines(): int + { + return $this->lines; + } + + /** + * + * @throws \FireflyIII\Exceptions\FireflyException + */ + public function run(): bool + { + if ('configured' !== $this->job->status) { + Log::error(sprintf('Job %s is in state "%s" so it cannot be started.', $this->job->key, $this->job->status)); + + return false; + } + Log::info(sprintf('Start with import job %s using Spectre.', $this->job->key)); + set_time_limit(0); + + // check if job has token first! + $config = $this->job->configuration; + $hasToken = $config['has-token'] ?? false; + if ($hasToken === false) { + Log::debug('Job has no token'); + // create customer if user does not have one: + $customer = $this->getCustomer(); + Log::debug(sprintf('Customer ID is %s', $customer->getId())); + // use customer to request a token: + $uri = route('import.status', [$this->job->key]); + $token = $this->getToken($customer, $uri); + Log::debug(sprintf('Token is %s', $token->getToken())); + + // update job, give it the token: + $config = $this->job->configuration; + $config['has-token'] = true; + $config['token'] = $token->getToken(); + $config['token-expires'] = $token->getExpiresAt()->format('U'); + $config['token-url'] = $token->getConnectUrl(); + $this->job->configuration = $config; + + Log::debug('Job config is now', $config); + + // update job, set status to "configuring". + $this->job->status = 'configuring'; + $this->job->save(); + Log::debug(sprintf('Job status is now %s', $this->job->status)); + + return true; + } + $isRedirected = $config['is-redirected'] ?? false; + if ($isRedirected === true) { + // assume user has "used" the token. + // ... + // now what? + throw new FireflyException('Application cannot handle this.'); + } + + throw new FireflyException('Application cannot handle this.'); + } + + /** + * @param ImportJob $job + */ + public function setJob(ImportJob $job) + { + $this->job = $job; + } + + /** + * @return Customer + * @throws \FireflyIII\Exceptions\FireflyException + */ + protected function createCustomer(): Customer + { + $newCustomerRequest = new NewCustomerRequest($this->job->user); + $newCustomerRequest->call(); + $customer = $newCustomerRequest->getCustomer(); + + Preferences::setForUser($this->job->user, 'spectre_customer', $customer->toArray()); + + return $customer; + + } + + /** + * @return Customer + * @throws \FireflyIII\Exceptions\FireflyException + */ + protected function getCustomer(): Customer + { + $preference = Preferences::getForUser($this->job->user, 'spectre_customer', null); + if (is_null($preference)) { + return $this->createCustomer(); + } + $customer = new Customer($preference->data); + + return $customer; + } + + /** + * @param Customer $customer + * @param string $returnUri + * + * @return Token + * @throws \FireflyIII\Exceptions\FireflyException + */ + protected function getToken(Customer $customer, string $returnUri): Token + { + $request = new CreateTokenRequest($this->job->user); + $request->setUri($returnUri); + $request->setCustomer($customer); + $request->call(); + Log::debug('Call to get token is finished'); + + return $request->getToken(); + + } +} diff --git a/app/Import/Specifics/AbnAmroDescription.php b/app/Import/Specifics/AbnAmroDescription.php index cd884c7c29..26658ad045 100644 --- a/app/Import/Specifics/AbnAmroDescription.php +++ b/app/Import/Specifics/AbnAmroDescription.php @@ -1,7 +1,7 @@ . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -58,7 +58,7 @@ class AbnAmroDescription implements SpecificInterface */ public function run(array $row): array { - $this->row = $row; + $this->row = array_values($row); if (!isset($row[7])) { return $row; diff --git a/app/Import/Specifics/IngDescription.php b/app/Import/Specifics/IngDescription.php index 010b93801d..6839fa76ba 100644 --- a/app/Import/Specifics/IngDescription.php +++ b/app/Import/Specifics/IngDescription.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -60,7 +60,7 @@ class IngDescription implements SpecificInterface */ public function run(array $row): array { - $this->row = $row; + $this->row = array_values($row); if (count($this->row) >= 8) { // check if the array is correct switch ($this->row[4]) { // Get value for the mutation type case 'GT': // InternetBankieren @@ -69,6 +69,8 @@ class IngDescription implements SpecificInterface case 'IC': // Incasso $this->removeIBANIngDescription(); $this->removeNameIngDescription(); + // if "tegenrekening" empty, copy the description. Primitive, but it works. + $this->copyDescriptionToOpposite(); break; case 'BA': // Betaalautomaat $this->addNameIngDescription(); @@ -113,9 +115,20 @@ class IngDescription implements SpecificInterface */ protected function removeNameIngDescription() { - // Try remove everything bevore the 'Omschrijving' + // Try remove everything before the 'Omschrijving' $this->row[8] = preg_replace('/.+Omschrijving: /', '', $this->row[8]); return true; } + + /** + * + */ + private function copyDescriptionToOpposite(): void + { + $search = ['Naar Oranje Spaarrekening ', 'Afschrijvingen']; + if (0 === strlen($this->row[3])) { + $this->row[3] = trim(str_ireplace($search, '', $this->row[8])); + } + } } diff --git a/app/Import/Specifics/PresidentsChoice.php b/app/Import/Specifics/PresidentsChoice.php index 1c0d5ca1ba..96fec74867 100644 --- a/app/Import/Specifics/PresidentsChoice.php +++ b/app/Import/Specifics/PresidentsChoice.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -50,6 +50,7 @@ class PresidentsChoice implements SpecificInterface */ public function run(array $row): array { + $row = array_values($row); // first, if column 2 is empty and 3 is not, do nothing. // if column 3 is empty and column 2 is not, move amount to column 3, *-1 if (isset($row[3]) && 0 === strlen($row[3])) { diff --git a/app/Import/Specifics/RabobankDescription.php b/app/Import/Specifics/RabobankDescription.php index 94a9e1f559..b29127260a 100644 --- a/app/Import/Specifics/RabobankDescription.php +++ b/app/Import/Specifics/RabobankDescription.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -52,6 +52,7 @@ class RabobankDescription implements SpecificInterface */ public function run(array $row): array { + $row = array_values($row); Log::debug(sprintf('Now in RabobankSpecific::run(). Row has %d columns', count($row))); $oppositeAccount = isset($row[5]) ? trim($row[5]) : ''; $oppositeName = isset($row[6]) ? trim($row[6]) : ''; diff --git a/app/Import/Specifics/SnsDescription.php b/app/Import/Specifics/SnsDescription.php index 3f52171846..3ef766e81a 100644 --- a/app/Import/Specifics/SnsDescription.php +++ b/app/Import/Specifics/SnsDescription.php @@ -1,7 +1,7 @@ . - */ - -/** - * snsDescription.php - * Author 2017 hugovanduijn@gmail.com. - * - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -60,6 +50,7 @@ class SnsDescription implements SpecificInterface */ public function run(array $row): array { + $row = array_values($row); $row[17] = ltrim($row[17], "'"); $row[17] = rtrim($row[17], "'"); diff --git a/app/Import/Specifics/SpecificInterface.php b/app/Import/Specifics/SpecificInterface.php index 837966be3e..d721f18557 100644 --- a/app/Import/Specifics/SpecificInterface.php +++ b/app/Import/Specifics/SpecificInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Import/Storage/ImportStorage.php b/app/Import/Storage/ImportStorage.php index 76e409f673..f548ae0068 100644 --- a/app/Import/Storage/ImportStorage.php +++ b/app/Import/Storage/ImportStorage.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -45,11 +45,11 @@ class ImportStorage public $errors; /** @var Collection */ public $journals; - /** @var BillRepositoryInterface */ + /** @var BillRepositoryInterface */ protected $billRepository; // yes, hard coded /** @var Collection */ protected $bills; -/** @var int */ + /** @var int */ protected $defaultCurrencyId = 1; /** @var ImportJob */ protected $job; @@ -96,11 +96,11 @@ class ImportStorage $config = $job->configuration; $this->applyRules = $config['apply_rules'] ?? false; $this->matchBills = $config['match_bills'] ?? false; - if ($this->applyRules === true) { + if (true === $this->applyRules) { Log::debug('applyRules seems to be true, get the rules.'); $this->rules = $this->getRules(); } - if ($this->matchBills === true) { + if (true === $this->matchBills) { Log::debug('matchBills seems to be true, get the bills'); $this->bills = $this->getBills(); $this->billRepository = app(BillRepositoryInterface::class); @@ -226,22 +226,21 @@ class ImportStorage $this->job->addStepsDone(1); // run rules if config calls for it: - if ($this->applyRules === true) { + if (true === $this->applyRules) { Log::info('Will apply rules to this journal.'); $this->applyRules($journal); } - if (!($this->applyRules === true)) { + if (!(true === $this->applyRules)) { Log::info('Will NOT apply rules to this journal.'); } // match bills if config calls for it. - if ($this->matchBills === true) { - //$this->/applyRules($journal); + if (true === $this->matchBills) { Log::info('Cannot match bills (yet).'); $this->matchBills($journal); } - if (!($this->matchBills === true)) { + if (!(true === $this->matchBills)) { Log::info('Cannot match bills (yet), but do not have to.'); } diff --git a/app/Import/Storage/ImportSupport.php b/app/Import/Storage/ImportSupport.php index d5640aa98c..94fe0d0188 100644 --- a/app/Import/Storage/ImportSupport.php +++ b/app/Import/Storage/ImportSupport.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -93,8 +93,9 @@ trait ImportSupport */ protected function matchBills(TransactionJournal $journal): bool { - if(!is_null($journal->bill_id)) { + if (!is_null($journal->bill_id)) { Log::debug('Journal is already linked to a bill, will not scan.'); + return true; } if ($this->bills->count() > 0) { @@ -264,6 +265,7 @@ trait ImportSupport * * @return string *x + * * @throws FireflyException * * @see ImportSupport::getOpposingAccount() @@ -408,6 +410,13 @@ trait ImportSupport } } + /** + * @param array $parameters + * + * @return TransactionJournal + * + * @throws FireflyException + */ private function storeJournal(array $parameters): TransactionJournal { // find transaction type: diff --git a/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php b/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php index 77aa4174f4..a1d896184c 100644 --- a/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php +++ b/app/Jobs/ExecuteRuleGroupOnExistingTransactions.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Jobs/ExecuteRuleOnExistingTransactions.php b/app/Jobs/ExecuteRuleOnExistingTransactions.php index 0c7fbd7fd1..fafa74a5b9 100644 --- a/app/Jobs/ExecuteRuleOnExistingTransactions.php +++ b/app/Jobs/ExecuteRuleOnExistingTransactions.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -93,6 +93,14 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue $this->endDate = $date; } + /** + * @return Rule + */ + public function getRule(): Rule + { + return $this->rule; + } + /** * @return \Carbon\Carbon */ diff --git a/app/Jobs/Job.php b/app/Jobs/Job.php index 738c8a0ff6..7de34f6460 100644 --- a/app/Jobs/Job.php +++ b/app/Jobs/Job.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Jobs/MailError.php b/app/Jobs/MailError.php index 58835eb59f..8c61797fa2 100644 --- a/app/Jobs/MailError.php +++ b/app/Jobs/MailError.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Mail/AdminTestMail.php b/app/Mail/AdminTestMail.php index 9895359c3b..dc2ea460e8 100644 --- a/app/Mail/AdminTestMail.php +++ b/app/Mail/AdminTestMail.php @@ -16,12 +16,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ - declare(strict_types=1); - namespace FireflyIII\Mail; use Illuminate\Bus\Queueable; diff --git a/app/Mail/ConfirmEmailChangeMail.php b/app/Mail/ConfirmEmailChangeMail.php index d08b62eba5..4a0e5dd1cd 100644 --- a/app/Mail/ConfirmEmailChangeMail.php +++ b/app/Mail/ConfirmEmailChangeMail.php @@ -16,9 +16,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ - declare(strict_types=1); namespace FireflyIII\Mail; diff --git a/app/Mail/RegisteredUser.php b/app/Mail/RegisteredUser.php index 1e01647930..462509408f 100644 --- a/app/Mail/RegisteredUser.php +++ b/app/Mail/RegisteredUser.php @@ -17,19 +17,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * RegisteredUser.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Mail; use Illuminate\Bus\Queueable; diff --git a/app/Mail/RequestedNewPassword.php b/app/Mail/RequestedNewPassword.php index 6041424d62..6ff7c81f03 100644 --- a/app/Mail/RequestedNewPassword.php +++ b/app/Mail/RequestedNewPassword.php @@ -17,19 +17,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * RequestedNewPassword.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Mail; use Illuminate\Bus\Queueable; diff --git a/app/Mail/UndoEmailChangeMail.php b/app/Mail/UndoEmailChangeMail.php index 6fc85d6e07..94a6b5b5ab 100644 --- a/app/Mail/UndoEmailChangeMail.php +++ b/app/Mail/UndoEmailChangeMail.php @@ -16,13 +16,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ - declare(strict_types=1); - - namespace FireflyIII\Mail; use Illuminate\Bus\Queueable; @@ -36,7 +33,7 @@ class UndoEmailChangeMail extends Mailable { use Queueable, SerializesModels; - /** @var string IP address of user*/ + /** @var string IP address of user */ public $ipAddress; /** @var string New email address */ public $newEmail; diff --git a/app/Models/Account.php b/app/Models/Account.php index 50c6ec7618..11a1061320 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -59,8 +59,11 @@ class Account extends Model protected $fillable = ['user_id', 'account_type_id', 'name', 'active', 'virtual_balance', 'iban']; /** @var array */ protected $hidden = ['encrypted']; + /** + * @var array + */ protected $rules - = [ + = [ 'user_id' => 'required|exists:users,id', 'account_type_id' => 'required|exists:account_types,id', 'name' => 'required|between:1,200', @@ -111,15 +114,17 @@ class Account extends Model } /** - * @param Account $value + * @param string $value * * @return Account */ - public static function routeBinder(Account $value) + public static function routeBinder(string $value): Account { if (auth()->check()) { - if (intval($value->user_id) === auth()->user()->id) { - return $value; + $accountId = intval($value); + $account = auth()->user()->accounts()->find($accountId); + if (!is_null($account)) { + return $account; } } throw new NotFoundHttpException; @@ -127,6 +132,7 @@ class Account extends Model /** * @return HasMany + * @codeCoverageIgnore */ public function accountMeta(): HasMany { @@ -135,6 +141,7 @@ class Account extends Model /** * @return BelongsTo + * @codeCoverageIgnore */ public function accountType(): BelongsTo { @@ -143,6 +150,7 @@ class Account extends Model /** * @return string + * @codeCoverageIgnore */ public function getEditNameAttribute(): string { @@ -156,8 +164,6 @@ class Account extends Model } /** - * FIxxME can return null. - * * @param $value * * @return string @@ -182,6 +188,8 @@ class Account extends Model } /** + * @codeCoverageIgnore + * * @param string $fieldName * * @return string @@ -198,6 +206,8 @@ class Account extends Model } /** + * @codeCoverageIgnore + * * @param $value * * @return string @@ -215,8 +225,6 @@ class Account extends Model * Returns the opening balance. * * @return TransactionJournal - * - * @throws FireflyException */ public function getOpeningBalance(): TransactionJournal { @@ -266,8 +274,6 @@ class Account extends Model * Returns the date of the opening balance for this account. If no date, will return 01-01-1900. * * @return Carbon - * - * @throws FireflyException */ public function getOpeningBalanceDate(): Carbon { @@ -286,6 +292,7 @@ class Account extends Model /** * @return HasMany + * @codeCoverageIgnore */ public function piggyBanks(): HasMany { @@ -293,6 +300,8 @@ class Account extends Model } /** + * @codeCoverageIgnore + * * @param EloquentBuilder $query * @param array $types */ @@ -306,6 +315,8 @@ class Account extends Model } /** + * @codeCoverageIgnore + * * @param EloquentBuilder $query * @param string $name * @param string $value @@ -323,7 +334,11 @@ class Account extends Model } /** + * @codeCoverageIgnore + * * @param $value + * + * @codeCoverageIgnore */ public function setIbanAttribute($value) { @@ -331,6 +346,8 @@ class Account extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setNameAttribute($value) @@ -341,15 +358,20 @@ class Account extends Model } /** + * @codeCoverageIgnore + * * @param $value + * + * @codeCoverageIgnore */ public function setVirtualBalanceAttribute($value) { - $this->attributes['virtual_balance'] = strval(round($value, 12)); + $this->attributes['virtual_balance'] = strval($value); } /** * @return HasMany + * @codeCoverageIgnore */ public function transactions(): HasMany { @@ -358,6 +380,7 @@ class Account extends Model /** * @return BelongsTo + * @codeCoverageIgnore */ public function user(): BelongsTo { diff --git a/app/Models/AccountMeta.php b/app/Models/AccountMeta.php index b4e6c3053f..c98e4780da 100644 --- a/app/Models/AccountMeta.php +++ b/app/Models/AccountMeta.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -42,10 +42,14 @@ class AccountMeta extends Model ]; /** @var array */ protected $fillable = ['account_id', 'name', 'data']; - protected $table = 'account_meta'; + /** + * @var string + */ + protected $table = 'account_meta'; /** * @return BelongsTo + * @codeCoverageIgnore */ public function account(): BelongsTo { @@ -55,6 +59,7 @@ class AccountMeta extends Model /** * @param $value * + * @codeCoverageIgnore * @return mixed */ public function getDataAttribute($value) @@ -64,6 +69,8 @@ class AccountMeta extends Model /** * @param $value + * + * @codeCoverageIgnore */ public function setDataAttribute($value) { diff --git a/app/Models/AccountType.php b/app/Models/AccountType.php index 66eb903b65..9b34d0382e 100644 --- a/app/Models/AccountType.php +++ b/app/Models/AccountType.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -30,16 +30,46 @@ use Illuminate\Database\Eloquent\Relations\HasMany; */ class AccountType extends Model { - const DEFAULT = 'Default account'; - const CASH = 'Cash account'; - const ASSET = 'Asset account'; - const EXPENSE = 'Expense account'; - const REVENUE = 'Revenue account'; + /** + * + */ + const DEFAULT = 'Default account'; + /** + * + */ + const CASH = 'Cash account'; + /** + * + */ + const ASSET = 'Asset account'; + /** + * + */ + const EXPENSE = 'Expense account'; + /** + * + */ + const REVENUE = 'Revenue account'; + /** + * + */ const INITIAL_BALANCE = 'Initial balance account'; - const BENEFICIARY = 'Beneficiary account'; - const IMPORT = 'Import account'; - const RECONCILIATION = 'Reconciliation account'; - const LOAN = 'Loan'; + /** + * + */ + const BENEFICIARY = 'Beneficiary account'; + /** + * + */ + const IMPORT = 'Import account'; + /** + * + */ + const RECONCILIATION = 'Reconciliation account'; + /** + * + */ + const LOAN = 'Loan'; /** * The attributes that should be casted to native types. * @@ -55,6 +85,7 @@ class AccountType extends Model /** * @return HasMany + * @codeCoverageIgnore */ public function accounts(): HasMany { diff --git a/app/Models/Attachment.php b/app/Models/Attachment.php index 00ea1c5e89..f78478dde8 100644 --- a/app/Models/Attachment.php +++ b/app/Models/Attachment.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -52,22 +52,26 @@ class Attachment extends Model protected $fillable = ['attachable_id', 'attachable_type', 'user_id', 'md5', 'filename', 'mime', 'title', 'notes', 'description', 'size', 'uploaded']; /** - * @param Attachment $value + * @param string $value * * @return Attachment */ - public static function routeBinder(Attachment $value) + public static function routeBinder(string $value): Attachment { if (auth()->check()) { - if (intval($value->user_id) === auth()->user()->id) { - return $value; + $attachmentId = intval($value); + $attachment = auth()->user()->attachments()->find($attachmentId); + if (!is_null($attachment)) { + return $attachment; } } throw new NotFoundHttpException; } /** - * Get all of the owning imageable models. + * Get all of the owning attachable models. + * + * @codeCoverageIgnore * * @return MorphTo */ @@ -79,6 +83,7 @@ class Attachment extends Model /** * Returns the expected filename for this attachment. * + * @codeCoverageIgnore * @return string */ public function fileName(): string @@ -89,6 +94,7 @@ class Attachment extends Model /** * @param $value * + * @codeCoverageIgnore * @return null|string */ public function getDescriptionAttribute($value) @@ -103,6 +109,7 @@ class Attachment extends Model /** * @param $value * + * @codeCoverageIgnore * @return null|string */ public function getFilenameAttribute($value) @@ -117,6 +124,7 @@ class Attachment extends Model /** * @param $value * + * @codeCoverageIgnore * @return null|string */ public function getMimeAttribute($value) @@ -131,6 +139,7 @@ class Attachment extends Model /** * @param $value * + * @codeCoverageIgnore * @return null|string */ public function getNotesAttribute($value) @@ -145,6 +154,7 @@ class Attachment extends Model /** * @param $value * + * @codeCoverageIgnore * @return null|string */ public function getTitleAttribute($value) @@ -157,6 +167,8 @@ class Attachment extends Model } /** + * @codeCoverageIgnore + * * @param string $value */ public function setDescriptionAttribute(string $value) @@ -165,6 +177,8 @@ class Attachment extends Model } /** + * @codeCoverageIgnore + * * @param string $value */ public function setFilenameAttribute(string $value) @@ -173,6 +187,8 @@ class Attachment extends Model } /** + * @codeCoverageIgnore + * * @param string $value */ public function setMimeAttribute(string $value) @@ -181,6 +197,8 @@ class Attachment extends Model } /** + * @codeCoverageIgnore + * * @param string $value */ public function setNotesAttribute(string $value) @@ -189,6 +207,8 @@ class Attachment extends Model } /** + * @codeCoverageIgnore + * * @param string $value */ public function setTitleAttribute(string $value) @@ -197,6 +217,7 @@ class Attachment extends Model } /** + * @codeCoverageIgnore * @return BelongsTo */ public function user(): BelongsTo diff --git a/app/Models/AvailableBudget.php b/app/Models/AvailableBudget.php index 9e90b2572f..b936a1a580 100644 --- a/app/Models/AvailableBudget.php +++ b/app/Models/AvailableBudget.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -49,6 +49,7 @@ class AvailableBudget extends Model protected $fillable = ['user_id', 'transaction_currency_id', 'amount', 'start_date', 'end_date']; /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function transactionCurrency() @@ -57,6 +58,7 @@ class AvailableBudget extends Model } /** + * @codeCoverageIgnore * @return BelongsTo */ public function user(): BelongsTo diff --git a/app/Models/Bill.php b/app/Models/Bill.php index 7b9a7fd2a7..b7dcb125cd 100644 --- a/app/Models/Bill.php +++ b/app/Models/Bill.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -42,7 +42,7 @@ class Bill extends Model * @var array */ protected $casts - = [ + = [ 'created_at' => 'datetime', 'updated_at' => 'datetime', 'deleted_at' => 'datetime', @@ -53,28 +53,40 @@ class Bill extends Model 'name_encrypted' => 'boolean', 'match_encrypted' => 'boolean', ]; + /** + * @var array + */ protected $fillable - = ['name', 'match', 'amount_min', 'match_encrypted', 'name_encrypted', 'user_id', 'amount_max', 'date', 'repeat_freq', 'skip', - 'automatch', 'active',]; + = ['name', 'match', 'amount_min', 'match_encrypted', 'name_encrypted', 'user_id', 'amount_max', 'date', 'repeat_freq', 'skip', + 'automatch', 'active',]; + /** + * @var array + */ protected $hidden = ['amount_min_encrypted', 'amount_max_encrypted', 'name_encrypted', 'match_encrypted']; - protected $rules = ['name' => 'required|between:1,200']; + /** + * @var array + */ + protected $rules = ['name' => 'required|between:1,200']; /** - * @param Bill $value + * @param string $value * * @return Bill */ - public static function routeBinder(Bill $value) + public static function routeBinder(string $value): Bill { if (auth()->check()) { - if (intval($value->user_id) === auth()->user()->id) { - return $value; + $billId = intval($value); + $bill = auth()->user()->bills()->find($billId); + if (!is_null($bill)) { + return $bill; } } throw new NotFoundHttpException; } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\MorphMany */ public function attachments() @@ -83,6 +95,8 @@ class Bill extends Model } /** + * @codeCoverageIgnore + * * @param $value * * @return string @@ -97,6 +111,8 @@ class Bill extends Model } /** + * @codeCoverageIgnore + * * @param $value * * @return string @@ -111,6 +127,7 @@ class Bill extends Model } /** + * @codeCoverageIgnore * Get all of the notes. */ public function notes() @@ -119,23 +136,29 @@ class Bill extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setAmountMaxAttribute($value) { - $this->attributes['amount_max'] = strval(round($value, 12)); + $this->attributes['amount_max'] = strval($value); } /** * @param $value + * + * @codeCoverageIgnore */ public function setAmountMinAttribute($value) { - $this->attributes['amount_min'] = strval(round($value, 12)); + $this->attributes['amount_min'] = strval($value); } /** * @param $value + * + * @codeCoverageIgnore */ public function setMatchAttribute($value) { @@ -146,6 +169,8 @@ class Bill extends Model /** * @param $value + * + * @codeCoverageIgnore */ public function setNameAttribute($value) { @@ -155,6 +180,7 @@ class Bill extends Model } /** + * @codeCoverageIgnore * @return HasMany */ public function transactionJournals(): HasMany @@ -163,6 +189,7 @@ class Bill extends Model } /** + * @codeCoverageIgnore * @return BelongsTo */ public function user(): BelongsTo diff --git a/app/Models/Budget.php b/app/Models/Budget.php index d319d2aa2b..ba013701ea 100644 --- a/app/Models/Budget.php +++ b/app/Models/Budget.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -84,21 +84,24 @@ class Budget extends Model } /** - * @param Budget $value + * @param string $value * * @return Budget */ - public static function routeBinder(Budget $value) + public static function routeBinder(string $value): Budget { if (auth()->check()) { - if (intval($value->user_id) === auth()->user()->id) { - return $value; + $budgetId = intval($value); + $budget = auth()->user()->budgets()->find($budgetId); + if (!is_null($budget)) { + return $budget; } } throw new NotFoundHttpException; } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function budgetlimits() @@ -107,6 +110,8 @@ class Budget extends Model } /** + * @codeCoverageIgnore + * * @param $value * * @return string @@ -121,6 +126,8 @@ class Budget extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setNameAttribute($value) @@ -131,6 +138,7 @@ class Budget extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function transactionJournals() @@ -139,6 +147,7 @@ class Budget extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function transactions() @@ -147,6 +156,7 @@ class Budget extends Model } /** + * @codeCoverageIgnore * @return BelongsTo */ public function user(): BelongsTo diff --git a/app/Models/BudgetLimit.php b/app/Models/BudgetLimit.php index b8902b4727..ddab3dfab0 100644 --- a/app/Models/BudgetLimit.php +++ b/app/Models/BudgetLimit.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -47,25 +47,27 @@ class BudgetLimit extends Model protected $dates = ['start_date', 'end_date']; /** - * @param $value + * @param string $value * * @return mixed */ - public static function routeBinder($value) + public static function routeBinder(string $value): BudgetLimit { if (auth()->check()) { - $object = self::where('budget_limits.id', $value) - ->leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id') - ->where('budgets.user_id', auth()->user()->id) - ->first(['budget_limits.*']); - if ($object) { - return $object; + $budgetLimitId = intval($value); + $budgetLimit = self::where('budget_limits.id', $budgetLimitId) + ->leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id') + ->where('budgets.user_id', auth()->user()->id) + ->first(['budget_limits.*']); + if (!is_null($budgetLimit)) { + return $budgetLimit; } } throw new NotFoundHttpException; } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function budget() @@ -74,6 +76,8 @@ class BudgetLimit extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setAmountAttribute($value) diff --git a/app/Models/Category.php b/app/Models/Category.php index d72cd168e2..38f6e3712d 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -83,21 +83,25 @@ class Category extends Model } /** - * @param Category $value + * @param string $value * * @return Category */ - public static function routeBinder(Category $value) + public static function routeBinder(string $value): Category { if (auth()->check()) { - if (intval($value->user_id) === auth()->user()->id) { - return $value; + $categoryId = intval($value); + $category = auth()->user()->categories()->find($categoryId); + if (!is_null($category)) { + return $category; } } throw new NotFoundHttpException; } /** + * @codeCoverageIgnore + * * @param $value * * @return string @@ -112,6 +116,8 @@ class Category extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setNameAttribute($value) @@ -122,6 +128,7 @@ class Category extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function transactionJournals() @@ -130,6 +137,7 @@ class Category extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function transactions() @@ -138,6 +146,7 @@ class Category extends Model } /** + * @codeCoverageIgnore * @return BelongsTo */ public function user(): BelongsTo diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 028f5faf57..6a2b97c9bf 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -38,13 +38,18 @@ class Configuration extends Model * @var array */ protected $casts - = [ + = [ 'created_at' => 'datetime', 'updated_at' => 'datetime', ]; + /** + * @var string + */ protected $table = 'configuration'; /** + * @codeCoverageIgnore + * * @param $value * * @return mixed @@ -55,6 +60,8 @@ class Configuration extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setDataAttribute($value) diff --git a/app/Models/CurrencyExchangeRate.php b/app/Models/CurrencyExchangeRate.php index acea35d9f2..7701cb9fff 100644 --- a/app/Models/CurrencyExchangeRate.php +++ b/app/Models/CurrencyExchangeRate.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -35,6 +35,7 @@ class CurrencyExchangeRate extends Model protected $dates = ['date']; /** + * @codeCoverageIgnore * @return BelongsTo */ public function fromCurrency(): BelongsTo @@ -43,6 +44,7 @@ class CurrencyExchangeRate extends Model } /** + * @codeCoverageIgnore * @return BelongsTo */ public function toCurrency(): BelongsTo @@ -51,6 +53,7 @@ class CurrencyExchangeRate extends Model } /** + * @codeCoverageIgnore * @return BelongsTo */ public function user(): BelongsTo diff --git a/app/Models/ExportJob.php b/app/Models/ExportJob.php index 599b6bdba9..1c019919e6 100644 --- a/app/Models/ExportJob.php +++ b/app/Models/ExportJob.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -41,24 +41,27 @@ class ExportJob extends Model ]; /** - * @param $value + * @param string $value * - * @return mixed + * @return ExportJob * * @throws NotFoundHttpException */ - public static function routeBinder($value) + public static function routeBinder(string $value): ExportJob { if (auth()->check()) { - $model = self::where('key', $value)->where('user_id', auth()->user()->id)->first(); - if (null !== $model) { - return $model; + $key = trim($value); + $exportJob = auth()->user()->exportJobs()->where('key', $key)->first(); + if (null !== $exportJob) { + return $exportJob; } } throw new NotFoundHttpException; } /** + * @codeCoverageIgnore + * * @param $status */ public function change($status) @@ -68,6 +71,7 @@ class ExportJob extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function user() diff --git a/app/Models/ImportJob.php b/app/Models/ImportJob.php index 74c7e591f9..57015f946b 100644 --- a/app/Models/ImportJob.php +++ b/app/Models/ImportJob.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Models; use Crypt; +use FireflyIII\Exceptions\FireflyException; use Illuminate\Database\Eloquent\Model; use Log; use Storage; @@ -33,6 +34,18 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; */ class ImportJob extends Model { + /** + * @var array + */ + public $validStatus + = [ + 'new', + 'configuring', + 'configured', + 'running', + 'error', + 'finished', + ]; /** * The attributes that should be casted to native types. * @@ -44,28 +57,26 @@ class ImportJob extends Model 'updated_at' => 'datetime', ]; - protected $validStatus - = [ - 'new', - 'initialized', - 'configured', - 'running', - 'finished', - ]; - /** * @param $value * * @return mixed * * @throws NotFoundHttpException + * @throws FireflyException */ - public static function routeBinder($value) + public static function routeBinder($value): ImportJob { if (auth()->check()) { - $model = self::where('key', $value)->where('user_id', auth()->user()->id)->first(); - if (null !== $model) { - return $model; + $key = trim($value); + $importJob = auth()->user()->importJobs()->where('key', $key)->first(); + if (null !== $importJob) { + // must have valid status: + if (!in_array($importJob->status, $importJob->validStatus)) { + throw new FireflyException(sprintf('ImportJob with key "%s" has invalid status "%s"', $importJob->key, $importJob->status)); + } + + return $importJob; } } throw new NotFoundHttpException; @@ -109,12 +120,21 @@ class ImportJob extends Model } /** - * @param $status + * @param string $status + * + * @throws FireflyException */ - public function change($status) + public function change(string $status): void { - $this->status = $status; - $this->save(); + if (in_array($status, $this->validStatus)) { + Log::debug(sprintf('Job status set (in model) to "%s"', $status)); + $this->status = $status; + $this->save(); + + return; + } + throw new FireflyException(sprintf('Status "%s" is invalid for job "%s".', $status, $this->key)); + } /** @@ -149,6 +169,8 @@ class ImportJob extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setConfigurationAttribute($value) @@ -157,6 +179,8 @@ class ImportJob extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setExtendedStatusAttribute($value) @@ -176,6 +200,8 @@ class ImportJob extends Model /** * @return string + * + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function uploadFileContents(): string { @@ -189,6 +215,7 @@ class ImportJob extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function user() diff --git a/app/Models/LinkType.php b/app/Models/LinkType.php index 0c0e0cfac7..143e30f4e6 100644 --- a/app/Models/LinkType.php +++ b/app/Models/LinkType.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -50,21 +50,26 @@ class LinkType extends Model /** * @param $value * - * @return mixed + * @return LinkType * * @throws NotFoundHttpException */ - public static function routeBinder($value) + public static function routeBinder(string $value): LinkType { if (auth()->check()) { - $model = self::where('id', $value)->first(); - if (null !== $model) { - return $model; + $linkTypeId = intval($value); + $linkType = self::find($linkTypeId); + if (null !== $linkType) { + return $linkType; } } throw new NotFoundHttpException; } + /** + * @codeCoverageIgnore + * @return \Illuminate\Database\Eloquent\Relations\HasMany + */ public function transactionJournalLinks() { return $this->hasMany(TransactionJournalLink::class); diff --git a/app/Models/Note.php b/app/Models/Note.php index 4d5d2bfafb..df8b0de9de 100644 --- a/app/Models/Note.php +++ b/app/Models/Note.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -45,6 +45,7 @@ class Note extends Model protected $fillable = ['title', 'text']; /** + * @codeCoverageIgnore * @return string */ public function getMarkdownAttribute(): string @@ -55,6 +56,7 @@ class Note extends Model } /** + * @codeCoverageIgnore * Get all of the owning noteable models. Currently piggy bank and * transaction journal. */ diff --git a/app/Models/PiggyBank.php b/app/Models/PiggyBank.php index b3a4e1fe90..51904e9f9d 100644 --- a/app/Models/PiggyBank.php +++ b/app/Models/PiggyBank.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -61,21 +61,26 @@ class PiggyBank extends Model protected $hidden = ['targetamount_encrypted', 'encrypted']; /** - * @param PiggyBank $value + * @param string $value * * @return PiggyBank */ - public static function routeBinder(PiggyBank $value) + public static function routeBinder(string $value): PiggyBank { if (auth()->check()) { - if (intval($value->account->user_id) === auth()->user()->id) { - return $value; + $piggyBankId = intval($value); + $piggyBank = self::where('piggy_banks.id', $piggyBankId) + ->leftJoin('accounts', 'accounts.id', '=', 'piggy_banks.account_id') + ->where('accounts.user_id', auth()->user()->id)->first(['piggy_banks.*']); + if (!is_null($piggyBank)) { + return $piggyBank; } } throw new NotFoundHttpException; } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function account(): BelongsTo @@ -105,6 +110,8 @@ class PiggyBank extends Model } /** + * @codeCoverageIgnore + * * @param $value * * @return string @@ -162,6 +169,7 @@ class PiggyBank extends Model } /** + * @codeCoverageIgnore * Get all of the piggy bank's notes. */ public function notes() @@ -170,6 +178,7 @@ class PiggyBank extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function piggyBankEvents() @@ -178,6 +187,7 @@ class PiggyBank extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function piggyBankRepetitions() @@ -186,6 +196,8 @@ class PiggyBank extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setNameAttribute($value) @@ -196,10 +208,12 @@ class PiggyBank extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setTargetamountAttribute($value) { - $this->attributes['targetamount'] = strval(round($value, 12)); + $this->attributes['targetamount'] = strval($value); } } diff --git a/app/Models/PiggyBankEvent.php b/app/Models/PiggyBankEvent.php index 4ec1836c9b..4bd7753aa9 100644 --- a/app/Models/PiggyBankEvent.php +++ b/app/Models/PiggyBankEvent.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -41,11 +41,18 @@ class PiggyBankEvent extends Model 'date' => 'datetime', ]; /** @var array */ - protected $dates = ['date']; + protected $dates = ['date']; + /** + * @var array + */ protected $fillable = ['piggy_bank_id', 'transaction_journal_id', 'date', 'amount']; - protected $hidden = ['amount_encrypted']; + /** + * @var array + */ + protected $hidden = ['amount_encrypted']; /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function piggyBank() @@ -54,14 +61,17 @@ class PiggyBankEvent extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setAmountAttribute($value) { - $this->attributes['amount'] = strval(round($value, 2)); + $this->attributes['amount'] = strval($value); } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function transactionJournal() diff --git a/app/Models/PiggyBankRepetition.php b/app/Models/PiggyBankRepetition.php index edb2f51841..af65867865 100644 --- a/app/Models/PiggyBankRepetition.php +++ b/app/Models/PiggyBankRepetition.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -50,6 +50,7 @@ class PiggyBankRepetition extends Model protected $fillable = ['piggy_bank_id', 'startdate', 'targetdate', 'currentamount']; /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function piggyBank() @@ -58,6 +59,8 @@ class PiggyBankRepetition extends Model } /** + * @codeCoverageIgnore + * * @param EloquentBuilder $query * @param Carbon $start * @param Carbon $target @@ -70,6 +73,8 @@ class PiggyBankRepetition extends Model } /** + * @codeCoverageIgnore + * * @param EloquentBuilder $query * @param Carbon $date * @@ -92,10 +97,12 @@ class PiggyBankRepetition extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setCurrentamountAttribute($value) { - $this->attributes['currentamount'] = strval(round($value, 12)); + $this->attributes['currentamount'] = strval($value); } } diff --git a/app/Models/Preference.php b/app/Models/Preference.php index a5296a2036..e59f68148d 100644 --- a/app/Models/Preference.php +++ b/app/Models/Preference.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -79,6 +79,8 @@ class Preference extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setDataAttribute($value) @@ -87,6 +89,7 @@ class Preference extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function user() diff --git a/app/Models/Role.php b/app/Models/Role.php index 1a52cb8acf..339ed95f41 100644 --- a/app/Models/Role.php +++ b/app/Models/Role.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -41,9 +41,13 @@ class Role extends Model 'updated_at' => 'datetime', ]; - protected $fillable = ['name','display_name','description']; + /** + * @var array + */ + protected $fillable = ['name', 'display_name', 'description']; /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function users(): BelongsToMany diff --git a/app/Models/Rule.php b/app/Models/Rule.php index 4a37c9ab3d..a59525674f 100644 --- a/app/Models/Rule.php +++ b/app/Models/Rule.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -49,21 +49,24 @@ class Rule extends Model ]; /** - * @param Rule $value + * @param string $value * * @return Rule */ - public static function routeBinder(Rule $value) + public static function routeBinder(string $value): Rule { if (auth()->check()) { - if (intval($value->user_id) === auth()->user()->id) { - return $value; + $ruleId = intval($value); + $rule = auth()->user()->rules()->find($ruleId); + if (!is_null($rule)) { + return $rule; } } throw new NotFoundHttpException; } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function ruleActions() @@ -72,6 +75,7 @@ class Rule extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function ruleGroup() @@ -80,6 +84,7 @@ class Rule extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function ruleTriggers() @@ -88,6 +93,7 @@ class Rule extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function user() diff --git a/app/Models/RuleAction.php b/app/Models/RuleAction.php index 3bfdacc406..2bb86141fd 100644 --- a/app/Models/RuleAction.php +++ b/app/Models/RuleAction.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -44,6 +44,7 @@ class RuleAction extends Model ]; /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function rule() diff --git a/app/Models/RuleGroup.php b/app/Models/RuleGroup.php index 33c98ed0b1..c57ebc4ad8 100644 --- a/app/Models/RuleGroup.php +++ b/app/Models/RuleGroup.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -46,24 +46,30 @@ class RuleGroup extends Model 'order' => 'int', ]; + /** + * @var array + */ protected $fillable = ['user_id', 'order', 'title', 'description', 'active']; /** - * @param RuleGroup $value + * @param string $value * * @return RuleGroup */ - public static function routeBinder(RuleGroup $value) + public static function routeBinder(string $value): RuleGroup { if (auth()->check()) { - if (intval($value->user_id) === auth()->user()->id) { - return $value; + $ruleGroupId = intval($value); + $ruleGroup = auth()->user()->ruleGroups()->find($ruleGroupId); + if (!is_null($ruleGroup)) { + return $ruleGroup; } } throw new NotFoundHttpException; } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function rules() @@ -72,6 +78,7 @@ class RuleGroup extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function user() diff --git a/app/Models/RuleTrigger.php b/app/Models/RuleTrigger.php index bf867571a6..842be11e52 100644 --- a/app/Models/RuleTrigger.php +++ b/app/Models/RuleTrigger.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -44,6 +44,7 @@ class RuleTrigger extends Model ]; /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function rule() diff --git a/app/Models/Tag.php b/app/Models/Tag.php index 555284408c..5f70bee39e 100644 --- a/app/Models/Tag.php +++ b/app/Models/Tag.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -87,15 +87,17 @@ class Tag extends Model } /** - * @param Tag $value + * @param string $value * * @return Tag */ - public static function routeBinder(Tag $value) + public static function routeBinder(string $value): Tag { if (auth()->check()) { - if (intval($value->user_id) === auth()->user()->id) { - return $value; + $tagId = intval($value); + $tag = auth()->user()->tags()->find($tagId); + if (!is_null($tag)) { + return $tag; } } throw new NotFoundHttpException; @@ -105,8 +107,10 @@ class Tag extends Model * @param Tag $tag * * @return string + * + * @throws \FireflyIII\Exceptions\FireflyException */ - public static function tagSum(self $tag): string + public static function tagSum(Tag $tag): string { $sum = '0'; /** @var TransactionJournal $journal */ @@ -118,6 +122,8 @@ class Tag extends Model } /** + * @codeCoverageIgnore + * * @param $value * * @return string @@ -132,6 +138,8 @@ class Tag extends Model } /** + * @codeCoverageIgnore + * * @param $value * * @return string @@ -164,6 +172,8 @@ class Tag extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setDescriptionAttribute($value) @@ -172,6 +182,8 @@ class Tag extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setTagAttribute($value) @@ -180,6 +192,7 @@ class Tag extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function transactionJournals() @@ -188,6 +201,7 @@ class Tag extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function user() diff --git a/app/Models/Transaction.php b/app/Models/Transaction.php index ca77193672..35d388ad99 100644 --- a/app/Models/Transaction.php +++ b/app/Models/Transaction.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -75,7 +75,7 @@ class Transaction extends Model * @var array */ protected $casts - = [ + = [ 'created_at' => 'datetime', 'updated_at' => 'datetime', 'deleted_at' => 'datetime', @@ -84,12 +84,21 @@ class Transaction extends Model 'bill_name_encrypted' => 'boolean', 'reconciled' => 'boolean', ]; + /** + * @var array + */ protected $fillable - = ['account_id', 'transaction_journal_id', 'description', 'amount', 'identifier', 'transaction_currency_id', 'foreign_currency_id', - 'foreign_amount',]; + = ['account_id', 'transaction_journal_id', 'description', 'amount', 'identifier', 'transaction_currency_id', 'foreign_currency_id', + 'foreign_amount',]; + /** + * @var array + */ protected $hidden = ['encrypted']; + /** + * @var array + */ protected $rules - = [ + = [ 'account_id' => 'required|exists:accounts,id', 'transaction_journal_id' => 'required|exists:transaction_journals,id', 'transaction_currency_id' => 'required|exists:transaction_currencies,id', @@ -98,6 +107,8 @@ class Transaction extends Model ]; /** + * @codeCoverageIgnore + * * @param Builder $query * @param string $table * @@ -121,6 +132,7 @@ class Transaction extends Model use SoftDeletes, ValidatingTrait; /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function account() @@ -129,6 +141,7 @@ class Transaction extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function budgets() @@ -137,6 +150,7 @@ class Transaction extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function categories() @@ -145,6 +159,7 @@ class Transaction extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function foreignCurrency() @@ -153,6 +168,8 @@ class Transaction extends Model } /** + * @codeCoverageIgnore + * * @param $value * * @return float|int @@ -163,6 +180,8 @@ class Transaction extends Model } /** + * @codeCoverageIgnore + * * @param Builder $query * @param Carbon $date */ @@ -175,6 +194,8 @@ class Transaction extends Model } /** + * @codeCoverageIgnore + * * @param Builder $query * @param Carbon $date */ @@ -187,6 +208,8 @@ class Transaction extends Model } /** + * @codeCoverageIgnore + * * @param Builder $query * @param array $types */ @@ -203,14 +226,17 @@ class Transaction extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setAmountAttribute($value) { - $this->attributes['amount'] = strval(round($value, 12)); + $this->attributes['amount'] = strval($value); } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function transactionCurrency() @@ -219,6 +245,7 @@ class Transaction extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function transactionJournal() diff --git a/app/Models/TransactionCurrency.php b/app/Models/TransactionCurrency.php index 5e8b4dfe7f..708fc36217 100644 --- a/app/Models/TransactionCurrency.php +++ b/app/Models/TransactionCurrency.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -51,19 +51,24 @@ class TransactionCurrency extends Model protected $fillable = ['name', 'code', 'symbol', 'decimal_places']; /** - * @param TransactionCurrency $currency + * @param string $value * * @return TransactionCurrency */ - public static function routeBinder(self $currency) + public static function routeBinder(string $value): TransactionCurrency { if (auth()->check()) { - return $currency; + $currencyId = intval($value); + $currency = self::find($currencyId); + if (!is_null($currency)) { + return $currency; + } } throw new NotFoundHttpException; } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function transactionJournals() diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php index 883a6ba3ab..74fc1fd07a 100644 --- a/app/Models/TransactionJournal.php +++ b/app/Models/TransactionJournal.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -83,21 +83,20 @@ class TransactionJournal extends Model ]; /** - * @param $value + * @param string $value * - * @return mixed - * - * @throws NotFoundHttpException + * @return TransactionJournal */ - public static function routeBinder($value) + public static function routeBinder(string $value): TransactionJournal { if (auth()->check()) { - $object = self::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.*']); - if (null !== $object) { - return $object; + $journalId = intval($value); + $journal = auth()->user()->transactionJournals()->where('transaction_journals.id', $journalId) + ->with('transactionType') + ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') + ->first(['transaction_journals.*']); + if (!is_null($journal)) { + return $journal; } } @@ -105,6 +104,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\MorphMany */ public function attachments() @@ -113,6 +113,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function bill() @@ -121,6 +122,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function budgets(): BelongsToMany @@ -129,6 +131,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function categories(): BelongsToMany @@ -137,6 +140,8 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore + * * @param string $name * * @return bool @@ -149,6 +154,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return HasMany */ public function destinationJournalLinks(): HasMany @@ -157,6 +163,8 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore + * * @param $value * * @return string @@ -171,6 +179,7 @@ class TransactionJournal extends Model } /** + * * @param string $name * * @return string @@ -206,6 +215,8 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore + * * @param string $name * * @return bool @@ -216,6 +227,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return bool */ public function isDeposit(): bool @@ -228,6 +240,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return bool */ public function isOpeningBalance(): bool @@ -240,6 +253,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return bool */ public function isTransfer(): bool @@ -252,6 +266,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return bool */ public function isWithdrawal(): bool @@ -264,6 +279,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * Get all of the notes. */ public function notes() @@ -272,6 +288,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function piggyBankEvents(): HasMany @@ -280,6 +297,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * Save the model to the database. * * @param array $options @@ -295,6 +313,8 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore + * * @param EloquentBuilder $query * @param Carbon $date * @@ -306,6 +326,8 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore + * * @param EloquentBuilder $query * @param Carbon $date * @@ -317,6 +339,8 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore + * * @param EloquentBuilder $query */ public function scopeSortCorrectly(EloquentBuilder $query) @@ -327,6 +351,8 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore + * * @param EloquentBuilder $query * @param array $types */ @@ -341,6 +367,8 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setDescriptionAttribute($value) @@ -388,6 +416,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return HasMany */ public function sourceJournalLinks(): HasMany @@ -396,6 +425,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany */ public function tags() @@ -404,6 +434,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function transactionCurrency() @@ -412,6 +443,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return HasMany */ public function transactionJournalMeta(): HasMany @@ -420,6 +452,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function transactionType() @@ -428,6 +461,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return HasMany */ public function transactions(): HasMany @@ -436,6 +470,7 @@ class TransactionJournal extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function user() diff --git a/app/Models/TransactionJournalLink.php b/app/Models/TransactionJournalLink.php index c3a001f556..36ec286341 100644 --- a/app/Models/TransactionJournalLink.php +++ b/app/Models/TransactionJournalLink.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -32,32 +32,37 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; */ class TransactionJournalLink extends Model { + /** + * @var string + */ protected $table = 'journal_links'; /** - * @param $value + * @param string $value * * @return mixed * * @throws NotFoundHttpException */ - public static function routeBinder($value) + public static function routeBinder(string $value): TransactionJournalLink { if (auth()->check()) { - $model = self::where('journal_links.id', $value) - ->leftJoin('transaction_journals as t_a', 't_a.id', '=', 'source_id') - ->leftJoin('transaction_journals as t_b', 't_b.id', '=', 'destination_id') - ->where('t_a.user_id', auth()->user()->id) - ->where('t_b.user_id', auth()->user()->id) - ->first(['journal_links.*']); - if (null !== $model) { - return $model; + $linkId = intval($value); + $link = self::where('journal_links.id', $linkId) + ->leftJoin('transaction_journals as t_a', 't_a.id', '=', 'source_id') + ->leftJoin('transaction_journals as t_b', 't_b.id', '=', 'destination_id') + ->where('t_a.user_id', auth()->user()->id) + ->where('t_b.user_id', auth()->user()->id) + ->first(['journal_links.*']); + if (!is_null($link)) { + return $link; } } throw new NotFoundHttpException; } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function destination() @@ -66,6 +71,8 @@ class TransactionJournalLink extends Model } /** + * @codeCoverageIgnore + * * @param $value * * @return null|string @@ -73,13 +80,14 @@ class TransactionJournalLink extends Model public function getCommentAttribute($value): ?string { if (null !== $value) { - return Crypt::decrypt($value); + return app('steam')->tryDecrypt($value); } return null; } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function linkType(): BelongsTo @@ -88,6 +96,8 @@ class TransactionJournalLink extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setCommentAttribute($value): void @@ -101,6 +111,7 @@ class TransactionJournalLink extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function source() diff --git a/app/Models/TransactionJournalMeta.php b/app/Models/TransactionJournalMeta.php index 8a93df7870..3e87d48d0b 100644 --- a/app/Models/TransactionJournalMeta.php +++ b/app/Models/TransactionJournalMeta.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -49,6 +49,8 @@ class TransactionJournalMeta extends Model protected $table = 'journal_meta'; /** + * @codeCoverageIgnore + * * @param $value * * @return mixed @@ -59,6 +61,8 @@ class TransactionJournalMeta extends Model } /** + * @codeCoverageIgnore + * * @param $value */ public function setDataAttribute($value) @@ -69,6 +73,7 @@ class TransactionJournalMeta extends Model } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function transactionJournal(): BelongsTo diff --git a/app/Models/TransactionType.php b/app/Models/TransactionType.php index f8c5274226..5fd8972049 100644 --- a/app/Models/TransactionType.php +++ b/app/Models/TransactionType.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -33,11 +33,26 @@ class TransactionType extends Model { use SoftDeletes; - const WITHDRAWAL = 'Withdrawal'; - const DEPOSIT = 'Deposit'; - const TRANSFER = 'Transfer'; + /** + * + */ + const WITHDRAWAL = 'Withdrawal'; + /** + * + */ + const DEPOSIT = 'Deposit'; + /** + * + */ + const TRANSFER = 'Transfer'; + /** + * + */ const OPENING_BALANCE = 'Opening balance'; - const RECONCILIATION = 'Reconciliation'; + /** + * + */ + const RECONCILIATION = 'Reconciliation'; /** * The attributes that should be casted to native types. * @@ -70,38 +85,43 @@ class TransactionType extends Model } /** + * @codeCoverageIgnore * @return bool */ - public function isDeposit() + public function isDeposit(): bool { return self::DEPOSIT === $this->type; } /** + * @codeCoverageIgnore * @return bool */ - public function isOpeningBalance() + public function isOpeningBalance(): bool { return self::OPENING_BALANCE === $this->type; } /** + * @codeCoverageIgnore * @return bool */ - public function isTransfer() + public function isTransfer(): bool { return self::TRANSFER === $this->type; } /** + * @codeCoverageIgnore * @return bool */ - public function isWithdrawal() + public function isWithdrawal(): bool { return self::WITHDRAWAL === $this->type; } /** + * @codeCoverageIgnore * @return \Illuminate\Database\Eloquent\Relations\HasMany */ public function transactionJournals() diff --git a/app/Providers/AccountServiceProvider.php b/app/Providers/AccountServiceProvider.php index 7f041d1902..0582c7377a 100644 --- a/app/Providers/AccountServiceProvider.php +++ b/app/Providers/AccountServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -30,6 +30,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class AccountServiceProvider. */ class AccountServiceProvider extends ServiceProvider diff --git a/app/Providers/AdminServiceProvider.php b/app/Providers/AdminServiceProvider.php index 81a71c9765..a0d236a579 100644 --- a/app/Providers/AdminServiceProvider.php +++ b/app/Providers/AdminServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class AdminServiceProvider */ class AdminServiceProvider extends ServiceProvider diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index a0af9c7ee7..42fdfc5350 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -26,6 +26,7 @@ use Illuminate\Support\Facades\Schema; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class AppServiceProvider. */ class AppServiceProvider extends ServiceProvider diff --git a/app/Providers/AttachmentServiceProvider.php b/app/Providers/AttachmentServiceProvider.php index 4725f7cb0d..c40862918f 100644 --- a/app/Providers/AttachmentServiceProvider.php +++ b/app/Providers/AttachmentServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class AttachmentServiceProvider. */ class AttachmentServiceProvider extends ServiceProvider diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index b70d194202..3c78d0b5b2 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -16,24 +16,16 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * AuthServiceProvider.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Providers; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; /** + * @codeCoverageIgnore * Class AuthServiceProvider */ class AuthServiceProvider extends ServiceProvider diff --git a/app/Providers/BillServiceProvider.php b/app/Providers/BillServiceProvider.php index f0377d8ca8..0bd528df31 100644 --- a/app/Providers/BillServiceProvider.php +++ b/app/Providers/BillServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class BillServiceProvider. */ class BillServiceProvider extends ServiceProvider diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php index 0d6648fe02..1c37b18c83 100644 --- a/app/Providers/BroadcastServiceProvider.php +++ b/app/Providers/BroadcastServiceProvider.php @@ -16,25 +16,17 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * BroadcastServiceProvider.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Providers; use Illuminate\Support\Facades\Broadcast; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class BroadcastServiceProvider */ class BroadcastServiceProvider extends ServiceProvider diff --git a/app/Providers/BudgetServiceProvider.php b/app/Providers/BudgetServiceProvider.php index 49fd527457..e728fa728e 100644 --- a/app/Providers/BudgetServiceProvider.php +++ b/app/Providers/BudgetServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class BudgetServiceProvider. */ class BudgetServiceProvider extends ServiceProvider diff --git a/app/Providers/CategoryServiceProvider.php b/app/Providers/CategoryServiceProvider.php index 2be853ccf0..4fa1846e45 100644 --- a/app/Providers/CategoryServiceProvider.php +++ b/app/Providers/CategoryServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class CategoryServiceProvider. */ class CategoryServiceProvider extends ServiceProvider diff --git a/app/Providers/CurrencyServiceProvider.php b/app/Providers/CurrencyServiceProvider.php index 76a41f6f98..622c66767c 100644 --- a/app/Providers/CurrencyServiceProvider.php +++ b/app/Providers/CurrencyServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class CurrencyServiceProvider. */ class CurrencyServiceProvider extends ServiceProvider diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 57ad5aa5c0..9cd5f2d8d5 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Providers; use FireflyIII\Events\RegisteredUser; +use FireflyIII\Events\RequestedVersionCheckStatus; use FireflyIII\Models\Account; use FireflyIII\Models\PiggyBank; use FireflyIII\Models\PiggyBankRepetition; @@ -39,6 +40,7 @@ use Log; class EventServiceProvider extends ServiceProvider { /** + * @codeCoverageIgnore * The event listener mappings for the application. * * @var array @@ -53,6 +55,10 @@ class EventServiceProvider extends ServiceProvider // is a User related event. Login::class => [ 'FireflyIII\Handlers\Events\UserEventHandler@checkSingleUserIsAdmin', + + ], + RequestedVersionCheckStatus::class => [ + 'FireflyIII\Handlers\Events\VersionCheckEventHandler@checkForUpdates', ], // is a User related event. @@ -82,6 +88,7 @@ class EventServiceProvider extends ServiceProvider ]; /** + * @codeCoverageIgnore * Register any events for your application. */ public function boot() diff --git a/app/Providers/ExportJobServiceProvider.php b/app/Providers/ExportJobServiceProvider.php index 143d8daf07..56aa74ba1e 100644 --- a/app/Providers/ExportJobServiceProvider.php +++ b/app/Providers/ExportJobServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -30,6 +30,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class ExportJobServiceProvider. */ class ExportJobServiceProvider extends ServiceProvider @@ -51,7 +52,7 @@ class ExportJobServiceProvider extends ServiceProvider } /** - * + * Register export job. */ private function exportJob() { @@ -69,6 +70,9 @@ class ExportJobServiceProvider extends ServiceProvider ); } + /** + * Register import job. + */ private function importJob() { $this->app->bind( diff --git a/app/Providers/FireflyServiceProvider.php b/app/Providers/FireflyServiceProvider.php index 398c45bd4a..5e3c5ccd2a 100644 --- a/app/Providers/FireflyServiceProvider.php +++ b/app/Providers/FireflyServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -69,10 +69,14 @@ use TwigBridge\Extension\Loader\Functions; use Validator; /** + * @codeCoverageIgnore * Class FireflyServiceProvider. */ class FireflyServiceProvider extends ServiceProvider { + /** + * Start provider. + */ public function boot() { Validator::resolver( @@ -94,7 +98,7 @@ class FireflyServiceProvider extends ServiceProvider } /** - * + * Register stuff. */ public function register() { diff --git a/app/Providers/FireflySessionProvider.php b/app/Providers/FireflySessionProvider.php index 9bae19be71..5a860196ae 100644 --- a/app/Providers/FireflySessionProvider.php +++ b/app/Providers/FireflySessionProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -27,6 +27,7 @@ use Illuminate\Session\SessionManager; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class FireflySessionProvider */ class FireflySessionProvider extends ServiceProvider diff --git a/app/Providers/JournalServiceProvider.php b/app/Providers/JournalServiceProvider.php index 069b882f16..b839730664 100644 --- a/app/Providers/JournalServiceProvider.php +++ b/app/Providers/JournalServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -32,6 +32,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class JournalServiceProvider. */ class JournalServiceProvider extends ServiceProvider diff --git a/app/Providers/LogServiceProvider.php b/app/Providers/LogServiceProvider.php index bdfb6cc6bb..753b3c45d0 100644 --- a/app/Providers/LogServiceProvider.php +++ b/app/Providers/LogServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -26,6 +26,7 @@ use Illuminate\Log\LogServiceProvider as LaravelLogServiceProvider; use Illuminate\Log\Writer; /** + * @codeCoverageIgnore * Class LogServiceProvider. */ class LogServiceProvider extends LaravelLogServiceProvider diff --git a/app/Providers/PiggyBankServiceProvider.php b/app/Providers/PiggyBankServiceProvider.php index 2655f5b522..11f767e797 100644 --- a/app/Providers/PiggyBankServiceProvider.php +++ b/app/Providers/PiggyBankServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class PiggyBankServiceProvider. */ class PiggyBankServiceProvider extends ServiceProvider diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 1be7d7c064..8a57b746f4 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -16,24 +16,19 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -/** - * RouteServiceProvider.php - * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. - * - * See the LICENSE file for details. - */ - namespace FireflyIII\Providers; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Support\Facades\Route; +/** + * @codeCoverageIgnore + * Class RouteServiceProvider + */ class RouteServiceProvider extends ServiceProvider { /** diff --git a/app/Providers/RuleGroupServiceProvider.php b/app/Providers/RuleGroupServiceProvider.php index 07c9ee2e0a..6ad98a1758 100644 --- a/app/Providers/RuleGroupServiceProvider.php +++ b/app/Providers/RuleGroupServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class RuleGroupServiceProvider. */ class RuleGroupServiceProvider extends ServiceProvider diff --git a/app/Providers/RuleServiceProvider.php b/app/Providers/RuleServiceProvider.php index bf49190da9..2f0cac6e17 100644 --- a/app/Providers/RuleServiceProvider.php +++ b/app/Providers/RuleServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class RuleServiceProvider. */ class RuleServiceProvider extends ServiceProvider diff --git a/app/Providers/SearchServiceProvider.php b/app/Providers/SearchServiceProvider.php index 97c5072950..8af050c72d 100644 --- a/app/Providers/SearchServiceProvider.php +++ b/app/Providers/SearchServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class SearchServiceProvider. */ class SearchServiceProvider extends ServiceProvider diff --git a/app/Providers/SessionServiceProvider.php b/app/Providers/SessionServiceProvider.php index 7143eafff9..2f936a0747 100644 --- a/app/Providers/SessionServiceProvider.php +++ b/app/Providers/SessionServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -26,6 +26,7 @@ use FireflyIII\Http\Middleware\StartFireflySession; use Illuminate\Session\SessionServiceProvider as BaseSessionServiceProvider; /** + * @codeCoverageIgnore * Class SessionServiceProvider. */ class SessionServiceProvider extends BaseSessionServiceProvider diff --git a/app/Providers/TagServiceProvider.php b/app/Providers/TagServiceProvider.php index acbf9e18cd..1e71905e22 100644 --- a/app/Providers/TagServiceProvider.php +++ b/app/Providers/TagServiceProvider.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,7 @@ use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; /** + * @codeCoverageIgnore * Class TagServiceProvider. */ class TagServiceProvider extends ServiceProvider diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index cb4b8f87fc..3c404fdf88 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -43,7 +43,6 @@ use Validator; */ class AccountRepository implements AccountRepositoryInterface { - /** @var User */ private $user; @@ -72,6 +71,8 @@ class AccountRepository implements AccountRepositoryInterface * @param Account $moveTo * * @return bool + * + * @throws \Exception */ public function destroy(Account $account, Account $moveTo): bool { @@ -160,6 +161,8 @@ class AccountRepository implements AccountRepositoryInterface * @param array $data * * @return Account + * + * @throws FireflyException */ public function store(array $data): Account { @@ -187,7 +190,7 @@ class AccountRepository implements AccountRepositoryInterface // update the account: $account->name = $data['name']; $account->active = $data['active']; - $account->virtual_balance = $data['virtualBalance']; + $account->virtual_balance = trim($data['virtualBalance']) === '' ? '0' : $data['virtualBalance']; $account->iban = $data['iban']; $account->save(); @@ -220,7 +223,7 @@ class AccountRepository implements AccountRepositoryInterface /** @var Transaction $transaction */ foreach ($journal->transactions as $transaction) { $transaction->amount = bcmul($data['amount'], '-1'); - if ($transaction->account->accountType->type === AccountType::ASSET) { + if (AccountType::ASSET === $transaction->account->accountType->type) { $transaction->amount = $data['amount']; } $transaction->save(); @@ -238,6 +241,8 @@ class AccountRepository implements AccountRepositoryInterface /** * @param Account $account + * + * @throws \Exception */ protected function deleteInitialBalance(Account $account) { @@ -300,7 +305,7 @@ class AccountRepository implements AccountRepositoryInterface 'user_id' => $this->user->id, 'account_type_id' => $accountType->id, 'name' => $data['name'], - 'virtual_balance' => $data['virtualBalance'], + 'virtual_balance' => strlen(strval($data['virtualBalance'])) === 0 ? '0' : $data['virtualBalance'], 'active' => true === $data['active'] ? true : false, 'iban' => $data['iban'], ]; @@ -364,13 +369,13 @@ class AccountRepository implements AccountRepositoryInterface 'date' => $data['openingBalanceDate'], ] ); - Log::debug(sprintf('Created new opening balance journal: #%d', $journal->id)); + Log::notice(sprintf('Created new opening balance journal: #%d', $journal->id)); $firstAccount = $account; $secondAccount = $opposing; $firstAmount = $amount; $secondAmount = bcmul($amount, '-1'); - Log::debug(sprintf('First amount is %s, second amount is %s', $firstAmount, $secondAmount)); + Log::notice(sprintf('First amount is %s, second amount is %s', $firstAmount, $secondAmount)); if (bccomp($amount, '0') === -1) { Log::debug(sprintf('%s is a negative number.', $amount)); @@ -378,7 +383,7 @@ class AccountRepository implements AccountRepositoryInterface $secondAccount = $account; $firstAmount = bcmul($amount, '-1'); $secondAmount = $amount; - Log::debug(sprintf('First amount is %s, second amount is %s', $firstAmount, $secondAmount)); + Log::notice(sprintf('First amount is %s, second amount is %s', $firstAmount, $secondAmount)); } $one = new Transaction( @@ -400,7 +405,7 @@ class AccountRepository implements AccountRepositoryInterface ); $two->save(); // second transaction: to - Log::debug(sprintf('Stored two transactions, #%d and #%d', $one->id, $two->id)); + Log::notice(sprintf('Stored two transactions for new account, #%d and #%d', $one->id, $two->id)); return $journal; } @@ -409,6 +414,8 @@ class AccountRepository implements AccountRepositoryInterface * @param string $name * * @return Account + * + * @throws FireflyException */ protected function storeOpposingAccount(string $name): Account { @@ -417,7 +424,7 @@ class AccountRepository implements AccountRepositoryInterface 'name' => $name . ' initial balance', 'active' => false, 'iban' => '', - 'virtualBalance' => 0, + 'virtualBalance' => '0', ]; Log::debug('Going to create an opening balance opposing account.'); @@ -506,6 +513,8 @@ class AccountRepository implements AccountRepositoryInterface * @param array $data * * @return bool + * + * @throws \Exception */ protected function updateOpeningBalanceJournal(Account $account, TransactionJournal $journal, array $data): bool { diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index c05fb8243f..985b32104c 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -33,7 +33,6 @@ use Illuminate\Support\Collection; */ interface AccountRepositoryInterface { - /** * Moved here from account CRUD. * diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index 04b5c18f84..c032724f32 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/Account/AccountTaskerInterface.php b/app/Repositories/Account/AccountTaskerInterface.php index 3e3f022a68..3c8e27a810 100644 --- a/app/Repositories/Account/AccountTaskerInterface.php +++ b/app/Repositories/Account/AccountTaskerInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/Account/FindAccountsTrait.php b/app/Repositories/Account/FindAccountsTrait.php index 42ed53b3ce..8214dd1157 100644 --- a/app/Repositories/Account/FindAccountsTrait.php +++ b/app/Repositories/Account/FindAccountsTrait.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -211,6 +211,8 @@ trait FindAccountsTrait /** * @return Account + * + * @throws FireflyException */ public function getCashAccount(): Account { @@ -250,7 +252,7 @@ trait FindAccountsTrait 'accountType' => 'reconcile', 'name' => $name, 'iban' => null, - 'virtualBalance' => null, + 'virtualBalance' => '0', 'active' => true, ]; $account = $this->storeAccount($data); diff --git a/app/Repositories/Attachment/AttachmentRepository.php b/app/Repositories/Attachment/AttachmentRepository.php index a0e62e508e..05e3176293 100644 --- a/app/Repositories/Attachment/AttachmentRepository.php +++ b/app/Repositories/Attachment/AttachmentRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -43,6 +43,8 @@ class AttachmentRepository implements AttachmentRepositoryInterface * @param Attachment $attachment * * @return bool + * + * @throws \Exception */ public function destroy(Attachment $attachment): bool { @@ -129,6 +131,8 @@ class AttachmentRepository implements AttachmentRepositoryInterface * @param Attachment $attachment * * @return string + * + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function getContent(Attachment $attachment): string { diff --git a/app/Repositories/Attachment/AttachmentRepositoryInterface.php b/app/Repositories/Attachment/AttachmentRepositoryInterface.php index bf15bbea35..262d776cb2 100644 --- a/app/Repositories/Attachment/AttachmentRepositoryInterface.php +++ b/app/Repositories/Attachment/AttachmentRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index 7b1491908e..00fe9f70e3 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -48,6 +48,8 @@ class BillRepository implements BillRepositoryInterface * @param Bill $bill * * @return bool + * + * @throws \Exception */ public function destroy(Bill $bill): bool { @@ -390,6 +392,9 @@ class BillRepository implements BillRepositoryInterface * @param Carbon $date * * @return \Carbon\Carbon + * + * @throws \FireflyIII\Support\Facades\FireflyException + * @throws \FireflyIII\Support\Facades\FireflyException */ public function nextDateMatch(Bill $bill, Carbon $date): Carbon { @@ -427,6 +432,10 @@ class BillRepository implements BillRepositoryInterface * @param Carbon $date * * @return Carbon + * + * @throws \FireflyIII\Support\Facades\FireflyException + * @throws \FireflyIII\Support\Facades\FireflyException + * @throws \FireflyIII\Support\Facades\FireflyException */ public function nextExpectedMatch(Bill $bill, Carbon $date): Carbon { @@ -610,10 +619,9 @@ class BillRepository implements BillRepositoryInterface return $wordMatch; } - /** - * @param Bill $bill - * @param string $note + * @param Bill $bill + * @param string $note * * @return bool */ diff --git a/app/Repositories/Bill/BillRepositoryInterface.php b/app/Repositories/Bill/BillRepositoryInterface.php index acc5b9b977..3a99b0fc62 100644 --- a/app/Repositories/Bill/BillRepositoryInterface.php +++ b/app/Repositories/Bill/BillRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index aa60bda9a8..ed65e673ad 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -51,6 +51,9 @@ class BudgetRepository implements BudgetRepositoryInterface /** * @return bool + * + * @throws \Exception + * @throws \Exception */ public function cleanupBudgets(): bool { @@ -123,6 +126,8 @@ class BudgetRepository implements BudgetRepositoryInterface * @param Budget $budget * * @return bool + * + * @throws \Exception */ public function destroy(Budget $budget): bool { @@ -604,6 +609,8 @@ class BudgetRepository implements BudgetRepositoryInterface * @param string $amount * * @return BudgetLimit + * + * @throws \Exception */ public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, string $amount): BudgetLimit { diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.php index 5f41cbfd23..1563d2080d 100644 --- a/app/Repositories/Budget/BudgetRepositoryInterface.php +++ b/app/Repositories/Budget/BudgetRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index 659e5dde38..03ad9d4308 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -44,6 +44,8 @@ class CategoryRepository implements CategoryRepositoryInterface * @param Category $category * * @return bool + * + * @throws \Exception */ public function destroy(Category $category): bool { diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php index 2444678ca5..5aa9c0278c 100644 --- a/app/Repositories/Category/CategoryRepositoryInterface.php +++ b/app/Repositories/Category/CategoryRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/Currency/CurrencyRepository.php b/app/Repositories/Currency/CurrencyRepository.php index 7862a2fdba..2dbff1614e 100644 --- a/app/Repositories/Currency/CurrencyRepository.php +++ b/app/Repositories/Currency/CurrencyRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/Currency/CurrencyRepositoryInterface.php b/app/Repositories/Currency/CurrencyRepositoryInterface.php index 233e59044a..e7d2d66eb3 100644 --- a/app/Repositories/Currency/CurrencyRepositoryInterface.php +++ b/app/Repositories/Currency/CurrencyRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/ExportJob/ExportJobRepository.php b/app/Repositories/ExportJob/ExportJobRepository.php index 85fc0cb189..9117d85c69 100644 --- a/app/Repositories/ExportJob/ExportJobRepository.php +++ b/app/Repositories/ExportJob/ExportJobRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -53,6 +53,8 @@ class ExportJobRepository implements ExportJobRepositoryInterface /** * @return bool + * + * @throws \Exception */ public function cleanup(): bool { @@ -137,6 +139,8 @@ class ExportJobRepository implements ExportJobRepositoryInterface * @param ExportJob $job * * @return string + * + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function getContent(ExportJob $job): string { diff --git a/app/Repositories/ExportJob/ExportJobRepositoryInterface.php b/app/Repositories/ExportJob/ExportJobRepositoryInterface.php index 34c1eb3b29..2fdcd1362f 100644 --- a/app/Repositories/ExportJob/ExportJobRepositoryInterface.php +++ b/app/Repositories/ExportJob/ExportJobRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/ImportJob/ImportJobRepository.php b/app/Repositories/ImportJob/ImportJobRepository.php index c3bef54aee..8925dbaaf3 100644 --- a/app/Repositories/ImportJob/ImportJobRepository.php +++ b/app/Repositories/ImportJob/ImportJobRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -42,20 +42,16 @@ class ImportJobRepository implements ImportJobRepositoryInterface private $user; /** - * @param string $fileType + * @param string $type * * @return ImportJob * * @throws FireflyException */ - public function create(string $fileType): ImportJob + public function create(string $type): ImportJob { - $count = 0; - $fileType = strtolower($fileType); - $keys = array_keys(config('firefly.import_formats')); - if (!in_array($fileType, $keys)) { - throw new FireflyException(sprintf('Cannot use type "%s" for import job.', $fileType)); - } + $count = 0; + $type = strtolower($type); while ($count < 30) { $key = Str::random(12); @@ -63,10 +59,10 @@ class ImportJobRepository implements ImportJobRepositoryInterface if (null === $existing->id) { $importJob = new ImportJob; $importJob->user()->associate($this->user); - $importJob->file_type = $fileType; + $importJob->file_type = $type; $importJob->key = Str::random(12); $importJob->status = 'new'; - $importJob->configuration = []; + $importJob->configuration = config(sprintf('import.default_config.%s', $type)) ?? []; $importJob->extended_status = [ 'steps' => 0, 'done' => 0, @@ -80,8 +76,7 @@ class ImportJobRepository implements ImportJobRepositoryInterface } ++$count; } - - return new ImportJob; + throw new FireflyException('Could not create an import job with a unique key after 30 tries.'); } /** @@ -130,18 +125,23 @@ class ImportJobRepository implements ImportJobRepositoryInterface } /** - * @param ImportJob $job - * @param UploadedFile $file + * @param ImportJob $job + * @param null|UploadedFile $file * - * @return mixed + * @return bool + * + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ - public function processFile(ImportJob $job, UploadedFile $file): bool + public function processFile(ImportJob $job, ?UploadedFile $file): bool { + if (is_null($file)) { + return false; + } /** @var UserRepositoryInterface $repository */ $repository = app(UserRepositoryInterface::class); $newName = sprintf('%s.upload', $job->key); $uploaded = new SplFileObject($file->getRealPath()); - $content = $uploaded->fread($uploaded->getSize()); + $content = trim($uploaded->fread($uploaded->getSize())); $contentEncrypted = Crypt::encrypt($content); $disk = Storage::disk('upload'); @@ -176,8 +176,12 @@ class ImportJobRepository implements ImportJobRepositoryInterface */ public function setConfiguration(ImportJob $job, array $configuration): ImportJob { - $job->configuration = $configuration; + Log::debug(sprintf('Incoming config for job "%s" is: ', $job->key), $configuration); + $currentConfig = $job->configuration; + $newConfig = array_merge($currentConfig, $configuration); + $job->configuration = $newConfig; $job->save(); + Log::debug(sprintf('Set config of job "%s" to: ', $job->key), $newConfig); return $job; } diff --git a/app/Repositories/ImportJob/ImportJobRepositoryInterface.php b/app/Repositories/ImportJob/ImportJobRepositoryInterface.php index ad74c4e021..6138806ffa 100644 --- a/app/Repositories/ImportJob/ImportJobRepositoryInterface.php +++ b/app/Repositories/ImportJob/ImportJobRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -32,11 +32,11 @@ use Symfony\Component\HttpFoundation\File\UploadedFile; interface ImportJobRepositoryInterface { /** - * @param string $fileType + * @param string $type * * @return ImportJob */ - public function create(string $fileType): ImportJob; + public function create(string $type): ImportJob; /** * @param string $key @@ -54,12 +54,12 @@ interface ImportJobRepositoryInterface public function processConfiguration(ImportJob $job, UploadedFile $file): bool; /** - * @param ImportJob $job - * @param UploadedFile $file + * @param ImportJob $job + * @param null|UploadedFile $file * - * @return mixed + * @return bool */ - public function processFile(ImportJob $job, UploadedFile $file): bool; + public function processFile(ImportJob $job, ?UploadedFile $file): bool; /** * @param ImportJob $job diff --git a/app/Repositories/Journal/CreateJournalsTrait.php b/app/Repositories/Journal/CreateJournalsTrait.php index e9b9e1be87..897d145a1c 100644 --- a/app/Repositories/Journal/CreateJournalsTrait.php +++ b/app/Repositories/Journal/CreateJournalsTrait.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -42,6 +42,8 @@ use Log; trait CreateJournalsTrait { /** + * Store accounts found in parent class. + * * @param User $user * @param TransactionType $type * @param array $data @@ -78,6 +80,8 @@ trait CreateJournalsTrait } /** + * Store a budget if found. + * * @param Transaction $transaction * @param int $budgetId */ @@ -91,6 +95,8 @@ trait CreateJournalsTrait } /** + * Store category if found. + * * @param Transaction $transaction * @param string $category */ @@ -161,6 +167,8 @@ trait CreateJournalsTrait } /** + * Store a transaction. + * * @param array $data * * @return Transaction @@ -202,6 +210,8 @@ trait CreateJournalsTrait } /** + * Update note for journal. + * * @param TransactionJournal $journal * @param string $note * diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index e43bf02459..c71afd2e20 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -24,6 +24,7 @@ namespace FireflyIII\Repositories\Journal; use FireflyIII\Models\Account; use FireflyIII\Models\AccountType; +use FireflyIII\Models\Note; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; @@ -99,6 +100,8 @@ class JournalRepository implements JournalRepositoryInterface * @param TransactionJournal $journal * * @return bool + * + * @throws \Exception */ public function delete(TransactionJournal $journal): bool { @@ -179,7 +182,7 @@ class JournalRepository implements JournalRepositoryInterface { /** @var Transaction $transaction */ foreach ($journal->transactions as $transaction) { - if ($transaction->account->accountType->type === AccountType::ASSET) { + if (AccountType::ASSET === $transaction->account->accountType->type) { return $transaction; } } @@ -187,6 +190,16 @@ class JournalRepository implements JournalRepositoryInterface return null; } + /** + * @param TransactionJournal $journal + * + * @return Note|null + */ + public function getNote(TransactionJournal $journal): ?Note + { + return $journal->notes()->first(); + } + /** * @return Collection */ @@ -273,6 +286,9 @@ class JournalRepository implements JournalRepositoryInterface * @param array $data * * @return TransactionJournal + * + * @throws \FireflyIII\Exceptions\FireflyException + * @throws \FireflyIII\Exceptions\FireflyException */ public function store(array $data): TransactionJournal { @@ -358,6 +374,11 @@ class JournalRepository implements JournalRepositoryInterface * @param array $data * * @return TransactionJournal + * + * @throws \FireflyIII\Exceptions\FireflyException + * @throws \FireflyIII\Exceptions\FireflyException + * @throws \FireflyIII\Exceptions\FireflyException + * @throws \FireflyIII\Exceptions\FireflyException */ public function update(TransactionJournal $journal, array $data): TransactionJournal { @@ -411,7 +432,6 @@ class JournalRepository implements JournalRepositoryInterface return $journal; } - /** * Same as above but for transaction journal with multiple transactions. * diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.php index af54952808..782b38cca3 100644 --- a/app/Repositories/Journal/JournalRepositoryInterface.php +++ b/app/Repositories/Journal/JournalRepositoryInterface.php @@ -16,14 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ - declare(strict_types=1); namespace FireflyIII\Repositories\Journal; use FireflyIII\Models\Account; +use FireflyIII\Models\Note; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; @@ -99,6 +99,13 @@ interface JournalRepositoryInterface */ public function getAssetTransaction(TransactionJournal $journal): ?Transaction; + /** + * @param TransactionJournal $journal + * + * @return Note|null + */ + public function getNote(TransactionJournal $journal): ?Note; + /** * @return Collection */ diff --git a/app/Repositories/Journal/JournalTasker.php b/app/Repositories/Journal/JournalTasker.php index ae7f22e7be..b70c575dce 100644 --- a/app/Repositories/Journal/JournalTasker.php +++ b/app/Repositories/Journal/JournalTasker.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/Journal/JournalTaskerInterface.php b/app/Repositories/Journal/JournalTaskerInterface.php index 37899de92f..06d9294654 100644 --- a/app/Repositories/Journal/JournalTaskerInterface.php +++ b/app/Repositories/Journal/JournalTaskerInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/Journal/SupportJournalsTrait.php b/app/Repositories/Journal/SupportJournalsTrait.php index 25a8a02d69..6584e18a80 100644 --- a/app/Repositories/Journal/SupportJournalsTrait.php +++ b/app/Repositories/Journal/SupportJournalsTrait.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -119,6 +119,9 @@ trait SupportJournalsTrait * @param array $data * * @return array + * + * @throws FireflyException + * @throws FireflyException */ protected function storeDepositAccounts(User $user, array $data): array { @@ -165,6 +168,9 @@ trait SupportJournalsTrait * @param array $data * * @return array + * + * @throws FireflyException + * @throws FireflyException */ protected function storeWithdrawalAccounts(User $user, array $data): array { diff --git a/app/Repositories/Journal/UpdateJournalsTrait.php b/app/Repositories/Journal/UpdateJournalsTrait.php index 0095d8bf83..e56b62d73a 100644 --- a/app/Repositories/Journal/UpdateJournalsTrait.php +++ b/app/Repositories/Journal/UpdateJournalsTrait.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -71,6 +71,8 @@ trait UpdateJournalsTrait } /** + * Update destination transaction. + * * @param TransactionJournal $journal * @param Account $account * @param array $data @@ -94,6 +96,8 @@ trait UpdateJournalsTrait } /** + * Update source transaction. + * * @param TransactionJournal $journal * @param Account $account * @param array $data @@ -118,6 +122,8 @@ trait UpdateJournalsTrait } /** + * Update tags. + * * @param TransactionJournal $journal * @param array $array * diff --git a/app/Repositories/LinkType/LinkTypeRepository.php b/app/Repositories/LinkType/LinkTypeRepository.php index 7ff44353f0..0e9c7acf8e 100644 --- a/app/Repositories/LinkType/LinkTypeRepository.php +++ b/app/Repositories/LinkType/LinkTypeRepository.php @@ -16,17 +16,19 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Repositories\LinkType; +use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\LinkType; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournalLink; use FireflyIII\User; use Illuminate\Support\Collection; +use Log; /** * Class LinkTypeRepository. @@ -51,6 +53,8 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface * @param LinkType $moveTo * * @return bool + * + * @throws \Exception */ public function destroy(LinkType $linkType, LinkType $moveTo): bool { @@ -66,6 +70,8 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface * @param TransactionJournalLink $link * * @return bool + * + * @throws \Exception */ public function destroyLink(TransactionJournalLink $link): bool { @@ -153,6 +159,42 @@ class LinkTypeRepository implements LinkTypeRepositoryInterface return $linkType; } + /** + * Store link between two journals. + * + * @param array $information + * @param TransactionJournal $left + * @param TransactionJournal $right + * + * @return mixed + * @throws FireflyException + */ + public function storeLink(array $information, TransactionJournal $left, TransactionJournal $right): TransactionJournalLink + { + $linkType = $this->find(intval($information['link_type_id']) ?? 0); + if (is_null($linkType->id)) { + throw new FireflyException(sprintf('Link type #%d cannot be resolved to an actual link type', intval($information['link_type_id']) ?? 0)); + } + $link = new TransactionJournalLink; + $link->linkType()->associate($linkType); + if ('inward' === $information['direction']) { + Log::debug(sprintf('Link type is inwards ("%s"), so %d is source and %d is destination.', $linkType->inward, $left->id, $right->id)); + $link->source()->associate($left); + $link->destination()->associate($right); + } + + if ('outward' === $information['direction']) { + Log::debug(sprintf('Link type is inwards ("%s"), so %d is source and %d is destination.', $linkType->outward, $right->id, $left->id)); + $link->source()->associate($right); + $link->destination()->associate($left); + } + + $link->comment = $link['comments'] ?? null; + $link->save(); + + return $link; + } + /** * @param TransactionJournalLink $link * diff --git a/app/Repositories/LinkType/LinkTypeRepositoryInterface.php b/app/Repositories/LinkType/LinkTypeRepositoryInterface.php index b917cec351..19ae1c8846 100644 --- a/app/Repositories/LinkType/LinkTypeRepositoryInterface.php +++ b/app/Repositories/LinkType/LinkTypeRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -92,6 +92,17 @@ interface LinkTypeRepositoryInterface */ public function store(array $data): LinkType; + /** + * Store link between two journals. + * + * @param array $information + * @param TransactionJournal $left + * @param TransactionJournal $right + * + * @return mixed + */ + public function storeLink(array $information, TransactionJournal $left, TransactionJournal $right): TransactionJournalLink; + /** * @param TransactionJournalLink $link * diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php index 49f2852217..1953be27e2 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepository.php +++ b/app/Repositories/PiggyBank/PiggyBankRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php index 1219552227..93ae5f1e3c 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php +++ b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/Rule/RuleRepository.php b/app/Repositories/Rule/RuleRepository.php index 8f58c366ce..3d92220a51 100644 --- a/app/Repositories/Rule/RuleRepository.php +++ b/app/Repositories/Rule/RuleRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -49,6 +49,10 @@ class RuleRepository implements RuleRepositoryInterface * @param Rule $rule * * @return bool + * + * @throws \Exception + * @throws \Exception + * @throws \Exception */ public function destroy(Rule $rule): bool { diff --git a/app/Repositories/Rule/RuleRepositoryInterface.php b/app/Repositories/Rule/RuleRepositoryInterface.php index 57612767d5..b3c1215e40 100644 --- a/app/Repositories/Rule/RuleRepositoryInterface.php +++ b/app/Repositories/Rule/RuleRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/RuleGroup/RuleGroupRepository.php b/app/Repositories/RuleGroup/RuleGroupRepository.php index 4c45395466..f271e7d893 100644 --- a/app/Repositories/RuleGroup/RuleGroupRepository.php +++ b/app/Repositories/RuleGroup/RuleGroupRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -49,6 +49,9 @@ class RuleGroupRepository implements RuleGroupRepositoryInterface * @param RuleGroup|null $moveTo * * @return bool + * + * @throws \Exception + * @throws \Exception */ public function destroy(RuleGroup $ruleGroup, ?RuleGroup $moveTo): bool { diff --git a/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php b/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php index ca9a142bc1..c45524d31f 100644 --- a/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php +++ b/app/Repositories/RuleGroup/RuleGroupRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php index 05f4807096..9d18a137cb 100644 --- a/app/Repositories/Tag/TagRepository.php +++ b/app/Repositories/Tag/TagRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -74,6 +74,8 @@ class TagRepository implements TagRepositoryInterface * @param Tag $tag * * @return bool + * + * @throws \Exception */ public function destroy(Tag $tag): bool { diff --git a/app/Repositories/Tag/TagRepositoryInterface.php b/app/Repositories/Tag/TagRepositoryInterface.php index 814fb87036..f17b57118b 100644 --- a/app/Repositories/Tag/TagRepositoryInterface.php +++ b/app/Repositories/Tag/TagRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php index 45c567ca2d..5f7c793f15 100644 --- a/app/Repositories/User/UserRepository.php +++ b/app/Repositories/User/UserRepository.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -132,6 +132,8 @@ class UserRepository implements UserRepositoryInterface * @param User $user * * @return bool + * + * @throws \Exception */ public function destroy(User $user): bool { @@ -166,6 +168,16 @@ class UserRepository implements UserRepositoryInterface return User::where('email', $email)->first(); } + /** + * Returns the first user in the DB. Generally only works when there is just one. + * + * @return null|User + */ + public function first(): ?User + { + return User::first(); + } + /** * Return basic user information. * @@ -223,6 +235,35 @@ class UserRepository implements UserRepositoryInterface return $user->hasRole($role); } + /** + * @param array $data + * + * @return User + */ + public function store(array $data): User + { + $password = bcrypt($data['password'] ?? app('str')->random(16)); + + return User::create( + [ + 'email' => $data['email'], + 'password' => $password, + ] + ); + } + + /** + * @param User $user + */ + public function unblockUser(User $user): void + { + $user->blocked = 0; + $user->blocked_code = ''; + $user->save(); + + return; + } + /** * This updates the users email address. Same as changeEmail just without most logging. This makes sure that the undo/confirm routine can't catch this one. * The user is NOT blocked. diff --git a/app/Repositories/User/UserRepositoryInterface.php b/app/Repositories/User/UserRepositoryInterface.php index 8436eee569..f3a76efcd4 100644 --- a/app/Repositories/User/UserRepositoryInterface.php +++ b/app/Repositories/User/UserRepositoryInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -105,6 +105,13 @@ interface UserRepositoryInterface */ public function findByEmail(string $email): ?User; + /** + * Returns the first user in the DB. Generally only works when there is just one. + * + * @return null|User + */ + public function first(): ?User; + /** * Return basic user information. * @@ -122,6 +129,18 @@ interface UserRepositoryInterface */ public function hasRole(User $user, string $role): bool; + /** + * @param array $data + * + * @return User + */ + public function store(array $data): User; + + /** + * @param User $user + */ + public function unblockUser(User $user): void; + /** * This updates the users email address. Same as changeEmail just without most logging. This makes sure that the undo/confirm routine can't catch this one. * The user is NOT blocked. diff --git a/app/Services/Bunq/Id/BunqId.php b/app/Services/Bunq/Id/BunqId.php index 3ba845c54e..da63a6b43c 100644 --- a/app/Services/Bunq/Id/BunqId.php +++ b/app/Services/Bunq/Id/BunqId.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Id/DeviceServerId.php b/app/Services/Bunq/Id/DeviceServerId.php index a074753b55..e5758ae8d2 100644 --- a/app/Services/Bunq/Id/DeviceServerId.php +++ b/app/Services/Bunq/Id/DeviceServerId.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Id/DeviceSessionId.php b/app/Services/Bunq/Id/DeviceSessionId.php index 71ce07ebcc..91c5233870 100644 --- a/app/Services/Bunq/Id/DeviceSessionId.php +++ b/app/Services/Bunq/Id/DeviceSessionId.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Id/InstallationId.php b/app/Services/Bunq/Id/InstallationId.php index 48a9d73170..ec3053165c 100644 --- a/app/Services/Bunq/Id/InstallationId.php +++ b/app/Services/Bunq/Id/InstallationId.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Object/Alias.php b/app/Services/Bunq/Object/Alias.php index 7819c6bd48..7457eb0cda 100644 --- a/app/Services/Bunq/Object/Alias.php +++ b/app/Services/Bunq/Object/Alias.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Object/Amount.php b/app/Services/Bunq/Object/Amount.php index 2504bffb26..2875472c69 100644 --- a/app/Services/Bunq/Object/Amount.php +++ b/app/Services/Bunq/Object/Amount.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Object/Avatar.php b/app/Services/Bunq/Object/Avatar.php index 0ac804bacd..67048f95ff 100644 --- a/app/Services/Bunq/Object/Avatar.php +++ b/app/Services/Bunq/Object/Avatar.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Object/BunqObject.php b/app/Services/Bunq/Object/BunqObject.php index a14df09963..81af013f22 100644 --- a/app/Services/Bunq/Object/BunqObject.php +++ b/app/Services/Bunq/Object/BunqObject.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Object/DeviceServer.php b/app/Services/Bunq/Object/DeviceServer.php index f884631c0a..44617cd66c 100644 --- a/app/Services/Bunq/Object/DeviceServer.php +++ b/app/Services/Bunq/Object/DeviceServer.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,6 +25,9 @@ namespace FireflyIII\Services\Bunq\Object; use Carbon\Carbon; use FireflyIII\Services\Bunq\Id\DeviceServerId; +/** + * Class DeviceServer + */ class DeviceServer extends BunqObject { /** @var Carbon */ @@ -40,6 +43,11 @@ class DeviceServer extends BunqObject /** @var Carbon */ private $updated; + /** + * DeviceServer constructor. + * + * @param array $data + */ public function __construct(array $data) { $id = new DeviceServerId(); diff --git a/app/Services/Bunq/Object/MonetaryAccountBank.php b/app/Services/Bunq/Object/MonetaryAccountBank.php index d5b60d6652..092572b455 100644 --- a/app/Services/Bunq/Object/MonetaryAccountBank.php +++ b/app/Services/Bunq/Object/MonetaryAccountBank.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Object/MonetaryAccountProfile.php b/app/Services/Bunq/Object/MonetaryAccountProfile.php index 8a4f436f43..1de1fb4099 100644 --- a/app/Services/Bunq/Object/MonetaryAccountProfile.php +++ b/app/Services/Bunq/Object/MonetaryAccountProfile.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -31,7 +31,13 @@ class MonetaryAccountProfile extends BunqObject private $profileActionRequired = ''; /** @var Amount */ private $profileAmountRequired; + /** + * @var null + */ private $profileDrain; + /** + * @var null + */ private $profileFill; /** diff --git a/app/Services/Bunq/Object/MonetaryAccountSetting.php b/app/Services/Bunq/Object/MonetaryAccountSetting.php index 58f44f80b0..ac189a7477 100644 --- a/app/Services/Bunq/Object/MonetaryAccountSetting.php +++ b/app/Services/Bunq/Object/MonetaryAccountSetting.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Object/NotificationFilter.php b/app/Services/Bunq/Object/NotificationFilter.php index ffcf92362c..11ec026496 100644 --- a/app/Services/Bunq/Object/NotificationFilter.php +++ b/app/Services/Bunq/Object/NotificationFilter.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Object/ServerPublicKey.php b/app/Services/Bunq/Object/ServerPublicKey.php index b70a6ac01e..89e16e1c27 100644 --- a/app/Services/Bunq/Object/ServerPublicKey.php +++ b/app/Services/Bunq/Object/ServerPublicKey.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Object/UserCompany.php b/app/Services/Bunq/Object/UserCompany.php index 36f37ce4a4..44d2341703 100644 --- a/app/Services/Bunq/Object/UserCompany.php +++ b/app/Services/Bunq/Object/UserCompany.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -29,10 +29,19 @@ use Carbon\Carbon; */ class UserCompany extends BunqObject { + /** + * @var + */ private $addressMain; + /** + * @var + */ private $addressPostal; /** @var array */ private $aliases = []; + /** + * @var + */ private $avatar; /** @var string */ private $cocNumber = ''; @@ -40,7 +49,13 @@ class UserCompany extends BunqObject private $counterBankIban = ''; /** @var Carbon */ private $created; + /** + * @var + */ private $dailyLimit; + /** + * @var + */ private $directorAlias; /** @var string */ private $displayName = ''; diff --git a/app/Services/Bunq/Object/UserLight.php b/app/Services/Bunq/Object/UserLight.php index 060a257282..576b32b641 100644 --- a/app/Services/Bunq/Object/UserLight.php +++ b/app/Services/Bunq/Object/UserLight.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Object/UserPerson.php b/app/Services/Bunq/Object/UserPerson.php index 223dfef779..66d7e5ac13 100644 --- a/app/Services/Bunq/Object/UserPerson.php +++ b/app/Services/Bunq/Object/UserPerson.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -29,10 +29,19 @@ use Carbon\Carbon; */ class UserPerson extends BunqObject { + /** + * @var + */ private $addressMain; + /** + * @var + */ private $addressPostal; /** @var array */ private $aliases = []; + /** + * @var + */ private $avatar; /** @var array */ private $billingContracts = []; @@ -40,8 +49,17 @@ class UserPerson extends BunqObject private $countryOfBirth = ''; /** @var Carbon */ private $created; + /** + * @var + */ private $customer; + /** + * @var + */ private $customerLimit; + /** + * @var + */ private $dailyLimit; /** @var Carbon */ private $dateOfBirth; @@ -77,6 +95,9 @@ class UserPerson extends BunqObject private $publicNickName = ''; /** @var string */ private $publicUuid = ''; + /** + * @var mixed + */ private $region; /** @var int */ private $sessionTimeout = 0; diff --git a/app/Services/Bunq/Request/BunqRequest.php b/app/Services/Bunq/Request/BunqRequest.php index dcc4a23729..ef30bf91b9 100644 --- a/app/Services/Bunq/Request/BunqRequest.php +++ b/app/Services/Bunq/Request/BunqRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -42,8 +42,11 @@ abstract class BunqRequest private $privateKey = ''; /** @var string */ private $server = ''; + /** + * @var array + */ private $upperCaseHeaders - = [ + = [ 'x-bunq-client-response-id' => 'X-Bunq-Client-Response-Id', 'x-bunq-client-request-id' => 'X-Bunq-Client-Request-Id', ]; @@ -160,6 +163,9 @@ abstract class BunqRequest return $result; } + /** + * @return array + */ protected function getDefaultHeaders(): array { $userAgent = sprintf('FireflyIII v%s', config('firefly.version')); @@ -324,6 +330,8 @@ abstract class BunqRequest * @param array $headers * * @return array + * + * @throws Exception */ protected function sendUnsignedBunqDelete(string $uri, array $headers): array { @@ -353,6 +361,8 @@ abstract class BunqRequest * @param array $headers * * @return array + * + * @throws Exception */ protected function sendUnsignedBunqPost(string $uri, array $data, array $headers): array { diff --git a/app/Services/Bunq/Request/DeleteDeviceSessionRequest.php b/app/Services/Bunq/Request/DeleteDeviceSessionRequest.php index 750baef294..0351dc4d52 100644 --- a/app/Services/Bunq/Request/DeleteDeviceSessionRequest.php +++ b/app/Services/Bunq/Request/DeleteDeviceSessionRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -34,7 +34,7 @@ class DeleteDeviceSessionRequest extends BunqRequest private $sessionToken; /** - * + * @throws \Exception */ public function call(): void { diff --git a/app/Services/Bunq/Request/DeviceServerRequest.php b/app/Services/Bunq/Request/DeviceServerRequest.php index a6d817bf7b..e17cd8b42e 100644 --- a/app/Services/Bunq/Request/DeviceServerRequest.php +++ b/app/Services/Bunq/Request/DeviceServerRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -40,7 +40,7 @@ class DeviceServerRequest extends BunqRequest private $permittedIps = []; /** - * + * @throws \Exception */ public function call(): void { diff --git a/app/Services/Bunq/Request/DeviceSessionRequest.php b/app/Services/Bunq/Request/DeviceSessionRequest.php index 603b795ac6..4f6bf028b5 100644 --- a/app/Services/Bunq/Request/DeviceSessionRequest.php +++ b/app/Services/Bunq/Request/DeviceSessionRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -46,7 +46,7 @@ class DeviceSessionRequest extends BunqRequest private $userPerson; /** - * + * @throws \Exception */ public function call(): void { @@ -115,6 +115,11 @@ class DeviceSessionRequest extends BunqRequest return $deviceSessionId; } + /** + * @param array $response + * + * @return SessionToken + */ private function extractSessionToken(array $response): SessionToken { $data = $this->getKeyFromResponse('Token', $response); diff --git a/app/Services/Bunq/Request/InstallationTokenRequest.php b/app/Services/Bunq/Request/InstallationTokenRequest.php index 8678ebb0c3..03eef6d185 100644 --- a/app/Services/Bunq/Request/InstallationTokenRequest.php +++ b/app/Services/Bunq/Request/InstallationTokenRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -40,7 +40,7 @@ class InstallationTokenRequest extends BunqRequest private $publicKey = ''; /** - * + * @throws \Exception */ public function call(): void { diff --git a/app/Services/Bunq/Request/ListDeviceServerRequest.php b/app/Services/Bunq/Request/ListDeviceServerRequest.php index 4c82e91c8e..dd72623152 100644 --- a/app/Services/Bunq/Request/ListDeviceServerRequest.php +++ b/app/Services/Bunq/Request/ListDeviceServerRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -43,7 +43,7 @@ class ListDeviceServerRequest extends BunqRequest } /** - * + * @throws \Exception */ public function call(): void { diff --git a/app/Services/Bunq/Request/ListMonetaryAccountRequest.php b/app/Services/Bunq/Request/ListMonetaryAccountRequest.php index bfdf871f32..a1c92be526 100644 --- a/app/Services/Bunq/Request/ListMonetaryAccountRequest.php +++ b/app/Services/Bunq/Request/ListMonetaryAccountRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -39,7 +39,7 @@ class ListMonetaryAccountRequest extends BunqRequest private $userId = 0; /** - * + * @throws \Exception */ public function call(): void { diff --git a/app/Services/Bunq/Request/ListUserRequest.php b/app/Services/Bunq/Request/ListUserRequest.php index 8aa9bf2407..514b62a533 100644 --- a/app/Services/Bunq/Request/ListUserRequest.php +++ b/app/Services/Bunq/Request/ListUserRequest.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -42,7 +42,7 @@ class ListUserRequest extends BunqRequest private $userPerson; /** - * + * @throws \Exception */ public function call(): void { diff --git a/app/Services/Bunq/Token/BunqToken.php b/app/Services/Bunq/Token/BunqToken.php index e83537fc7a..1352958902 100644 --- a/app/Services/Bunq/Token/BunqToken.php +++ b/app/Services/Bunq/Token/BunqToken.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Token/InstallationToken.php b/app/Services/Bunq/Token/InstallationToken.php index 4bf38c4d3c..2826658292 100644 --- a/app/Services/Bunq/Token/InstallationToken.php +++ b/app/Services/Bunq/Token/InstallationToken.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Bunq/Token/SessionToken.php b/app/Services/Bunq/Token/SessionToken.php index 129216906c..46e9cf3e88 100644 --- a/app/Services/Bunq/Token/SessionToken.php +++ b/app/Services/Bunq/Token/SessionToken.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Currency/ExchangeRateInterface.php b/app/Services/Currency/ExchangeRateInterface.php index 5e9bdfd080..8d97a6cc47 100644 --- a/app/Services/Currency/ExchangeRateInterface.php +++ b/app/Services/Currency/ExchangeRateInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -27,6 +27,9 @@ use FireflyIII\Models\CurrencyExchangeRate; use FireflyIII\Models\TransactionCurrency; use FireflyIII\User; +/** + * Interface ExchangeRateInterface + */ interface ExchangeRateInterface { /** diff --git a/app/Services/Currency/FixerIO.php b/app/Services/Currency/FixerIO.php index 20f0e4bbfe..ec0f4cb10b 100644 --- a/app/Services/Currency/FixerIO.php +++ b/app/Services/Currency/FixerIO.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -38,6 +38,13 @@ class FixerIO implements ExchangeRateInterface /** @var User */ protected $user; + /** + * @param TransactionCurrency $fromCurrency + * @param TransactionCurrency $toCurrency + * @param Carbon $date + * + * @return CurrencyExchangeRate + */ public function getRate(TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date): CurrencyExchangeRate { $uri = sprintf('https://api.fixer.io/%s?base=%s&symbols=%s', $date->format('Y-m-d'), $fromCurrency->code, $toCurrency->code); diff --git a/app/Services/Github/Object/GithubObject.php b/app/Services/Github/Object/GithubObject.php new file mode 100644 index 0000000000..c3f13ab04c --- /dev/null +++ b/app/Services/Github/Object/GithubObject.php @@ -0,0 +1,30 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Services\Github\Object; + +/** + * Class SpectreObject + */ +class GithubObject +{ +} diff --git a/app/Services/Github/Object/Release.php b/app/Services/Github/Object/Release.php new file mode 100644 index 0000000000..e8d6789b8b --- /dev/null +++ b/app/Services/Github/Object/Release.php @@ -0,0 +1,89 @@ +. + */ + +declare(strict_types=1); + +namespace FireflyIII\Services\Github\Object; + +use Carbon\Carbon; + + +/** + * Class Release + */ +class Release extends GithubObject +{ + /** @var string */ + private $content; + /** @var string */ + private $id; + /** @var string */ + private $title; + /** @var Carbon */ + private $updated; + + /** + * Release constructor. + * + * @param array $data + */ + public function __construct(array $data) + { + $this->id = $data['id']; + $this->updated = new Carbon($data['updated']); + $this->title = $data['title']; + $this->content = $data['content']; + } + + /** + * @return string + */ + public function getContent(): string + { + return $this->content; + } + + /** + * @return string + */ + public function getId(): string + { + return $this->id; + } + + /** + * @return string + */ + public function getTitle(): string + { + return $this->title; + } + + /** + * @return Carbon + */ + public function getUpdated(): Carbon + { + return $this->updated; + } + + +} \ No newline at end of file diff --git a/app/Services/Github/Request/GithubRequest.php b/app/Services/Github/Request/GithubRequest.php new file mode 100644 index 0000000000..49ca47f0ed --- /dev/null +++ b/app/Services/Github/Request/GithubRequest.php @@ -0,0 +1,35 @@ +. + */ + +declare(strict_types=1); + +namespace FireflyIII\Services\Github\Request; + +/** + * Interface GithubRequest + * + * @package FireflyIII\Services\Github\Request + */ +interface GithubRequest +{ + public function call(); + +} \ No newline at end of file diff --git a/app/Services/Github/Request/UpdateRequest.php b/app/Services/Github/Request/UpdateRequest.php new file mode 100644 index 0000000000..5182b75d10 --- /dev/null +++ b/app/Services/Github/Request/UpdateRequest.php @@ -0,0 +1,82 @@ +. + */ + +declare(strict_types=1); + +namespace FireflyIII\Services\Github\Request; + +use Exception; +use FireflyIII\Exceptions\FireflyException; +use FireflyIII\Services\Github\Object\Release; +use Requests; +use SimpleXMLElement; + +/** + * Class UpdateRequest + */ +class UpdateRequest implements GitHubRequest +{ + /** @var array */ + private $releases = []; + + /** + * + * @throws FireflyException + */ + public function call() + { + $uri = 'https://github.com/firefly-iii/firefly-iii/releases.atom'; + try { + $response = Requests::get($uri); + } catch (Exception $e) { + throw new FireflyException(sprintf('Response error from Github: %s', $e->getMessage())); + } + + if ($response->status_code !== 200) { + throw new FireflyException(sprintf('Returned code %d, error: %s', $response->status_code, $response->body)); + } + + $releaseXml = new SimpleXMLElement($response->body, LIBXML_NOCDATA); + + //fetch the products for each category + if (isset($releaseXml->entry)) { + foreach ($releaseXml->entry as $entry) { + $array = [ + 'id' => strval($entry->id), + 'updated' => strval($entry->updated), + 'title' => strval($entry->title), + 'content' => strval($entry->content), + ]; + $this->releases[] = new Release($array); + } + } + } + + /** + * @return array + */ + public function getReleases(): array + { + return $this->releases; + } + + +} \ No newline at end of file diff --git a/app/Services/Password/PwndVerifier.php b/app/Services/Password/PwndVerifier.php index 61cf6947b9..b79a157327 100644 --- a/app/Services/Password/PwndVerifier.php +++ b/app/Services/Password/PwndVerifier.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Password/Verifier.php b/app/Services/Password/Verifier.php index 54b5f63eb7..9bc4b164e9 100644 --- a/app/Services/Password/Verifier.php +++ b/app/Services/Password/Verifier.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Services/Spectre/Object/Customer.php b/app/Services/Spectre/Object/Customer.php new file mode 100644 index 0000000000..755dcfc38d --- /dev/null +++ b/app/Services/Spectre/Object/Customer.php @@ -0,0 +1,108 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Services\Spectre\Object; + +/** + * Class Customer + */ +class Customer extends SpectreObject +{ + /** @var int */ + private $id; + /** @var string */ + private $identifier; + /** @var string */ + private $secret; + + /** + * Customer constructor. + * + * @param array $data + */ + public function __construct(array $data) + { + $this->id = intval($data['id']); + $this->identifier = $data['identifier']; + $this->secret = $data['secret']; + } + + /** + * @return int + */ + public function getId(): int + { + return $this->id; + } + + /** + * @param int $id + */ + public function setId(int $id): void + { + $this->id = $id; + } + + /** + * @return string + */ + public function getIdentifier(): string + { + return $this->identifier; + } + + /** + * @param string $identifier + */ + public function setIdentifier(string $identifier): void + { + $this->identifier = $identifier; + } + + /** + * @return string + */ + public function getSecret(): string + { + return $this->secret; + } + + /** + * @param string $secret + */ + public function setSecret(string $secret): void + { + $this->secret = $secret; + } + + /** + * @return array + */ + public function toArray(): array + { + return [ + 'id' => $this->id, + 'identifier' => $this->identifier, + 'secret' => $this->secret, + ]; + } +} diff --git a/app/Services/Spectre/Object/SpectreObject.php b/app/Services/Spectre/Object/SpectreObject.php new file mode 100644 index 0000000000..f731cdf317 --- /dev/null +++ b/app/Services/Spectre/Object/SpectreObject.php @@ -0,0 +1,30 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Services\Spectre\Object; + +/** + * Class SpectreObject + */ +class SpectreObject +{ +} diff --git a/app/Services/Spectre/Object/Token.php b/app/Services/Spectre/Object/Token.php new file mode 100644 index 0000000000..d2e51d3c18 --- /dev/null +++ b/app/Services/Spectre/Object/Token.php @@ -0,0 +1,76 @@ +. + */ + +declare(strict_types=1); + +namespace FireflyIII\Services\Spectre\Object; + +use Carbon\Carbon; + +/** + * Class Token + */ +class Token extends SpectreObject +{ + /** @var string */ + private $connectUrl; + /** @var Carbon */ + private $expiresAt; + /** @var string */ + private $token; + + /** + * Token constructor. + * + * @param array $data + */ + public function __construct(array $data) + { + $this->token = $data['token']; + $this->expiresAt = new Carbon($data['expires_at']); + $this->connectUrl = $data['connect_url']; + } + + /** + * @return string + */ + public function getConnectUrl(): string + { + return $this->connectUrl; + } + + /** + * @return Carbon + */ + public function getExpiresAt(): Carbon + { + return $this->expiresAt; + } + + /** + * @return string + */ + public function getToken(): string + { + return $this->token; + } + +} \ No newline at end of file diff --git a/app/Services/Spectre/Request/CreateTokenRequest.php b/app/Services/Spectre/Request/CreateTokenRequest.php new file mode 100644 index 0000000000..adacab4ae8 --- /dev/null +++ b/app/Services/Spectre/Request/CreateTokenRequest.php @@ -0,0 +1,94 @@ +. + */ + +declare(strict_types=1); + +namespace FireflyIII\Services\Spectre\Request; + +use FireflyIII\Services\Spectre\Object\Customer; +use FireflyIII\Services\Spectre\Object\Token; + + +/** + * Class CreateTokenRequest + */ +class CreateTokenRequest extends SpectreRequest +{ + /** @var Customer */ + private $customer; + + /** @var Token */ + private $token; + + /** @var string */ + private $uri; + + /** + * + * @throws \FireflyIII\Exceptions\FireflyException + */ + public function call(): void + { + // add mandatory fields to login object + $data = [ + 'data' => [ + 'customer_id' => $this->customer->getId(), + 'fetch_type' => 'recent', + 'daily_refresh' => true, + 'include_fake_providers' => true, + 'show_consent_confirmation' => true, + 'credentials_strategy' => 'ask', + 'return_to' => $this->uri, + ], + ]; + $uri = '/api/v3/tokens/create'; + $response = $this->sendSignedSpectrePost($uri, $data); + $this->token = new Token($response['data']); + + return; + } + + /** + * @return Token + */ + public function getToken(): Token + { + return $this->token; + } + + /** + * @param Customer $customer + */ + public function setCustomer(Customer $customer): void + { + $this->customer = $customer; + } + + /** + * @param string $uri + */ + public function setUri(string $uri): void + { + $this->uri = $uri; + } + + +} \ No newline at end of file diff --git a/app/Services/Spectre/Request/NewCustomerRequest.php b/app/Services/Spectre/Request/NewCustomerRequest.php new file mode 100644 index 0000000000..0c6960be90 --- /dev/null +++ b/app/Services/Spectre/Request/NewCustomerRequest.php @@ -0,0 +1,60 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Services\Spectre\Request; + +use FireflyIII\Services\Spectre\Object\Customer; + +/** + * Class NewCustomerRequest + */ +class NewCustomerRequest extends SpectreRequest +{ + /** @var Customer */ + protected $customer; + + /** + * @throws \FireflyIII\Exceptions\FireflyException + */ + public function call(): void + { + $data = [ + 'data' => [ + 'identifier' => 'default_ff3_customer', + ], + ]; + $uri = '/api/v3/customers/'; + $response = $this->sendSignedSpectrePost($uri, $data); + // create customer: + $this->customer = new Customer($response['data']); + + return; + } + + /** + * @return Customer + */ + public function getCustomer(): Customer + { + return $this->customer; + } +} diff --git a/app/Services/Spectre/Request/SpectreRequest.php b/app/Services/Spectre/Request/SpectreRequest.php new file mode 100644 index 0000000000..8db025b6ba --- /dev/null +++ b/app/Services/Spectre/Request/SpectreRequest.php @@ -0,0 +1,276 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Services\Spectre\Request; + +use FireflyIII\Exceptions\FireflyException; +use FireflyIII\User; +use Log; +use Requests; +use Requests_Exception; +use Requests_Response; + +/** + * Class BunqRequest. + */ +abstract class SpectreRequest +{ + /** @var string */ + protected $clientId = ''; + /** + * @var int + */ + protected $expiresAt = 0; + /** @var string */ + protected $serviceSecret = ''; + /** @var string */ + private $privateKey = ''; + /** @var string */ + private $server = ''; + /** @var User */ + private $user; + + /** + * SpectreRequest constructor. + * + * @param User $user + * + * @throws \Illuminate\Container\EntryNotFoundException + */ + public function __construct(User $user) + { + $this->user = $user; + $this->server = config('firefly.spectre.server'); + $this->expiresAt = time() + 180; + $privateKey = app('preferences')->get('spectre_private_key', null); + $this->privateKey = $privateKey->data; + + // set client ID + $clientId = app('preferences')->get('spectre_client_id', null); + $this->clientId = $clientId->data; + + // set service secret + $serviceSecret = app('preferences')->get('spectre_service_secret', null); + $this->serviceSecret = $serviceSecret->data; + } + + /** + * + */ + abstract public function call(): void; + + /** + * @return string + */ + public function getClientId(): string + { + return $this->clientId; + } + + /** + * @param string $clientId + */ + public function setClientId(string $clientId): void + { + $this->clientId = $clientId; + } + + /** + * @return string + */ + public function getServer(): string + { + return $this->server; + } + + /** + * @return string + */ + public function getServiceSecret(): string + { + return $this->serviceSecret; + } + + /** + * @param string $serviceSecret + */ + public function setServiceSecret(string $serviceSecret): void + { + $this->serviceSecret = $serviceSecret; + } + + /** + * @param string $privateKey + */ + public function setPrivateKey(string $privateKey) + { + $this->privateKey = $privateKey; + } + + /** + * @param string $method + * @param string $uri + * @param string $data + * + * @return string + * + * @throws FireflyException + */ + protected function generateSignature(string $method, string $uri, string $data): string + { + if (0 === strlen($this->privateKey)) { + throw new FireflyException('No private key present.'); + } + if ('get' === strtolower($method) || 'delete' === strtolower($method)) { + $data = ''; + } + $toSign = $this->expiresAt . '|' . strtoupper($method) . '|' . $uri . '|' . $data . ''; // no file so no content there. + Log::debug(sprintf('String to sign: "%s"', $toSign)); + $signature = ''; + + // Sign the data + openssl_sign($toSign, $signature, $this->privateKey, OPENSSL_ALGO_SHA1); + $signature = base64_encode($signature); + + return $signature; + } + + /** + * @return array + */ + protected function getDefaultHeaders(): array + { + $userAgent = sprintf('FireflyIII v%s', config('firefly.version')); + + return [ + 'Client-Id' => $this->getClientId(), + 'Service-Secret' => $this->getServiceSecret(), + 'Accept' => 'application/json', + 'Content-type' => 'application/json', + 'Cache-Control' => 'no-cache', + 'User-Agent' => $userAgent, + 'Expires-at' => $this->expiresAt, + ]; + } + + /** + * @param string $uri + * @param array $data + * + * @return array + * + * @throws FireflyException + */ + protected function sendSignedSpectreGet(string $uri, array $data): array + { + if (0 === strlen($this->server)) { + throw new FireflyException('No Spectre server defined'); + } + + $headers = $this->getDefaultHeaders(); + $body = json_encode($data); + $fullUri = $this->server . $uri; + $signature = $this->generateSignature('get', $fullUri, $body); + $headers['Signature'] = $signature; + + Log::debug('Final headers for spectre signed get request:', $headers); + try { + $response = Requests::get($fullUri, $headers); + } catch (Requests_Exception $e) { + throw new FireflyException(sprintf('Request Exception: %s', $e->getMessage())); + } + $this->detectError($response); + $statusCode = intval($response->status_code); + + $body = $response->body; + $array = json_decode($body, true); + $responseHeaders = $response->headers->getAll(); + $array['ResponseHeaders'] = $responseHeaders; + $array['ResponseStatusCode'] = $statusCode; + + if (isset($array['error_class'])) { + $message = $array['error_message'] ?? '(no message)'; + throw new FireflyException(sprintf('Error of class %s: %s', $array['error_class'], $message)); + } + + return $array; + } + + /** + * @param string $uri + * @param array $data + * + * @return array + * + * @throws FireflyException + */ + protected function sendSignedSpectrePost(string $uri, array $data): array + { + if (0 === strlen($this->server)) { + throw new FireflyException('No Spectre server defined'); + } + + $headers = $this->getDefaultHeaders(); + $body = json_encode($data); + $fullUri = $this->server . $uri; + $signature = $this->generateSignature('post', $fullUri, $body); + $headers['Signature'] = $signature; + + Log::debug('Final headers for spectre signed POST request:', $headers); + try { + $response = Requests::post($fullUri, $headers, $body); + } catch (Requests_Exception $e) { + throw new FireflyException(sprintf('Request Exception: %s', $e->getMessage())); + } + $this->detectError($response); + $body = $response->body; + $array = json_decode($body, true); + $responseHeaders = $response->headers->getAll(); + $array['ResponseHeaders'] = $responseHeaders; + $array['ResponseStatusCode'] = $response->status_code; + + return $array; + } + + /** + * @param Requests_Response $response + * + * @throws FireflyException + */ + private function detectError(Requests_Response $response): void + { + $body = $response->body; + $array = json_decode($body, true); + if (isset($array['error_class'])) { + $message = $array['error_message'] ?? '(no message)'; + + throw new FireflyException(sprintf('Error of class %s: %s', $array['error_class'], $message)); + } + + $statusCode = intval($response->status_code); + if (200 !== $statusCode) { + throw new FireflyException(sprintf('Status code %d: %s', $statusCode, $response->body)); + } + + return; + } +} diff --git a/app/Support/Amount.php b/app/Support/Amount.php index 16b251fdec..a9d066e557 100644 --- a/app/Support/Amount.php +++ b/app/Support/Amount.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -202,7 +202,7 @@ class Amount /** * @return \FireflyIII\Models\TransactionCurrency * - * @throws FireflyException + * @throws \FireflyIII\Exceptions\FireflyException */ public function getDefaultCurrency(): TransactionCurrency { @@ -216,7 +216,7 @@ class Amount * * @return \FireflyIII\Models\TransactionCurrency * - * @throws FireflyException + * @throws \FireflyIII\Exceptions\FireflyException */ public function getDefaultCurrencyByUser(User $user): TransactionCurrency { diff --git a/app/Support/Binder/AccountList.php b/app/Support/Binder/AccountList.php index d048a0f666..78be7c6e38 100644 --- a/app/Support/Binder/AccountList.php +++ b/app/Support/Binder/AccountList.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Support\Binder; use FireflyIII\Models\Account; +use Illuminate\Routing\Route; use Illuminate\Support\Collection; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -31,52 +32,41 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; */ class AccountList implements BinderInterface { + /** - * @param $value - * @param $route + * @param string $value + * @param Route $route * * @return Collection */ - public static function routeBinder($value, $route): Collection + public static function routeBinder(string $value, Route $route): Collection { if (auth()->check()) { - $ids = explode(',', $value); - // filter ids: - $ids = self::filterIds($ids); + $list = []; + $incoming = explode(',', $value); + foreach ($incoming as $entry) { + $list[] = intval($entry); + } + $list = array_unique($list); + if (count($list) === 0) { + throw new NotFoundHttpException; // @codeCoverageIgnore + } - /** @var \Illuminate\Support\Collection $object */ - $object = Account::leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id') - ->whereIn('accounts.id', $ids) - ->where('user_id', auth()->user()->id) - ->get(['accounts.*']); - if ($object->count() > 0) { - $object = $object->sortBy( + /** @var \Illuminate\Support\Collection $collection */ + $collection = auth()->user()->accounts() + ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id') + ->whereIn('accounts.id', $list) + ->get(['accounts.*']); + if ($collection->count() > 0) { + $collection = $collection->sortBy( function (Account $account) { return $account->name; } ); - return $object; + return $collection; } } throw new NotFoundHttpException; } - - /** - * @param array $ids - * - * @return array - */ - protected static function filterIds(array $ids): array - { - $new = []; - foreach ($ids as $id) { - if (intval($id) > 0) { - $new[] = $id; - } - } - $new = array_unique($new); - - return $new; - } } diff --git a/app/Support/Binder/BinderInterface.php b/app/Support/Binder/BinderInterface.php index e5887a69da..3488867ba1 100644 --- a/app/Support/Binder/BinderInterface.php +++ b/app/Support/Binder/BinderInterface.php @@ -16,22 +16,24 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Support\Binder; +use Illuminate\Routing\Route; + /** * Interface BinderInterface. */ interface BinderInterface { /** - * @param $value - * @param $route + * @param string $value + * @param Route $route * * @return mixed */ - public static function routeBinder($value, $route); + public static function routeBinder(string $value, Route $route); } diff --git a/app/Support/Binder/BudgetList.php b/app/Support/Binder/BudgetList.php index 279c0982d7..f02cd32765 100644 --- a/app/Support/Binder/BudgetList.php +++ b/app/Support/Binder/BudgetList.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Support\Binder; use FireflyIII\Models\Budget; +use Illuminate\Routing\Route; use Illuminate\Support\Collection; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -32,28 +33,37 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class BudgetList implements BinderInterface { /** - * @param $value - * @param $route + * @param string $value + * @param Route $route * - * @return mixed + * @return Collection */ - public static function routeBinder($value, $route): Collection + public static function routeBinder(string $value, Route $route): Collection { if (auth()->check()) { - $ids = explode(',', $value); - /** @var \Illuminate\Support\Collection $object */ - $object = Budget::where('active', 1) - ->whereIn('id', $ids) - ->where('user_id', auth()->user()->id) - ->get(); - - // add empty budget if applicable. - if (in_array('0', $ids)) { - $object->push(new Budget); + $list = []; + $incoming = explode(',', $value); + foreach ($incoming as $entry) { + $list[] = intval($entry); + } + $list = array_unique($list); + if (count($list) === 0) { + throw new NotFoundHttpException; // @codeCoverageIgnore } - if ($object->count() > 0) { - return $object; + /** @var \Illuminate\Support\Collection $collection */ + $collection = auth()->user()->budgets() + ->where('active', 1) + ->whereIn('id', $list) + ->get(); + + // add empty budget if applicable. + if (in_array(0, $list)) { + $collection->push(new Budget); + } + + if ($collection->count() > 0) { + return $collection; } } throw new NotFoundHttpException; diff --git a/app/Support/Binder/CategoryList.php b/app/Support/Binder/CategoryList.php index 2469a5c524..3ce93ce553 100644 --- a/app/Support/Binder/CategoryList.php +++ b/app/Support/Binder/CategoryList.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Support\Binder; use FireflyIII\Models\Category; +use Illuminate\Routing\Route; use Illuminate\Support\Collection; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -32,27 +33,36 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class CategoryList implements BinderInterface { /** - * @param $value - * @param $route + * @param string $value + * @param Route $route * - * @return mixed + * @return Collection */ - public static function routeBinder($value, $route): Collection + public static function routeBinder(string $value, Route $route): Collection { if (auth()->check()) { - $ids = explode(',', $value); - /** @var \Illuminate\Support\Collection $object */ - $object = Category::whereIn('id', $ids) - ->where('user_id', auth()->user()->id) - ->get(); - - // add empty category if applicable. - if (in_array('0', $ids)) { - $object->push(new Category); + $list = []; + $incoming = explode(',', $value); + foreach ($incoming as $entry) { + $list[] = intval($entry); + } + $list = array_unique($list); + if (count($list) === 0) { + throw new NotFoundHttpException; // @codeCoverageIgnore } - if ($object->count() > 0) { - return $object; + /** @var \Illuminate\Support\Collection $collection */ + $collection = auth()->user()->categories() + ->whereIn('id', $list) + ->get(); + + // add empty category if applicable. + if (in_array(0, $list)) { + $collection->push(new Category); + } + + if ($collection->count() > 0) { + return $collection; } } throw new NotFoundHttpException; diff --git a/app/Support/Binder/CurrencyCode.php b/app/Support/Binder/CurrencyCode.php index e2f810d432..e142ee83a6 100644 --- a/app/Support/Binder/CurrencyCode.php +++ b/app/Support/Binder/CurrencyCode.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Support\Binder; use FireflyIII\Models\TransactionCurrency; +use Illuminate\Routing\Route; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** @@ -31,16 +32,18 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class CurrencyCode implements BinderInterface { /** - * @param $value - * @param $route + * @param string $value + * @param Route $route * - * @return mixed + * @return TransactionCurrency */ - public static function routeBinder($value, $route) + public static function routeBinder(string $value, Route $route): TransactionCurrency { - $currency = TransactionCurrency::where('code', $value)->first(); - if (null !== $currency) { - return $currency; + if (auth()->check()) { + $currency = TransactionCurrency::where('code', trim($value))->first(); + if (null !== $currency) { + return $currency; + } } throw new NotFoundHttpException; } diff --git a/app/Support/Binder/Date.php b/app/Support/Binder/Date.php index d517fd1957..5b04cfbd54 100644 --- a/app/Support/Binder/Date.php +++ b/app/Support/Binder/Date.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -24,7 +24,8 @@ namespace FireflyIII\Support\Binder; use Carbon\Carbon; use Exception; -use FireflyIII\Helpers\FiscalHelper; +use FireflyIII\Helpers\FiscalHelperInterface; +use Illuminate\Routing\Route; use Log; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -34,14 +35,15 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class Date implements BinderInterface { /** - * @param $value - * @param $route + * @param string $value + * @param Route $route * - * @return mixed + * @return Carbon */ - public static function routeBinder($value, $route): Carbon + public static function routeBinder(string $value, Route $route): Carbon { - $fiscalHelper = new FiscalHelper; + /** @var FiscalHelperInterface $fiscalHelper */ + $fiscalHelper = app(FiscalHelperInterface::class); switch ($value) { default: diff --git a/app/Support/Binder/JournalList.php b/app/Support/Binder/JournalList.php index cb8171b9cb..ee556f9907 100644 --- a/app/Support/Binder/JournalList.php +++ b/app/Support/Binder/JournalList.php @@ -16,13 +16,13 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Support\Binder; -use FireflyIII\Models\TransactionJournal; +use Illuminate\Routing\Route; use Illuminate\Support\Collection; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -32,22 +32,32 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class JournalList implements BinderInterface { /** - * @param $value - * @param $route + * @param string $value + * @param Route $route * * @return mixed */ - public static function routeBinder($value, $route): Collection + public static function routeBinder(string $value, Route $route): Collection { if (auth()->check()) { - $ids = explode(',', $value); - /** @var \Illuminate\Support\Collection $object */ - $object = TransactionJournal::whereIn('transaction_journals.id', $ids) - ->where('transaction_journals.user_id', auth()->user()->id) - ->get(['transaction_journals.*']); + $list = []; + $incoming = explode(',', $value); + foreach ($incoming as $entry) { + $list[] = intval($entry); + } + $list = array_unique($list); + if (count($list) === 0) { + throw new NotFoundHttpException; // @codeCoverageIgnore + } - if ($object->count() > 0) { - return $object; + /** @var \Illuminate\Support\Collection $collection */ + $collection = auth()->user()->transactionJournals() + ->whereIn('transaction_journals.id', $list) + ->where('transaction_journals.completed', 1) + ->get(['transaction_journals.*']); + + if ($collection->count() > 0) { + return $collection; } } throw new NotFoundHttpException; diff --git a/app/Support/Binder/TagList.php b/app/Support/Binder/TagList.php index de088a0ddf..60ec2f86dd 100644 --- a/app/Support/Binder/TagList.php +++ b/app/Support/Binder/TagList.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -24,6 +24,7 @@ namespace FireflyIII\Support\Binder; use FireflyIII\Models\Tag; use FireflyIII\Repositories\Tag\TagRepositoryInterface; +use Illuminate\Routing\Route; use Illuminate\Support\Collection; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -33,26 +34,35 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class TagList implements BinderInterface { /** - * @param $value - * @param $route + * @param string $value + * @param Route $route * - * @return mixed + * @return Collection */ - public static function routeBinder($value, $route): Collection + public static function routeBinder(string $value, Route $route): Collection { if (auth()->check()) { - $tags = explode(',', $value); + $list = []; + $incoming = explode(',', $value); + foreach ($incoming as $entry) { + $list[] = trim($entry); + } + $list = array_unique($list); + if (count($list) === 0) { + throw new NotFoundHttpException; // @codeCoverageIgnore + } /** @var TagRepositoryInterface $repository */ $repository = app(TagRepositoryInterface::class); $allTags = $repository->get(); - $set = $allTags->filter( - function (Tag $tag) use ($tags) { - return in_array($tag->tag, $tags); + + $collection = $allTags->filter( + function (Tag $tag) use ($list) { + return in_array($tag->tag, $list); } ); - if ($set->count() > 0) { - return $set; + if ($collection->count() > 0) { + return $collection; } } throw new NotFoundHttpException; diff --git a/app/Support/Binder/UnfinishedJournal.php b/app/Support/Binder/UnfinishedJournal.php index 56b9c42cf5..92d03ac75f 100644 --- a/app/Support/Binder/UnfinishedJournal.php +++ b/app/Support/Binder/UnfinishedJournal.php @@ -16,13 +16,14 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Support\Binder; use FireflyIII\Models\TransactionJournal; +use Illuminate\Routing\Route; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** @@ -31,20 +32,20 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class UnfinishedJournal implements BinderInterface { /** - * @param $value - * @param $route + * @param string $value + * @param Route $route * - * @return mixed + * @return TransactionJournal */ - public static function routeBinder($value, $route): TransactionJournal + public static function routeBinder(string $value, Route $route): TransactionJournal { if (auth()->check()) { - $object = TransactionJournal::where('transaction_journals.id', $value) - ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') - ->where('completed', 0) - ->where('user_id', auth()->user()->id)->first(['transaction_journals.*']); - if ($object) { - return $object; + $journal = auth()->user()->transactionJournals()->where('transaction_journals.id', $value) + ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') + ->where('completed', 0) + ->where('user_id', auth()->user()->id)->first(['transaction_journals.*']); + if (!is_null($journal)) { + return $journal; } } diff --git a/app/Support/CacheProperties.php b/app/Support/CacheProperties.php index 2cfd0e720c..0e0be45819 100644 --- a/app/Support/CacheProperties.php +++ b/app/Support/CacheProperties.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/ChartColour.php b/app/Support/ChartColour.php index 3f2eb21488..ace9884d81 100644 --- a/app/Support/ChartColour.php +++ b/app/Support/ChartColour.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -27,6 +27,9 @@ namespace FireflyIII\Support; */ class ChartColour { + /** + * @var array + */ public static $colours = [ [53, 124, 165], diff --git a/app/Support/Domain.php b/app/Support/Domain.php index c94e1e80b5..6ccc9a07f3 100644 --- a/app/Support/Domain.php +++ b/app/Support/Domain.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Events/BillScanner.php b/app/Support/Events/BillScanner.php index 21315f668a..f07d5d71b6 100644 --- a/app/Support/Events/BillScanner.php +++ b/app/Support/Events/BillScanner.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php index 0c3b5b5e1f..04ce257ebb 100644 --- a/app/Support/ExpandedForm.php +++ b/app/Support/ExpandedForm.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,6 +25,7 @@ namespace FireflyIII\Support; use Amount as Amt; use Carbon\Carbon; use Eloquent; +use FireflyIII\Exceptions\FireflyException; use Illuminate\Support\Collection; use Illuminate\Support\MessageBag; use RuntimeException; @@ -36,11 +37,12 @@ use Session; class ExpandedForm { /** - * @param $name - * @param null $value - * @param array $options + * @param string $name + * @param null $value + * @param array $options * * @return string + * @throws \FireflyIII\Exceptions\FireflyException */ public function amount(string $name, $value = null, array $options = []): string { @@ -53,6 +55,7 @@ class ExpandedForm * @param array $options * * @return string + * @throws \FireflyIII\Exceptions\FireflyException */ public function amountSmall(string $name, $value = null, array $options = []): string { @@ -65,6 +68,8 @@ class ExpandedForm * @param array $options * * @return string + * @throws \FireflyIII\Exceptions\FireflyException + * */ public function balance(string $name, $value = null, array $options = []): string { @@ -78,6 +83,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function checkbox(string $name, $value = 1, $checked = null, $options = []): string { @@ -100,6 +107,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function date(string $name, $value = null, array $options = []): string { @@ -118,6 +127,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function file(string $name, array $options = []): string { @@ -135,6 +146,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function integer(string $name, $value = null, array $options = []): string { @@ -154,6 +167,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function location(string $name, $value = null, array $options = []): string { @@ -226,6 +241,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function multiCheckbox(string $name, array $list = [], $selected = null, array $options = []): string { @@ -247,6 +264,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function multiRadio(string $name, array $list = [], $selected = null, array $options = []): string { @@ -267,6 +286,9 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable + * @throws Facades\FireflyException */ public function nonSelectableAmount(string $name, $value = null, array $options = []): string { @@ -295,6 +317,9 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable + * @throws Facades\FireflyException */ public function nonSelectableBalance(string $name, $value = null, array $options = []): string { @@ -324,6 +349,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function number(string $name, $value = null, array $options = []): string { @@ -344,6 +371,8 @@ class ExpandedForm * @param $name * * @return string + * + * @throws \Throwable */ public function optionsList(string $type, string $name): string { @@ -366,6 +395,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function password(string $name, array $options = []): string { @@ -384,6 +415,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function select(string $name, array $list = [], $selected = null, array $options = []): string { @@ -404,6 +437,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function staticText(string $name, $value, array $options = []): string { @@ -421,6 +456,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function tags(string $name, $value = null, array $options = []): string { @@ -440,6 +477,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function text(string $name, $value = null, array $options = []): string { @@ -458,6 +497,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \Throwable */ public function textarea(string $name, $value = null, array $options = []): string { @@ -557,6 +598,8 @@ class ExpandedForm * @param array $options * * @return string + * + * @throws \FireflyIII\Exceptions\FireflyException */ private function currencyField(string $name, string $view, $value = null, array $options = []): string { diff --git a/app/Support/Facades/Amount.php b/app/Support/Facades/Amount.php index d60471705d..24bb3d89c6 100644 --- a/app/Support/Facades/Amount.php +++ b/app/Support/Facades/Amount.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,6 +25,7 @@ namespace FireflyIII\Support\Facades; use Illuminate\Support\Facades\Facade; /** + * @codeCoverageIgnore * Class Amount. */ class Amount extends Facade diff --git a/app/Support/Facades/ExpandedForm.php b/app/Support/Facades/ExpandedForm.php index 9334a4212c..909313f951 100644 --- a/app/Support/Facades/ExpandedForm.php +++ b/app/Support/Facades/ExpandedForm.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,7 +25,8 @@ namespace FireflyIII\Support\Facades; use Illuminate\Support\Facades\Facade; /** - * Class Amount. + * @codeCoverageIgnore + * Class ExpandedForm. */ class ExpandedForm extends Facade { diff --git a/app/Support/Facades/FireflyConfig.php b/app/Support/Facades/FireflyConfig.php index d8da789f1f..98fdaf7201 100644 --- a/app/Support/Facades/FireflyConfig.php +++ b/app/Support/Facades/FireflyConfig.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,6 +25,7 @@ namespace FireflyIII\Support\Facades; use Illuminate\Support\Facades\Facade; /** + * @codeCoverageIgnore * Class FireflyConfig. */ class FireflyConfig extends Facade diff --git a/app/Support/Facades/Navigation.php b/app/Support/Facades/Navigation.php index cd5ef864f3..f54c32e414 100644 --- a/app/Support/Facades/Navigation.php +++ b/app/Support/Facades/Navigation.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,6 +25,7 @@ namespace FireflyIII\Support\Facades; use Illuminate\Support\Facades\Facade; /** + * @codeCoverageIgnore * Class Navigation. */ class Navigation extends Facade diff --git a/app/Support/Facades/Preferences.php b/app/Support/Facades/Preferences.php index 1cb13a12d6..a166989cbb 100644 --- a/app/Support/Facades/Preferences.php +++ b/app/Support/Facades/Preferences.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,6 +25,7 @@ namespace FireflyIII\Support\Facades; use Illuminate\Support\Facades\Facade; /** + * @codeCoverageIgnore * Class Preferences. */ class Preferences extends Facade diff --git a/app/Support/Facades/Steam.php b/app/Support/Facades/Steam.php index cc523bff9d..d59b93b9b8 100644 --- a/app/Support/Facades/Steam.php +++ b/app/Support/Facades/Steam.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -25,6 +25,7 @@ namespace FireflyIII\Support\Facades; use Illuminate\Support\Facades\Facade; /** + * @codeCoverageIgnore * Class Steam. */ class Steam extends Facade diff --git a/app/Support/FireflyConfig.php b/app/Support/FireflyConfig.php index 6842300967..193aa10ae0 100644 --- a/app/Support/FireflyConfig.php +++ b/app/Support/FireflyConfig.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Import/Configuration/ConfigurationInterface.php b/app/Support/Import/Configuration/ConfigurationInterface.php index 14a2ecb4ae..40c53c4a5b 100644 --- a/app/Support/Import/Configuration/ConfigurationInterface.php +++ b/app/Support/Import/Configuration/ConfigurationInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Import/Configuration/Csv/Initial.php b/app/Support/Import/Configuration/File/Initial.php similarity index 91% rename from app/Support/Import/Configuration/Csv/Initial.php rename to app/Support/Import/Configuration/File/Initial.php index 88a3ca00e2..66baa95f26 100644 --- a/app/Support/Import/Configuration/Csv/Initial.php +++ b/app/Support/Import/Configuration/File/Initial.php @@ -16,11 +16,11 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -namespace FireflyIII\Support\Import\Configuration\Csv; +namespace FireflyIII\Support\Import\Configuration\File; use ExpandedForm; use FireflyIII\Models\AccountType; @@ -34,6 +34,9 @@ use Log; */ class Initial implements ConfigurationInterface { + /** + * @var ImportJob + */ private $job; /** @@ -50,6 +53,13 @@ class Initial implements ConfigurationInterface 'tab' => trans('form.csv_tab'), ]; + // update job with default date format: + $config = $this->job->configuration; + if (!isset($config['date-format'])) { + $config['date-format'] = 'Ymd'; + $this->job->configuration = $config; + $this->job->save(); + } $specifics = []; // collect specifics. diff --git a/app/Support/Import/Configuration/Csv/Map.php b/app/Support/Import/Configuration/File/Map.php similarity index 94% rename from app/Support/Import/Configuration/Csv/Map.php rename to app/Support/Import/Configuration/File/Map.php index 7aa35f62b0..ec54b7315d 100644 --- a/app/Support/Import/Configuration/Csv/Map.php +++ b/app/Support/Import/Configuration/File/Map.php @@ -16,11 +16,11 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -namespace FireflyIII\Support\Import\Configuration\Csv; +namespace FireflyIII\Support\Import\Configuration\File; use FireflyIII\Exceptions\FireflyException; use FireflyIII\Import\Mapper\MapperInterface; @@ -29,6 +29,7 @@ use FireflyIII\Import\Specifics\SpecificInterface; use FireflyIII\Models\ImportJob; use FireflyIII\Support\Import\Configuration\ConfigurationInterface; use League\Csv\Reader; +use League\Csv\Statement; use Log; /** @@ -49,6 +50,8 @@ class Map implements ConfigurationInterface * @return array * * @throws FireflyException + * @throws \League\Csv\Exception + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function getData(): array { @@ -57,11 +60,15 @@ class Map implements ConfigurationInterface // in order to actually map we also need all possible values from the CSV file. $content = $this->job->uploadFileContents(); + $offset = 0; /** @var Reader $reader */ $reader = Reader::createFromString($content); $reader->setDelimiter($this->configuration['delimiter']); - $offset = $this->configuration['has-headers'] ? 1 : 0; - $results = $reader->setOffset($offset)->fetch(); + if ($this->configuration['has-headers']) { + $offset = 1; + } + $stmt = (new Statement)->offset($offset); + $results = $stmt->process($reader); $this->validSpecifics = array_keys(config('csv.import_specifics')); $indexes = array_keys($this->data); $rowIndex = 0; @@ -69,13 +76,12 @@ class Map implements ConfigurationInterface $row = $this->runSpecifics($row); //do something here - foreach ($indexes as $index) { // this is simply 1, 2, 3, etc. if (!isset($row[$index])) { // don't really know how to handle this. Just skip, for now. continue; } - $value = $row[$index]; + $value = trim($row[$index]); if (strlen($value) > 0) { // we can do some preprocessing here, // which is exclusively to fix the tags: @@ -182,6 +188,8 @@ class Map implements ConfigurationInterface /** * @return bool + * + * @throws FireflyException */ private function getMappableColumns(): bool { diff --git a/app/Support/Import/Configuration/Csv/Roles.php b/app/Support/Import/Configuration/File/Roles.php similarity index 88% rename from app/Support/Import/Configuration/Csv/Roles.php rename to app/Support/Import/Configuration/File/Roles.php index 97160b430e..7ae7495582 100644 --- a/app/Support/Import/Configuration/Csv/Roles.php +++ b/app/Support/Import/Configuration/File/Roles.php @@ -16,16 +16,17 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); -namespace FireflyIII\Support\Import\Configuration\Csv; +namespace FireflyIII\Support\Import\Configuration\File; use FireflyIII\Import\Specifics\SpecificInterface; use FireflyIII\Models\ImportJob; use FireflyIII\Support\Import\Configuration\ConfigurationInterface; use League\Csv\Reader; +use League\Csv\Statement; use Log; /** @@ -33,6 +34,9 @@ use Log; */ class Roles implements ConfigurationInterface { + /** + * @var array + */ private $data = []; /** @var ImportJob */ private $job; @@ -44,18 +48,29 @@ class Roles implements ConfigurationInterface * Get the data necessary to show the configuration screen. * * @return array + * + * @throws \League\Csv\Exception + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException */ public function getData(): array { $config = $this->job->configuration; $content = $this->job->uploadFileContents(); - + $headers = []; + $offset = 0; // create CSV reader. $reader = Reader::createFromString($content); $reader->setDelimiter($config['delimiter']); - $start = $config['has-headers'] ? 1 : 0; - $end = $start + config('csv.example_rows'); + if ($config['has-headers']) { + $offset = 1; + // get headers: + $stmt = (new Statement)->limit(1)->offset(0); + $records = $stmt->process($reader); + $headers = $records->fetchOne(); + } + // example rows: + $stmt = (new Statement)->limit(intval(config('csv.example_rows', 5)))->offset($offset); // set data: $roles = $this->getRoles(); asort($roles); @@ -63,16 +78,15 @@ class Roles implements ConfigurationInterface 'examples' => [], 'roles' => $roles, 'total' => 0, - 'headers' => $config['has-headers'] ? $reader->fetchOne(0) : [], + 'headers' => $headers, ]; - while ($start < $end) { - $row = $reader->fetchOne($start); + $records = $stmt->process($reader); + foreach ($records as $row) { $row = $this->processSpecifics($row); $count = count($row); $this->data['total'] = $count > $this->data['total'] ? $count : $this->data['total']; $this->processRow($row); - ++$start; } $this->updateColumCount(); @@ -140,7 +154,7 @@ class Roles implements ConfigurationInterface { $roles = []; foreach (array_keys(config('csv.import_roles')) as $role) { - $roles[$role] = trans('csv.column_' . $role); + $roles[$role] = trans('import.column_' . $role); } return $roles; @@ -234,7 +248,7 @@ class Roles implements ConfigurationInterface */ private function processSpecifics(array $row): array { - $names = array_keys($this->job->configuration['specifics']); + $names = array_keys($this->job->configuration['specifics'] ?? []); foreach ($names as $name) { /** @var SpecificInterface $specific */ $specific = app('FireflyIII\Import\Specifics\\' . $name); @@ -258,7 +272,7 @@ class Roles implements ConfigurationInterface if ('_ignore' !== $role) { ++$assigned; } - if (in_array($role, ['amount', 'amount_credit', 'amount_debet'])) { + if (in_array($role, ['amount', 'amount_credit', 'amount_debit'])) { $hasAmount = true; } } @@ -269,7 +283,7 @@ class Roles implements ConfigurationInterface $this->warning = ''; } if (0 === $assigned || !$hasAmount) { - $this->warning = strval(trans('csv.roles_warning')); + $this->warning = strval(trans('import.roles_warning')); } return true; diff --git a/app/Support/Import/Configuration/File/Upload.php b/app/Support/Import/Configuration/File/Upload.php new file mode 100644 index 0000000000..8b6943489d --- /dev/null +++ b/app/Support/Import/Configuration/File/Upload.php @@ -0,0 +1,116 @@ +. + */ +declare(strict_types=1); + +namespace FireflyIII\Support\Import\Configuration\File; + +use FireflyIII\Models\ImportJob; +use FireflyIII\Repositories\ImportJob\ImportJobRepositoryInterface; +use FireflyIII\Support\Import\Configuration\ConfigurationInterface; +use Log; + +/** + * Class Upload. + */ +class Upload implements ConfigurationInterface +{ + /** @var ImportJob */ + private $job; + + /** @var string */ + private $warning = ''; + + /** + * Get the data necessary to show the configuration screen. + * + * @return array + */ + public function getData(): array + { + $importFileTypes = []; + $defaultImportType = config('import.options.file.default_import_format'); + + foreach (config('import.options.file.import_formats') as $type) { + $importFileTypes[$type] = trans('import.import_file_type_' . $type); + } + + return [ + 'default_type' => $defaultImportType, + 'file_types' => $importFileTypes, + ]; + } + + /** + * Return possible warning to user. + * + * @return string + */ + public function getWarningMessage(): string + { + return $this->warning; + } + + /** + * @param ImportJob $job + * + * @return ConfigurationInterface + */ + public function setJob(ImportJob $job): ConfigurationInterface + { + $this->job = $job; + + return $this; + } + + /** + * Store the result. + * + * @param array $data + * + * @return bool + */ + public function storeConfiguration(array $data): bool + { + Log::debug('Now in storeConfiguration for file Upload.'); + /** @var ImportJobRepositoryInterface $repository */ + $repository = app(ImportJobRepositoryInterface::class); + $type = $data['import_file_type'] ?? 'unknown'; + $config = $this->job->configuration; + $config['file-type'] = in_array($type, config('import.options.file.import_formats')) ? $type : 'unknown'; + $repository->setConfiguration($this->job, $config); + $uploaded = $repository->processFile($this->job, $data['import_file'] ?? null); + $this->job->save(); + Log::debug(sprintf('Result of upload is %s', var_export($uploaded, true))); + // process config, if present: + if (isset($data['configuration_file'])) { + $repository->processConfiguration($this->job, $data['configuration_file']); + } + $config = $this->job->configuration; + $config['has-file-upload'] = $uploaded; + $repository->setConfiguration($this->job, $config); + + if (false === $uploaded) { + $this->warning = 'No valid upload.'; + } + + return true; + } +} diff --git a/app/Support/Import/Information/BunqInformation.php b/app/Support/Import/Information/BunqInformation.php index 3c76d63558..ab12faf500 100644 --- a/app/Support/Import/Information/BunqInformation.php +++ b/app/Support/Import/Information/BunqInformation.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -61,6 +61,9 @@ class BunqInformation implements InformationInterface * color: any associated color. * * @return array + * + * @throws FireflyException + * @throws \Exception */ public function getAccounts(): array { @@ -113,6 +116,8 @@ class BunqInformation implements InformationInterface /** * @param SessionToken $sessionToken + * + * @throws \Exception */ private function closeSession(SessionToken $sessionToken): void { @@ -135,6 +140,8 @@ class BunqInformation implements InformationInterface * @param int $userId * * @return Collection + * + * @throws \Exception */ private function getMonetaryAccounts(SessionToken $sessionToken, int $userId): Collection { @@ -159,6 +166,7 @@ class BunqInformation implements InformationInterface * @return int * * @throws FireflyException + * @throws \Exception */ private function getUserInformation(SessionToken $sessionToken): int { @@ -185,6 +193,8 @@ class BunqInformation implements InformationInterface /** * @return SessionToken + * + * @throws \Exception */ private function startSession(): SessionToken { diff --git a/app/Support/Import/Information/InformationInterface.php b/app/Support/Import/Information/InformationInterface.php index 7de8e527d4..69181c651d 100644 --- a/app/Support/Import/Information/InformationInterface.php +++ b/app/Support/Import/Information/InformationInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Models/TransactionJournalTrait.php b/app/Support/Models/TransactionJournalTrait.php index 928fa95e79..196f154d45 100644 --- a/app/Support/Models/TransactionJournalTrait.php +++ b/app/Support/Models/TransactionJournalTrait.php @@ -16,14 +16,13 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); namespace FireflyIII\Support\Models; use Carbon\Carbon; -use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournalMeta; use FireflyIII\Models\TransactionType; @@ -45,8 +44,6 @@ trait TransactionJournalTrait { /** * @return string - * - * @throws FireflyException */ public function amount(): string { diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index 158cdc16ab..59de0f956d 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -24,6 +24,7 @@ namespace FireflyIII\Support; use Carbon\Carbon; use FireflyIII\Exceptions\FireflyException; +use Log; /** * Class Navigation. @@ -438,6 +439,7 @@ class Navigation { $date = clone $theDate; // 1D 1W 1M 3M 6M 1Y + Log::debug(sprintf('subtractPeriod: date is %s', $date->format('Y-m-d'))); $functionMap = [ '1D' => 'subDays', 'daily' => 'subDays', @@ -461,12 +463,16 @@ class Navigation if (isset($functionMap[$repeatFreq])) { $function = $functionMap[$repeatFreq]; $date->$function($subtract); + Log::debug(sprintf('%s is in function map, execute %s with argument %d', $repeatFreq, $function, $subtract)); + Log::debug(sprintf('subtractPeriod: resulting date is %s', $date->format('Y-m-d'))); return $date; } if (isset($modifierMap[$repeatFreq])) { $subtract = $subtract * $modifierMap[$repeatFreq]; $date->subMonths($subtract); + Log::debug(sprintf('%s is in modifier map with value %d, execute subMonths with argument %d', $repeatFreq, $modifierMap[$repeatFreq], $subtract)); + Log::debug(sprintf('subtractPeriod: resulting date is %s', $date->format('Y-m-d'))); return $date; } @@ -479,7 +485,10 @@ class Navigation /** @var Carbon $tEnd */ $tEnd = session('end', Carbon::now()->endOfMonth()); $diffInDays = $tStart->diffInDays($tEnd); + Log::debug(sprintf('repeatFreq is %s, start is %s and end is %s (session data).', $repeatFreq, $tStart->format('Y-m-d'), $tEnd->format('Y-m-d'))); + Log::debug(sprintf('Diff in days is %d', $diffInDays)); $date->subDays($diffInDays * $subtract); + Log::debug(sprintf('subtractPeriod: resulting date is %s', $date->format('Y-m-d'))); return $date; } diff --git a/app/Support/Preferences.php b/app/Support/Preferences.php index d7aeec3970..32fb1dc2b1 100644 --- a/app/Support/Preferences.php +++ b/app/Support/Preferences.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Search/Modifier.php b/app/Support/Search/Modifier.php index 4d2271a729..afce3946c8 100644 --- a/app/Support/Search/Modifier.php +++ b/app/Support/Search/Modifier.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -24,11 +24,13 @@ namespace FireflyIII\Support\Search; use Carbon\Carbon; use Exception; -use FireflyIII\Exceptions\FireflyException; use FireflyIII\Models\Transaction; use Log; use Steam; +/** + * Class Modifier + */ class Modifier { /** @@ -52,11 +54,10 @@ class Modifier /** * @param array $modifier * @param Transaction $transaction - * @SuppressWarnings(PHPMD.CyclomaticComplexity) * * @return bool * - * @throws FireflyException + * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public static function apply(array $modifier, Transaction $transaction): bool { diff --git a/app/Support/Search/Search.php b/app/Support/Search/Search.php index e5aa93b4cb..0b2e0c2b2e 100644 --- a/app/Support/Search/Search.php +++ b/app/Support/Search/Search.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -185,6 +185,11 @@ class Search implements SearchInterface $this->user = $user; } + /** + * @param JournalCollectorInterface $collector + * + * @return JournalCollectorInterface + */ private function applyModifiers(JournalCollectorInterface $collector): JournalCollectorInterface { foreach ($this->modifiers as $modifier) { diff --git a/app/Support/Search/SearchInterface.php b/app/Support/Search/SearchInterface.php index f24c26cfc3..d1d7ebdb71 100644 --- a/app/Support/Search/SearchInterface.php +++ b/app/Support/Search/SearchInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/SingleCacheProperties.php b/app/Support/SingleCacheProperties.php index f0b88d108d..a6be94f57c 100644 --- a/app/Support/SingleCacheProperties.php +++ b/app/Support/SingleCacheProperties.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Steam.php b/app/Support/Steam.php index 70a95bdb01..b971028029 100644 --- a/app/Support/Steam.php +++ b/app/Support/Steam.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Twig/AmountFormat.php b/app/Support/Twig/AmountFormat.php index 98ff3509b7..a65587b9f0 100644 --- a/app/Support/Twig/AmountFormat.php +++ b/app/Support/Twig/AmountFormat.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Twig/Extension/Transaction.php b/app/Support/Twig/Extension/Transaction.php index ef8e443d78..5fea1eb71d 100644 --- a/app/Support/Twig/Extension/Transaction.php +++ b/app/Support/Twig/Extension/Transaction.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -394,7 +394,7 @@ class Transaction extends Twig_Extension $txt = sprintf('', trans('firefly.transfer')); break; case TransactionType::OPENING_BALANCE: - $txt = sprintf('', trans('firefly.openingBalance')); + $txt = sprintf('', trans('firefly.opening_balance')); break; case TransactionType::RECONCILIATION: $txt = sprintf('', trans('firefly.reconciliation_transaction')); diff --git a/app/Support/Twig/Extension/TransactionJournal.php b/app/Support/Twig/Extension/TransactionJournal.php index 66affea81b..8fd0347fd9 100644 --- a/app/Support/Twig/Extension/TransactionJournal.php +++ b/app/Support/Twig/Extension/TransactionJournal.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,6 +28,9 @@ use FireflyIII\Models\TransactionType; use FireflyIII\Support\SingleCacheProperties; use Twig_Extension; +/** + * Class TransactionJournal + */ class TransactionJournal extends Twig_Extension { /** diff --git a/app/Support/Twig/General.php b/app/Support/Twig/General.php index 754972cd4a..cfa0f73f35 100644 --- a/app/Support/Twig/General.php +++ b/app/Support/Twig/General.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Twig/Journal.php b/app/Support/Twig/Journal.php index 1f32719ab3..c098b2d96b 100644 --- a/app/Support/Twig/Journal.php +++ b/app/Support/Twig/Journal.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Twig/Loader/TransactionJournalLoader.php b/app/Support/Twig/Loader/TransactionJournalLoader.php index f0a3de2895..5268fa9dd8 100644 --- a/app/Support/Twig/Loader/TransactionJournalLoader.php +++ b/app/Support/Twig/Loader/TransactionJournalLoader.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Twig/Loader/TransactionLoader.php b/app/Support/Twig/Loader/TransactionLoader.php index a32ee03d43..43ed1b2774 100644 --- a/app/Support/Twig/Loader/TransactionLoader.php +++ b/app/Support/Twig/Loader/TransactionLoader.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Twig/PiggyBank.php b/app/Support/Twig/PiggyBank.php index 05d91a04be..9d5d3abc8c 100644 --- a/app/Support/Twig/PiggyBank.php +++ b/app/Support/Twig/PiggyBank.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Twig/Rule.php b/app/Support/Twig/Rule.php index 9a9350de10..dc115318f8 100644 --- a/app/Support/Twig/Rule.php +++ b/app/Support/Twig/Rule.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Twig/Transaction.php b/app/Support/Twig/Transaction.php index c9095e78cd..ec20cf3c04 100644 --- a/app/Support/Twig/Transaction.php +++ b/app/Support/Twig/Transaction.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/Support/Twig/Translation.php b/app/Support/Twig/Translation.php index fd4ffe1852..d910ff054e 100644 --- a/app/Support/Twig/Translation.php +++ b/app/Support/Twig/Translation.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Actions/ActionInterface.php b/app/TransactionRules/Actions/ActionInterface.php index 4b8fe556dc..e2490e1799 100644 --- a/app/TransactionRules/Actions/ActionInterface.php +++ b/app/TransactionRules/Actions/ActionInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Actions/AddTag.php b/app/TransactionRules/Actions/AddTag.php index d4d3e4a486..09a1dd6c54 100644 --- a/app/TransactionRules/Actions/AddTag.php +++ b/app/TransactionRules/Actions/AddTag.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Actions/AppendDescription.php b/app/TransactionRules/Actions/AppendDescription.php index 1c15703706..16b9054b62 100644 --- a/app/TransactionRules/Actions/AppendDescription.php +++ b/app/TransactionRules/Actions/AppendDescription.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Actions/AppendNotes.php b/app/TransactionRules/Actions/AppendNotes.php index bdfb17838d..9c779760d8 100644 --- a/app/TransactionRules/Actions/AppendNotes.php +++ b/app/TransactionRules/Actions/AppendNotes.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Actions/ClearBudget.php b/app/TransactionRules/Actions/ClearBudget.php index fdbe53c0cf..6b62511b86 100644 --- a/app/TransactionRules/Actions/ClearBudget.php +++ b/app/TransactionRules/Actions/ClearBudget.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Actions/ClearCategory.php b/app/TransactionRules/Actions/ClearCategory.php index 933b034b73..80aeb088a0 100644 --- a/app/TransactionRules/Actions/ClearCategory.php +++ b/app/TransactionRules/Actions/ClearCategory.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Actions/ClearNotes.php b/app/TransactionRules/Actions/ClearNotes.php index b9b1d34e5d..7dec7f12f7 100644 --- a/app/TransactionRules/Actions/ClearNotes.php +++ b/app/TransactionRules/Actions/ClearNotes.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -51,6 +51,8 @@ class ClearNotes implements ActionInterface * @param TransactionJournal $journal * * @return bool + * + * @throws \Exception */ public function act(TransactionJournal $journal): bool { diff --git a/app/TransactionRules/Actions/PrependDescription.php b/app/TransactionRules/Actions/PrependDescription.php index bab0c148ef..56a355f721 100644 --- a/app/TransactionRules/Actions/PrependDescription.php +++ b/app/TransactionRules/Actions/PrependDescription.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Actions/PrependNotes.php b/app/TransactionRules/Actions/PrependNotes.php index 30b54ae2fd..4cb7802769 100644 --- a/app/TransactionRules/Actions/PrependNotes.php +++ b/app/TransactionRules/Actions/PrependNotes.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Actions/RemoveAllTags.php b/app/TransactionRules/Actions/RemoveAllTags.php index e270faa8cd..33535117b8 100644 --- a/app/TransactionRules/Actions/RemoveAllTags.php +++ b/app/TransactionRules/Actions/RemoveAllTags.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Actions/RemoveTag.php b/app/TransactionRules/Actions/RemoveTag.php index 3b6e10a42f..dd81dedfd5 100644 --- a/app/TransactionRules/Actions/RemoveTag.php +++ b/app/TransactionRules/Actions/RemoveTag.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -67,6 +67,7 @@ class RemoveTag implements ActionInterface Log::debug(sprintf('RuleAction RemoveTag removed tag #%d ("%s") from journal #%d.', $tag->id, $tag->tag, $journal->id)); $journal->tags()->detach([$tag->id]); $journal->touch(); + return true; } Log::debug(sprintf('RuleAction RemoveTag tried to remove tag "%s" from journal #%d but no such tag exists.', $name, $journal->id)); diff --git a/app/TransactionRules/Actions/SetBudget.php b/app/TransactionRules/Actions/SetBudget.php index 98609f8c33..795cb61ee6 100644 --- a/app/TransactionRules/Actions/SetBudget.php +++ b/app/TransactionRules/Actions/SetBudget.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -89,6 +89,7 @@ class SetBudget implements ActionInterface $journal->budgets()->sync([$budget->id]); $journal->touch(); + return true; } } diff --git a/app/TransactionRules/Actions/SetCategory.php b/app/TransactionRules/Actions/SetCategory.php index 9052ef5baf..2e052abfa4 100644 --- a/app/TransactionRules/Actions/SetCategory.php +++ b/app/TransactionRules/Actions/SetCategory.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Actions/SetDescription.php b/app/TransactionRules/Actions/SetDescription.php index cd56b164f4..ff703d0e32 100644 --- a/app/TransactionRules/Actions/SetDescription.php +++ b/app/TransactionRules/Actions/SetDescription.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -35,7 +35,6 @@ class SetDescription implements ActionInterface private $action; /** - * * TriggerInterface constructor. * * @param RuleAction $action diff --git a/app/TransactionRules/Actions/SetDestinationAccount.php b/app/TransactionRules/Actions/SetDestinationAccount.php index e1008e6c0c..e522903edf 100644 --- a/app/TransactionRules/Actions/SetDestinationAccount.php +++ b/app/TransactionRules/Actions/SetDestinationAccount.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -59,6 +59,7 @@ class SetDestinationAccount implements ActionInterface /** * Set destination account to X + * * @param TransactionJournal $journal * * @return bool diff --git a/app/TransactionRules/Actions/SetNotes.php b/app/TransactionRules/Actions/SetNotes.php index c93419f8a2..e4193e5c6e 100644 --- a/app/TransactionRules/Actions/SetNotes.php +++ b/app/TransactionRules/Actions/SetNotes.php @@ -16,9 +16,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ - declare(strict_types=1); namespace FireflyIII\TransactionRules\Actions; diff --git a/app/TransactionRules/Actions/SetSourceAccount.php b/app/TransactionRules/Actions/SetSourceAccount.php index 06ec739a62..5244211892 100644 --- a/app/TransactionRules/Actions/SetSourceAccount.php +++ b/app/TransactionRules/Actions/SetSourceAccount.php @@ -16,9 +16,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ - declare(strict_types=1); namespace FireflyIII\TransactionRules\Actions; @@ -42,7 +41,7 @@ class SetSourceAccount implements ActionInterface /** @var TransactionJournal The journal */ private $journal; - /** @var Account The new source account*/ + /** @var Account The new source account */ private $newSourceAccount; /** @var AccountRepositoryInterface Account repository */ diff --git a/app/TransactionRules/Factory/ActionFactory.php b/app/TransactionRules/Factory/ActionFactory.php index 91c903487e..f9864c0e5d 100644 --- a/app/TransactionRules/Factory/ActionFactory.php +++ b/app/TransactionRules/Factory/ActionFactory.php @@ -1,7 +1,7 @@ . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -47,6 +47,8 @@ class ActionFactory * @param RuleAction $action * * @return ActionInterface + * + * @throws FireflyException */ public static function getAction(RuleAction $action): ActionInterface { diff --git a/app/TransactionRules/Factory/TriggerFactory.php b/app/TransactionRules/Factory/TriggerFactory.php index 35cf8f2431..9616939987 100644 --- a/app/TransactionRules/Factory/TriggerFactory.php +++ b/app/TransactionRules/Factory/TriggerFactory.php @@ -1,7 +1,7 @@ . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -49,6 +49,8 @@ class TriggerFactory * @param RuleTrigger $trigger * * @return AbstractTrigger + * + * @throws FireflyException */ public static function getTrigger(RuleTrigger $trigger) { diff --git a/app/TransactionRules/Processor.php b/app/TransactionRules/Processor.php index ad4a3560b7..0c35753533 100644 --- a/app/TransactionRules/Processor.php +++ b/app/TransactionRules/Processor.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -45,7 +45,7 @@ final class Processor public $journal; /** @var Rule Rule that applies */ public $rule; - /** @var Collection All triggers*/ + /** @var Collection All triggers */ public $triggers; /** @var int Found triggers */ private $foundTriggers = 0; @@ -95,6 +95,8 @@ final class Processor * @param string $triggerValue * * @return Processor + * + * @throws \FireflyIII\Exceptions\FireflyException */ public static function makeFromString(string $triggerName, string $triggerValue) { @@ -118,6 +120,8 @@ final class Processor * @param array $triggers * * @return Processor + * + * @throws \FireflyIII\Exceptions\FireflyException */ public static function makeFromStringArray(array $triggers) { diff --git a/app/TransactionRules/TransactionMatcher.php b/app/TransactionRules/TransactionMatcher.php index 49ef27059b..11a8ed8a9d 100644 --- a/app/TransactionRules/TransactionMatcher.php +++ b/app/TransactionRules/TransactionMatcher.php @@ -1,7 +1,7 @@ . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -109,6 +109,7 @@ class TransactionMatcher /** * Return limit + * * @return int */ public function getLimit(): int @@ -132,6 +133,7 @@ class TransactionMatcher /** * Get range + * * @return int */ public function getRange(): int @@ -155,6 +157,7 @@ class TransactionMatcher /** * Get triggers + * * @return array */ public function getTriggers(): array diff --git a/app/TransactionRules/Triggers/AbstractTrigger.php b/app/TransactionRules/Triggers/AbstractTrigger.php index b6ca47c6ca..0177db9860 100644 --- a/app/TransactionRules/Triggers/AbstractTrigger.php +++ b/app/TransactionRules/Triggers/AbstractTrigger.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -29,6 +29,7 @@ use FireflyIII\Models\TransactionJournal; * This class will be magical! * * Class AbstractTrigger + * @method triggered */ class AbstractTrigger { @@ -43,15 +44,6 @@ class AbstractTrigger /** @var string Trigger value */ protected $triggerValue; - /** - * AbstractTrigger constructor. - * - * @codeCoverageIgnore - */ - private function __construct() - { - } - /** * Make a new trigger from the value given in the string. * @@ -73,6 +65,7 @@ class AbstractTrigger /** * Make a new trigger from the rule trigger in the parameter + * * @codeCoverageIgnore * * @param RuleTrigger $trigger diff --git a/app/TransactionRules/Triggers/AmountExactly.php b/app/TransactionRules/Triggers/AmountExactly.php index b6f040478d..f0bdfd5d29 100644 --- a/app/TransactionRules/Triggers/AmountExactly.php +++ b/app/TransactionRules/Triggers/AmountExactly.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/AmountLess.php b/app/TransactionRules/Triggers/AmountLess.php index 7f3538a200..f27fbc0740 100644 --- a/app/TransactionRules/Triggers/AmountLess.php +++ b/app/TransactionRules/Triggers/AmountLess.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/AmountMore.php b/app/TransactionRules/Triggers/AmountMore.php index 5e641a8e11..894068a032 100644 --- a/app/TransactionRules/Triggers/AmountMore.php +++ b/app/TransactionRules/Triggers/AmountMore.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/BudgetIs.php b/app/TransactionRules/Triggers/BudgetIs.php index 8a87c96f84..bdf2fc2533 100644 --- a/app/TransactionRules/Triggers/BudgetIs.php +++ b/app/TransactionRules/Triggers/BudgetIs.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/CategoryIs.php b/app/TransactionRules/Triggers/CategoryIs.php index 840d93d017..14fb50a6d9 100644 --- a/app/TransactionRules/Triggers/CategoryIs.php +++ b/app/TransactionRules/Triggers/CategoryIs.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/DescriptionContains.php b/app/TransactionRules/Triggers/DescriptionContains.php index 2a14eb97f0..d055699e2f 100644 --- a/app/TransactionRules/Triggers/DescriptionContains.php +++ b/app/TransactionRules/Triggers/DescriptionContains.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -64,6 +64,7 @@ final class DescriptionContains extends AbstractTrigger implements TriggerInterf /** * Returns true when description contains X + * * @param TransactionJournal $journal * * @return bool diff --git a/app/TransactionRules/Triggers/DescriptionEnds.php b/app/TransactionRules/Triggers/DescriptionEnds.php index 36b077c7f2..cb6c53c00f 100644 --- a/app/TransactionRules/Triggers/DescriptionEnds.php +++ b/app/TransactionRules/Triggers/DescriptionEnds.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/DescriptionIs.php b/app/TransactionRules/Triggers/DescriptionIs.php index bce888ebfe..3f7e7c481e 100644 --- a/app/TransactionRules/Triggers/DescriptionIs.php +++ b/app/TransactionRules/Triggers/DescriptionIs.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/DescriptionStarts.php b/app/TransactionRules/Triggers/DescriptionStarts.php index 773a58e03a..075a0d8441 100644 --- a/app/TransactionRules/Triggers/DescriptionStarts.php +++ b/app/TransactionRules/Triggers/DescriptionStarts.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/FromAccountContains.php b/app/TransactionRules/Triggers/FromAccountContains.php index 8e265a2645..ecb4ef0eab 100644 --- a/app/TransactionRules/Triggers/FromAccountContains.php +++ b/app/TransactionRules/Triggers/FromAccountContains.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/FromAccountEnds.php b/app/TransactionRules/Triggers/FromAccountEnds.php index 0c7818ee91..c18fc72c1d 100644 --- a/app/TransactionRules/Triggers/FromAccountEnds.php +++ b/app/TransactionRules/Triggers/FromAccountEnds.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/FromAccountIs.php b/app/TransactionRules/Triggers/FromAccountIs.php index 4c8321f241..4e1810297b 100644 --- a/app/TransactionRules/Triggers/FromAccountIs.php +++ b/app/TransactionRules/Triggers/FromAccountIs.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/FromAccountStarts.php b/app/TransactionRules/Triggers/FromAccountStarts.php index 117d727273..0d15c40dae 100644 --- a/app/TransactionRules/Triggers/FromAccountStarts.php +++ b/app/TransactionRules/Triggers/FromAccountStarts.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/HasAnyBudget.php b/app/TransactionRules/Triggers/HasAnyBudget.php index 57d3e7b2b4..46bd011a64 100644 --- a/app/TransactionRules/Triggers/HasAnyBudget.php +++ b/app/TransactionRules/Triggers/HasAnyBudget.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/HasAnyCategory.php b/app/TransactionRules/Triggers/HasAnyCategory.php index 58177c6603..2f356f2eaa 100644 --- a/app/TransactionRules/Triggers/HasAnyCategory.php +++ b/app/TransactionRules/Triggers/HasAnyCategory.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/HasAnyTag.php b/app/TransactionRules/Triggers/HasAnyTag.php index bbc07bdcdc..5e1795bb20 100644 --- a/app/TransactionRules/Triggers/HasAnyTag.php +++ b/app/TransactionRules/Triggers/HasAnyTag.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/HasAttachment.php b/app/TransactionRules/Triggers/HasAttachment.php index b9381cd82f..f415e7ea22 100644 --- a/app/TransactionRules/Triggers/HasAttachment.php +++ b/app/TransactionRules/Triggers/HasAttachment.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/HasNoBudget.php b/app/TransactionRules/Triggers/HasNoBudget.php index f0990f99fb..fa4bae0539 100644 --- a/app/TransactionRules/Triggers/HasNoBudget.php +++ b/app/TransactionRules/Triggers/HasNoBudget.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -54,6 +54,7 @@ final class HasNoBudget extends AbstractTrigger implements TriggerInterface /** * Returns true when journal has no budget + * * @param TransactionJournal $journal * * @return bool diff --git a/app/TransactionRules/Triggers/HasNoCategory.php b/app/TransactionRules/Triggers/HasNoCategory.php index 03c8c18732..b0ebe78d6a 100644 --- a/app/TransactionRules/Triggers/HasNoCategory.php +++ b/app/TransactionRules/Triggers/HasNoCategory.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/HasNoTag.php b/app/TransactionRules/Triggers/HasNoTag.php index 377c2bcdd5..98e435e865 100644 --- a/app/TransactionRules/Triggers/HasNoTag.php +++ b/app/TransactionRules/Triggers/HasNoTag.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/NotesAny.php b/app/TransactionRules/Triggers/NotesAny.php index 6e9b298047..cee387e0dd 100644 --- a/app/TransactionRules/Triggers/NotesAny.php +++ b/app/TransactionRules/Triggers/NotesAny.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/NotesAre.php b/app/TransactionRules/Triggers/NotesAre.php index 5aea73ae2b..a191edf5ff 100644 --- a/app/TransactionRules/Triggers/NotesAre.php +++ b/app/TransactionRules/Triggers/NotesAre.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/NotesContain.php b/app/TransactionRules/Triggers/NotesContain.php index 20a8549d56..cb6b324455 100644 --- a/app/TransactionRules/Triggers/NotesContain.php +++ b/app/TransactionRules/Triggers/NotesContain.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/NotesEmpty.php b/app/TransactionRules/Triggers/NotesEmpty.php index 91af8d7b43..f552709b98 100644 --- a/app/TransactionRules/Triggers/NotesEmpty.php +++ b/app/TransactionRules/Triggers/NotesEmpty.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/NotesEnd.php b/app/TransactionRules/Triggers/NotesEnd.php index 5ed37b9a04..08cc86e290 100644 --- a/app/TransactionRules/Triggers/NotesEnd.php +++ b/app/TransactionRules/Triggers/NotesEnd.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -65,6 +65,7 @@ final class NotesEnd extends AbstractTrigger implements TriggerInterface /** * Returns true when notes end with X + * * @param TransactionJournal $journal * * @return bool diff --git a/app/TransactionRules/Triggers/NotesStart.php b/app/TransactionRules/Triggers/NotesStart.php index 31bc0b43b1..3e0defa274 100644 --- a/app/TransactionRules/Triggers/NotesStart.php +++ b/app/TransactionRules/Triggers/NotesStart.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/TagIs.php b/app/TransactionRules/Triggers/TagIs.php index de0b952de1..687f14cf5b 100644 --- a/app/TransactionRules/Triggers/TagIs.php +++ b/app/TransactionRules/Triggers/TagIs.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/ToAccountContains.php b/app/TransactionRules/Triggers/ToAccountContains.php index e73f575a75..1120880094 100644 --- a/app/TransactionRules/Triggers/ToAccountContains.php +++ b/app/TransactionRules/Triggers/ToAccountContains.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/ToAccountEnds.php b/app/TransactionRules/Triggers/ToAccountEnds.php index ab623133c8..17345f1322 100644 --- a/app/TransactionRules/Triggers/ToAccountEnds.php +++ b/app/TransactionRules/Triggers/ToAccountEnds.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/ToAccountIs.php b/app/TransactionRules/Triggers/ToAccountIs.php index ab224ff5a0..87b3831fea 100644 --- a/app/TransactionRules/Triggers/ToAccountIs.php +++ b/app/TransactionRules/Triggers/ToAccountIs.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -64,6 +64,7 @@ final class ToAccountIs extends AbstractTrigger implements TriggerInterface /** * Returns true when to-account is X. + * * @param TransactionJournal $journal * * @return bool diff --git a/app/TransactionRules/Triggers/ToAccountStarts.php b/app/TransactionRules/Triggers/ToAccountStarts.php index 38b18bcd2a..4662760264 100644 --- a/app/TransactionRules/Triggers/ToAccountStarts.php +++ b/app/TransactionRules/Triggers/ToAccountStarts.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/TransactionType.php b/app/TransactionRules/Triggers/TransactionType.php index 0b15a440e1..a5a2c3d2c6 100644 --- a/app/TransactionRules/Triggers/TransactionType.php +++ b/app/TransactionRules/Triggers/TransactionType.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/TriggerInterface.php b/app/TransactionRules/Triggers/TriggerInterface.php index 63c2b57af6..9877633e22 100644 --- a/app/TransactionRules/Triggers/TriggerInterface.php +++ b/app/TransactionRules/Triggers/TriggerInterface.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/TransactionRules/Triggers/UserAction.php b/app/TransactionRules/Triggers/UserAction.php index eb0a99076e..7a8ed85d7c 100644 --- a/app/TransactionRules/Triggers/UserAction.php +++ b/app/TransactionRules/Triggers/UserAction.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/app/User.php b/app/User.php index 1bad9256c7..d0620307ec 100644 --- a/app/User.php +++ b/app/User.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -27,8 +27,10 @@ use FireflyIII\Models\CurrencyExchangeRate; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasManyThrough; +use Illuminate\Database\QueryException; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; +use Log; use Request; /** @@ -59,6 +61,7 @@ class User extends Authenticatable protected $table = 'users'; /** + * @codeCoverageIgnore * Link to accounts. * * @return HasMany @@ -84,11 +87,16 @@ class User extends Authenticatable if (is_array($role)) { $role = $role['id']; } - - $this->roles()->attach($role); + try { + $this->roles()->attach($role); + } catch (QueryException $e) { + // don't care + Log::info(sprintf('Query exception when giving user a role: %s', $e->getMessage())); + } } /** + * @codeCoverageIgnore * Link to attachments * * @return HasMany @@ -99,6 +107,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to available budgets * * @return HasMany @@ -109,6 +118,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to bills. * * @return HasMany @@ -119,6 +129,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to budgets. * * @return HasMany @@ -129,6 +140,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to categories * * @return HasMany @@ -139,6 +151,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to currency exchange rates * * @return HasMany @@ -149,6 +162,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to export jobs * * @return HasMany @@ -159,6 +173,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Generates access token. * * @return string @@ -171,6 +186,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Checks if the user has a role by its name. * * Full credit goes to: https://github.com/Zizaco/entrust @@ -191,6 +207,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to import jobs. * * @return HasMany @@ -201,6 +218,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to piggy banks. * * @return HasManyThrough @@ -211,6 +229,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to preferences. * * @return HasMany @@ -221,6 +240,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to roles. * * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany @@ -231,6 +251,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to rule groups. * * @return HasMany @@ -241,6 +262,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to rules. * * @return HasMany @@ -251,6 +273,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Send the password reset notification. * * @param string $token @@ -263,6 +286,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to tags. * * @return HasMany @@ -273,6 +297,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to transaction journals. * * @return HasMany @@ -283,6 +308,7 @@ class User extends Authenticatable } /** + * @codeCoverageIgnore * Link to transactions. * * @return HasManyThrough diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php index 95b14b987b..b50b3b4659 100644 --- a/app/Validation/FireflyValidator.php +++ b/app/Validation/FireflyValidator.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -340,7 +340,7 @@ class FireflyValidator extends Validator * * @return bool */ - public function validateUniqueAccountNumberForUser($attribute, $value, $parameters): bool + public function validateUniqueAccountNumberForUser($attribute, $value): bool { $accountId = $this->data['id'] ?? 0; diff --git a/bootstrap/app.php b/bootstrap/app.php index 1206138d26..aefb6a0580 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -1,4 +1,24 @@ . + */ + declare(strict_types=1); diff --git a/composer.json b/composer.json index ed4265d187..a82586a995 100644 --- a/composer.json +++ b/composer.json @@ -34,7 +34,7 @@ "transfers", "management" ], - "license": "Creative Commons Attribution-ShareAlike 4.0 International License", + "license": "GPL-3.0", "homepage": "https://github.com/firefly-iii/firefly-iii", "type": "project", "authors": [ @@ -49,32 +49,33 @@ "php": ">=7.1.0", "ext-bcmath": "*", "ext-curl": "*", - "ext-intl": "*", "ext-gd": "*", + "ext-intl": "*", "ext-mbstring": "*", "ext-zip": "*", "bacon/bacon-qr-code": "1.*", - "davejamesmiller/laravel-breadcrumbs": "3.*", - "doctrine/dbal": "^2.5", - "fideloper/proxy": "~3.3", + "davejamesmiller/laravel-breadcrumbs": "4.*", + "doctrine/dbal": "2.*", + "fideloper/proxy": "3.*", "laravel/framework": "5.5.*", - "laravelcollective/html": "^5.4", - "league/commonmark": "0.15.*", - "league/csv": "8.*", - "pragmarx/google2fa": "1.*", + "laravelcollective/html": "5.5.*", + "league/commonmark": "0.*", + "league/csv": "9.*", + "pragmarx/google2fa": "2.*", + "pragmarx/google2fa-laravel": "^0.1.4", "rcrowe/twigbridge": "0.9.*", "rmccue/requests": "1.*", - "twig/twig": "1.30.0", + "twig/twig": "1.*", "watson/validating": "3.*" }, "require-dev": { - "filp/whoops": "~2.0", - "fzaninotto/faker": "~1.4", - "mockery/mockery": "0.9.*", - "phpunit/phpunit": "~6.0", - "barryvdh/laravel-debugbar": "2.*", + "barryvdh/laravel-debugbar": "3.*", "barryvdh/laravel-ide-helper": "2.*", - "php-coveralls/php-coveralls": "^1.0" + "filp/whoops": "2.*", + "fzaninotto/faker": "1.*", + "mockery/mockery": "^1.0", + "php-coveralls/php-coveralls": "^2.0", + "phpunit/phpunit": "^6.0" }, "autoload": { "classmap": [ @@ -97,6 +98,9 @@ } }, "scripts": { + "pre-install-cmd": [ + "if [ -z ${DYNO+x} ]; then echo Not in Heroku environment.; else php -r \"file_exists('.env') || copy('.env.heroku', '.env');\"; fi" + ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], @@ -115,9 +119,6 @@ "post-install-cmd": [ "php artisan optimize", "php artisan firefly:instructions install" - ], - "compile": [ - "@php -r \"file_exists('.env.heroku') || copy('.env.heroku', '.env');\"" ] }, "config": { diff --git a/composer.lock b/composer.lock index 60d58eb54b..88046c0b2d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "a68c1a305e8e57a21936600540421f11", + "content-hash": "b65015e818e8643480e794b418268e97", "packages": [ { "name": "bacon/bacon-qr-code", @@ -52,85 +52,42 @@ "homepage": "https://github.com/Bacon/BaconQrCode", "time": "2017-10-17T09:59:25+00:00" }, - { - "name": "christian-riesen/base32", - "version": "1.3.1", - "source": { - "type": "git", - "url": "https://github.com/ChristianRiesen/base32.git", - "reference": "0a31e50c0fa9b1692d077c86ac188eecdcbaf7fa" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ChristianRiesen/base32/zipball/0a31e50c0fa9b1692d077c86ac188eecdcbaf7fa", - "reference": "0a31e50c0fa9b1692d077c86ac188eecdcbaf7fa", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "4.*", - "satooshi/php-coveralls": "0.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Base32\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christian Riesen", - "email": "chris.riesen@gmail.com", - "homepage": "http://christianriesen.com", - "role": "Developer" - } - ], - "description": "Base32 encoder/decoder according to RFC 4648", - "homepage": "https://github.com/ChristianRiesen/base32", - "keywords": [ - "base32", - "decode", - "encode", - "rfc4648" - ], - "time": "2016-05-05T11:49:03+00:00" - }, { "name": "davejamesmiller/laravel-breadcrumbs", - "version": "3.0.3", + "version": "4.2.0", "source": { "type": "git", "url": "https://github.com/davejamesmiller/laravel-breadcrumbs.git", - "reference": "0b0f4792dee645b0f084164aa17d4320e4bb734f" + "reference": "368d7b3a2cd21fe2e648756e5d01d3fe4fbe98e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/davejamesmiller/laravel-breadcrumbs/zipball/0b0f4792dee645b0f084164aa17d4320e4bb734f", - "reference": "0b0f4792dee645b0f084164aa17d4320e4bb734f", + "url": "https://api.github.com/repos/davejamesmiller/laravel-breadcrumbs/zipball/368d7b3a2cd21fe2e648756e5d01d3fe4fbe98e1", + "reference": "368d7b3a2cd21fe2e648756e5d01d3fe4fbe98e1", "shasum": "" }, "require": { - "illuminate/support": "5.*", - "illuminate/view": "5.*", - "php": ">=5.4.0" + "illuminate/support": "5.5.*", + "illuminate/view": "5.5.*", + "php": ">=7.0.0" }, "require-dev": { - "mockery/mockery": "0.9.*", - "orchestra/testbench": "3.2.*|3.3.*", - "phpunit/phpunit": "4.*" + "laravel/framework": "5.5.*", + "orchestra/testbench": "3.5.*", + "phpunit/phpunit": "6.*", + "satooshi/php-coveralls": "1.0.*" }, "type": "library", + "extra": { + "laravel": { + "providers": [ + "DaveJamesMiller\\Breadcrumbs\\BreadcrumbsServiceProvider" + ], + "aliases": { + "Breadcrumbs": "DaveJamesMiller\\Breadcrumbs\\Facades\\Breadcrumbs" + } + } + }, "autoload": { "psr-4": { "DaveJamesMiller\\Breadcrumbs\\": "src/" @@ -147,25 +104,25 @@ "homepage": "https://davejamesmiller.com/" } ], - "description": "A simple Laravel-style way to create breadcrumbs in Laravel.", - "homepage": "https://laravel-breadcrumbs.readthedocs.io/", + "description": "A simple Laravel-style way to create breadcrumbs.", + "homepage": "https://github.com/davejamesmiller/laravel-breadcrumbs", "keywords": [ "laravel" ], - "time": "2017-06-24T11:10:49+00:00" + "time": "2017-09-14T08:23:50+00:00" }, { "name": "doctrine/annotations", - "version": "v1.5.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "5beebb01b025c94e93686b7a0ed3edae81fe3e7f" + "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5beebb01b025c94e93686b7a0ed3edae81fe3e7f", - "reference": "5beebb01b025c94e93686b7a0ed3edae81fe3e7f", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", + "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", "shasum": "" }, "require": { @@ -174,12 +131,12 @@ }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5.x-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { @@ -220,7 +177,7 @@ "docblock", "parser" ], - "time": "2017-07-22T10:58:02+00:00" + "time": "2017-12-06T07:11:42+00:00" }, { "name": "doctrine/cache", @@ -791,16 +748,16 @@ }, { "name": "laravel/framework", - "version": "v5.5.24", + "version": "v5.5.28", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "06135405bb1f736dac5e9529ed1541fc446c9c0f" + "reference": "cfafae1f2043208390a7c984e3070696f4969605" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/06135405bb1f736dac5e9529ed1541fc446c9c0f", - "reference": "06135405bb1f736dac5e9529ed1541fc446c9c0f", + "url": "https://api.github.com/repos/laravel/framework/zipball/cfafae1f2043208390a7c984e3070696f4969605", + "reference": "cfafae1f2043208390a7c984e3070696f4969605", "shasum": "" }, "require": { @@ -880,6 +837,7 @@ "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).", "laravel/tinker": "Required to use the tinker console command (~1.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", + "league/flysystem-cached-adapter": "Required to use Flysystem caching (~1.0).", "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", "nexmo/client": "Required to use the Nexmo transport (~1.0).", "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", @@ -920,7 +878,7 @@ "framework", "laravel" ], - "time": "2017-12-07T01:28:21+00:00" + "time": "2017-12-26T16:24:40+00:00" }, { "name": "laravelcollective/html", @@ -989,16 +947,16 @@ }, { "name": "league/commonmark", - "version": "0.15.7", + "version": "0.16.0", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "36d82f166e441dfa28643f8d01dd8bdd3a579adf" + "reference": "c0e41be0f80c51ad3170c9c713f74a0b8dec59ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/36d82f166e441dfa28643f8d01dd8bdd3a579adf", - "reference": "36d82f166e441dfa28643f8d01dd8bdd3a579adf", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c0e41be0f80c51ad3170c9c713f74a0b8dec59ce", + "reference": "c0e41be0f80c51ad3170c9c713f74a0b8dec59ce", "shasum": "" }, "require": { @@ -1014,7 +972,7 @@ "jgm/commonmark": "0.28", "michelf/php-markdown": "~1.4", "mikehaertl/php-shellcommand": "~1.2.0", - "phpunit/phpunit": "~4.3|~5.0", + "phpunit/phpunit": "^4.8.35|~5.7", "scrutinizer/ocular": "~1.1", "symfony/finder": "~2.3|~3.0" }, @@ -1027,7 +985,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "0.16-dev" + "dev-master": "0.17-dev" } }, "autoload": { @@ -1054,40 +1012,47 @@ "markdown", "parser" ], - "time": "2017-10-26T15:41:07+00:00" + "time": "2017-10-31T00:49:55+00:00" }, { "name": "league/csv", - "version": "8.2.2", + "version": "9.1.1", "source": { "type": "git", "url": "https://github.com/thephpleague/csv.git", - "reference": "fa8bc05f64eb6c66b96edfaf60648f022ecb5f55" + "reference": "66118f5c2a7e4da77e743e69f74773c63b73e8f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/csv/zipball/fa8bc05f64eb6c66b96edfaf60648f022ecb5f55", - "reference": "fa8bc05f64eb6c66b96edfaf60648f022ecb5f55", + "url": "https://api.github.com/repos/thephpleague/csv/zipball/66118f5c2a7e4da77e743e69f74773c63b73e8f9", + "reference": "66118f5c2a7e4da77e743e69f74773c63b73e8f9", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": ">=5.5.0" + "php": ">=7.0.10" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^1.9", - "phpunit/phpunit": "^4.0" + "ext-curl": "*", + "friendsofphp/php-cs-fixer": "^2.0", + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-iconv": "Needed to ease transcoding CSV using iconv stream filters" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "8.2-dev" + "dev-master": "9.x-dev" } }, "autoload": { "psr-4": { "League\\Csv\\": "src" - } + }, + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1111,7 +1076,7 @@ "read", "write" ], - "time": "2017-07-12T07:18:20+00:00" + "time": "2017-11-28T08:29:49+00:00" }, { "name": "league/flysystem", @@ -1371,6 +1336,68 @@ ], "time": "2017-01-16T07:55:07+00:00" }, + { + "name": "paragonie/constant_time_encoding", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/constant_time_encoding.git", + "reference": "9e7d88e6e4015c2f06a3fa22f06e1d5faa77e6c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/9e7d88e6e4015c2f06a3fa22f06e1d5faa77e6c4", + "reference": "9e7d88e6e4015c2f06a3fa22f06e1d5faa77e6c4", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "^6", + "vimeo/psalm": "^0.3|^1" + }, + "type": "library", + "autoload": { + "psr-4": { + "ParagonIE\\ConstantTime\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com", + "role": "Maintainer" + }, + { + "name": "Steve 'Sc00bz' Thomas", + "email": "steve@tobtu.com", + "homepage": "https://www.tobtu.com", + "role": "Original Developer" + } + ], + "description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)", + "keywords": [ + "base16", + "base32", + "base32_decode", + "base32_encode", + "base64", + "base64_decode", + "base64_encode", + "bin2hex", + "encoding", + "hex", + "hex2bin", + "rfc4648" + ], + "time": "2017-09-22T14:55:37+00:00" + }, { "name": "paragonie/random_compat", "version": "v2.0.11", @@ -1421,26 +1448,28 @@ }, { "name": "pragmarx/google2fa", - "version": "v1.0.1", + "version": "v2.0.6", "source": { "type": "git", "url": "https://github.com/antonioribeiro/google2fa.git", - "reference": "b346dc138339b745c5831405d00cff7c1351aa0d" + "reference": "bc2d654305e4d09254125f8cd390a7fbc4742d46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/b346dc138339b745c5831405d00cff7c1351aa0d", - "reference": "b346dc138339b745c5831405d00cff7c1351aa0d", + "url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/bc2d654305e4d09254125f8cd390a7fbc4742d46", + "reference": "bc2d654305e4d09254125f8cd390a7fbc4742d46", "shasum": "" }, "require": { - "christian-riesen/base32": "~1.3", + "paragonie/constant_time_encoding": "~1.0|~2.0", "paragonie/random_compat": "~1.4|~2.0", "php": ">=5.4", "symfony/polyfill-php56": "~1.2" }, "require-dev": { - "phpspec/phpspec": "~2.1" + "bacon/bacon-qr-code": "~1.0", + "phpspec/phpspec": "~2.1", + "phpunit/phpunit": "~4" }, "suggest": { "bacon/bacon-qr-code": "Required to generate inline QR Codes." @@ -1448,11 +1477,8 @@ "type": "library", "extra": { "component": "package", - "frameworks": [ - "Laravel" - ], "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1473,12 +1499,84 @@ ], "description": "A One Time Password Authentication package, compatible with Google Authenticator.", "keywords": [ + "2fa", "Authentication", "Two Factor Authentication", "google2fa", "laravel" ], - "time": "2016-07-18T20:25:04+00:00" + "time": "2017-09-12T06:55:05+00:00" + }, + { + "name": "pragmarx/google2fa-laravel", + "version": "v0.1.4", + "source": { + "type": "git", + "url": "https://github.com/antonioribeiro/google2fa-laravel.git", + "reference": "38bd96a1732b9dea963c52e0f503a65265c077c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/antonioribeiro/google2fa-laravel/zipball/38bd96a1732b9dea963c52e0f503a65265c077c9", + "reference": "38bd96a1732b9dea963c52e0f503a65265c077c9", + "shasum": "" + }, + "require": { + "laravel/framework": ">=5.2", + "php": ">=5.4", + "pragmarx/google2fa": "~2.0" + }, + "require-dev": { + "benconstable/phpspec-laravel": "~3.0", + "phpspec/phpspec": "~3" + }, + "suggest": { + "bacon/bacon-qr-code": "Required to generate inline QR Codes.", + "pragmarx/recovery": "Generate recovery codes." + }, + "type": "library", + "extra": { + "component": "package", + "frameworks": [ + "Laravel" + ], + "branch-alias": { + "dev-master": "0.1-dev" + }, + "laravel": { + "providers": [ + "PragmaRX\\Google2FALaravel\\ServiceProvider" + ], + "aliases": { + "Google2FA": "PragmaRX\\Google2FALaravel\\Facade" + } + } + }, + "autoload": { + "psr-4": { + "PragmaRX\\Google2FALaravel\\": "src/", + "spec\\PragmaRX\\Google2FALaravel\\": "tests/spec/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Antonio Carlos Ribeiro", + "email": "acr@antoniocarlosribeiro.com", + "role": "Creator & Designer" + } + ], + "description": "A One Time Password Authentication package, compatible with Google Authenticator.", + "keywords": [ + "Authentication", + "Two Factor Authentication", + "google2fa", + "laravel" + ], + "time": "2017-12-06T03:26:14+00:00" }, { "name": "psr/container", @@ -1876,16 +1974,16 @@ }, { "name": "symfony/console", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "2cdef78de8f54f68ff16a857e710e7302b47d4c7" + "reference": "9f21adfb92a9315b73ae2ed43138988ee4913d4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/2cdef78de8f54f68ff16a857e710e7302b47d4c7", - "reference": "2cdef78de8f54f68ff16a857e710e7302b47d4c7", + "url": "https://api.github.com/repos/symfony/console/zipball/9f21adfb92a9315b73ae2ed43138988ee4913d4e", + "reference": "9f21adfb92a9315b73ae2ed43138988ee4913d4e", "shasum": "" }, "require": { @@ -1941,20 +2039,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-12-02T18:20:11+00:00" + "time": "2017-12-14T19:40:10+00:00" }, { "name": "symfony/css-selector", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "7134b93e90ea7e7881fcb2da006d21b4c5f31908" + "reference": "eac760b414cf1f64362c3dd047b989e4db121332" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/7134b93e90ea7e7881fcb2da006d21b4c5f31908", - "reference": "7134b93e90ea7e7881fcb2da006d21b4c5f31908", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/eac760b414cf1f64362c3dd047b989e4db121332", + "reference": "eac760b414cf1f64362c3dd047b989e4db121332", "shasum": "" }, "require": { @@ -1994,20 +2092,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2017-11-05T16:10:10+00:00" + "time": "2017-12-14T19:40:10+00:00" }, { "name": "symfony/debug", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "fb2001e5d85f95d8b6ab94ae3be5d2672df128fd" + "reference": "543deab3ffff94402440b326fc94153bae2dfa7a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/fb2001e5d85f95d8b6ab94ae3be5d2672df128fd", - "reference": "fb2001e5d85f95d8b6ab94ae3be5d2672df128fd", + "url": "https://api.github.com/repos/symfony/debug/zipball/543deab3ffff94402440b326fc94153bae2dfa7a", + "reference": "543deab3ffff94402440b326fc94153bae2dfa7a", "shasum": "" }, "require": { @@ -2050,31 +2148,34 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-11-21T09:01:46+00:00" + "time": "2017-12-12T08:27:14+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v2.8.32", + "version": "v4.0.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b59aacf238fadda50d612c9de73b74751872a903" + "reference": "d4face19ed8002eec8280bc1c5ec18130472bf43" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b59aacf238fadda50d612c9de73b74751872a903", - "reference": "b59aacf238fadda50d612c9de73b74751872a903", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d4face19ed8002eec8280bc1c5ec18130472bf43", + "reference": "d4face19ed8002eec8280bc1c5ec18130472bf43", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": "^7.1.3" + }, + "conflict": { + "symfony/dependency-injection": "<3.4" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "^2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/stopwatch": "~3.4|~4.0" }, "suggest": { "symfony/dependency-injection": "", @@ -2083,7 +2184,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -2110,11 +2211,11 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-11-05T15:25:56+00:00" + "time": "2017-12-14T19:48:22+00:00" }, { "name": "symfony/finder", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -2163,16 +2264,16 @@ }, { "name": "symfony/http-foundation", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "d9625c8abb907e0ca2d7506afd7a719a572c766f" + "reference": "59bf131b5460227a2f583a7dbe6b179f98f9e0a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d9625c8abb907e0ca2d7506afd7a719a572c766f", - "reference": "d9625c8abb907e0ca2d7506afd7a719a572c766f", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/59bf131b5460227a2f583a7dbe6b179f98f9e0a5", + "reference": "59bf131b5460227a2f583a7dbe6b179f98f9e0a5", "shasum": "" }, "require": { @@ -2213,55 +2314,58 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2017-11-30T14:56:21+00:00" + "time": "2017-12-14T19:40:10+00:00" }, { "name": "symfony/http-kernel", - "version": "v3.3.0", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "4ad34a0d20a5848c0fcbf6ff6a2ff1cd9cf4b9ed" + "reference": "48325096bbda77b983e642d21a4dd9bdde3ab73e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4ad34a0d20a5848c0fcbf6ff6a2ff1cd9cf4b9ed", - "reference": "4ad34a0d20a5848c0fcbf6ff6a2ff1cd9cf4b9ed", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/48325096bbda77b983e642d21a4dd9bdde3ab73e", + "reference": "48325096bbda77b983e642d21a4dd9bdde3ab73e", "shasum": "" }, "require": { - "php": ">=5.5.9", + "php": "^5.5.9|>=7.0.8", "psr/log": "~1.0", - "symfony/debug": "~2.8|~3.0", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/http-foundation": "~3.3" + "symfony/debug": "~2.8|~3.0|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/http-foundation": "^3.3.11|~4.0" }, "conflict": { "symfony/config": "<2.8", - "symfony/dependency-injection": "<3.3", - "symfony/var-dumper": "<3.3" + "symfony/dependency-injection": "<3.4", + "symfony/var-dumper": "<3.3", + "twig/twig": "<1.34|<2.4,>=2" + }, + "provide": { + "psr/log-implementation": "1.0" }, "require-dev": { "psr/cache": "~1.0", - "symfony/browser-kit": "~2.8|~3.0", + "symfony/browser-kit": "~2.8|~3.0|~4.0", "symfony/class-loader": "~2.8|~3.0", - "symfony/config": "~2.8|~3.0", - "symfony/console": "~2.8|~3.0", - "symfony/css-selector": "~2.8|~3.0", - "symfony/dependency-injection": "~3.3", - "symfony/dom-crawler": "~2.8|~3.0", - "symfony/expression-language": "~2.8|~3.0", - "symfony/finder": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0", - "symfony/routing": "~2.8|~3.0", - "symfony/stopwatch": "~2.8|~3.0", - "symfony/templating": "~2.8|~3.0", - "symfony/translation": "~2.8|~3.0", - "symfony/var-dumper": "~3.3" + "symfony/config": "~2.8|~3.0|~4.0", + "symfony/console": "~2.8|~3.0|~4.0", + "symfony/css-selector": "~2.8|~3.0|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/dom-crawler": "~2.8|~3.0|~4.0", + "symfony/expression-language": "~2.8|~3.0|~4.0", + "symfony/finder": "~2.8|~3.0|~4.0", + "symfony/process": "~2.8|~3.0|~4.0", + "symfony/routing": "~3.4|~4.0", + "symfony/stopwatch": "~2.8|~3.0|~4.0", + "symfony/templating": "~2.8|~3.0|~4.0", + "symfony/translation": "~2.8|~3.0|~4.0", + "symfony/var-dumper": "~3.3|~4.0" }, "suggest": { "symfony/browser-kit": "", - "symfony/class-loader": "", "symfony/config": "", "symfony/console": "", "symfony/dependency-injection": "", @@ -2271,7 +2375,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -2298,7 +2402,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2017-05-29T21:02:12+00:00" + "time": "2017-12-15T02:05:18+00:00" }, { "name": "symfony/polyfill-mbstring", @@ -2528,16 +2632,16 @@ }, { "name": "symfony/process", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "db25e810fd5e124085e3777257d0cf4ae533d0ea" + "reference": "bb3ef65d493a6d57297cad6c560ee04e2a8f5098" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/db25e810fd5e124085e3777257d0cf4ae533d0ea", - "reference": "db25e810fd5e124085e3777257d0cf4ae533d0ea", + "url": "https://api.github.com/repos/symfony/process/zipball/bb3ef65d493a6d57297cad6c560ee04e2a8f5098", + "reference": "bb3ef65d493a6d57297cad6c560ee04e2a8f5098", "shasum": "" }, "require": { @@ -2573,20 +2677,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-11-22T12:18:49+00:00" + "time": "2017-12-14T19:40:10+00:00" }, { "name": "symfony/routing", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "d768aa5b25d98188bae3fe4ce3eb2924c97aafac" + "reference": "5f248dfac5e4660c74982eb3dadc71cf58595570" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/d768aa5b25d98188bae3fe4ce3eb2924c97aafac", - "reference": "d768aa5b25d98188bae3fe4ce3eb2924c97aafac", + "url": "https://api.github.com/repos/symfony/routing/zipball/5f248dfac5e4660c74982eb3dadc71cf58595570", + "reference": "5f248dfac5e4660c74982eb3dadc71cf58595570", "shasum": "" }, "require": { @@ -2651,20 +2755,20 @@ "uri", "url" ], - "time": "2017-11-24T14:13:49+00:00" + "time": "2017-12-14T22:37:31+00:00" }, { "name": "symfony/translation", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "e05b0a5996ad7a35ba3a19ffad8b72c9daa64dfa" + "reference": "4c5d5582baf2829751a5207659329c1f52eedeb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/e05b0a5996ad7a35ba3a19ffad8b72c9daa64dfa", - "reference": "e05b0a5996ad7a35ba3a19ffad8b72c9daa64dfa", + "url": "https://api.github.com/repos/symfony/translation/zipball/4c5d5582baf2829751a5207659329c1f52eedeb6", + "reference": "4c5d5582baf2829751a5207659329c1f52eedeb6", "shasum": "" }, "require": { @@ -2719,20 +2823,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2017-11-27T14:23:00+00:00" + "time": "2017-12-12T08:27:14+00:00" }, { "name": "symfony/var-dumper", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "ec650a975a8e04e0c114d35eab732981243db3a2" + "reference": "757074cf71b952ce9e75b557538948811c2bf006" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ec650a975a8e04e0c114d35eab732981243db3a2", - "reference": "ec650a975a8e04e0c114d35eab732981243db3a2", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/757074cf71b952ce9e75b557538948811c2bf006", + "reference": "757074cf71b952ce9e75b557538948811c2bf006", "shasum": "" }, "require": { @@ -2788,7 +2892,7 @@ "debug", "dump" ], - "time": "2017-11-30T14:59:23+00:00" + "time": "2017-12-11T22:06:16+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -2839,34 +2943,38 @@ }, { "name": "twig/twig", - "version": "v1.30.0", + "version": "v1.35.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "c6ff71094fde15d12398eaba029434b013dc5e59" + "reference": "daa657073e55b0a78cce8fdd22682fddecc6385f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/c6ff71094fde15d12398eaba029434b013dc5e59", - "reference": "c6ff71094fde15d12398eaba029434b013dc5e59", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/daa657073e55b0a78cce8fdd22682fddecc6385f", + "reference": "daa657073e55b0a78cce8fdd22682fddecc6385f", "shasum": "" }, "require": { - "php": ">=5.2.7" + "php": ">=5.3.3" }, "require-dev": { + "psr/container": "^1.0", "symfony/debug": "~2.7", - "symfony/phpunit-bridge": "~3.2@dev" + "symfony/phpunit-bridge": "~3.3@dev" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.30-dev" + "dev-master": "1.35-dev" } }, "autoload": { "psr-0": { "Twig_": "lib/" + }, + "psr-4": { + "Twig\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -2896,7 +3004,7 @@ "keywords": [ "templating" ], - "time": "2016-12-23T11:06:22+00:00" + "time": "2017-09-27T18:06:46+00:00" }, { "name": "vlucas/phpdotenv", @@ -3002,25 +3110,44 @@ "packages-dev": [ { "name": "barryvdh/laravel-debugbar", - "version": "v2.4.3", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "d7c88f08131f6404cb714f3f6cf0642f6afa3903" + "reference": "01a859752094e00aa8548832312366753272f8af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/d7c88f08131f6404cb714f3f6cf0642f6afa3903", - "reference": "d7c88f08131f6404cb714f3f6cf0642f6afa3903", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/01a859752094e00aa8548832312366753272f8af", + "reference": "01a859752094e00aa8548832312366753272f8af", "shasum": "" }, "require": { - "illuminate/support": "5.1.*|5.2.*|5.3.*|5.4.*|5.5.*", - "maximebf/debugbar": "~1.13.0", - "php": ">=5.5.9", - "symfony/finder": "~2.7|~3.0" + "illuminate/routing": "5.5.x", + "illuminate/session": "5.5.x", + "illuminate/support": "5.5.x", + "maximebf/debugbar": "~1.14.0", + "php": ">=7.0", + "symfony/debug": "^3", + "symfony/finder": "^3" + }, + "require-dev": { + "illuminate/framework": "5.5.x" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\Debugbar\\ServiceProvider" + ], + "aliases": { + "Debugbar": "Barryvdh\\Debugbar\\Facade" + } + } + }, "autoload": { "psr-4": { "Barryvdh\\Debugbar\\": "src/" @@ -3047,7 +3174,7 @@ "profiler", "webprofiler" ], - "time": "2017-07-21T11:56:48+00:00" + "time": "2017-09-18T13:32:46+00:00" }, { "name": "barryvdh/laravel-ide-helper", @@ -3337,76 +3464,163 @@ "time": "2017-08-15T16:48:10+00:00" }, { - "name": "guzzle/guzzle", - "version": "v3.9.3", + "name": "guzzlehttp/guzzle", + "version": "6.3.0", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle3.git", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" + "url": "https://github.com/guzzle/guzzle.git", + "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", - "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", + "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", "shasum": "" }, "require": { - "ext-curl": "*", - "php": ">=5.3.3", - "symfony/event-dispatcher": "~2.1" - }, - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" }, "require-dev": { - "doctrine/cache": "~1.3", - "monolog/monolog": "~1.0", - "phpunit/phpunit": "3.7.*", - "psr/log": "~1.0", - "symfony/class-loader": "~2.1", - "zendframework/zend-cache": "2.*,<2.3", - "zendframework/zend-log": "2.*,<2.3" + "ext-curl": "*", + "phpunit/phpunit": "^4.0 || ^5.0", + "psr/log": "^1.0" }, "suggest": { - "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.9-dev" + "dev-master": "6.2-dev" } }, "autoload": { - "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2017-06-22T18:50:49+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], "authors": [ { "name": "Michael Dowling", @@ -3414,40 +3628,38 @@ "homepage": "https://github.com/mtdowling" }, { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" } ], - "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", - "homepage": "http://guzzlephp.org/", + "description": "PSR-7 message implementation that also provides common utility methods", "keywords": [ - "client", - "curl", - "framework", "http", - "http client", - "rest", - "web service" + "message", + "request", + "response", + "stream", + "uri", + "url" ], - "abandoned": "guzzlehttp/guzzle", - "time": "2015-03-18T18:23:50+00:00" + "time": "2017-03-20T17:10:46+00:00" }, { "name": "hamcrest/hamcrest-php", - "version": "v1.2.2", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c" + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b37020aa976fa52d3de9aa904aa2522dc518f79c", - "reference": "b37020aa976fa52d3de9aa904aa2522dc518f79c", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad", + "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": "^5.3|^7.0" }, "replace": { "cordoval/hamcrest-php": "*", @@ -3456,15 +3668,18 @@ }, "require-dev": { "phpunit/php-file-iterator": "1.3.3", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "^1.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "classmap": [ "hamcrest" - ], - "files": [ - "hamcrest/Hamcrest.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -3475,20 +3690,20 @@ "keywords": [ "test" ], - "time": "2015-05-11T14:41:42+00:00" + "time": "2016-01-20T08:20:44+00:00" }, { "name": "maximebf/debugbar", - "version": "1.13.1", + "version": "v1.14.1", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "afee79a236348e39a44cb837106b7c5b4897ac2a" + "reference": "64251a392344e3d22f3d21c3b7c531ba96eb01d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/afee79a236348e39a44cb837106b7c5b4897ac2a", - "reference": "afee79a236348e39a44cb837106b7c5b4897ac2a", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/64251a392344e3d22f3d21c3b7c531ba96eb01d2", + "reference": "64251a392344e3d22f3d21c3b7c531ba96eb01d2", "shasum": "" }, "require": { @@ -3507,7 +3722,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -3536,34 +3751,34 @@ "debug", "debugbar" ], - "time": "2017-01-05T08:46:19+00:00" + "time": "2017-09-13T12:19:36+00:00" }, { "name": "mockery/mockery", - "version": "0.9.9", + "version": "1.0", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "6fdb61243844dc924071d3404bb23994ea0b6856" + "reference": "1bac8c362b12f522fdd1f1fa3556284c91affa38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/6fdb61243844dc924071d3404bb23994ea0b6856", - "reference": "6fdb61243844dc924071d3404bb23994ea0b6856", + "url": "https://api.github.com/repos/mockery/mockery/zipball/1bac8c362b12f522fdd1f1fa3556284c91affa38", + "reference": "1bac8c362b12f522fdd1f1fa3556284c91affa38", "shasum": "" }, "require": { - "hamcrest/hamcrest-php": "~1.1", + "hamcrest/hamcrest-php": "~2.0", "lib-pcre": ">=7.0", - "php": ">=5.3.2" + "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~5.7|~6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.9.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -3588,7 +3803,7 @@ } ], "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", - "homepage": "http://github.com/padraic/mockery", + "homepage": "http://github.com/mockery/mockery", "keywords": [ "BDD", "TDD", @@ -3601,7 +3816,7 @@ "test double", "testing" ], - "time": "2017-02-28T12:52:32+00:00" + "time": "2017-10-06T16:20:43+00:00" }, { "name": "myclabs/deep-copy", @@ -3752,23 +3967,23 @@ }, { "name": "php-coveralls/php-coveralls", - "version": "v1.1.0", + "version": "v2.0.0", "source": { "type": "git", "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad" + "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad", - "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3eaf7eb689cdf6b86801a3843940d974dc657068", + "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068", "shasum": "" }, "require": { "ext-json": "*", "ext-simplexml": "*", - "guzzle/guzzle": "^2.8 || ^3.0", - "php": "^5.3.3 || ^7.0", + "guzzlehttp/guzzle": "^6.0", + "php": "^5.5 || ^7.0", "psr/log": "^1.0", "symfony/config": "^2.1 || ^3.0 || ^4.0", "symfony/console": "^2.1 || ^3.0 || ^4.0", @@ -3782,12 +3997,17 @@ "symfony/http-kernel": "Allows Symfony integration" }, "bin": [ - "bin/coveralls" + "bin/php-coveralls" ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, "autoload": { "psr-4": { - "Satooshi\\": "src/Satooshi/" + "PhpCoveralls\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -3798,7 +4018,24 @@ { "name": "Kitamura Satoshi", "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp" + "homepage": "https://www.facebook.com/satooshi.jp", + "role": "Original creator" + }, + { + "name": "Takashi Matsuo", + "email": "tmatsuo@google.com" + }, + { + "name": "Google Inc" + }, + { + "name": "Dariusz Ruminski", + "email": "dariusz.ruminski@gmail.com", + "homepage": "https://github.com/keradus" + }, + { + "name": "Contributors", + "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" } ], "description": "PHP client library for Coveralls API", @@ -3809,7 +4046,7 @@ "github", "test" ], - "time": "2017-12-06T23:17:56+00:00" + "time": "2017-12-08T14:28:16+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -4277,16 +4514,16 @@ }, { "name": "phpunit/phpunit", - "version": "6.5.3", + "version": "6.5.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "882e886cc928a0abd3c61282b2a64026237d14a4" + "reference": "83d27937a310f2984fd575686138597147bdc7df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/882e886cc928a0abd3c61282b2a64026237d14a4", - "reference": "882e886cc928a0abd3c61282b2a64026237d14a4", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/83d27937a310f2984fd575686138597147bdc7df", + "reference": "83d27937a310f2984fd575686138597147bdc7df", "shasum": "" }, "require": { @@ -4304,7 +4541,7 @@ "phpunit/php-file-iterator": "^1.4.3", "phpunit/php-text-template": "^1.2.1", "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^5.0.4", + "phpunit/phpunit-mock-objects": "^5.0.5", "sebastian/comparator": "^2.1", "sebastian/diff": "^2.0", "sebastian/environment": "^3.1", @@ -4357,27 +4594,27 @@ "testing", "xunit" ], - "time": "2017-12-06T09:42:03+00:00" + "time": "2017-12-17T06:31:19+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "5.0.4", + "version": "5.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "16b50f4167e5e85e81ca8a3dd105d0a5fd32009a" + "reference": "283b9f4f670e3a6fd6c4ff95c51a952eb5c75933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/16b50f4167e5e85e81ca8a3dd105d0a5fd32009a", - "reference": "16b50f4167e5e85e81ca8a3dd105d0a5fd32009a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/283b9f4f670e3a6fd6c4ff95c51a952eb5c75933", + "reference": "283b9f4f670e3a6fd6c4ff95c51a952eb5c75933", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.5", "php": "^7.0", "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.0" + "sebastian/exporter": "^3.1" }, "conflict": { "phpunit/phpunit": "<6.0" @@ -4416,7 +4653,57 @@ "mock", "xunit" ], - "time": "2017-12-02T05:31:19+00:00" + "time": "2017-12-10T08:01:53+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -4465,16 +4752,16 @@ }, { "name": "sebastian/comparator", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1174d9018191e93cb9d719edec01257fc05f8158" + "reference": "b11c729f95109b56a0fe9650c6a63a0fcd8c439f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1174d9018191e93cb9d719edec01257fc05f8158", - "reference": "1174d9018191e93cb9d719edec01257fc05f8158", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/b11c729f95109b56a0fe9650c6a63a0fcd8c439f", + "reference": "b11c729f95109b56a0fe9650c6a63a0fcd8c439f", "shasum": "" }, "require": { @@ -4525,7 +4812,7 @@ "compare", "equality" ], - "time": "2017-11-03T07:16:52+00:00" + "time": "2017-12-22T14:50:35+00:00" }, { "name": "sebastian/diff", @@ -4979,7 +5266,7 @@ }, { "name": "symfony/class-loader", - "version": "v3.4.1", + "version": "v3.4.2", "source": { "type": "git", "url": "https://github.com/symfony/class-loader.git", @@ -5035,16 +5322,16 @@ }, { "name": "symfony/config", - "version": "v4.0.1", + "version": "v4.0.2", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "6e6dbc6d2beff8117b974d74274bff02e43c32a6" + "reference": "0356e6d5298e9e72212c0bad65c2f1b49e42d622" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/6e6dbc6d2beff8117b974d74274bff02e43c32a6", - "reference": "6e6dbc6d2beff8117b974d74274bff02e43c32a6", + "url": "https://api.github.com/repos/symfony/config/zipball/0356e6d5298e9e72212c0bad65c2f1b49e42d622", + "reference": "0356e6d5298e9e72212c0bad65c2f1b49e42d622", "shasum": "" }, "require": { @@ -5091,20 +5378,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2017-11-20T18:22:57+00:00" + "time": "2017-12-14T19:48:22+00:00" }, { "name": "symfony/filesystem", - "version": "v4.0.1", + "version": "v4.0.2", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "c9d4a26759ff75a077e4e334315cb632739b661a" + "reference": "8c2868641d0c4885eee9c12a89c2b695eb1985cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/c9d4a26759ff75a077e4e334315cb632739b661a", - "reference": "c9d4a26759ff75a077e4e334315cb632739b661a", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/8c2868641d0c4885eee9c12a89c2b695eb1985cd", + "reference": "8c2868641d0c4885eee9c12a89c2b695eb1985cd", "shasum": "" }, "require": { @@ -5140,11 +5427,11 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2017-11-21T14:14:53+00:00" + "time": "2017-12-14T19:48:22+00:00" }, { "name": "symfony/stopwatch", - "version": "v4.0.1", + "version": "v4.0.2", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -5193,16 +5480,16 @@ }, { "name": "symfony/yaml", - "version": "v4.0.1", + "version": "v4.0.2", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "873417cb9949f07be8852d41e3be5ab6f09e1218" + "reference": "a5ee52d155f06ad23b19eb63c31228ff56ad1116" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/873417cb9949f07be8852d41e3be5ab6f09e1218", - "reference": "873417cb9949f07be8852d41e3be5ab6f09e1218", + "url": "https://api.github.com/repos/symfony/yaml/zipball/a5ee52d155f06ad23b19eb63c31228ff56ad1116", + "reference": "a5ee52d155f06ad23b19eb63c31228ff56ad1116", "shasum": "" }, "require": { @@ -5247,7 +5534,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-12-04T18:34:52+00:00" + "time": "2017-12-12T08:41:51+00:00" }, { "name": "theseer/tokenizer", @@ -5349,8 +5636,8 @@ "php": ">=7.1.0", "ext-bcmath": "*", "ext-curl": "*", - "ext-intl": "*", "ext-gd": "*", + "ext-intl": "*", "ext-mbstring": "*", "ext-zip": "*" }, diff --git a/config/app.php b/config/app.php index 36121a892f..9d5c96d992 100644 --- a/config/app.php +++ b/config/app.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -76,11 +76,11 @@ return [ FireflyIII\Providers\RouteServiceProvider::class, // own stuff: - //Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, - //Barryvdh\Debugbar\ServiceProvider::class, - DaveJamesMiller\Breadcrumbs\ServiceProvider::class, + // Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, + // Barryvdh\Debugbar\ServiceProvider::class, TwigBridge\ServiceProvider::class, - PragmaRX\Google2FA\Vendor\Laravel\ServiceProvider::class, + PragmaRX\Google2FALaravel\ServiceProvider::class, + /* * More service providers. @@ -141,14 +141,14 @@ return [ 'Twig' => TwigBridge\Facade\Twig::class, 'Form' => Collective\Html\FormFacade::class, 'Html' => Collective\Html\HtmlFacade::class, - 'Breadcrumbs' => DaveJamesMiller\Breadcrumbs\Facade::class, 'Preferences' => \FireflyIII\Support\Facades\Preferences::class, 'FireflyConfig' => \FireflyIII\Support\Facades\FireflyConfig::class, 'Navigation' => \FireflyIII\Support\Facades\Navigation::class, 'Amount' => \FireflyIII\Support\Facades\Amount::class, 'Steam' => \FireflyIII\Support\Facades\Steam::class, 'ExpandedForm' => \FireflyIII\Support\Facades\ExpandedForm::class, - 'Google2FA' => PragmaRX\Google2FA\Vendor\Laravel\Facade::class, + 'Google2FA' => PragmaRX\Google2FALaravel\Facade::class, + ], ]; diff --git a/config/auth.php b/config/auth.php index 73352da7a0..134d34926f 100644 --- a/config/auth.php +++ b/config/auth.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/config/breadcrumbs.php b/config/breadcrumbs.php new file mode 100644 index 0000000000..764f93c676 --- /dev/null +++ b/config/breadcrumbs.php @@ -0,0 +1,70 @@ + 'breadcrumbs::bootstrap3', + + /* + |-------------------------------------------------------------------------- + | Breadcrumbs File(s) + |-------------------------------------------------------------------------- + | + | The file(s) where breadcrumbs are defined. e.g. + | + | - base_path('routes/breadcrumbs.php') + | - glob(base_path('breadcrumbs/*.php')) + | + */ + + 'files' => base_path('routes/breadcrumbs.php'), + + /* + |-------------------------------------------------------------------------- + | Exceptions + |-------------------------------------------------------------------------- + | + | Determine when to throw an exception. + | + */ + + // When route-bound breadcrumbs are used but the current route doesn't have a name (UnnamedRouteException) + 'unnamed-route-exception' => true, + + // When route-bound breadcrumbs are used and the matching breadcrumb doesn't exist (InvalidBreadcrumbException) + 'missing-route-bound-breadcrumb-exception' => true, + + // When a named breadcrumb is used but doesn't exist (InvalidBreadcrumbException) + 'invalid-named-breadcrumb-exception' => true, + + /* + |-------------------------------------------------------------------------- + | Classes + |-------------------------------------------------------------------------- + | + | Subclass the default classes for more advanced customisations. + | + */ + + // Manager + 'manager-class' => DaveJamesMiller\Breadcrumbs\BreadcrumbsManager::class, + + // Generator + 'generator-class' => DaveJamesMiller\Breadcrumbs\BreadcrumbsGenerator::class, + +]; diff --git a/config/broadcasting.php b/config/broadcasting.php index 00c45c8caf..8d6ebe7ee5 100644 --- a/config/broadcasting.php +++ b/config/broadcasting.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/config/cache.php b/config/cache.php index c3360fdae1..d8ac011596 100644 --- a/config/cache.php +++ b/config/cache.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/config/csv.php b/config/csv.php index a10ea901ba..adf39792c3 100644 --- a/config/csv.php +++ b/config/csv.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -89,6 +89,12 @@ return [ 'converter' => 'BillId', 'mapper' => 'Bills', ], + 'note' => [ + 'mappable' => false, + 'pre-process-map' => false, + 'field' => 'note', + 'converter' => 'Note', + ], 'bill-name' => [ 'mappable' => true, 'pre-process-map' => false, @@ -175,16 +181,16 @@ return [ 'field' => 'budget', 'mapper' => 'Budgets', ], - 'rabo-debet-credit' => [ + 'rabo-debit-credit' => [ 'mappable' => false, 'pre-process-map' => false, - 'converter' => 'RabobankDebetCredit', + 'converter' => 'RabobankDebitCredit', 'field' => 'amount-modifier', ], - 'ing-debet-credit' => [ + 'ing-debit-credit' => [ 'mappable' => false, 'pre-process-map' => false, - 'converter' => 'INGDebetCredit', + 'converter' => 'INGDebitCredit', 'field' => 'amount-modifier', ], 'category-id' => [ @@ -280,11 +286,11 @@ return [ 'converter' => 'Amount', 'field' => 'amount', ], - 'amount_debet' => [ + 'amount_debit' => [ 'mappable' => false, 'pre-process-map' => false, - 'converter' => 'AmountDebet', - 'field' => 'amount_debet', + 'converter' => 'AmountDebit', + 'field' => 'amount_debit', ], 'amount_credit' => [ 'mappable' => false, diff --git a/config/database.php b/config/database.php index 352c2e6f7f..4f7fd754f6 100644 --- a/config/database.php +++ b/config/database.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/config/filesystems.php b/config/filesystems.php index e3b4962a76..1633b48e06 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/config/firefly.php b/config/firefly.php index 744d82cfc3..ba2d8eae30 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -28,39 +28,25 @@ declare(strict_types=1); */ return [ - 'configuration' => [ + 'configuration' => [ 'single_user_mode' => true, 'is_demo_site' => false, ], - 'encryption' => (is_null(env('USE_ENCRYPTION')) || env('USE_ENCRYPTION') === true), - 'version' => '4.6.11.1', - 'maxUploadSize' => 15242880, - 'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf','text/plain'], - 'list_length' => 10, - 'export_formats' => [ + 'encryption' => (is_null(env('USE_ENCRYPTION')) || env('USE_ENCRYPTION') === true), + 'version' => '4.6.12', + 'maxUploadSize' => 15242880, + 'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf', 'text/plain'], + 'list_length' => 10, + 'export_formats' => [ 'csv' => 'FireflyIII\Export\Exporter\CsvExporter', ], - 'import_formats' => [ - 'csv' => 'FireflyIII\Import\Configurator\CsvConfigurator', - ], - 'import_configurators' => [ - 'csv' => 'FireflyIII\Import\Configurator\CsvConfigurator', - ], - 'import_processors' => [ - 'csv' => 'FireflyIII\Import\FileProcessor\CsvProcessor', - ], - 'import_pre' => [ - 'bunq' => 'FireflyIII\Support\Import\Prerequisites\BunqPrerequisites', - ], - 'import_info' => [ - 'bunq' => 'FireflyIII\Support\Import\Information\BunqInformation', - ], - 'import_transactions' => [ - 'bunq' => 'FireflyIII\Support\Import\Transactions\BunqTransactions', - ], - 'bunq' => [ + 'bunq' => [ 'server' => 'https://sandbox.public.api.bunq.com', ], + 'spectre' => [ + 'server' => 'https://www.saltedge.com', + ], + 'default_export_format' => 'csv', 'default_import_format' => 'csv', 'bill_periods' => ['weekly', 'monthly', 'quarterly', 'half-year', 'yearly'], @@ -128,9 +114,10 @@ return [ 'languages' => [ // completed languages 'en_US' => ['name_locale' => 'English', 'name_english' => 'English'], - 'nl_NL' => ['name_locale' => 'Nederlands', 'name_english' => 'Dutch'], 'de_DE' => ['name_locale' => 'Deutsch', 'name_english' => 'German'], 'fr_FR' => ['name_locale' => 'Français', 'name_english' => 'French'], + 'id_ID' => ['name_locale' => 'Bahasa Indonesia', 'name_english' => 'Indonesian'], + 'nl_NL' => ['name_locale' => 'Nederlands', 'name_english' => 'Dutch'], 'pl_PL' => ['name_locale' => 'Polski', 'name_english' => 'Polish '], // incomplete languages: @@ -159,34 +146,38 @@ return [ ], 'bindables' => [ - 'account' => 'FireflyIII\Models\Account', - 'attachment' => 'FireflyIII\Models\Attachment', - 'bill' => 'FireflyIII\Models\Bill', - 'budget' => 'FireflyIII\Models\Budget', - 'category' => 'FireflyIII\Models\Category', - 'transaction_type' => 'FireflyIII\Models\TransactionType', + // models + 'account' => \FireflyIII\Models\Account::class, + 'attachment' => \FireflyIII\Models\Attachment::class, + 'bill' => \FireflyIII\Models\Bill::class, + 'budget' => \FireflyIII\Models\Budget::class, + 'category' => \FireflyIII\Models\Category::class, + 'linkType' => \FireflyIII\Models\LinkType::class, + 'transaction_type' => \FireflyIII\Models\TransactionType::class, 'journalLink' => \FireflyIII\Models\TransactionJournalLink::class, - 'currency' => 'FireflyIII\Models\TransactionCurrency', - 'fromCurrencyCode' => 'FireflyIII\Support\Binder\CurrencyCode', - 'toCurrencyCode' => 'FireflyIII\Support\Binder\CurrencyCode', - 'limitrepetition' => 'FireflyIII\Models\LimitRepetition', - 'budgetlimit' => 'FireflyIII\Models\BudgetLimit', - 'piggyBank' => 'FireflyIII\Models\PiggyBank', - 'tj' => 'FireflyIII\Models\TransactionJournal', - 'unfinishedJournal' => 'FireflyIII\Support\Binder\UnfinishedJournal', - 'tag' => 'FireflyIII\Models\Tag', - 'rule' => 'FireflyIII\Models\Rule', - 'ruleGroup' => 'FireflyIII\Models\RuleGroup', - 'jobKey' => 'FireflyIII\Models\ExportJob', - 'importJob' => 'FireflyIII\Models\ImportJob', - 'accountList' => 'FireflyIII\Support\Binder\AccountList', - 'budgetList' => 'FireflyIII\Support\Binder\BudgetList', - 'journalList' => 'FireflyIII\Support\Binder\JournalList', - 'categoryList' => 'FireflyIII\Support\Binder\CategoryList', - 'tagList' => 'FireflyIII\Support\Binder\TagList', - 'start_date' => 'FireflyIII\Support\Binder\Date', - 'end_date' => 'FireflyIII\Support\Binder\Date', - 'date' => 'FireflyIII\Support\Binder\Date', + 'currency' => \FireflyIII\Models\TransactionCurrency::class, + 'budgetlimit' => \FireflyIII\Models\BudgetLimit::class, + 'piggyBank' => \FireflyIII\Models\PiggyBank::class, + 'tj' => \FireflyIII\Models\TransactionJournal::class, + 'tag' => \FireflyIII\Models\Tag::class, + 'rule' => \FireflyIII\Models\Rule::class, + 'ruleGroup' => \FireflyIII\Models\RuleGroup::class, + 'exportJob' => \FireflyIII\Models\ExportJob::class, + 'importJob' => \FireflyIII\Models\ImportJob::class, + + // binders + 'fromCurrencyCode' => \FireflyIII\Support\Binder\CurrencyCode::class, + 'toCurrencyCode' => \FireflyIII\Support\Binder\CurrencyCode::class, + 'unfinishedJournal' => \FireflyIII\Support\Binder\UnfinishedJournal::class, + 'accountList' => \FireflyIII\Support\Binder\AccountList::class, + 'expenseList' => \FireflyIII\Support\Binder\AccountList::class, + 'budgetList' => \FireflyIII\Support\Binder\BudgetList::class, + 'journalList' => \FireflyIII\Support\Binder\JournalList::class, + 'categoryList' => \FireflyIII\Support\Binder\CategoryList::class, + 'tagList' => \FireflyIII\Support\Binder\TagList::class, + 'start_date' => \FireflyIII\Support\Binder\Date::class, + 'end_date' => \FireflyIII\Support\Binder\Date::class, + 'date' => \FireflyIII\Support\Binder\Date::class, ], 'rule-triggers' => [ 'user_action' => 'FireflyIII\TransactionRules\Triggers\UserAction', diff --git a/config/google2fa.php b/config/google2fa.php new file mode 100644 index 0000000000..e04f5e0b76 --- /dev/null +++ b/config/google2fa.php @@ -0,0 +1,68 @@ + true, + + /* + * Lifetime in minutes. + * In case you need your users to be asked for a new one time passwords from time to time. + */ + + 'lifetime' => 0, // 0 = eternal + + /* + * Renew lifetime at every new request. + */ + + 'keep_alive' => true, + + /* + * Auth container binding + */ + + 'auth' => 'auth', + + /* + * 2FA verified session var + */ + + 'session_var' => 'google2fa', + + /* + * One Time Password request input name + */ + 'otp_input' => 'one_time_password', + + /* + * One Time Password Window + */ + 'window' => 1, + + /* + * Forbid user to reuse One Time Passwords. + */ + 'forbid_old_passwords' => false, + + /* + * User's table column for google2fa secret + */ + 'otp_secret_column' => 'google2fa_secret', + + /* + * One Time Password View + */ + 'view' => 'google2fa.index', + + /* + * One Time Password error message + */ + 'error_messages' => [ + 'wrong_otp' => "The 'One Time Password' typed was wrong.", + ], + +]; diff --git a/config/import.php b/config/import.php new file mode 100644 index 0000000000..003d0ac062 --- /dev/null +++ b/config/import.php @@ -0,0 +1,78 @@ +. + */ + +declare(strict_types=1); + +return [ + 'enabled' => [ + 'file' => true, + 'bunq' => false, + 'spectre' => true, + 'plaid' => false, + ], + 'prerequisites' => [ + 'file' => 'FireflyIII\Import\Prerequisites\FilePrerequisites', + 'bunq' => 'FireflyIII\Import\Prerequisites\BunqPrerequisites', + 'spectre' => 'FireflyIII\Import\Prerequisites\SpectrePrerequisites', + 'plaid' => 'FireflyIII\Import\Prerequisites\PlaidPrerequisites', + + ], + 'configuration' => [ + 'file' => 'FireflyIII\Import\Configuration\FileConfigurator', + 'bunq' => 'FireflyIII\Import\Configuration\BunqConfigurator', + 'spectre' => 'FireflyIII\Import\Configuration\SpectreConfigurator', + 'plaid' => 'FireflyIII\Import\Configuration\PlaidConfigurator', + ], + 'routine' => [ + 'file' => 'FireflyIII\Import\Routine\FileRoutine', + 'bunq' => 'FireflyIII\Import\Routine\BunqRoutine', + 'spectre' => 'FireflyIII\Import\Routine\SpectreRoutine', + 'plaid' => 'FireflyIII\Import\Routine\PlaidRoutine', + ], + + 'options' => [ + 'file' => [ + 'import_formats' => ['csv'], // mt940 + 'default_import_format' => 'csv', + 'processors' => [ + 'csv' => 'FireflyIII\Import\FileProcessor\CsvProcessor', + ], + ], + ], + 'default_config' => [ + 'file' => [ + 'has-config-file' => true, + 'auto-start' => false, + ], + 'bunq' => [ + 'has-config-file' => false, + 'auto-start' => true, + ], + 'spectre' => [ + 'has-config-file' => false, + 'auto-start' => true, + ], + 'plaid' => [ + 'has-config-file' => false, + 'auto-start' => true, + ], + ], +]; diff --git a/config/intro.php b/config/intro.php index 24c4f1fc8a..dafcb13bac 100644 --- a/config/intro.php +++ b/config/intro.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -37,7 +37,7 @@ return [ ], // accounts: create 'accounts_create' => [ - 'iban' => ['element' => '#ffInput_iban'], + 'iban' => ['element' => '#ffInput_iban'], ], // extra text for asset account creation. 'accounts_create_asset' => [ diff --git a/config/mail.php b/config/mail.php index 82d77cdcfe..85ed8227d4 100644 --- a/config/mail.php +++ b/config/mail.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/config/queue.php b/config/queue.php index 171e9babc5..a3d2a3e528 100644 --- a/config/queue.php +++ b/config/queue.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/config/services.php b/config/services.php index 8b9e73ff36..01c5a3d90e 100644 --- a/config/services.php +++ b/config/services.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/config/session.php b/config/session.php index 3ca75340f1..a478a0cde3 100644 --- a/config/session.php +++ b/config/session.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/config/twigbridge.php b/config/twigbridge.php index df96c93a2d..5d7467be5b 100644 --- a/config/twigbridge.php +++ b/config/twigbridge.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); @@ -160,7 +160,7 @@ return [ 'facades' => [ 'Breadcrumbs' => [ 'is_safe' => [ - 'renderIfExists', + 'render', ], ], 'Session', diff --git a/config/upgrade.php b/config/upgrade.php index d0f6e5b716..7164d9991d 100644 --- a/config/upgrade.php +++ b/config/upgrade.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/config/view.php b/config/view.php index b4eea48aab..28b72fedb1 100644 --- a/config/view.php +++ b/config/view.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php index 85bedc97cf..db84ef623b 100644 --- a/database/factories/ModelFactory.php +++ b/database/factories/ModelFactory.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/migrations/2016_06_16_000000_create_support_tables.php b/database/migrations/2016_06_16_000000_create_support_tables.php index b47de14d0b..0adc8d6ddc 100644 --- a/database/migrations/2016_06_16_000000_create_support_tables.php +++ b/database/migrations/2016_06_16_000000_create_support_tables.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); @@ -150,7 +160,7 @@ class CreateSupportTables extends Migration // straight from laravel $table->string('email')->index(); $table->string('token')->index(); - $table->timestamp('created_at'); + $table->timestamp('created_at')->nullable(); } ); } diff --git a/database/migrations/2016_06_16_000001_create_users_table.php b/database/migrations/2016_06_16_000001_create_users_table.php index 52573e8b1f..551bfa748f 100644 --- a/database/migrations/2016_06_16_000001_create_users_table.php +++ b/database/migrations/2016_06_16_000001_create_users_table.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); 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 edc7eb3b36..09e547b800 100644 --- a/database/migrations/2016_06_16_000002_create_main_tables.php +++ b/database/migrations/2016_06_16_000002_create_main_tables.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/migrations/2016_08_25_091522_changes_for_3101.php b/database/migrations/2016_08_25_091522_changes_for_3101.php index 4a9c2a33ec..5fabe0ffe0 100644 --- a/database/migrations/2016_08_25_091522_changes_for_3101.php +++ b/database/migrations/2016_08_25_091522_changes_for_3101.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/migrations/2016_09_12_121359_fix_nullables.php b/database/migrations/2016_09_12_121359_fix_nullables.php index 164e3e5236..606e08f4b9 100644 --- a/database/migrations/2016_09_12_121359_fix_nullables.php +++ b/database/migrations/2016_09_12_121359_fix_nullables.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); 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 2e33905fd8..a6ae3345a2 100644 --- a/database/migrations/2016_10_09_150037_expand_transactions_table.php +++ b/database/migrations/2016_10_09_150037_expand_transactions_table.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/migrations/2016_10_22_075804_changes_for_v410.php b/database/migrations/2016_10_22_075804_changes_for_v410.php index b3931aeb78..227d40732e 100644 --- a/database/migrations/2016_10_22_075804_changes_for_v410.php +++ b/database/migrations/2016_10_22_075804_changes_for_v410.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/migrations/2016_11_24_210552_changes_for_v420.php b/database/migrations/2016_11_24_210552_changes_for_v420.php index 1ca2c5b652..9f209d531d 100644 --- a/database/migrations/2016_11_24_210552_changes_for_v420.php +++ b/database/migrations/2016_11_24_210552_changes_for_v420.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/migrations/2016_12_22_150431_changes_for_v430.php b/database/migrations/2016_12_22_150431_changes_for_v430.php index 57be784576..f35038fcb8 100644 --- a/database/migrations/2016_12_22_150431_changes_for_v430.php +++ b/database/migrations/2016_12_22_150431_changes_for_v430.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/migrations/2016_12_28_203205_changes_for_v431.php b/database/migrations/2016_12_28_203205_changes_for_v431.php index 9beb9fd9f6..10168fb337 100644 --- a/database/migrations/2016_12_28_203205_changes_for_v431.php +++ b/database/migrations/2016_12_28_203205_changes_for_v431.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/migrations/2017_04_13_163623_changes_for_v440.php b/database/migrations/2017_04_13_163623_changes_for_v440.php index be6aa0e697..c5829ec619 100644 --- a/database/migrations/2017_04_13_163623_changes_for_v440.php +++ b/database/migrations/2017_04_13_163623_changes_for_v440.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/migrations/2017_06_02_105232_changes_for_v450.php b/database/migrations/2017_06_02_105232_changes_for_v450.php index dbc92fe4da..4df00f1393 100644 --- a/database/migrations/2017_06_02_105232_changes_for_v450.php +++ b/database/migrations/2017_06_02_105232_changes_for_v450.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/migrations/2017_08_20_062014_changes_for_v470.php b/database/migrations/2017_08_20_062014_changes_for_v470.php index 0f1173a17f..fc42fba920 100644 --- a/database/migrations/2017_08_20_062014_changes_for_v470.php +++ b/database/migrations/2017_08_20_062014_changes_for_v470.php @@ -1,5 +1,23 @@ . + */ declare(strict_types=1); use Illuminate\Database\Migrations\Migration; diff --git a/database/migrations/2017_11_04_170844_changes_for_v470a.php b/database/migrations/2017_11_04_170844_changes_for_v470a.php index 6ebbdb0a23..b2d1f603cc 100644 --- a/database/migrations/2017_11_04_170844_changes_for_v470a.php +++ b/database/migrations/2017_11_04_170844_changes_for_v470a.php @@ -1,11 +1,32 @@ . + */ declare(strict_types=1); use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; +/** + * Class ChangesForV470a + */ class ChangesForV470a extends Migration { /** diff --git a/database/seeds/AccountTypeSeeder.php b/database/seeds/AccountTypeSeeder.php index 2a1b072141..c59597e880 100644 --- a/database/seeds/AccountTypeSeeder.php +++ b/database/seeds/AccountTypeSeeder.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 11505d148a..de5a134985 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/seeds/LinkTypeSeeder.php b/database/seeds/LinkTypeSeeder.php index 4662d0820c..c8d0266ca6 100644 --- a/database/seeds/LinkTypeSeeder.php +++ b/database/seeds/LinkTypeSeeder.php @@ -2,10 +2,21 @@ /** * LinkTypeSeeder.php * Copyright (c) 2017 thegrumpydictator@gmail.com - * This software may be modified and distributed under the terms of the - * Creative Commons Attribution-ShareAlike 4.0 International License. * - * See the LICENSE file for details. + * This file is part of Firefly III. + * + * Firefly III is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Firefly III is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Firefly III. If not, see . */ declare(strict_types=1); diff --git a/database/seeds/PermissionSeeder.php b/database/seeds/PermissionSeeder.php index f24ef6b1c0..13690c8d62 100644 --- a/database/seeds/PermissionSeeder.php +++ b/database/seeds/PermissionSeeder.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/seeds/TransactionCurrencySeeder.php b/database/seeds/TransactionCurrencySeeder.php index 31b3650681..99552db096 100644 --- a/database/seeds/TransactionCurrencySeeder.php +++ b/database/seeds/TransactionCurrencySeeder.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/database/seeds/TransactionTypeSeeder.php b/database/seeds/TransactionTypeSeeder.php index f12c118758..7bed4bd7f9 100644 --- a/database/seeds/TransactionTypeSeeder.php +++ b/database/seeds/TransactionTypeSeeder.php @@ -1,12 +1,22 @@ . */ declare(strict_types=1); diff --git a/docker-compose.dockerhub.yml b/docker-compose.dockerhub.yml deleted file mode 100644 index 9efec01696..0000000000 --- a/docker-compose.dockerhub.yml +++ /dev/null @@ -1,33 +0,0 @@ -version: '2' -services: - firefly-db: - image: mysql:8 - environment: - - MYSQL_DATABASE=firefly_db - - MYSQL_USER=firefly_db - - MYSQL_PASSWORD=firefly_db_secret - - MYSQL_RANDOM_ROOT_PASSWORD=yes - volumes: - - firefly-storage:/var/lib/mysql - - firefly-app: - image: 'jc5x/firefly-iii' - environment: - - FF_DB_HOST=firefly-db - - FF_DB_NAME=firefly_db - - FF_DB_USER=firefly_db - - FF_DB_PASSWORD=firefly_db_secret - - FF_APP_KEY=SomeRandomStringOf32CharsExactly - - FF_APP_ENV=local - ports: - - "9001:80" - links: - - firefly-db - volumes: - - firefly-app-storage:/var/www/firefly-iii/storage - -volumes: - firefly-storage: - driver: local - firefly-app-storage: - driver: local \ No newline at end of file diff --git a/docker-compose.override.yml b/docker-compose.override.yml deleted file mode 100644 index c8ce8bea02..0000000000 --- a/docker-compose.override.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: '2' - -services: - firefly-db: - volumes: - - firefly-dev-storage:/var/lib/mysql - firefly-app: - volumes: - - .:/var/www/firefly-iii - environment: - - INIT_DATABASE=yes - - FF_APP_ENV=development - -volumes: - firefly-dev-storage: - driver: local diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml deleted file mode 100644 index 4ae95111a1..0000000000 --- a/docker-compose.prod.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: '2' - -services: - firefly-app: - environment: - - FF_APP_ENV=local - volumes: - - firefly-app-storage:/var/www/firefly-iii/storage - -volumes: - firefly-app-storage: - driver: local diff --git a/docker-compose.yml b/docker-compose.yml index 6c411857eb..47af6350d2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,6 @@ -version: '2' - +version: '3.2' services: - firefly-db: + firefly_iii_db: image: mysql:8 environment: - MYSQL_DATABASE=firefly_db @@ -9,23 +8,29 @@ services: - MYSQL_PASSWORD=firefly_db_secret - MYSQL_RANDOM_ROOT_PASSWORD=yes volumes: - - firefly-storage:/var/lib/mysql - - firefly-app: - image: firefly-iii - build: . + - firefly_iii_db:/var/lib/mysql + firefly_iii_app: + image: jc5x/firefly-iii environment: - - FF_DB_HOST=firefly-db + - FF_DB_HOST=firefly_iii_db - FF_DB_NAME=firefly_db - FF_DB_USER=firefly_db - FF_DB_PASSWORD=firefly_db_secret - - FF_APP_KEY=SomeRandomStringOf32CharsExactly + - FF_APP_KEY=S0m3R@nd0mStr1ngOf32Ch@rsEx@ctly - FF_APP_ENV=local ports: - "80:80" + volumes: + - type: volume + source: firefly_iii_export + target: /var/www/firefly-iii/storage/export + - type: volume + source: firefly_iii_upload + target: /var/www/firefly-iii/storage/upload links: - - firefly-db + - firefly_iii_db volumes: - firefly-storage: - driver: local + firefly_iii_db: + firefly_iii_export: + firefly_iii_upload: diff --git a/docker/docker.env b/docker/docker.env new file mode 100644 index 0000000000..7ba55b06fe --- /dev/null +++ b/docker/docker.env @@ -0,0 +1,6 @@ +FF_APP_ENV=local +FF_APP_KEY=S0m3R@nd0mString0f32Ch@rsEx@ct1y +FF_DB_HOST= +FF_DB_NAME= +FF_DB_USER= +FF_DB_PASSWORD= \ No newline at end of file diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 5f6409bf3b..088a999742 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,5 +1,8 @@ #!/bin/bash +# make sure we own the volumes: +chown -R www-data:www-data $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload +chmod -R 775 $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload cat .env.docker | envsubst > .env && cat .env composer dump-autoload diff --git a/phpunit.coverage.xml b/phpunit.coverage.xml index 0df946fb6b..1f52d8a767 100644 --- a/phpunit.coverage.xml +++ b/phpunit.coverage.xml @@ -1,13 +1,4 @@ - - . + ~ along with Firefly III. If not, see . --> diff --git a/public/css/firefly.css b/public/css/firefly.css index b1224ebcdc..3f783c50c2 100644 --- a/public/css/firefly.css +++ b/public/css/firefly.css @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ #daterange { diff --git a/public/css/google-fonts.css b/public/css/google-fonts.css index 3647aa35a3..fcc127cf4b 100644 --- a/public/css/google-fonts.css +++ b/public/css/google-fonts.css @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /* cyrillic-ext */ diff --git a/public/images/logos/bunq.png b/public/images/logos/bunq.png index c1223bc4fc..fad92342b7 100644 Binary files a/public/images/logos/bunq.png and b/public/images/logos/bunq.png differ diff --git a/public/images/logos/csv.png b/public/images/logos/csv.png new file mode 100644 index 0000000000..6b71776154 Binary files /dev/null and b/public/images/logos/csv.png differ diff --git a/public/images/logos/file.png b/public/images/logos/file.png new file mode 100644 index 0000000000..0024f8af41 Binary files /dev/null and b/public/images/logos/file.png differ diff --git a/public/images/logos/plaid.png b/public/images/logos/plaid.png new file mode 100644 index 0000000000..23187ce8aa Binary files /dev/null and b/public/images/logos/plaid.png differ diff --git a/public/images/logos/spectre.png b/public/images/logos/spectre.png new file mode 100644 index 0000000000..6c2189e96c Binary files /dev/null and b/public/images/logos/spectre.png differ diff --git a/public/index.php b/public/index.php index abea8072d8..eedd6e418e 100644 --- a/public/index.php +++ b/public/index.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** diff --git a/public/js/ff/accounts/create.js b/public/js/ff/accounts/create.js index 96c7468811..ddf5207587 100644 --- a/public/js/ff/accounts/create.js +++ b/public/js/ff/accounts/create.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: Modernizr, currencies */ diff --git a/public/js/ff/accounts/edit-reconciliation.js b/public/js/ff/accounts/edit-reconciliation.js index cbcbcd7e42..b32e6da5f8 100644 --- a/public/js/ff/accounts/edit-reconciliation.js +++ b/public/js/ff/accounts/edit-reconciliation.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: what, Modernizr, selectsForeignCurrency, convertForeignToNative, validateCurrencyForTransfer, convertSourceToDestination, journalData, journal, accountInfo, exchangeRateInstructions, currencyInfo */ diff --git a/public/js/ff/accounts/edit.js b/public/js/ff/accounts/edit.js index ca2ec6ff90..0f8d1922be 100644 --- a/public/js/ff/accounts/edit.js +++ b/public/js/ff/accounts/edit.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: Modernizr, currencies */ diff --git a/public/js/ff/accounts/reconcile.js b/public/js/ff/accounts/reconcile.js index 6609efd287..4f1b46666d 100644 --- a/public/js/ff/accounts/reconcile.js +++ b/public/js/ff/accounts/reconcile.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: overviewUri, transactionsUri, indexUri,accounting */ @@ -36,10 +36,12 @@ $(function () { Respond to changes in balance statements. */ $('input[type="number"]').on('change', function () { + console.log('On change number input.'); if (reconcileStarted) { calculateBalanceDifference(); difference = balanceDifference - selectedAmount; updateDifference(); + } changedBalances = true; }); @@ -48,6 +50,7 @@ $(function () { Respond to changes in the date range. */ $('input[type="date"]').on('change', function () { + console.log('On change date input.'); if (reconcileStarted) { // hide original instructions. $('.select_transactions_instruction').hide(); @@ -67,16 +70,19 @@ $(function () { }); function storeReconcile() { + console.log('In storeReconcile.'); // get modal HTML: var ids = []; $.each($('.reconcile_checkbox:checked'), function (i, v) { ids.push($(v).data('id')); }); + console.log('Ids is ' + ids); var cleared = []; $.each($('input[class="cleared"]'), function (i, v) { var obj = $(v); cleared.push(obj.data('id')); }); + console.log('Cleared is ' + ids); var variables = { startBalance: parseFloat($('input[name="start_balance"]').val()), @@ -90,9 +96,7 @@ function storeReconcile() { $.getJSON(uri, variables).done(function (data) { - if (data.is_zero === false) { - $('#defaultModal').empty().html(data.html).modal('show'); - } + $('#defaultModal').empty().html(data.html).modal('show'); }); } @@ -101,6 +105,7 @@ function storeReconcile() { * @param e */ function checkReconciledBox(e) { + console.log('In checkReconciledBox.'); var el = $(e.target); var amount = parseFloat(el.val()); // if checked, add to selected amount @@ -120,6 +125,7 @@ function checkReconciledBox(e) { * and put it in balanceDifference. */ function calculateBalanceDifference() { + console.log('In calculateBalanceDifference.'); var startBalance = parseFloat($('input[name="start_balance"]').val()); var endBalance = parseFloat($('input[name="end_balance"]').val()); balanceDifference = startBalance - endBalance; @@ -133,6 +139,7 @@ function calculateBalanceDifference() { * This more or less resets the reconciliation. */ function getTransactionsForRange() { + console.log('In getTransactionsForRange.'); // clear out the box: $('#transactions_holder').empty().append($('

').addClass('text-center').html('')); var uri = transactionsUri.replace('%start%', $('input[name="start_date"]').val()).replace('%end%', $('input[name="end_date"]').val()); @@ -147,6 +154,7 @@ function getTransactionsForRange() { * */ function includeClearedTransactions() { + console.log('In includeClearedTransactions.'); $.each($('input[class="cleared"]'), function (i, v) { var obj = $(v); if (obj.data('younger') === false) { @@ -160,6 +168,7 @@ function includeClearedTransactions() { * @param data */ function placeTransactions(data) { + console.log('In placeTransactions.'); $('#transactions_holder').empty().html(data.html); selectedAmount = 0; // update start + end balance when user has not touched them. @@ -174,7 +183,7 @@ function placeTransactions(data) { // any already cleared transactions must be added to / removed from selectedAmount. includeClearedTransactions(); - difference = balanceDifference; + difference = balanceDifference - selectedAmount; updateDifference(); // enable the check buttons: @@ -191,7 +200,7 @@ function placeTransactions(data) { * @returns {boolean} */ function startReconcile() { - + console.log('In startReconcile.'); reconcileStarted = true; // hide the start button. @@ -213,6 +222,7 @@ function startReconcile() { } function updateDifference() { + console.log('In updateDifference.'); var addClass = 'text-info'; if (difference > 0) { addClass = 'text-success'; diff --git a/public/js/ff/accounts/show.js b/public/js/ff/accounts/show.js index 30bb012a93..ba77ebff95 100644 --- a/public/js/ff/accounts/show.js +++ b/public/js/ff/accounts/show.js @@ -15,10 +15,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ -/** global: chartUri, incomeCategoryUri, expenseCategoryUri, expenseBudgetUri */ +/** global: chartUri, incomeCategoryUri, expenseCategoryUri, expenseBudgetUri, token */ var fixHelper = function (e, tr) { "use strict"; @@ -96,7 +96,7 @@ function sortStop(event, ui) { }); // do extra animation when done? - $.post('transactions/reorder', {items: submit, date: thisDate}); + $.post('transactions/reorder', {items: submit, date: thisDate, _token: token}); current.animate({backgroundColor: "#5cb85c"}, 200, function () { $(this).animate({backgroundColor: originalBG}, 200); diff --git a/public/js/ff/admin/update/index.js b/public/js/ff/admin/update/index.js new file mode 100644 index 0000000000..d02d0ad23f --- /dev/null +++ b/public/js/ff/admin/update/index.js @@ -0,0 +1,42 @@ +/* + * index.js + * Copyright (c) 2017 thegrumpydictator@gmail.com + * + * This file is part of Firefly III. + * + * Firefly III is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Firefly III is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Firefly III. If not, see . + */ + +/** global: updateCheckUri */ + +$(function () { + "use strict"; + + // Enable update button. + + $('#update').click(checkUpdate); +}); + +function checkUpdate() { + + // do post update check: + $.post(updateCheckUri).done(function (data) { + alert(data.result); + }).fail(function () { + alert('Error while checking.'); + }); + + + return false; +} \ No newline at end of file diff --git a/public/js/ff/bills/create.js b/public/js/ff/bills/create.js index 132ff358f2..2e679a5de7 100644 --- a/public/js/ff/bills/create.js +++ b/public/js/ff/bills/create.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: Modernizr */ diff --git a/public/js/ff/bills/edit.js b/public/js/ff/bills/edit.js index 9d4416b9ba..eacac841c7 100644 --- a/public/js/ff/bills/edit.js +++ b/public/js/ff/bills/edit.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: Modernizr */ diff --git a/public/js/ff/bills/show.js b/public/js/ff/bills/show.js index 87b67f89c7..39ef1ca95e 100644 --- a/public/js/ff/bills/show.js +++ b/public/js/ff/bills/show.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: billUri */ diff --git a/public/js/ff/budgets/index.js b/public/js/ff/budgets/index.js index 0fc5f64cc6..6a36dae5a0 100644 --- a/public/js/ff/budgets/index.js +++ b/public/js/ff/budgets/index.js @@ -15,10 +15,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ -/** global: infoIncomeUri, spent, budgeted, available, currencySymbol, budgetIndexUri, updateIncomeUri, periodStart, periodEnd, budgetAmountUri, accounting */ +/** global: infoIncomeUri, token, spent, budgeted, available, currencySymbol, budgetIndexUri, updateIncomeUri, periodStart, periodEnd, budgetAmountUri, accounting */ /** * */ @@ -104,7 +104,7 @@ function updateBudgetedAmounts(e) { var target = $(e.target); var id = target.data('id'); var leftCell = $('td[class$="left"][data-id="' + id + '"]'); - var link = $('a[data-id="'+id+'"][class="budget-link"]'); + var link = $('a[data-id="' + id + '"][class="budget-link"]'); var value = target.val(); var original = target.data('original'); @@ -112,7 +112,7 @@ function updateBudgetedAmounts(e) { target.prop('disabled', true); // replace link (for now) - link.attr('href','#'); + link.attr('href', '#'); // replace "left" with spinner. leftCell.empty().html(''); @@ -120,7 +120,7 @@ function updateBudgetedAmounts(e) { // send a post to Firefly to update the amount: var newUri = budgetAmountUri.replace("REPLACE", id); - $.post(newUri, {amount: value, start: periodStart, end: periodEnd}).done(function (data) { + $.post(newUri, {amount: value, start: periodStart, end: periodEnd, _token: token}).done(function (data) { // difference between new value and original value var difference = value - original; diff --git a/public/js/ff/budgets/show.js b/public/js/ff/budgets/show.js index debfb93f40..75ac5ade1b 100644 --- a/public/js/ff/budgets/show.js +++ b/public/js/ff/budgets/show.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: budgetChartUri, expenseCategoryUri, expenseAssetUri, expenseExpenseUri, budgetLimitID */ diff --git a/public/js/ff/categories/index.js b/public/js/ff/categories/index.js index 4927cb3c71..2dabe84bc2 100644 --- a/public/js/ff/categories/index.js +++ b/public/js/ff/categories/index.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ $(function () { diff --git a/public/js/ff/categories/show-by-date.js b/public/js/ff/categories/show-by-date.js index 8c85156d2a..5ff90192f8 100644 --- a/public/js/ff/categories/show-by-date.js +++ b/public/js/ff/categories/show-by-date.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: specific */ diff --git a/public/js/ff/categories/show.js b/public/js/ff/categories/show.js index 841b4d9428..8b83ac44a5 100644 --- a/public/js/ff/categories/show.js +++ b/public/js/ff/categories/show.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: everything, current, specific */ diff --git a/public/js/ff/charts.defaults.js b/public/js/ff/charts.defaults.js index a3395ceac0..e2764d5567 100644 --- a/public/js/ff/charts.defaults.js +++ b/public/js/ff/charts.defaults.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: accounting */ @@ -29,40 +29,37 @@ * @param maxwidth * @returns {Array} */ -function formatLabel(str, maxwidth){ +function formatLabel(str, maxwidth) { var sections = []; var words = str.split(" "); var temp = ""; - words.forEach(function(item, index){ - if(temp.length > 0) - { + words.forEach(function (item, index) { + if (temp.length > 0) { var concat = temp + ' ' + item; - if(concat.length > maxwidth){ + if (concat.length > maxwidth) { sections.push(temp); temp = ""; } - else{ - if(index === (words.length-1)) - { + else { + if (index === (words.length - 1)) { sections.push(concat); return; } - else{ + else { temp = concat; return; } } } - if(index === (words.length-1)) - { + if (index === (words.length - 1)) { sections.push(item); return; } - if(item.length < maxwidth) { + if (item.length < maxwidth) { temp = item; } else { diff --git a/public/js/ff/charts.js b/public/js/ff/charts.js index d69efc3f66..a67009b729 100644 --- a/public/js/ff/charts.js +++ b/public/js/ff/charts.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: Chart, defaultChartOptions, accounting, defaultPieOptions, noDataForChart, todayText */ var allCharts = {}; diff --git a/public/js/ff/export/index.js b/public/js/ff/export/index.js index b446b20f03..6bd496b5c0 100644 --- a/public/js/ff/export/index.js +++ b/public/js/ff/export/index.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: jobKey, Modernizr */ @@ -44,6 +44,7 @@ $(function () { function startExport() { "use strict"; + console.log('startExport'); hideForm(); showLoading(); hideError(); diff --git a/public/js/ff/firefly.js b/public/js/ff/firefly.js index 855ccff7d3..d0218514de 100644 --- a/public/js/ff/firefly.js +++ b/public/js/ff/firefly.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: moment, token, dateRangeMeta,dateRangeConfig, accountingConfig, accounting, currencySymbol, mon_decimal_point, frac_digits, showFullList, showOnlyTop, mon_thousands_sep */ diff --git a/public/js/ff/guest.js b/public/js/ff/guest.js index eea7ea3202..fcebc44abf 100644 --- a/public/js/ff/guest.js +++ b/public/js/ff/guest.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ $(function () { diff --git a/public/js/ff/help.js b/public/js/ff/help.js index 49a45b732a..9e7280b1c0 100644 --- a/public/js/ff/help.js +++ b/public/js/ff/help.js @@ -15,9 +15,9 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ - +/** global: token */ $(function () { "use strict"; $('#help').click(showHelp); @@ -50,7 +50,7 @@ function showHelp(e) { } function enableGuidance(route, specialPage) { - $.post('json/intro/enable/' + route + '/' + specialPage).done(function (data) { + $.post('json/intro/enable/' + route + '/' + specialPage, {_token: token}).done(function (data) { alert(data.message); }).fail(function () { alert('Could not re-enable introduction.'); diff --git a/public/js/ff/import/status.js b/public/js/ff/import/status.js index 09a1aaeae3..c05560cafd 100644 --- a/public/js/ff/import/status.js +++ b/public/js/ff/import/status.js @@ -15,10 +15,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ -/** global: jobImportUrl, langImportSingleError, langImportMultiError, jobStartUrl, langImportTimeOutError, langImportFinished, langImportFatalError */ +/** global: job, langImportSingleError, langImportMultiError, jobStartUrl, langImportTimeOutError, langImportFinished, langImportFatalError */ var timeOutId; var startInterval = 1000; @@ -34,21 +34,29 @@ var knownErrors = 0; $(function () { "use strict"; - timeOutId = setTimeout(checkImportStatus, startInterval); + console.log('in start'); + timeOutId = setTimeout(checkJobStatus, startInterval); + $('.start-job').click(startJob); + if (job.configuration['auto-start']) { + console.log('Called startJob()!'); + startJob(); + } }); /** * Downloads some JSON and responds to its content to see what the status is of the current import. */ -function checkImportStatus() { - $.getJSON(jobImportUrl).done(reportOnJobImport).fail(failedJobImport); +function checkJobStatus() { + console.log('in checkJobStatus'); + $.getJSON(jobStatusUri).done(reportOnJobStatus).fail(reportFailedJob); } /** * This method is called when the JSON query returns an error. If possible, this error is relayed to the user. */ -function failedJobImport(jqxhr, textStatus, error) { +function reportFailedJob(jqxhr, textStatus, error) { + console.log('in reportFailedJob'); // hide all possible boxes: $('.statusbox').hide(); @@ -67,13 +75,20 @@ function failedJobImport(jqxhr, textStatus, error) { * * @param data */ -function reportOnJobImport(data) { +function reportOnJobStatus(data) { + console.log('in reportOnJobStatus: ' + data.status); switch (data.status) { case "configured": // job is ready. Do not check again, just show the start-box. Hide the rest. - $('.statusbox').hide(); - $('.status_configured').show(); + if (!job.configuration['auto-start']) { + $('.statusbox').hide(); + $('.status_configured').show(); + } + if (job.configuration['auto-start']) { + console.log('Job is auto start. Check status again in 500ms.'); + timeOutId = setTimeout(checkJobStatus, interval); + } break; case "running": // job is running! Show the running box: @@ -94,7 +109,7 @@ function reportOnJobImport(data) { showStalledBox(); } else { // check again in 500ms - timeOutId = setTimeout(checkImportStatus, interval); + timeOutId = setTimeout(checkJobStatus, interval); } break; case "finished": @@ -103,7 +118,26 @@ function reportOnJobImport(data) { // show text: $('#import-status-more-info').html(data.finishedText); break; + case "errored": + // TODO this view is not yet used. + // hide all possible boxes: + $('.statusbox').hide(); + + // fill in some details: + var errorMessage = data.error_message; + + $('.fatal_error_txt').text(errorMessage); + + // show the fatal error box: + $('.fatal_error').show(); + break; + case "configuring": + // redirect back to configure screen. + console.log('Will now redirect to ' + jobConfigureUri); + window.location = jobConfigureUri; + break; default: + console.error('Cannot handle job status ' + data.status); break; } @@ -144,13 +178,16 @@ function jobIsStalled(data) { function startJob() { // disable the button, add loading thing. $('.start-job').prop('disabled', true).text('...'); - $.post(jobStartUrl).fail(reportOnSubmitError); + $.post(jobStartUri, {_token: token}).fail(reportOnSubmitError); // check status, every 500 ms. - timeOutId = setTimeout(checkImportStatus, startInterval); + timeOutId = setTimeout(checkJobStatus, startInterval); } -function reportOnSubmitError() { +/** + * When the start button fails (returns error code) this function reports. It assumes a time out. + */ +function reportOnSubmitError(jqxhr, textStatus, error) { // stop the refresh thing clearTimeout(timeOutId); @@ -158,7 +195,7 @@ function reportOnSubmitError() { $('.statusbox').hide(); // fill in some details: - var errorMessage = "Time out while waiting for job to finish."; + var errorMessage = "Submitting the job returned an error: " + textStatus + ' ' + error; $('.fatal_error_txt').text(errorMessage); diff --git a/public/js/ff/index.js b/public/js/ff/index.js index 1d9ac6739d..ca69033a7d 100644 --- a/public/js/ff/index.js +++ b/public/js/ff/index.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: accountFrontpageUri, today, piggyInfoUri, token, billCount, accountExpenseUri, accountRevenueUri */ diff --git a/public/js/ff/intro/intro.js b/public/js/ff/intro/intro.js index 65cd7cf005..a6e2bdfa99 100644 --- a/public/js/ff/intro/intro.js +++ b/public/js/ff/intro/intro.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: routeForTour, token, routeStepsUri, routeForFinishedTour, forceDemoOff */ diff --git a/public/js/ff/piggy-banks/create.js b/public/js/ff/piggy-banks/create.js index 132ff358f2..2e679a5de7 100644 --- a/public/js/ff/piggy-banks/create.js +++ b/public/js/ff/piggy-banks/create.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: Modernizr */ diff --git a/public/js/ff/piggy-banks/edit.js b/public/js/ff/piggy-banks/edit.js index 9d4416b9ba..eacac841c7 100644 --- a/public/js/ff/piggy-banks/edit.js +++ b/public/js/ff/piggy-banks/edit.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: Modernizr */ diff --git a/public/js/ff/piggy-banks/index.js b/public/js/ff/piggy-banks/index.js index cc4dba5b5f..292d7f7f7d 100644 --- a/public/js/ff/piggy-banks/index.js +++ b/public/js/ff/piggy-banks/index.js @@ -15,9 +15,9 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ - +/** global: token */ var fixHelper = function (e, tr) { "use strict"; var $originals = tr.children(); @@ -89,7 +89,7 @@ function stopSorting() { var id = holder.data('id'); order.push(id); }); - $.post('piggy-banks/sort', {order: order}).done(function () { + $.post('piggy-banks/sort', {order: order, _token: token}).done(function () { $('.loadSpin').removeClass('fa fa-refresh fa-spin'); }); } \ No newline at end of file diff --git a/public/js/ff/piggy-banks/show.js b/public/js/ff/piggy-banks/show.js index 3fcd764732..630108d1fa 100644 --- a/public/js/ff/piggy-banks/show.js +++ b/public/js/ff/piggy-banks/show.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: piggyBankID, lineChart */ diff --git a/public/js/ff/preferences/index.js b/public/js/ff/preferences/index.js index 6ae1f99f13..eb220b90a3 100644 --- a/public/js/ff/preferences/index.js +++ b/public/js/ff/preferences/index.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: Modernizr */ diff --git a/public/js/ff/reports/account/month.js b/public/js/ff/reports/account/month.js new file mode 100644 index 0000000000..6aba68d1b0 --- /dev/null +++ b/public/js/ff/reports/account/month.js @@ -0,0 +1,32 @@ +/* + * month.js + * Copyright (c) 2017 thegrumpydictator@gmail.com + * + * This file is part of Firefly III. + * + * Firefly III is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Firefly III is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Firefly III. If not, see . + */ +/** global: spentUri, categoryUri, budgetUri, expenseUri, incomeUri, mainUri */ +$(function () { + "use strict"; + doubleYChart(mainUri, 'in-out-chart'); + + loadAjaxPartial('inOutAccounts', spentUri); + loadAjaxPartial('inOutCategory', categoryUri); + loadAjaxPartial('inOutBudget', budgetUri); + loadAjaxPartial('topXexpense', expenseUri); + loadAjaxPartial('topXincome', incomeUri); + +}); + diff --git a/public/js/ff/reports/all.js b/public/js/ff/reports/all.js new file mode 100644 index 0000000000..912539796c --- /dev/null +++ b/public/js/ff/reports/all.js @@ -0,0 +1,156 @@ +/* + * all.js + * Copyright (c) 2017 thegrumpydictator@gmail.com + * + * This file is part of Firefly III. + * + * Firefly III is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Firefly III is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Firefly III. If not, see . + */ +/** global: startDate, endDate, accountIds */ +function loadAjaxPartial(holder, uri) { + "use strict"; + $.get(uri).done(function (data) { + displayAjaxPartial(data, holder); + }).fail(function () { + failAjaxPartial(uri, holder); + }); +} + +function failAjaxPartial(uri, holder) { + "use strict"; + var holderObject = $('#' + holder); + holderObject.parent().find('.overlay').remove(); + holderObject.addClass('general-chart-error'); + +} + + +function createCookie(name, value, days) { + "use strict"; + var expires; + + if (days) { + var date = new Date(); + date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); + expires = "; expires=" + date.toGMTString(); + } else { + expires = ""; + } + document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/"; +} + +function readCookie(name) { + "use strict"; + var nameEQ = encodeURIComponent(name) + "="; + var ca = document.cookie.split(';'); + for (var i = 0; i < ca.length; i++) { + var c = ca[i]; + while (c.charAt(0) === ' ') { + c = c.substring(1, c.length); + } + if (c.indexOf(nameEQ) === 0) { + return decodeURIComponent(c.substring(nameEQ.length, c.length)); + } + } + return null; +} + + +function triggerInfoClick() { + "use strict"; + // find the little info buttons and respond to them. + $('.firefly-info-button').unbind('click').click(clickInfoButton); +} + +function clickInfoButton(e) { + "use strict"; + // find all data tags, regardless of what they are: + var element = $(e.target); + var attributes = element.data(); + + // set wait cursor + $('body').addClass('waiting'); + + // add some more elements: + attributes.startDate = startDate; + attributes.endDate = endDate; + attributes.accounts = accountIds; + + $.getJSON('popup/general', {attributes: attributes}).done(respondInfoButton).fail(errorInfoButton); +} + +function errorInfoButton() { + "use strict"; + // remove wait cursor + $('body').removeClass('waiting'); + alert('Apologies. The requested data is not (yet) available.'); +} + +function respondInfoButton(data) { + "use strict"; + // remove wait cursor + $('body').removeClass('waiting'); + $('#defaultModal').empty().html(data.html).modal('show'); + +} + +function displayAjaxPartial(data, holder) { + "use strict"; + var obj = $('#' + holder); + obj.html(data); + obj.parent().find('.overlay').remove(); + + // call some often needed recalculations and what-not: + + // find a sortable table and make it sortable: + if (typeof $.bootstrapSortable === "function") { + $.bootstrapSortable(true); + } + + // find the info click things and respond to them: + triggerInfoClick(); + + // trigger list thing + listLengthInitial(); + + // 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 clickCategoryChart(e) { + "use strict"; + var link = $(e.target); + var categoryId = link.data('category'); + $('#category_help').remove(); + + var URL = 'chart/category/report-period/' + categoryId + '/' + accountIds + '/' + startDate + '/' + endDate; + var container = 'category_chart'; + columnChart(URL, container); + return false; +} + +function clickBudgetChart(e) { + "use strict"; + var link = $(e.target); + var budgetId = link.data('budget'); + $('#budget_help').remove(); + + var URL = 'chart/budget/period/' + budgetId + '/' + accountIds + '/' + startDate + '/' + endDate; + var container = 'budget_chart'; + columnChart(URL, container); + return false; +} \ No newline at end of file diff --git a/public/js/ff/reports/audit/all.js b/public/js/ff/reports/audit/all.js index 52f5dc9320..c75fef4b18 100644 --- a/public/js/ff/reports/audit/all.js +++ b/public/js/ff/reports/audit/all.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: hideable */ @@ -86,35 +86,3 @@ function showOnlyColumns(checkboxes) { } } } - - -function createCookie(name, value, days) { - "use strict"; - var expires; - - if (days) { - var date = new Date(); - date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); - expires = "; expires=" + date.toGMTString(); - } else { - expires = ""; - } - document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/"; -} - -function readCookie(name) { - "use strict"; - var nameEQ = encodeURIComponent(name) + "="; - var ca = document.cookie.split(';'); - for (var i = 0; i < ca.length; i++) { - var c = ca[i]; - while (c.charAt(0) === ' ') { - c = c.substring(1, c.length); - } - if (c.indexOf(nameEQ) === 0) { - return decodeURIComponent(c.substring(nameEQ.length, c.length)); - } - } - return null; -} - diff --git a/public/js/ff/reports/budget/month.js b/public/js/ff/reports/budget/month.js index c18f2da436..7fd3b4b5e7 100644 --- a/public/js/ff/reports/budget/month.js +++ b/public/js/ff/reports/budget/month.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: budgetExpenseUri, accountExpenseUri, mainUri */ diff --git a/public/js/ff/reports/category/month.js b/public/js/ff/reports/category/month.js index d62eca0e7c..35df4b25b3 100644 --- a/public/js/ff/reports/category/month.js +++ b/public/js/ff/reports/category/month.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: categoryIncomeUri, categoryExpenseUri, accountIncomeUri, accountExpenseUri, mainUri */ diff --git a/public/js/ff/reports/default/all.js b/public/js/ff/reports/default/all.js index dd49e9ec04..0993d18654 100644 --- a/public/js/ff/reports/default/all.js +++ b/public/js/ff/reports/default/all.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: accountReportUri, incomeReportUri, expenseReportUri, incExpReportUri, startDate, endDate, accountIds */ @@ -33,108 +33,3 @@ $(function () { loadAjaxPartial('incomeVsExpenseReport', incExpReportUri); }); - -function triggerInfoClick() { - "use strict"; - // find the little info buttons and respond to them. - $('.firefly-info-button').unbind('click').click(clickInfoButton); -} - -function clickInfoButton(e) { - "use strict"; - // find all data tags, regardless of what they are: - var element = $(e.target); - var attributes = element.data(); - - // set wait cursor - $('body').addClass('waiting'); - - // add some more elements: - attributes.startDate = startDate; - attributes.endDate = endDate; - attributes.accounts = accountIds; - - $.getJSON('popup/general', {attributes: attributes}).done(respondInfoButton).fail(errorInfoButton); -} - -function errorInfoButton() { - "use strict"; - // remove wait cursor - $('body').removeClass('waiting'); - alert('Apologies. The requested data is not (yet) available.'); -} - -function respondInfoButton(data) { - "use strict"; - // remove wait cursor - $('body').removeClass('waiting'); - $('#defaultModal').empty().html(data.html).modal('show'); - -} - -function loadAjaxPartial(holder, uri) { - "use strict"; - $.get(uri).done(function (data) { - displayAjaxPartial(data, holder); - }).fail(function () { - failAjaxPartial(uri, holder); - }); -} - -function displayAjaxPartial(data, holder) { - "use strict"; - var obj = $('#' + holder); - obj.html(data); - obj.parent().find('.overlay').remove(); - - // call some often needed recalculations and what-not: - - // find a sortable table and make it sortable: - if (typeof $.bootstrapSortable === "function") { - $.bootstrapSortable(true); - } - - // find the info click things and respond to them: - triggerInfoClick(); - - // trigger list thing - listLengthInitial(); - - // 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) { - "use strict"; - var holderObject = $('#' + holder); - holderObject.parent().find('.overlay').remove(); - holderObject.addClass('general-chart-error'); - -} - -function clickCategoryChart(e) { - "use strict"; - var link = $(e.target); - var categoryId = link.data('category'); - $('#category_help').remove(); - - var URL = 'chart/category/report-period/' + categoryId + '/' + accountIds + '/' + startDate + '/' + endDate; - var container = 'category_chart'; - columnChart(URL, container); - return false; -} - -function clickBudgetChart(e) { - "use strict"; - var link = $(e.target); - var budgetId = link.data('budget'); - $('#budget_help').remove(); - - var URL = 'chart/budget/period/' + budgetId + '/' + accountIds + '/' + startDate + '/' + endDate; - var container = 'budget_chart'; - columnChart(URL, container); - return false; -} \ No newline at end of file diff --git a/public/js/ff/reports/default/month.js b/public/js/ff/reports/default/month.js index a7f02e5723..9f8e67d060 100644 --- a/public/js/ff/reports/default/month.js +++ b/public/js/ff/reports/default/month.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: categoryReportUri, budgetReportUri, balanceReportUri, accountChartUri */ diff --git a/public/js/ff/reports/default/multi-year.js b/public/js/ff/reports/default/multi-year.js index dbe9a00cec..30ae613b0b 100644 --- a/public/js/ff/reports/default/multi-year.js +++ b/public/js/ff/reports/default/multi-year.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: budgetPeriodReportUri, categoryExpenseUri, categoryIncomeUri, netWorthUri, opChartUri, sumChartUri */ diff --git a/public/js/ff/reports/default/year.js b/public/js/ff/reports/default/year.js index 71dcbb2c1a..621ee4a0fe 100644 --- a/public/js/ff/reports/default/year.js +++ b/public/js/ff/reports/default/year.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: budgetPeriodReportUri, categoryExpenseUri, categoryIncomeUri, netWorthUri, opChartUri, sumChartUri */ diff --git a/public/js/ff/reports/index.js b/public/js/ff/reports/index.js index b95531e0df..9e9562e947 100644 --- a/public/js/ff/reports/index.js +++ b/public/js/ff/reports/index.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: minDate, nonSelectedText, allSelectedText, filterPlaceholder */ @@ -124,10 +124,21 @@ function setOptionalFromCookies() { if ((readCookie('report-tags') !== null)) { arr = readCookie('report-tags').split(','); arr.forEach(function (val) { - $('#inputBudgets').find('option[value="' + val + '"]').prop('selected', true); + $('#inputTags').find('option[value="' + val + '"]').prop('selected', true); }); } $('#inputTags').multiselect(defaultMultiSelect); + + // and expense/revenue thing + if ((readCookie('report-exp-rev') !== null)) { + arr = readCookie('report-exp-rev').split(','); + arr.forEach(function (val) { + $('#inputExpRevAccounts').find('option[value="' + val + '"]').prop('selected', true); + }); + } + $('#inputExpRevAccounts').multiselect(defaultMultiSelect); + + } function catchSubmit() { @@ -140,6 +151,7 @@ function catchSubmit() { var categories = $('#inputCategories').val(); var budgets = $('#inputBudgets').val(); var tags = $('#inputTags').val(); + var expRev = $('#inputExpRevAccounts').val(); // remember all // set cookie to remember choices. @@ -148,6 +160,7 @@ function catchSubmit() { createCookie('report-categories', categories, 365); createCookie('report-budgets', budgets, 365); createCookie('report-tags', tags, 365); + createCookie('report-exp-rev', expRev, 365); createCookie('report-start', moment(picker.startDate).format("YYYYMMDD"), 365); createCookie('report-end', moment(picker.endDate).format("YYYYMMDD"), 365); @@ -165,33 +178,3 @@ function preSelectDate(e) { } -function createCookie(name, value, days) { - "use strict"; - var expires; - - if (days) { - var date = new Date(); - date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); - expires = "; expires=" + date.toGMTString(); - } else { - expires = ""; - } - document.cookie = encodeURIComponent(name) + "=" + encodeURIComponent(value) + expires + "; path=/"; -} - -function readCookie(name) { - "use strict"; - var nameEQ = encodeURIComponent(name) + "="; - var ca = document.cookie.split(';'); - for (var i = 0; i < ca.length; i++) { - var c = ca[i]; - while (c.charAt(0) === ' ') { - c = c.substring(1, c.length); - } - if (c.indexOf(nameEQ) === 0) { - return decodeURIComponent(c.substring(nameEQ.length, c.length)); - } - } - return null; -} - diff --git a/public/js/ff/reports/tag/month.js b/public/js/ff/reports/tag/month.js index a210520566..01709c991b 100644 --- a/public/js/ff/reports/tag/month.js +++ b/public/js/ff/reports/tag/month.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: tagIncomeUri, tagExpenseUri, accountIncomeUri, accountExpenseUri, tagBudgetUri, tagCategoryUri, mainUri */ diff --git a/public/js/ff/rules/create-edit.js b/public/js/ff/rules/create-edit.js index 0f3cace670..5b2015abc3 100644 --- a/public/js/ff/rules/create-edit.js +++ b/public/js/ff/rules/create-edit.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: triggerCount, actionCount */ diff --git a/public/js/ff/rules/index.js b/public/js/ff/rules/index.js index 7e74c5edbc..27ef2fb053 100644 --- a/public/js/ff/rules/index.js +++ b/public/js/ff/rules/index.js @@ -15,9 +15,9 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ - +/** global: token */ var fixHelper = function (e, tr) { "use strict"; var $originals = tr.children(); @@ -115,11 +115,11 @@ function sortStop(event, ui) { }); if (parent.hasClass('rule-triggers')) { - $.post('rules/trigger/order/' + ruleId, {triggers: entries}).fail(function () { + $.post('rules/trigger/order/' + ruleId, {triggers: entries, _token: token}).fail(function () { alert('Could not re-order rule triggers. Please refresh the page.'); }); } else { - $.post('rules/action/order/' + ruleId, {actions: entries}).fail(function () { + $.post('rules/action/order/' + ruleId, {actions: entries, _token: token}).fail(function () { alert('Could not re-order rule actions. Please refresh the page.'); }); diff --git a/public/js/ff/rules/select-transactions.js b/public/js/ff/rules/select-transactions.js index 5d092b417b..e555c06ec1 100644 --- a/public/js/ff/rules/select-transactions.js +++ b/public/js/ff/rules/select-transactions.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: Modernizr, askReadWarning */ diff --git a/public/js/ff/search/index.js b/public/js/ff/search/index.js index d6d45402b6..70615ae476 100644 --- a/public/js/ff/search/index.js +++ b/public/js/ff/search/index.js @@ -15,10 +15,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ -/** global: searchQuery,searchUri */ +/** global: searchQuery,searchUri,token */ @@ -29,7 +29,7 @@ $(function () { }); function startSearch(query) { - $.post(searchUri, {query: query}).done(presentSearchResults).fail(searchFailure); + $.post(searchUri, {query: query, _token: token}).done(presentSearchResults).fail(searchFailure); } function searchFailure() { diff --git a/public/js/ff/tags/create-edit.js b/public/js/ff/tags/create-edit.js index cd975fed02..4ac008906a 100644 --- a/public/js/ff/tags/create-edit.js +++ b/public/js/ff/tags/create-edit.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: zoomLevel, latitude, longitude, google, apiKey, doPlaceMarker, Modernizr */ diff --git a/public/js/ff/tags/index.js b/public/js/ff/tags/index.js index 75291904e9..2c3eeb2559 100644 --- a/public/js/ff/tags/index.js +++ b/public/js/ff/tags/index.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: zoomLevel, latitude, longitude, google */ diff --git a/public/js/ff/tags/show.js b/public/js/ff/tags/show.js index d51d3ef920..b199393bbe 100644 --- a/public/js/ff/tags/show.js +++ b/public/js/ff/tags/show.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: zoomLevel, latitude, longitude, L, mapboxToken, doPlaceMarker */ @@ -48,7 +48,7 @@ $(function () { }).addTo(mymap); if (doPlaceMarker) { - var marker = L.marker([latitude, longitude]).addTo(mymap); + L.marker([latitude, longitude]).addTo(mymap); } } }); diff --git a/public/js/ff/transactions/list.js b/public/js/ff/transactions/list.js index 8d6b67152c..70694d0598 100644 --- a/public/js/ff/transactions/list.js +++ b/public/js/ff/transactions/list.js @@ -15,10 +15,10 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ -/** global: edit_selected_txt, delete_selected_txt */ +/** global: edit_selected_txt, delete_selected_txt, token */ /** * @@ -71,7 +71,7 @@ function goToReconcile() { baseHref = bases[0].href; } - $.post(baseHref + 'transactions/reconcile', {transactions: ids}).done(function () { + $.post(baseHref + 'transactions/reconcile', {transactions: ids, _token: token}).done(function () { window.location.reload(true); }).fail(function () { alert('Could not reconcile transactions: please check the logs and try again later.'); diff --git a/public/js/ff/transactions/mass/edit.js b/public/js/ff/transactions/mass/edit.js index fb7317f0bd..7a2b1aa228 100644 --- a/public/js/ff/transactions/mass/edit.js +++ b/public/js/ff/transactions/mass/edit.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: what */ diff --git a/public/js/ff/transactions/show.js b/public/js/ff/transactions/show.js index 093703bcdb..ba708245f7 100644 --- a/public/js/ff/transactions/show.js +++ b/public/js/ff/transactions/show.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: autoCompleteUri */ diff --git a/public/js/ff/transactions/single/common.js b/public/js/ff/transactions/single/common.js index eed4fbea7c..330022be71 100644 --- a/public/js/ff/transactions/single/common.js +++ b/public/js/ff/transactions/single/common.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: Modernizr, accountInfo, currencyInfo, accountInfo, transferInstructions, what */ diff --git a/public/js/ff/transactions/single/create.js b/public/js/ff/transactions/single/create.js index 01e15255f1..38699ca7b0 100644 --- a/public/js/ff/transactions/single/create.js +++ b/public/js/ff/transactions/single/create.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: currencyInfo, overruleCurrency,useAccountCurrency, accountInfo, what,Modernizr, title, breadcrumbs, middleCrumbName, button, piggiesLength, txt, middleCrumbUrl,exchangeRateInstructions, convertForeignToNative, convertSourceToDestination, selectsForeignCurrency, accountInfo */ diff --git a/public/js/ff/transactions/single/edit.js b/public/js/ff/transactions/single/edit.js index 78a19ae77e..078216f34b 100644 --- a/public/js/ff/transactions/single/edit.js +++ b/public/js/ff/transactions/single/edit.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ /** global: what, Modernizr, selectsForeignCurrency, convertForeignToNative, validateCurrencyForTransfer, convertSourceToDestination, journalData, journal, accountInfo, exchangeRateInstructions, currencyInfo */ diff --git a/public/js/ff/transactions/split/edit.js b/public/js/ff/transactions/split/edit.js index 26b146e4eb..bcf5a8b484 100644 --- a/public/js/ff/transactions/split/edit.js +++ b/public/js/ff/transactions/split/edit.js @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Firefly III. If not, see . + * along with Firefly III. If not, see . */ diff --git a/resources/lang/de_DE/auth.php b/resources/lang/de_DE/auth.php index 2ed9237587..8d8659fbca 100644 --- a/resources/lang/de_DE/auth.php +++ b/resources/lang/de_DE/auth.php @@ -1,18 +1,26 @@ . */ +declare(strict_types=1); return [ - /* |-------------------------------------------------------------------------- | Authentication Language Lines @@ -26,5 +34,4 @@ return [ 'failed' => 'Falscher Benutzername und/oder falsches Passwort.', 'throttle' => 'Zu viele Login-Versuche. Bitte versuchen Sie es in :seconds Sekunde(n) erneut.', - ]; diff --git a/resources/lang/de_DE/bank.php b/resources/lang/de_DE/bank.php index 86a0c3062b..ef0d636f91 100644 --- a/resources/lang/de_DE/bank.php +++ b/resources/lang/de_DE/bank.php @@ -1,8 +1,24 @@ . + */ declare(strict_types=1); - return [ - 'bunq_prerequisites_title' => 'Voraussetzungen für einen Import von bunq', - 'bunq_prerequisites_text' => 'Um aus bunq importieren zu können, benötigen Sie einen API-Schlüssel. Sie können dies über die App tun.', ]; diff --git a/resources/lang/de_DE/breadcrumbs.php b/resources/lang/de_DE/breadcrumbs.php index 6070b07090..742e727791 100644 --- a/resources/lang/de_DE/breadcrumbs.php +++ b/resources/lang/de_DE/breadcrumbs.php @@ -1,16 +1,24 @@ . */ +declare(strict_types=1); return [ 'home' => 'Home', @@ -21,6 +29,7 @@ return [ 'preferences' => 'Einstellungen', 'profile' => 'Profil', 'changePassword' => 'Passwort ändern', + 'change_email' => 'E-Mail Adresse ändern', 'bills' => 'Rechnungen', 'newBill' => 'Neue Rechnung', 'edit_bill' => 'Bearbeite Rechnung ":name"', diff --git a/resources/lang/de_DE/config.php b/resources/lang/de_DE/config.php index 0556b0f612..e5cce81e77 100644 --- a/resources/lang/de_DE/config.php +++ b/resources/lang/de_DE/config.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'locale' => 'de, Deutsch, de_DE, de_DE.utf8, de_DE.UTF-8', @@ -21,5 +30,4 @@ return [ 'quarter_of_year' => '%B %Y', 'year' => '%Y', 'half_year' => '%B %Y', - ]; diff --git a/resources/lang/de_DE/csv.php b/resources/lang/de_DE/csv.php index 5533ad319a..d61316b632 100644 --- a/resources/lang/de_DE/csv.php +++ b/resources/lang/de_DE/csv.php @@ -1,91 +1,24 @@ . */ - declare(strict_types=1); return [ - - // initial config - 'initial_title' => 'Import Einrichten (1/3) - Grundlegende Einstellungen', - 'initial_text' => 'Um Ihre Datei korrekt importieren zu können, überprüfen Sie bitte die folgenden Optionen.', - 'initial_box' => 'Standard CSV Importeinstellungen', - 'initial_box_title' => 'Standard CSV Importoptionen', - 'initial_header_help' => 'Hier auswählen, wenn die ersten Zeilen der CSV-Datei die Spaltenüberschriften sind.', - 'initial_date_help' => 'Datumsformat in ihrer CSV-Datei. Geben Sie das Format so an, wie es diese Seite zeigt. Die Standardeinstellung ergibt ein Datum, welches so aussehen: :dateExample.', - 'initial_delimiter_help' => 'Wählen Sie das Trennzeichen, welches in ihrer Datei genutzt wird. Wenn Sie nicht sicher sind, ist Komma die sicherste Option.', - 'initial_import_account_help' => 'Wenn ihre CSV-Datei KEINE Informationen über ihre Girokonten enthält, nutzen Sie bitte diese Dropdown-Liste um anzugeben, zu welchem Girokonto die Transaktionen in der CSV-Datei gehören.', - 'initial_submit' => 'Fortfahren mit Schritt 2/3', - - // new options: - 'apply_rules_title' => 'Regeln anwenden', - 'apply_rules_description' => 'Regeln anwenden. Beachten Sie, dass dadurch der Import erheblich verlangsamt wird.', - 'match_bills_title' => 'Rechnungen zuordnen', - 'match_bills_description' => 'Match your bills to newly created withdrawals. Note that this slows the import significantly.', - - // roles config - 'roles_title' => 'Import Einrichten (2/3) - Jeder Spalte eine Rolle zuordnen', - 'roles_text' => 'Jede Spalte in Ihrer CSV-Datei enthält bestimmte Daten. Bitte geben Sie an, welche Art von Daten enthalten sind. Die Option "Daten zuordnen" bedeutet, dass jeder Eintrag in der Spalte mit einem Wert aus Ihrer der Datenbank ersetzt wird. Eine oft zugeordnete Spalte ist die Spalte, welche die IBAN des fremden Kontos enthält. Diese können leicht mit bereits angelegten IBANs in Ihrer Datenbank verglichen werden.', - 'roles_table' => 'Tabelle', - 'roles_column_name' => 'Name der Spalte', - 'roles_column_example' => 'Beispieldaten', - 'roles_column_role' => 'Bedeutung der Spalte', - 'roles_do_map_value' => 'Diese Werte zuordnen', - 'roles_column' => 'Spalte', - 'roles_no_example_data' => 'Keine Beispieldaten vorhanden', - 'roles_submit' => 'Fortfahren mit Schritt 3/3', - 'roles_warning' => 'Markieren Sie zumindest eine Spalte als Betrags-spalte. Es empfiehlt sich auch, eine Spalte für die Beschreibung, das Datum und das Gegenkonto auszuwählen.', - - // map data - 'map_title' => 'Import Einrichten (3/3) - Import mit bereits vorhandenen Daten verknüpfen', - 'map_text' => 'In den folgenden Tabellen zeigt der linke Wert Informationen, die sich in Ihrer hochgeladenen CSV-Datei befinden. Es ist Ihre Aufgabe, diesen Wert, wenn möglich, einem bereits in der Datenbank vorhandenen zuzuordnen. Firefly wird sich an diese Zuordnung halten. Wenn kein Wert für die Zuordnung vorhanden ist oder Sie den bestimmten Wert nicht abbilden möchten, wählen Sie nichts aus.', - 'map_field_value' => 'Feldwert', - 'map_field_mapped_to' => 'Zugeordnet zu', - 'map_do_not_map' => '(keine Zuordnung)', - 'map_submit' => 'Starte den Import', - - // map things. - 'column__ignore' => '(diese Spalte ignorieren)', - 'column_account-iban' => 'Bestandskonto (IBAN)', - 'column_account-id' => 'Bestandskonto (vgl. ID in Firefly)', - 'column_account-name' => 'Bestandskonto (Name)', - 'column_amount' => 'Betrag', - 'column_amount_debet' => 'Amount (debet column)', - 'column_amount_credit' => 'Amount (credit column)', - 'column_amount-comma-separated' => 'Betrag (Komma als Dezimaltrennzeichen)', - 'column_bill-id' => 'Rechnung (ID übereinstimmend mit Firefly)', - 'column_bill-name' => 'Name der Rechnung', - 'column_budget-id' => 'Budget (ID übereinstimmend mit Firefly)', - 'column_budget-name' => 'Budgetname', - 'column_category-id' => 'Kategorie (ID übereinstimmend mit Firefly)', - 'column_category-name' => 'Name der Kategorie', - 'column_currency-code' => 'Währungsstandard (ISO 4217)', - 'column_currency-id' => 'Währung (ID übereinstimmend mit Firefly)', - 'column_currency-name' => 'Währungsname (übereinstimmend mit Firefly)', - 'column_currency-symbol' => 'Währungssysmbol (übereinstimmend mit Firefly)', - 'column_date-interest' => 'Datum der Zinsberechnung', - 'column_date-book' => 'Buchungsdatum der Überweisung', - 'column_date-process' => 'Verarbeitungsdatum der Überweisung', - 'column_date-transaction' => 'Datum', - 'column_description' => 'Beschreibung', - 'column_opposing-iban' => 'Zielkonto (IBAN)', - 'column_opposing-id' => 'Zielkonto (vgl. ID in Firefly)', - 'column_external-id' => 'Externe ID', - 'column_opposing-name' => 'Zielkonto (Name)', - 'column_rabo-debet-credit' => 'Spezifisches Kennzeichen für Belastung/Kredit der Rabobank', - 'column_ing-debet-credit' => 'Spezifisches Kennzeichen für Belastung/Kredit der ING', - 'column_sepa-ct-id' => 'SEPA Überweisungstransaktionsnummer', - 'column_sepa-ct-op' => 'SEPA Überweisungszielkonto', - 'column_sepa-db' => 'SEPA Lastschriftnummer', - 'column_tags-comma' => 'Tags (durch Komma getrennt)', - 'column_tags-space' => 'Tags (durch Leerzeichen getrennt)', - 'column_account-number' => 'Bestandskonto (Kontonr.)', - 'column_opposing-number' => 'Zielkonto (Kontonr.)', ]; diff --git a/resources/lang/de_DE/demo.php b/resources/lang/de_DE/demo.php index eec5193c40..220e0b6c84 100644 --- a/resources/lang/de_DE/demo.php +++ b/resources/lang/de_DE/demo.php @@ -1,13 +1,24 @@ . */ +declare(strict_types=1); return [ 'no_demo_text' => 'Leider gibt es keine zusätzlichen Demoerklärungen für diese Seite.', @@ -15,8 +26,8 @@ return [ 'index' => 'Willkommen bei Firefly III! Auf dieser Seite erhalten Sie einen schnellen Überblick über Ihre Finanzen. Für weitere Informationen, besuchen Sie die Accounts → Girokonten und natürlich Budgets und Berichte Seiten. Oder sehen Sie sich einfach um und schauen wo Sie landen.', 'accounts-index' => 'Vermögenskonten sind Ihre persönlichen Bank-Konten. Aufwandskonten sind Konten, denen Sie Geld zahlen, z. B. Läden und Freunde. Einnahmekonten sind Konten von denen Sie Geld erhalten, z. B. Ihr Arbeitgeber und andere Einkommensquellen. Auf dieser Seite können Sie diese bearbeiten oder entfernen.', 'budgets-index' => 'Diese Seite zeigt Ihnen einen Überblick über Ihre Budgets. Die obere Leiste zeigt den Betrag, der zur Verfügung steht. Dieser kann für einen Zeitraum angepasst werden, indem Sie auf den Betrag auf der rechten Seite klicken. Wie viel bisher ausgegeben wurde wird darunter angezeigt. Darunter sind die Aufwendungen pro Haushalt und wie viel dafür veranschlagt ist.', - 'reports-index-start' => 'Firefly III unterstützt vier Berichtarten. Mehr Informationen hierzu können durch ein Klick auf das Symbol in der oberen rechten Ecke aufgerufen werden.', - 'reports-index-examples' => 'Sehen Sie sich auch diese Beispiele an: eine monatliche Finanzübersicht, eine jährliche Finanzübersicht und eine Haushaltsübersicht.', + 'reports-index-start' => 'Firefly III supports a number of types of reports. Read about them by clicking on the -icon in the top right corner.', + 'reports-index-examples' => 'Sehen Sie sich auch diese Beispiele an: eine monatliche Finanzübersicht, eine jährliche Finanzübersicht und eine Haushaltsübersicht.', 'currencies-index' => 'Firefly III unterstützt mehrere Währungen. Obwohl es den Euro standardmäßig nutzt, ist es möglich US-Dollar oder viele andere Währungen zu verwenden. Wie Sie sehen können, ist eine kleine Auswahl an Währungen aufgenommen worden, aber Sie können Ihre eigenen hinzufügen. Die Standardwährung zu ändern, wird die Währung der vorhandenen Buchungen jedoch nicht ändern: Firefly III unterstützt die Verwendung mehrerer Währungen zur gleichen Zeit.', 'transactions-index' => 'Diese Aufwendungen, Einzahlungen und Überweisungen sind nicht besonders einfallsreich. Sie wurden automatisch generiert.', 'piggy-banks-index' => 'Wie Sie sehen können, gibt es drei Sparschweine. Benutzen die Plus- und Minusknöpfe um die Menge des Geldes in den Sparschweinen zu beeinflussen. Klicken Sie auf den Namen des Sparschweins um Details einzusehen.', diff --git a/resources/lang/de_DE/firefly.php b/resources/lang/de_DE/firefly.php index 0ded8338a7..fafe444808 100644 --- a/resources/lang/de_DE/firefly.php +++ b/resources/lang/de_DE/firefly.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ // general stuff: @@ -71,7 +80,7 @@ return [ 'source_accounts' => 'Herkunftskonto', 'destination_accounts' => 'Zielkonto', 'user_id_is' => 'Ihre Benutzerkennung ist :user', - 'field_supports_markdown' => 'Diese Feld unterstützt Abschlag .', + 'field_supports_markdown' => 'Dieses Feld unterstützt Markdown.', 'need_more_help' => 'Wenn Sie Hilfe beim Bedienen von Firefly III brauchen, erstellen Sie ein Ticket auf Github.', 'reenable_intro_text' => 'Sie können auch die Einführung wieder aktivieren.', 'intro_boxes_after_refresh' => 'Die Einführungsfelder werden wieder angezeigt, wenn Sie die Seite aktualisieren.', @@ -133,6 +142,22 @@ return [ 'invalid_locale_settings' => 'Firefly III kann keine Geldbeträge formatieren, da auf Ihrem Server die erforderlichen Pakete fehlen. Es gibt eine Anleitung, wie dies behoben werden kann.', 'quickswitch' => 'Schnellauswahl', + // check for updates: + 'update_check_title' => 'Check for updates', + 'admin_update_check_title' => 'Automatically check for update', + 'admin_update_check_explain' => 'Firefly III can check for updates automatically. When you enable this setting, it will contact Github to see if a new version of Firefly III is available. When it is, you will get a notification. You can test this notification using the button on the right. Please indicate below if you want Firefly III to check for updates.', + 'check_for_updates_permission' => 'Firefly III can check for updates, but it needs your permission to do so. Please go to the administration to indicate if you would like this feature to be enabled.', + 'updates_ask_me_later' => 'Ask me later', + 'updates_do_not_check' => 'Do not check for updates', + 'updates_enable_check' => 'Enable the check for updates', + 'admin_update_check_now_title' => 'Check for updates now', + 'admin_update_check_now_explain' => 'If you press the button, Firefly III will see if your current version is the latest.', + 'check_for_updates_button' => 'Check now!', + 'update_new_version_alert' => 'A new version is available. You are running v:your_version, the latest version is v:new_version which was released on :date.', + 'update_current_version_alert' => 'You are running v:version, which is the latest available release.', + 'update_newer_version_alert' => 'You are running v:your_version, which is newer than the latest release, v:new_version.', + 'update_check_error' => 'An error occurred while checking for updates. Please view the log files.', + // search 'search' => 'Suche', 'search_query' => 'Abfrage', @@ -233,14 +258,14 @@ return [ 'warning_transaction_subset' => 'Aus Performancegrü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ätsgründen werden nur die letzten :num_transactions Überweisungen überprüft.', 'warning_no_valid_triggers' => 'Keine gültigen Trigger gefunden.', - 'apply_rule_selection' => 'Übernehmen Sie die Regel ": title" auf eine Auswahl Ihrer Transaktionen', - 'apply_rule_selection_intro' => 'Regeln wie ": title" werden in der Regel nur auf neue oder aktualisierte Transaktionen angewandt, aber Sie können die Regel auch auf eine Auswahl Ihrer bestehenden Transaktionen anwenden. Dies kann nützlich sein, wenn Sie eine Regel aktualisiert haben und Sie die Änderungen benötigen, auf andere Transaktionen zu aktualisieren.', + 'apply_rule_selection' => 'Übernehmen Sie die Regel ":title" auf eine Auswahl Ihrer Transaktionen', + 'apply_rule_selection_intro' => 'Regeln wie ":title" werden in der Regel nur auf neue oder aktualisierte Transaktionen angewandt, aber Sie können die Regel auch auf eine Auswahl Ihrer bestehenden Transaktionen anwenden. Dies kann nützlich sein, wenn Sie eine Regel aktualisiert haben und Sie die Änderungen benötigen, auf andere Transaktionen zu aktualisieren.', 'include_transactions_from_accounts' => 'Überweisungen von diesem Konto einbeziehen', - 'applied_rule_selection' => 'Regel ": Titel" wurde auf Ihre Auswahl angewendet.', + 'applied_rule_selection' => 'Regel ":title" wurde auf Ihre Auswahl angewendet.', 'execute' => 'Ausführen', - 'apply_rule_group_selection' => 'Anwenden der Regelgruppe ": title" auf eine Auswahl Ihrer Transaktionen', - 'apply_rule_group_selection_intro' => 'Regelgruppen wie ": title" werden in der Regel nur auf neue oder aktualisierte Transaktionen angewandt, aber Sie können die Gruppe auch auf eine Auswahl Ihrer bestehenden Transaktionen anwenden. Dies kann nützlich sein, wenn Sie eine Gruppe aktualisiert haben und Sie die Änderungen benötigen, auf andere Transaktionen zu aktualisieren.', - 'applied_rule_group_selection' => 'Regelgruppe ": title" wurde auf Ihre Auswahl angewendet.', + 'apply_rule_group_selection' => 'Anwenden der Regelgruppe ":title" auf eine Auswahl Ihrer Transaktionen', + 'apply_rule_group_selection_intro' => 'Regelgruppen wie ":title" werden in der Regel nur auf neue oder aktualisierte Transaktionen angewandt, aber Sie können die Gruppe auch auf eine Auswahl Ihrer bestehenden Transaktionen anwenden. Dies kann nützlich sein, wenn Sie eine Gruppe aktualisiert haben und Sie die Änderungen benötigen, auf andere Transaktionen zu aktualisieren.', + 'applied_rule_group_selection' => 'Regelgruppe ":title" wurde auf Ihre Auswahl angewendet.', // actions and triggers 'rule_trigger_user_action' => 'Die Nutzeraktion ist ":trigger_value"', @@ -261,7 +286,7 @@ return [ 'rule_trigger_to_account_contains_choice' => 'Zielkonto enthält..', 'rule_trigger_to_account_contains' => 'Zielkonto enthält ":trigger_value"', 'rule_trigger_transaction_type_choice' => 'Überweisung ist vom Typ..', - 'rule_trigger_transaction_type' => 'Transaktion ist vom Typ ": Trigger_value"', + 'rule_trigger_transaction_type' => 'Transaktion ist vom Typ ":trigger_value"', 'rule_trigger_category_is_choice' => 'Kategorie ist..', 'rule_trigger_category_is' => 'Kategorie ist ":trigger_value"', 'rule_trigger_amount_less_choice' => 'Betrag ist geringer als..', @@ -343,7 +368,6 @@ return [ 'rule_action_set_notes_choice' => 'Set notes to..', 'rule_action_set_notes' => 'Set notes to ":action_value"', - 'rules_have_read_warning' => 'Haben Sie die Warnung gelesen?', 'apply_rule_warning' => 'Warnung: Das Ausführen einer Regel (Gruppe) für eine große Auswahl von Transaktionen kann sehr lange dauern, und es kann zu einer Zeitüberschreitung kommen. Wenn dies der Fall ist, wird die Regel (-Gruppe) nur auf eine unbekannte Teilmenge Ihrer Transaktionen angewendet. Dies könnte Ihre Finanzverwaltung komplett zerstören. Bitte seien Sie vorsichtig.', @@ -398,9 +422,9 @@ return [ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'pref_home_do_show_deposits' => 'Ja, zeige sie an', 'successful_count' => 'davon :count erfolgreich', - 'transaction_page_size_title' => 'Einträge pro Seite', - 'transaction_page_size_help' => 'Jede Liste von Transaktionen zeigt maximal folgende Anzahl an Transaktionen', - 'transaction_page_size_label' => 'Einträge pro Seite', + 'list_page_size_title' => 'Einträge pro Seite', + 'list_page_size_help' => 'Any list of things (accounts, transactions, etc) shows at most this many per page.', + 'list_page_size_label' => 'Einträge pro Seite', 'between_dates' => '(:start und :end)', 'pref_optional_fields_transaction' => 'Optionale Felder für Überweisungen', 'pref_optional_fields_transaction_help' => 'Standardmäßig sind nicht alle Felder aktiviert, wenn eine neue Überweisung erstellt wird (wegen der Übersicht). Unten können Sie diese Felder aktivieren, wenn Sie glauben, dass Sie nützlich für Sie sind. Alle Felder die deaktiviert sind, aber bereits ausgefüllt sind, werden unabhängig von ihren Einstellung sichtbar sein.', @@ -421,7 +445,6 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'optional_field_attachments' => 'Anhänge', 'optional_field_meta_data' => 'Optionale Metadaten', - // profile: 'change_your_password' => 'Passwort ändern', 'delete_account' => 'Konto löschen', @@ -443,7 +466,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'secure_pw_history' => 'Im August 2017 veröffentlichte die bekannte Sicherheitsforscherin Troy Hunt eine Liste von 306 Millionen gestohlenen Passwörtern. Diese Passwörter wurden während der Einbrüche bei Firmen wie LinkedIn, Adobe und NeoPets (und vielen mehr) gestohlen.', 'secure_pw_check_box' => 'Wenn Sie das Kontrollkästchen aktivieren, wird Firefly III den SHA1-Hash Ihres Passworts an die Website von Troy Hunt senden, um zu sehen, ob es auf der Liste steht. Dies verhindert, dass Sie unsichere Passwörter verwenden, was in der aktuellen NIST-Sonderveröffentlichung zu diesem Thema empfohlen wird.', 'secure_pw_sha1' => 'Aber ich dachte, dass SHA1 schon geknackt wurde?', - 'secure_pw_hash_speed' => 'Ja, aber nicht in diesem Zusammenhang. Wie Sie auf auf der Website, die erklärt, wie SHA1 gebrochen wurde, lesen können, ist es jetzt etwas leichter, eine "Kollision" zu finden: eine andere Zeichenfolge, die zu demselben SHA1-Hash führt. Es dauert nur mehr 10.000 Jahre mit einer Single-GPU-Maschine.', + 'secure_pw_hash_speed' => 'Ja, aber nicht in diesem Zusammenhang. Wie Sie auf auf der Website, die erklärt, wie SHA1 gebrochen wurde, lesen können, ist es jetzt etwas leichter, eine "Kollision" zu finden: eine andere Zeichenfolge, die zu demselben SHA1-Hash führt. Es dauert nur mehr 10.000 Jahre mit einer Single-GPU-Maschine.', 'secure_pw_hash_security' => 'Diese Kollision wäre nicht gleich Ihrem Passwort, noch wäre es nützlich auf (einer Seite wie) Firefly III. Diese Anwendung verwendet SHA1 nicht zur Passwortüberprüfung. Es ist also sicher, dieses Kästchen zu aktivieren. Ihr Passwort wird gehasht und über HTTPS übertragen.', 'secure_pw_should' => 'Soll ich die Box ankreuzen?', 'secure_pw_long_password' => 'Wenn Sie gerade ein langes, Single-Use-Passwort für Firefly III mit einem Kennwortgenerator generiert haben: Nein.', @@ -458,7 +481,6 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'login_with_new_email' => 'Sie können sich jetzt mit Ihrer neuen E-Mail-Adresse anmelden.', 'login_with_old_email' => 'Sie können sich jetzt wieder mit Ihrer alten E-Mail-Adresse anmelden.', - // attachments 'nr_of_attachments' => 'Ein Anhang |:count Anhänge', 'attachments' => 'Anhänge', @@ -564,7 +586,6 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'suggested' => 'Vorgeschlagen', 'average_between' => 'Average between :start and :end', - // bills: 'matching_on' => 'Reagiert auf', 'between_amounts' => 'zwischen :low und :high.', @@ -702,12 +723,15 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'deleted_transfer' => 'Überweisung ":description" erfolgreich gelöscht', 'stored_journal' => 'Neue Überweisung ":description" erfolgreich erstellt', 'select_transactions' => 'Überweisungen auswählen', + 'rule_group_select_transactions' => '":title" auf Transaktionen anwenden', + 'rule_select_transactions' => '":title" auf Transaktionen anwenden', 'stop_selection' => 'Auswahl von Überweisungen stoppen', 'reconcile_selected' => 'Ausgleichen', 'mass_delete_journals' => 'Löschen Sie eine Reihe von Überweisungen', 'mass_edit_journals' => 'Bearbeiten Sie eine Reihe von Überweisungen', '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.', 'no_budget' => '(kein Budget)', + 'no_budget_squared' => '(kein Budget)', 'perm-delete-many' => 'Das Löschen von mehreren Elementen auf einmal kann sich störend auswirken. Bitte seien Sie vorsichtig.', 'mass_deleted_transactions_success' => ':amount Überweisung(en) gelöscht.', 'mass_edited_transactions_success' => ':amount Überweisung(en) aktualisiert', @@ -717,7 +741,6 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'opt_group_sharedAsset' => 'Shared asset accounts', 'opt_group_ccAsset' => 'Kreditkarten', - // new user: 'welcome' => 'Willkommen bei Firefly!', 'submit' => 'Absenden', @@ -765,6 +788,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'piggyBanks' => 'Sparschweine', 'bills' => 'Rechnungen', 'withdrawal' => 'Ausgabe', + 'opening_balance' => 'Eröffnungsbilanz', 'deposit' => 'Einnahme', 'account' => 'Konto', 'transfer' => 'Überweisung', @@ -787,6 +811,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'report_default' => 'Default financial report between :start and :end', 'report_audit' => 'Transaction history overview between :start and :end', 'report_category' => 'Category report between :start and :end', + 'report_account' => 'Expense/revenue account report between :start and :end', 'report_budget' => 'Budget report between :start and :end', 'report_tag' => 'Tag report between :start and :end', 'quick_link_reports' => 'Schnellzugriff', @@ -811,8 +836,8 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'inactive' => 'Inaktiv', 'active' => 'Aktiv', 'difference' => 'Unterschied', - 'in' => 'Rein', - 'out' => 'Raus', + 'money_flowing_in' => 'In', + 'money_flowing_out' => 'Out', 'topX' => 'top :number', 'show_full_list' => 'Zeige die gesamte Liste', 'show_only_top' => 'Nur die Top :number anzeigen', @@ -822,6 +847,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'report_type_category' => 'Kategorie-Bericht', 'report_type_budget' => 'Budgetbericht', 'report_type_tag' => 'Tag report', + 'report_type_account' => 'Expense/revenue account report', 'more_info_help' => 'Weitere Informationen über diese Art von Berichten finden Sie in der Hilfe. Drücken Sie hierfür das (?)-Symbol in der oberen rechten Ecke.', 'report_included_accounts' => 'Eingezogene Konten', 'report_date_range' => 'Zeitraum', @@ -873,7 +899,10 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'account_role_ccAsset' => 'Kreditkarte', 'budget_chart_click' => 'Klicken Sie auf einen Budgetnamen in der obigen Tabelle, um ein Diagramm anzuzeigen.', 'category_chart_click' => 'Klicken Sie auf einen Kategorienamen in der obigen Tabelle, um ein Diagramm zu sehen.', - + 'in_out_accounts' => 'Earned and spent per combination', + 'in_out_per_category' => 'Earned and spent per category', + 'out_per_budget' => 'Spent per budget', + 'select_expense_revenue' => 'Select expense/revenue account', // charts: 'chart' => 'Diagram', @@ -885,7 +914,6 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'earned' => 'Verdient', 'overspent' => 'Zuviel ausgegeben', 'left' => 'Übrig', - 'no_budget' => '(no budget)', 'max-amount' => 'Höchstbetrag', 'min-amount' => 'Mindestbetrag', 'journal-amount' => 'Aktueller Rechnungseintrag', @@ -969,8 +997,7 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'total_size' => 'Gesamtgröße', 'budget_or_budgets' => 'Budget(s)', 'budgets_with_limits' => 'Budget(s) mit konfigurierten Betrag', - 'rule_or_rules' => 'Regel(n)', - 'rulegroup_or_groups' => 'Regelgruppe(n)', + 'nr_of_rules_in_total_groups' => ':count_rules rule(s) in :count_groups rule group(s)', 'tag_or_tags' => 'Tag(s)', 'configuration_updated' => 'Die Konfiguration wurde aktualisiert', 'setting_is_demo_site' => 'Demonstrationsseite', @@ -1036,7 +1063,6 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', '(partially) pays for_outward' => '(partially) pays for', '(partially) reimburses_outward' => '(partially) reimburses', - // split a transaction: 'splits' => 'Geteilte', 'add_another_split' => 'Eine weitere Aufteilung hinzufügen', @@ -1055,49 +1081,16 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', // import bread crumbs and titles: 'import' => 'Import', 'import_data' => 'Daten importieren', + 'import_general_index_file' => 'Datei importieren', + 'import_from_bunq' => 'Import mit bunq', + 'import_using_spectre' => 'Import mit Spectre', + 'import_using_plaid' => 'Import mit Plaid', + 'import_config_bread_crumb' => 'Import einrichten', // import index page: 'import_index_title' => 'Daten in Firefly III importieren', 'import_index_sub_title' => 'Index', 'import_general_index_intro' => 'Willkommen beim Importassistenten von Firefly. Es gibt einige Möglichkeiten, Daten in Firefly III zu importieren, die hier als Schaltflächen angezeigt werden.', - 'import_general_index_csv_file' => 'Importiere eine (CSV) Datei', - 'import_index_intro' => 'Dieser Assistent hilft Ihnen, Dateien von Ihrer Bank in Firefly III zu importieren. Bitte sehen Sie sich die Hilfeseiten in der oberen rechten Ecke an.', - 'import_index_file' => 'Datei auswählen', - 'import_index_config' => 'Wenn Sie bereits zuvor Daten in Firefly III importiert haben, haben Sie eventuell eine Kofigurationsdatei, welche einige Einstellungen für Sie voreinstellt. Für einige Banken haben andere Nutzer freundlicherweise bereits ihre Konfigurationsdatei zur Verfügung gestellt.', - 'import_index_type' => 'Wählen Sie den Typ der hochgeladenen Datei', - 'import_index_start' => 'Import starten', - 'import_file' => 'Datei importieren', - - // supported file types: - 'import_file_type_csv' => 'CSV (Kommagetrennte Werte)', - - // import configuration routine: - 'import_config_sub_title' => 'Set up your import file', - 'import_config_bread_crumb' => 'Set up your import file', - - // import status page: - 'import_status_bread_crumb' => 'Importstatus', - 'import_status_sub_title' => 'Importstatus', - 'import_status_wait_title' => 'Bitte warten...', - 'import_status_wait_text' => 'Diese Box wird gleich verschwinden.', - 'import_status_ready_title' => 'Der Import ist startbereit', - 'import_status_ready_text' => 'Der Import ist bereit zu starten. Alle Einstellungen wurden von Ihnen erledigt. Bitte laden Sie die Konfigurationsdatei herunter. Diese wird Ihnen beim Import helfen, sollte dieser nicht wie gewünscht verlaufen. Um den Import tatsächlich zu starten führen Sie den folgenden Befehl in der Konsole aus oder nutzen Sie den Web-basierten Import. Abhängig von ihrer Konfiguration wird Ihnen der Konsolenimport mehr Rückmeldungen geben.', - 'import_status_ready_config' => 'Konfigurationsdatei herunterladen', - 'import_status_ready_start' => 'Starte den Import', - 'import_status_ready_share' => 'Bitte denken Sie darüber nach ihre Konfiguration herunterzuladen und in der Sammlung an Import-Einstellungen zu teilen. Dieses erlaubt es anderen Nutzern von Firefly III ihre Daten einfacher zu importieren.', - 'import_status_running_title' => 'Der Import läuft', - 'import_status_running_placeholder' => 'Bitte warten Sie auf eine Aktualisierung...', - 'import_status_errors_title' => 'Fehler beim Import', - 'import_status_errors_single' => 'Beim Import ist ein Fehler aufgetreten. Dieser scheint aber nicht schwerwiegend zu sein.', - 'import_status_errors_multi' => 'Beim Import sind einige Fehler aufgetreten. Diese scheinen aber nicht schwerwiegend zu sein.', - 'import_status_fatal_title' => 'Ein schwerwiegender Fehler ist aufgetreten', - 'import_status_fatal_text' => 'Es ist ein schwerwiegender Fehler aufgetreten und die Importroutine kann nicht fortgeführt werden. Bitte sehen Sie sich die Erklärung in rot unten an.', - 'import_status_fatal_more' => 'Wenn der Fehler eine Zeitüberschreitung ist, wird der Import mittendrin gestoppt. Bei einigen Serverkonfigurationen wird lediglich der Server gestoppt, während der Import im Hintergrund ausgeführt wird. Um dies zu überprüfen, überprüfen Sie die Protokolldateien. Wenn das Problem weiterhin besteht, sollten Sie stattdessen den Import über die Befehlszeile in Erwägung ziehen.', - 'import_status_finished_title' => 'Importassistent abgeschlossen', - 'import_status_finished_text' => 'Der Importassistenten hat Ihre Datei importiert.', - 'import_status_finished_job' => 'Die importierten Transaktionen finden Sie im Tag : tag.', - 'import_status_job_running' => 'Der Import läuft...', - 'import_with_key' => 'Import with key \':key\'', // sandstorm.io errors and messages: 'sandstorm_not_available' => 'Diese Funktion ist nicht verfügbar, wenn Sie Firefly III in einer Sandstorm.io-Umgebung verwenden.', @@ -1147,6 +1140,4 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'no_bills_intro_default' => 'Du hast noch keine Rechnungen. Sie können Rechnungen erstellen, um die laufenden Ausgaben, wie zum Beispiel Ihre Versicherung oder Miete, nachzuverfolgen.', 'no_bills_imperative_default' => 'Haben Sie regelmäßige Rechnungen? Erstellen Sie eine Rechnung und verfolgen Sie Ihre Zahlungen:', 'no_bills_create_default' => 'Eine Rechnung erstellen', - - ]; diff --git a/resources/lang/de_DE/form.php b/resources/lang/de_DE/form.php index 2714fae3e4..43728aa0a2 100644 --- a/resources/lang/de_DE/form.php +++ b/resources/lang/de_DE/form.php @@ -1,18 +1,26 @@ . */ +declare(strict_types=1); return [ - // new user: 'bank_name' => 'Name der Bank', 'bank_balance' => 'Kontostand', @@ -80,7 +88,6 @@ return [ 'convert_Deposit' => 'Ändere zu Einzahlung', 'convert_Transfer' => 'Ändere zu Überweisung', - 'amount' => 'Betrag', 'date' => 'Datum', 'interest_date' => 'Zinstermin', @@ -162,6 +169,7 @@ return [ 'budget_keep_transactions' => 'Die eine Überweisung, die mit diesem Budget verknüpft ist, wird nicht gelöscht. | Keines der :count Budgets, die mit dieser Rechnung verknüpft sind, werden gelöscht.', 'category_keep_transactions' => 'Die eine Überweisungen, die mit dieser Kategorie verknüpft ist, wird nicht gelöscht. | Keine der :count Kategorien, die mit dieser Rechnung verknüpft sind, werden gelöscht.', 'tag_keep_transactions' => 'Die einzige Überweisung, die mit diesem Tag verknüpft ist, wird nicht gelöscht. | Keiner der :count Tags, die mit dieser Rechnung verknüpft sind, werden gelöscht.', + 'check_for_updates' => 'Check for updates', 'email' => 'E-Mail Adresse', 'password' => 'Passwort', @@ -169,13 +177,11 @@ return [ 'blocked' => 'Ist blockiert?', 'blocked_code' => 'Grund für Block', - // admin 'domain' => 'Domain', 'single_user_mode' => 'Registrierung deaktivieren', 'is_demo_site' => 'Ist eine Demonstrationsseite', - // import 'import_file' => 'Datei importieren', 'configuration_file' => 'Konfigurationsdatei', @@ -186,7 +192,12 @@ return [ 'csv_delimiter' => 'CSV-Trennzeichen', 'csv_import_account' => 'Standard Import-Konto', 'csv_config' => 'CSV-Import Einstellungen', - + 'client_id' => 'Client-ID', + 'service_secret' => 'Service secret', + 'app_secret' => 'App-Secret', + 'public_key' => 'Öffentlicher Schlüssel', + 'country_code' => 'Ländercode', + 'provider_code' => 'Bank oder Datenanbieter', 'due_date' => 'Fälligkeitstermin', 'payment_date' => 'Zahlungsdatum', diff --git a/resources/lang/de_DE/import.php b/resources/lang/de_DE/import.php new file mode 100644 index 0000000000..8ed4cc8d53 --- /dev/null +++ b/resources/lang/de_DE/import.php @@ -0,0 +1,163 @@ +. + */ +declare(strict_types=1); + +return [ + // status of import: + 'status_wait_title' => 'Bitte warten...', + 'status_wait_text' => 'Diese Box wird gleich verschwinden.', + 'status_fatal_title' => 'Ein schwerwiegender Fehler ist aufgetreten', + 'status_fatal_text' => 'Es ist ein schwerwiegender Fehler aufgetreten und die Importroutine kann nicht fortgeführt werden. Bitte sehen Sie sich die Erklärung in rot unten an.', + 'status_fatal_more' => 'Wenn der Fehler eine Zeitüberschreitung ist, wird der Import mittendrin gestoppt. Bei einigen Serverkonfigurationen wird lediglich der Server gestoppt, während der Import im Hintergrund ausgeführt wird. Um dies zu überprüfen, überprüfen Sie die Protokolldateien. Wenn das Problem weiterhin besteht, sollten Sie stattdessen den Import über die Befehlszeile in Erwägung ziehen.', + 'status_ready_title' => 'Der Import ist startbereit', + 'status_ready_text' => 'Der Import ist bereit zu starten. Alle Einstellungen wurden von Ihnen erledigt. Bitte laden Sie die Konfigurationsdatei herunter. Diese wird Ihnen beim Import helfen, sollte dieser nicht wie gewünscht verlaufen. Um den Import tatsächlich zu starten führen Sie den folgenden Befehl in der Konsole aus oder nutzen Sie den Web-basierten Import. Abhängig von ihrer Konfiguration wird Ihnen der Konsolenimport mehr Rückmeldungen geben.', + 'status_ready_noconfig_text' => 'Der Import ist bereit zu starten. Alle Einstellungen wurden von Ihnen erledigt. Um den Import tatsächlich zu starten führen Sie den folgenden Befehl in der Konsole aus oder nutzen Sie den Web-basierten Import. Abhängig von ihrer Konfiguration wird Ihnen der Konsolenimport mehr Rückmeldungen geben.', + 'status_ready_config' => 'Download der Konfiguration', + 'status_ready_start' => 'Starte den Import', + 'status_ready_share' => 'Bitte denken Sie darüber nach ihre Konfiguration herunterzuladen und in der Übersicht der Import-Einstellungen zu teilen. Dieses erlaubt es anderen Nutzern von Firefly III ihre Daten unkomplizierter zu importieren.', + 'status_job_new' => 'The job is brand new.', + 'status_job_configuring' => 'The import is being configured.', + 'status_job_configured' => 'Der Import ist konfiguriert.', + 'status_job_running' => 'Der Import läuft.. Bitte warten..', + 'status_job_error' => 'The job has generated an error.', + 'status_job_finished' => 'Der Import ist abgeschlossen!', + 'status_running_title' => 'Der Import läuft', + 'status_running_placeholder' => 'Bitte warten Sie auf eine Aktualisierung...', + 'status_finished_title' => 'Importassistent abgeschlossen', + 'status_finished_text' => 'Der Importassistent hat Ihre Daten importiert.', + 'status_errors_title' => 'Fehler beim Import', + 'status_errors_single' => 'Beim Import ist ein Fehler aufgetreten. Dieser scheint aber nicht schwerwiegend zu sein.', + 'status_errors_multi' => 'Beim Import sind einige Fehler aufgetreten. Diese scheinen aber nicht schwerwiegend zu sein.', + 'status_bread_crumb' => 'Importstatus', + 'status_sub_title' => 'Importstatus', + 'config_sub_title' => 'Import einrichten', + 'status_finished_job' => 'Die importierten Transaktionen finden Sie im Tag :tag.', + 'import_with_key' => 'Import mit Schlüssel \':key\'', + + // file, upload something + 'file_upload_title' => 'Import-Setup (1/4) - Laden Sie Ihre Datei hoch', + 'file_upload_text' => 'Dieser Assistent hilft Ihnen, Dateien von Ihrer Bank in Firefly III zu importieren. Bitte sehen Sie sich die Hilfeseiten in der oberen rechten Ecke an.', + 'file_upload_fields' => 'Felder', + 'file_upload_help' => 'Datei auswählen', + 'file_upload_config_help' => 'Wenn Sie bereits zuvor Daten in Firefly III importiert haben, haben Sie eventuell eine Konfigurationsdatei, welche einige Einstellungen für Sie voreinstellt. Für einige Banken haben andere Nutzer freundlicherweise bereits ihre Konfigurationsdatei zur Verfügung gestellt', + 'file_upload_type_help' => 'Wählen Sie den Typ der hochzuladenden Datei', + 'file_upload_submit' => 'Dateien hochladen', + + // file, upload types + 'import_file_type_csv' => 'CSV (Kommagetrennte Werte)', + + // file, initial config for CSV + 'csv_initial_title' => 'Import Einrichten (2/4) - Grundlegende Einstellungen', + 'csv_initial_text' => 'Um Ihre Datei korrekt importieren zu können, überprüfen Sie bitte die folgenden Optionen.', + 'csv_initial_box' => 'Standard CSV Importeinstellungen', + 'csv_initial_box_title' => 'Standard CSV Importeinstellungen', + 'csv_initial_header_help' => 'Hier auswählen, wenn die ersten Zeilen der CSV-Datei die Spaltenüberschriften sind.', + 'csv_initial_date_help' => 'Datumsformat in ihrer CSV-Datei. Geben Sie das Format so an, wie es diese Seite zeigt. Die Standardeinstellung ergibt Daten die so aussehen: :dateExample.', + 'csv_initial_delimiter_help' => 'Wählen Sie das Trennzeichen, welches in ihrer Datei genutzt wird. Wenn Sie nicht sicher sind ist Komma die sicherste Option.', + 'csv_initial_import_account_help' => 'Wenn ihre CSV-Datei KEINE Informationen über ihre Girokonten enthält, nutzen Sie bitte diese Dropdown-Liste um anzugeben, zu welchem Girokonto die Transaktionen in der CSV-Datei gehören.', + 'csv_initial_submit' => 'Fortfahren mit Schritt 3/4', + + // file, new options: + 'file_apply_rules_title' => 'Regeln anwenden', + 'file_apply_rules_description' => 'Regeln anwenden. Beachten Sie, dass dadurch der Import erheblich verlangsamt wird.', + 'file_match_bills_title' => 'Rechnungen zuordnen', + 'file_match_bills_description' => 'Ordnen Sie Ihre Rechnungen den neu erstellten Ausgaben zu. Beachten Sie, dass dadurch der Import erheblich verlangsamt wird.', + + // file, roles config + 'csv_roles_title' => 'Import Einrichten (3/4) - Jeder Spalte eine Rolle zuordnen', + 'csv_roles_text' => 'Jede Spalte in Ihrer CSV-Datei enthält bestimmte Daten. Bitte geben Sie an, welche Art von Daten enthalten sind. Die Option "Daten zuordnen" bedeutet, dass jeder Eintrag in der Spalte mit einem Wert aus Ihrer der Datenbank ersetzt wird. Eine oft zugeordnete Spalte ist die Spalte, welche die IBAN des fremden Kontos enthält. Diese können leicht mit bereits angelegten IBANs in Ihrer Datenbank verglichen werden.', + 'csv_roles_table' => 'Tabelle', + 'csv_roles_column_name' => 'Name der Spalte', + 'csv_roles_column_example' => 'Beispieldaten', + 'csv_roles_column_role' => 'Bedeutung der Spalte', + 'csv_roles_do_map_value' => 'Diese Werte zuordnen', + 'csv_roles_column' => 'Spalte', + 'csv_roles_no_example_data' => 'Keine Beispieldaten vorhanden', + 'csv_roles_submit' => 'Fortfahren mit Schritt 4/4', + 'csv_roles_warning' => 'Markieren Sie zumindest eine Spalte als Betragsspalte. Es empfiehlt sich auch, eine Spalte für die Beschreibung, das Datum und das Gegenkonto auszuwählen.', + + // file, map data + 'file_map_title' => 'Import Einrichten (4/4) - Import mit bereits vorhandenen Daten verknüpfen', + 'file_map_text' => 'In den folgenden Tabellen zeigt der linke Wert Informationen, die sich in Ihrer hochgeladenen Datei befinden. Es ist Ihre Aufgabe, diesen Wert, wenn möglich, einem bereits in der Datenbank vorhandenen zuzuordnen. Firefly wird sich an diese Zuordnung halten. Wenn kein Wert für die Zuordnung vorhanden ist oder Sie den bestimmten Wert nicht abbilden möchten, wählen Sie nichts aus.', + 'file_map_field_value' => 'Feldwert', + 'file_map_field_mapped_to' => 'Zugeordnet zu', + 'map_do_not_map' => '(keine Zuordnung)', + 'file_map_submit' => 'Starte den Import', + + // map things. + 'column__ignore' => '(diese Spalte ignorieren)', + 'column_account-iban' => 'Bestandskonto (IBAN)', + 'column_account-id' => 'Bestandskonto (vgl. ID in Firefly)', + 'column_account-name' => 'Bestandskonto (Name)', + 'column_amount' => 'Betrag', + 'column_amount_debit' => 'Amount (debit column)', + 'column_amount_credit' => 'Amount (credit column)', + 'column_amount-comma-separated' => 'Betrag (Komma als Dezimaltrennzeichen)', + 'column_bill-id' => 'Rechnung (ID übereinstimmend mit Firefly)', + 'column_bill-name' => 'Name der Rechnung', + 'column_budget-id' => 'Budget (ID übereinstimmend mit Firefly)', + 'column_budget-name' => 'Budgetname', + 'column_category-id' => 'Kategorie (ID übereinstimmend mit Firefly)', + 'column_category-name' => 'Name der Kategorie', + 'column_currency-code' => 'Währungsstandard (ISO 4217)', + 'column_currency-id' => 'Währung (ID übereinstimmend mit Firefly)', + 'column_currency-name' => 'Währungsname (übereinstimmend mit Firefly)', + 'column_currency-symbol' => 'Währungssysmbol (übereinstimmend mit Firefly)', + 'column_date-interest' => 'Datum der Zinsberechnung', + 'column_date-book' => 'Buchungsdatum der Überweisung', + 'column_date-process' => 'Verarbeitungsdatum der Überweisung', + 'column_date-transaction' => 'Datum', + 'column_description' => 'Beschreibung', + 'column_opposing-iban' => 'Zielkonto (IBAN)', + 'column_opposing-id' => 'Zielkonto (vgl. ID in Firefly)', + 'column_external-id' => 'Externe ID', + 'column_opposing-name' => 'Zielkonto (Name)', + 'column_rabo-debit-credit' => 'Rabobank specific debit/credit indicator', + 'column_ing-debit-credit' => 'ING specific debit/credit indicator', + 'column_sepa-ct-id' => 'SEPA Überweisungstransaktionsnummer', + 'column_sepa-ct-op' => 'SEPA Überweisungszielkonto', + 'column_sepa-db' => 'SEPA-Lastschrift', + 'column_tags-comma' => 'Tags (durch Komma getrennt)', + 'column_tags-space' => 'Tags (durch Leerzeichen getrennt)', + 'column_account-number' => 'Bestandskonto (Kontonr.)', + 'column_opposing-number' => 'Zielkonto (Kontonr.)', + 'column_note' => 'Notiz(en)', + + // prerequisites + 'prerequisites' => 'Prerequisites', + + // bunq + 'bunq_prerequisites_title' => 'Voraussetzungen für einen Import von bunq', + 'bunq_prerequisites_text' => 'Um aus bunq importieren zu können, benötigen Sie einen API-Schlüssel. Sie können diesen in der App bekommen.', + + // Spectre + 'spectre_title' => 'Importieren mit Spectre', + 'spectre_prerequisites_title' => 'Voraussetzungen für einen Import von Spectre', + 'spectre_prerequisites_text' => 'Um Daten mithilfe der Spectre-API zu importieren, müssen Sie einige Daten angeben. Sie sind auf der secrets-Seite zu finden.', + 'spectre_enter_pub_key' => 'Der Import funktioniert nur, wenn Sie diesen öffentlichen Schlüssel auf Ihrer Sicherheitsseite eingeben.', + 'spectre_select_country_title' => 'Land auswählen', + 'spectre_select_country_text' => 'Firefly III bietet eine große Auswahl an Banken und Websites, von denen Spectre Transaktionsdaten herunterladen kann. Diese Banken sind nach Ländern sortiert. Bitte beachten Sie, dass es ein "Pseudo-Land" gibt, wenn Sie etwas testen möchten. Wenn Sie aus anderen Finanzinstrumenten importieren möchten, verwenden Sie bitte das Pseudo-Land "Andere Finanzanwendungen". Standardmäßig erlaubt Spectre nur das Herunterladen von Daten von Pseudo-Banken. Stellen Sie ihren Status auf "Live" in Ihrem Dashboard, wenn Sie von echten Banken herunterladen möchten.', + 'spectre_select_provider_title' => 'Wählen Sie eine Bank', + 'spectre_select_provider_text' => 'Spectre unterstützt die folgenden Banken oder Finanzdienstleistungen, gruppiert nach Land. Bitte wählen Sie das aus, von dem Sie importieren möchten.', + 'spectre_input_fields_title' => 'Pflichtfelder', + 'spectre_input_fields_text' => 'Die folgenden Felder werden von ":provider" (aus: :country) benötigt.', + 'spectre_instructions_english' => 'Diese Anweisungen werden von "Spectre" für Sie zur Verfügung gestellt. Sie sind in Englisch:', +]; diff --git a/resources/lang/de_DE/intro.php b/resources/lang/de_DE/intro.php index 7f181bb9f6..c1d12e1eed 100644 --- a/resources/lang/de_DE/intro.php +++ b/resources/lang/de_DE/intro.php @@ -1,13 +1,24 @@ . */ +declare(strict_types=1); return [ // index diff --git a/resources/lang/de_DE/list.php b/resources/lang/de_DE/list.php index e021c7d5e9..eb4980e563 100644 --- a/resources/lang/de_DE/list.php +++ b/resources/lang/de_DE/list.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'buttons' => 'Schaltfläche', @@ -25,7 +34,7 @@ return [ 'currentBalance' => 'Aktueller Kontostand', 'active' => 'Aktiv?', 'lastActivity' => 'Letzte Aktivität', - 'balanceDiff' => 'Differenz des Kontostandes zwischen :start und :end', + 'balanceDiff' => 'Balance difference', 'matchesOn' => 'Übereinstimmung am', 'account_type' => 'Art des Kontos', 'created_at' => 'Erstellt am', @@ -86,7 +95,7 @@ return [ 'total_amount' => 'Gesamtbetrag', 'sum' => 'Summe', 'sum_excluding_transfers' => 'Summe (ohne Überweisungen)', - 'sum_withdrawals' => 'Summe der Auszahlungen', + 'sum_withdrawals' => 'Summe der Ausgaben', 'sum_deposits' => 'Summe der Einzahlungen', 'sum_transfers' => 'Summe der Überweisungen', 'reconcile' => 'Reconcile', diff --git a/resources/lang/de_DE/pagination.php b/resources/lang/de_DE/pagination.php index 93f901bbf6..c04bcf86ff 100644 --- a/resources/lang/de_DE/pagination.php +++ b/resources/lang/de_DE/pagination.php @@ -1,19 +1,26 @@ . */ +declare(strict_types=1); return [ - 'previous' => '« Vorherige', 'next' => 'Nächste »', - ]; diff --git a/resources/lang/de_DE/passwords.php b/resources/lang/de_DE/passwords.php index 272678f176..47184514cf 100644 --- a/resources/lang/de_DE/passwords.php +++ b/resources/lang/de_DE/passwords.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'password' => 'Passwörter müssen mindestens 6 Zeichen lang sein und übereinstimmen.', diff --git a/resources/lang/de_DE/validation.php b/resources/lang/de_DE/validation.php index 2633ffb165..c82dacbdaa 100644 --- a/resources/lang/de_DE/validation.php +++ b/resources/lang/de_DE/validation.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'iban' => 'Dies ist keine gültige IBAN.', diff --git a/resources/lang/en_US/auth.php b/resources/lang/en_US/auth.php index 2bc0df9611..a9ccd1af92 100644 --- a/resources/lang/en_US/auth.php +++ b/resources/lang/en_US/auth.php @@ -1,18 +1,26 @@ . */ +declare(strict_types=1); return [ - /* |-------------------------------------------------------------------------- | Authentication Language Lines @@ -26,5 +34,4 @@ return [ 'failed' => 'These credentials do not match our records.', 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', - ]; diff --git a/resources/lang/en_US/bank.php b/resources/lang/en_US/bank.php index 4becc5984c..ef0d636f91 100644 --- a/resources/lang/en_US/bank.php +++ b/resources/lang/en_US/bank.php @@ -1,8 +1,24 @@ . + */ declare(strict_types=1); - return [ - 'bunq_prerequisites_title' => 'Prerequisites for an import from bunq', - 'bunq_prerequisites_text' => 'In order to import from bunq, you need to obtain an API key. You can do this through the app.', ]; diff --git a/resources/lang/en_US/breadcrumbs.php b/resources/lang/en_US/breadcrumbs.php index be62acdc7a..0777e36191 100644 --- a/resources/lang/en_US/breadcrumbs.php +++ b/resources/lang/en_US/breadcrumbs.php @@ -1,16 +1,24 @@ . */ +declare(strict_types=1); return [ 'home' => 'Home', @@ -21,6 +29,7 @@ return [ 'preferences' => 'Preferences', 'profile' => 'Profile', 'changePassword' => 'Change your password', + 'change_email' => 'Change your email address', 'bills' => 'Bills', 'newBill' => 'New bill', 'edit_bill' => 'Edit bill ":name"', diff --git a/resources/lang/en_US/config.php b/resources/lang/en_US/config.php index 9fe187d98c..d3be97099d 100644 --- a/resources/lang/en_US/config.php +++ b/resources/lang/en_US/config.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'locale' => 'en, English, en_US, en_US.utf8, en_US.UTF-8', @@ -21,5 +30,4 @@ return [ 'quarter_of_year' => '%B %Y', 'year' => '%Y', 'half_year' => '%B %Y', - ]; diff --git a/resources/lang/en_US/csv.php b/resources/lang/en_US/csv.php index 4586dd6ac5..d61316b632 100644 --- a/resources/lang/en_US/csv.php +++ b/resources/lang/en_US/csv.php @@ -1,91 +1,24 @@ . */ - declare(strict_types=1); return [ - - // initial config - 'initial_title' => 'Import setup (1/3) - Basic CSV import setup', - 'initial_text' => 'To be able to import your file correctly, please validate the options below.', - 'initial_box' => 'Basic CSV import setup', - 'initial_box_title' => 'Basic CSV import setup options', - 'initial_header_help' => 'Check this box if the first row of your CSV file are the column titles.', - 'initial_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.', - 'initial_delimiter_help' => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', - 'initial_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.', - 'initial_submit' => 'Continue with step 2/3', - - // new options: - 'apply_rules_title' => 'Apply rules', - 'apply_rules_description' => 'Apply your rules. Note that this slows the import significantly.', - 'match_bills_title' => 'Match bills', - 'match_bills_description' => 'Match your bills to newly created withdrawals. Note that this slows the import significantly.', - - // roles config - 'roles_title' => 'Import setup (2/3) - Define each column\'s role', - 'roles_text' => 'Each column in your CSV file contains certain data. Please indicate what kind of data the importer should expect. The option to "map" data means that you will link each entry found in the column to a value in your database. An often mapped column is the column that contains the IBAN of the opposing account. That can be easily matched to IBAN\'s present in your database already.', - 'roles_table' => 'Table', - 'roles_column_name' => 'Name of column', - 'roles_column_example' => 'Column example data', - 'roles_column_role' => 'Column data meaning', - 'roles_do_map_value' => 'Map these values', - 'roles_column' => 'Column', - 'roles_no_example_data' => 'No example data available', - 'roles_submit' => 'Continue with step 3/3', - 'roles_warning' => 'At the very least, mark one column as the amount-column. It is advisable to also select a column for the description, date and the opposing account.', - - // map data - 'map_title' => 'Import setup (3/3) - 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.', - 'map_field_value' => 'Field value', - 'map_field_mapped_to' => 'Mapped to', - 'map_do_not_map' => '(do not map)', - 'map_submit' => 'Start the import', - - // 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_debet' => 'Amount (debet column)', - 'column_amount_credit' => 'Amount (credit column)', - '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/en_US/demo.php b/resources/lang/en_US/demo.php index c35b020f4a..ecea1e3411 100644 --- a/resources/lang/en_US/demo.php +++ b/resources/lang/en_US/demo.php @@ -1,13 +1,24 @@ . */ +declare(strict_types=1); return [ 'no_demo_text' => 'Sorry, there is no extra demo-explanation text for this page.', @@ -15,7 +26,7 @@ return [ 'index' => 'Welcome to Firefly III! On this page you get a quick overview of your finances. For more information, check out Accounts → Asset Accounts and of course the Budgets and Reports pages. Or just take a look around and see where you end up.', 'accounts-index' => 'Asset accounts are your personal bank accounts. Expense accounts are the accounts you spend money at, such as stores and friends. Revenue accounts are accounts you receive money from, such as your job, the government or other sources of income. On this page you can edit or remove them.', 'budgets-index' => 'This page shows you an overview of your budgets. The top bar shows the amount that is available to be budgeted. This can be customized for any period by clicking the amount on the right. The amount you\'ve actually spent is shown in the bar below. Below that are the expenses per budget and what you\'ve budgeted for them.', - 'reports-index-start' => 'Firefly III supports four types of reports. Read about them by clicking on the -icon in the top right corner.', + 'reports-index-start' => 'Firefly III supports a number of types of reports. Read about them by clicking on the -icon in the top right corner.', 'reports-index-examples' => 'Be sure to check out these examples: a monthly financial overview, a yearly financial overview and a budget overview.', 'currencies-index' => 'Firefly III supports multiple currencies. Although it defaults to the Euro it can be set to the US Dollar and many other currencies. As you can see a small selection of currencies has been included but you can add your own if you wish to. Changing the default currency will not change the currency of existing transactions however: Firefly III supports the use of multiple currencies at the same time.', 'transactions-index' => 'These expenses, deposits and transfers are not particularly imaginative. They have been generated automatically.', diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index 6ac6cdf35c..e079ca7c37 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ // general stuff: @@ -133,6 +142,22 @@ return [ 'invalid_locale_settings' => 'Firefly III is unable to format monetary amounts because your server is missing the required packages. There are instructions how to do this.', 'quickswitch' => 'Quickswitch', + // check for updates: + 'update_check_title' => 'Check for updates', + 'admin_update_check_title' => 'Automatically check for update', + 'admin_update_check_explain' => 'Firefly III can check for updates automatically. When you enable this setting, it will contact Github to see if a new version of Firefly III is available. When it is, you will get a notification. You can test this notification using the button on the right. Please indicate below if you want Firefly III to check for updates.', + 'check_for_updates_permission' => 'Firefly III can check for updates, but it needs your permission to do so. Please go to the administration to indicate if you would like this feature to be enabled.', + 'updates_ask_me_later' => 'Ask me later', + 'updates_do_not_check' => 'Do not check for updates', + 'updates_enable_check' => 'Enable the check for updates', + 'admin_update_check_now_title' => 'Check for updates now', + 'admin_update_check_now_explain' => 'If you press the button, Firefly III will see if your current version is the latest.', + 'check_for_updates_button' => 'Check now!', + 'update_new_version_alert' => 'A new version is available. You are running v:your_version, the latest version is v:new_version which was released on :date.', + 'update_current_version_alert' => 'You are running v:version, which is the latest available release.', + 'update_newer_version_alert' => 'You are running v:your_version, which is newer than the latest release, v:new_version.', + 'update_check_error' => 'An error occurred while checking for updates. Please view the log files.', + // search 'search' => 'Search', 'search_query' => 'Query', @@ -343,7 +368,6 @@ return [ 'rule_action_set_notes_choice' => 'Set notes to..', 'rule_action_set_notes' => 'Set notes to ":action_value"', - 'rules_have_read_warning' => 'Have you read the warning?', 'apply_rule_warning' => 'Warning: running a rule(group) on a large selection of transactions could take ages, and it could time-out. If it does, the rule(group) will only be applied to an unknown subset of your transactions. This might leave your financial administration in tatters. Please be careful.', @@ -397,9 +421,9 @@ return [ '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', + 'list_page_size_title' => 'Page size', + 'list_page_size_help' => 'Any list of things (accounts, transactions, etc) shows at most this many per page.', + 'list_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.', @@ -420,7 +444,6 @@ return [ 'optional_field_attachments' => 'Attachments', 'optional_field_meta_data' => 'Optional meta data', - // profile: 'change_your_password' => 'Change your password', 'delete_account' => 'Delete account', @@ -457,7 +480,6 @@ return [ 'login_with_new_email' => 'You can now login with your new email address.', 'login_with_old_email' => 'You can now login with your old email address again.', - // attachments 'nr_of_attachments' => 'One attachment|:count attachments', 'attachments' => 'Attachments', @@ -563,7 +585,6 @@ return [ 'suggested' => 'Suggested', 'average_between' => 'Average between :start and :end', - // bills: 'matching_on' => 'Matching on', 'between_amounts' => 'between :low and :high.', @@ -701,12 +722,15 @@ return [ 'deleted_transfer' => 'Successfully deleted transfer ":description"', 'stored_journal' => 'Successfully created new transaction ":description"', 'select_transactions' => 'Select transactions', + 'rule_group_select_transactions' => 'Apply ":title" to transactions', + 'rule_select_transactions' => 'Apply ":title" to transactions', 'stop_selection' => 'Stop selecting transactions', 'reconcile_selected' => 'Reconcile', '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.', 'no_budget' => 'none', + 'no_budget_squared' => '(no budget)', '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)', @@ -716,7 +740,6 @@ return [ 'opt_group_sharedAsset' => 'Shared asset accounts', 'opt_group_ccAsset' => 'Credit cards', - // new user: 'welcome' => 'Welcome to Firefly!', 'submit' => 'Submit', @@ -764,6 +787,7 @@ return [ 'piggyBanks' => 'Piggy banks', 'bills' => 'Bills', 'withdrawal' => 'Withdrawal', + 'opening_balance' => 'Opening balance', 'deposit' => 'Deposit', 'account' => 'Account', 'transfer' => 'Transfer', @@ -786,6 +810,7 @@ return [ 'report_default' => 'Default financial report between :start and :end', 'report_audit' => 'Transaction history overview between :start and :end', 'report_category' => 'Category report between :start and :end', + 'report_account' => 'Expense/revenue account report between :start and :end', 'report_budget' => 'Budget report between :start and :end', 'report_tag' => 'Tag report between :start and :end', 'quick_link_reports' => 'Quick links', @@ -810,8 +835,8 @@ return [ 'inactive' => 'Inactive', 'active' => 'Active', 'difference' => 'Difference', - 'in' => 'In', - 'out' => 'Out', + 'money_flowing_in' => 'In', + 'money_flowing_out' => 'Out', 'topX' => 'top :number', 'show_full_list' => 'Show entire list', 'show_only_top' => 'Show only top :number', @@ -821,6 +846,7 @@ return [ 'report_type_category' => 'Category report', 'report_type_budget' => 'Budget report', 'report_type_tag' => 'Tag report', + 'report_type_account' => 'Expense/revenue account report', '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', @@ -872,7 +898,10 @@ return [ 'account_role_ccAsset' => 'Credit card', 'budget_chart_click' => 'Please click on a budget name in the table above to see a chart.', 'category_chart_click' => 'Please click on a category name in the table above to see a chart.', - + 'in_out_accounts' => 'Earned and spent per combination', + 'in_out_per_category' => 'Earned and spent per category', + 'out_per_budget' => 'Spent per budget', + 'select_expense_revenue' => 'Select expense/revenue account', // charts: 'chart' => 'Chart', @@ -884,7 +913,6 @@ return [ 'earned' => 'Earned', 'overspent' => 'Overspent', 'left' => 'Left', - 'no_budget' => '(no budget)', 'max-amount' => 'Maximum amount', 'min-amount' => 'Minumum amount', 'journal-amount' => 'Current bill entry', @@ -968,8 +996,7 @@ return [ '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)', + 'nr_of_rules_in_total_groups' => ':count_rules rule(s) in :count_groups rule group(s)', 'tag_or_tags' => 'tag(s)', 'configuration_updated' => 'The configuration has been updated', 'setting_is_demo_site' => 'Demo site', @@ -1035,7 +1062,6 @@ return [ '(partially) pays for_outward' => '(partially) pays for', '(partially) reimburses_outward' => '(partially) reimburses', - // split a transaction: 'splits' => 'Splits', 'add_another_split' => 'Add another split', @@ -1054,49 +1080,16 @@ return [ // import bread crumbs and titles: 'import' => 'Import', 'import_data' => 'Import data', + 'import_general_index_file' => 'Import a file', + 'import_from_bunq' => 'Import from bunq', + 'import_using_spectre' => 'Import using Spectre', + 'import_using_plaid' => 'Import using Plaid', + 'import_config_bread_crumb' => 'Set up your import', // import index page: 'import_index_title' => 'Import data into Firefly III', 'import_index_sub_title' => 'Index', 'import_general_index_intro' => 'Welcome to Firefly\'s import routine. There are a few ways of importing data into Firefly III, displayed here as buttons.', - 'import_general_index_csv_file' => 'Import a (CSV) file', - 'import_index_intro' => 'This routine will help you import files from your bank into Firefly III. Please check out the help pages in the top right corner.', - 'import_index_file' => 'Select your file', - 'import_index_config' => '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_index_type' => 'Select the type of file you will upload', - 'import_index_start' => 'Start importing', - 'import_file' => 'Import a file', - - // supported file types: - 'import_file_type_csv' => 'CSV (comma separated values)', - - // import configuration routine: - 'import_config_sub_title' => 'Set up your import file', - 'import_config_bread_crumb' => 'Set up your import file', - - // import status page: - 'import_status_bread_crumb' => 'Import status', - 'import_status_sub_title' => 'Import status', - 'import_status_wait_title' => 'Please hold...', - 'import_status_wait_text' => 'This box will disappear in a moment.', - 'import_status_ready_title' => 'Import is ready to start', - 'import_status_ready_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_status_ready_config' => 'Download configuration', - 'import_status_ready_start' => 'Start the import', - 'import_status_ready_share' => '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_status_running_title' => 'The import is running', - 'import_status_running_placeholder' => 'Please hold for an update...', - 'import_status_errors_title' => 'Errors during the import', - 'import_status_errors_single' => 'An error has occured during the import. It does not appear to be fatal.', - 'import_status_errors_multi' => 'Some errors occured during the import. These do not appear to be fatal.', - 'import_status_fatal_title' => 'A fatal error occurred', - 'import_status_fatal_text' => 'A fatal error occurred, which the import-routine cannot recover from. Please see the explanation in red below.', - 'import_status_fatal_more' => 'If the error is a time-out, the import will have stopped half-way. For some server configurations, it is merely the server that stopped while the import keeps running in the background. To verify this, check out the log files. If the problem persists, consider importing over the command line instead.', - 'import_status_finished_title' => 'Import routine finished', - 'import_status_finished_text' => 'The import routine has imported your file.', - 'import_status_finished_job' => 'The transactions imported can be found in tag :tag.', - 'import_status_job_running' => 'The import is running...', - 'import_with_key' => 'Import with key \':key\'', // sandstorm.io errors and messages: 'sandstorm_not_available' => 'This function is not available when you are using Firefly III within a Sandstorm.io environment.', @@ -1146,6 +1139,4 @@ return [ 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent or insurance.', 'no_bills_imperative_default' => 'Do you have such regular bills? Create a bill and keep track of your payments:', 'no_bills_create_default' => 'Create a bill', - - ]; diff --git a/resources/lang/en_US/form.php b/resources/lang/en_US/form.php index 6d7a98c2fe..ee20875605 100644 --- a/resources/lang/en_US/form.php +++ b/resources/lang/en_US/form.php @@ -1,18 +1,26 @@ . */ +declare(strict_types=1); return [ - // new user: 'bank_name' => 'Bank name', 'bank_balance' => 'Balance', @@ -80,7 +88,6 @@ return [ 'convert_Deposit' => 'Convert deposit', 'convert_Transfer' => 'Convert transfer', - 'amount' => 'Amount', 'date' => 'Date', 'interest_date' => 'Interest date', @@ -162,6 +169,7 @@ return [ '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.', + 'check_for_updates' => 'Check for updates', 'email' => 'Email address', 'password' => 'Password', @@ -169,13 +177,11 @@ return [ 'blocked' => 'Is blocked?', 'blocked_code' => 'Reason for block', - // admin 'domain' => 'Domain', 'single_user_mode' => 'Disable user registration', 'is_demo_site' => 'Is demo site', - // import 'import_file' => 'Import file', 'configuration_file' => 'Configuration file', @@ -186,7 +192,12 @@ return [ 'csv_delimiter' => 'CSV field delimiter', 'csv_import_account' => 'Default import account', 'csv_config' => 'CSV import configuration', - + 'client_id' => 'Client ID', + 'service_secret' => 'Service secret', + 'app_secret' => 'App secret', + 'public_key' => 'Public key', + 'country_code' => 'Country code', + 'provider_code' => 'Bank or data-provider', 'due_date' => 'Due date', 'payment_date' => 'Payment date', diff --git a/resources/lang/en_US/import.php b/resources/lang/en_US/import.php new file mode 100644 index 0000000000..a73f185e19 --- /dev/null +++ b/resources/lang/en_US/import.php @@ -0,0 +1,163 @@ +. + */ +declare(strict_types=1); + +return [ + // status of import: + 'status_wait_title' => 'Please hold...', + 'status_wait_text' => 'This box will disappear in a moment.', + 'status_fatal_title' => 'A fatal error occurred', + 'status_fatal_text' => 'A fatal error occurred, which the import-routine cannot recover from. Please see the explanation in red below.', + 'status_fatal_more' => 'If the error is a time-out, the import will have stopped half-way. For some server configurations, it is merely the server that stopped while the import keeps running in the background. To verify this, check out the log files. If the problem persists, consider importing over the command line instead.', + 'status_ready_title' => 'Import is ready to start', + 'status_ready_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.', + 'status_ready_noconfig_text' => 'The import is ready to start. All the configuration you needed to do has been done. 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.', + 'status_ready_config' => 'Download configuration', + 'status_ready_start' => 'Start the import', + 'status_ready_share' => '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.', + 'status_job_new' => 'The job is brand new.', + 'status_job_configuring' => 'The import is being configured.', + 'status_job_configured' => 'The import is configured.', + 'status_job_running' => 'The import is running.. Please wait..', + 'status_job_error' => 'The job has generated an error.', + 'status_job_finished' => 'The import has finished!', + 'status_running_title' => 'The import is running', + 'status_running_placeholder' => 'Please hold for an update...', + 'status_finished_title' => 'Import routine finished', + 'status_finished_text' => 'The import routine has imported your data.', + 'status_errors_title' => 'Errors during the import', + 'status_errors_single' => 'An error has occurred during the import. It does not appear to be fatal.', + 'status_errors_multi' => 'Some errors occurred during the import. These do not appear to be fatal.', + 'status_bread_crumb' => 'Import status', + 'status_sub_title' => 'Import status', + 'config_sub_title' => 'Set up your import', + 'status_finished_job' => 'The transactions imported can be found in tag :tag.', + 'import_with_key' => 'Import with key \':key\'', + + // file, upload something + 'file_upload_title' => 'Import setup (1/4) - Upload your file', + 'file_upload_text' => 'This routine will help you import files from your bank into Firefly III. Please check out the help pages in the top right corner.', + 'file_upload_fields' => 'Fields', + 'file_upload_help' => 'Select your file', + 'file_upload_config_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', + 'file_upload_type_help' => 'Select the type of file you will upload', + 'file_upload_submit' => 'Upload files', + + // file, upload types + 'import_file_type_csv' => 'CSV (comma separated values)', + + // file, initial config for CSV + 'csv_initial_title' => 'Import setup (2/4) - Basic CSV import setup', + 'csv_initial_text' => 'To be able to import your file correctly, please validate the options below.', + 'csv_initial_box' => 'Basic CSV import setup', + 'csv_initial_box_title' => 'Basic CSV import setup options', + 'csv_initial_header_help' => 'Check this box if the first row of your CSV file are the column titles.', + 'csv_initial_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.', + 'csv_initial_delimiter_help' => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', + 'csv_initial_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.', + 'csv_initial_submit' => 'Continue with step 3/4', + + // file, new options: + 'file_apply_rules_title' => 'Apply rules', + 'file_apply_rules_description' => 'Apply your rules. Note that this slows the import significantly.', + 'file_match_bills_title' => 'Match bills', + 'file_match_bills_description' => 'Match your bills to newly created withdrawals. Note that this slows the import significantly.', + + // file, roles config + 'csv_roles_title' => 'Import setup (3/4) - Define each column\'s role', + 'csv_roles_text' => 'Each column in your CSV file contains certain data. Please indicate what kind of data the importer should expect. The option to "map" data means that you will link each entry found in the column to a value in your database. An often mapped column is the column that contains the IBAN of the opposing account. That can be easily matched to IBAN\'s present in your database already.', + 'csv_roles_table' => 'Table', + 'csv_roles_column_name' => 'Name of column', + 'csv_roles_column_example' => 'Column example data', + 'csv_roles_column_role' => 'Column data meaning', + 'csv_roles_do_map_value' => 'Map these values', + 'csv_roles_column' => 'Column', + 'csv_roles_no_example_data' => 'No example data available', + 'csv_roles_submit' => 'Continue with step 4/4', + 'csv_roles_warning' => 'At the very least, mark one column as the amount-column. It is advisable to also select a column for the description, date and the opposing account.', + + // file, map data + 'file_map_title' => 'Import setup (4/4) - Connect import data to Firefly III data', + 'file_map_text' => 'In the following tables, the left value shows you information found in your uploaded 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.', + 'file_map_field_value' => 'Field value', + 'file_map_field_mapped_to' => 'Mapped to', + 'map_do_not_map' => '(do not map)', + 'file_map_submit' => 'Start the import', + + // 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_debit' => 'Amount (debit column)', + 'column_amount_credit' => 'Amount (credit column)', + '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-debit-credit' => 'Rabobank specific debit/credit indicator', + 'column_ing-debit-credit' => 'ING specific debit/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 Debit', + '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)', + 'column_note' => 'Note(s)', + + // prerequisites + 'prerequisites' => 'Prerequisites', + + // bunq + 'bunq_prerequisites_title' => 'Prerequisites for an import from bunq', + 'bunq_prerequisites_text' => 'In order to import from bunq, you need to obtain an API key. You can do this through the app.', + + // Spectre + 'spectre_title' => 'Import using Spectre', + 'spectre_prerequisites_title' => 'Prerequisites for an import using Spectre', + 'spectre_prerequisites_text' => 'In order to import data using the Spectre API, you need to prove some secrets. They can be found on the secrets page.', + 'spectre_enter_pub_key' => 'The import will only work when you enter this public key on your security page.', + 'spectre_select_country_title' => 'Select a country', + 'spectre_select_country_text' => 'Firefly III has a large selection of banks and sites from which Spectre can download transactional data. These banks are sorted by country. Please not that there is a "Fake Country" for when you wish to test something. If you wish to import from other financial tools, please use the imaginary country called "Other financial applications". By default, Spectre only allows you to download data from fake banks. Make sure your status is "Live" on your Dashboard if you wish to download from real banks.', + 'spectre_select_provider_title' => 'Select a bank', + 'spectre_select_provider_text' => 'Spectre supports the following banks or financial services grouped under :country. Please pick the one you wish to import from.', + 'spectre_input_fields_title' => 'Input mandatory fields', + 'spectre_input_fields_text' => 'The following fields are mandated by ":provider" (from :country).', + 'spectre_instructions_english' => 'These instructions are provided by Spectre for your convencience. They are in English:', +]; diff --git a/resources/lang/en_US/intro.php b/resources/lang/en_US/intro.php index 0fe735125b..2a09aff2a7 100644 --- a/resources/lang/en_US/intro.php +++ b/resources/lang/en_US/intro.php @@ -1,13 +1,24 @@ . */ +declare(strict_types=1); return [ // index diff --git a/resources/lang/en_US/list.php b/resources/lang/en_US/list.php index 8129b082fc..f7f6d0c8fa 100644 --- a/resources/lang/en_US/list.php +++ b/resources/lang/en_US/list.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'buttons' => 'Buttons', @@ -25,7 +34,7 @@ return [ 'currentBalance' => 'Current balance', 'active' => 'Is active?', 'lastActivity' => 'Last activity', - 'balanceDiff' => 'Balance difference between :start and :end', + 'balanceDiff' => 'Balance difference', 'matchesOn' => 'Matched on', 'account_type' => 'Account type', 'created_at' => 'Created at', diff --git a/resources/lang/en_US/pagination.php b/resources/lang/en_US/pagination.php index 6e1c86af46..2c19d61e0c 100644 --- a/resources/lang/en_US/pagination.php +++ b/resources/lang/en_US/pagination.php @@ -1,19 +1,26 @@ . */ +declare(strict_types=1); return [ - 'previous' => '« Previous', 'next' => 'Next »', - ]; diff --git a/resources/lang/en_US/passwords.php b/resources/lang/en_US/passwords.php index aae1d74962..022045d473 100644 --- a/resources/lang/en_US/passwords.php +++ b/resources/lang/en_US/passwords.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'password' => 'Passwords must be at least six characters and match the confirmation.', diff --git a/resources/lang/en_US/validation.php b/resources/lang/en_US/validation.php index 9ea55191b5..2aed996555 100644 --- a/resources/lang/en_US/validation.php +++ b/resources/lang/en_US/validation.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'iban' => 'This is not a valid IBAN.', diff --git a/resources/lang/fr_FR/auth.php b/resources/lang/fr_FR/auth.php index 67482eb063..f6cd19d030 100644 --- a/resources/lang/fr_FR/auth.php +++ b/resources/lang/fr_FR/auth.php @@ -1,18 +1,26 @@ . */ +declare(strict_types=1); return [ - /* |-------------------------------------------------------------------------- | Authentication Language Lines @@ -26,5 +34,4 @@ return [ 'failed' => 'Ces identifiants n\'ont aucune correspondance.', 'throttle' => 'Trop de tentatives de connexion. Veuillez essayer à nouveau dans :seconds secondes.', - ]; diff --git a/resources/lang/fr_FR/bank.php b/resources/lang/fr_FR/bank.php index dc45c22851..ef0d636f91 100644 --- a/resources/lang/fr_FR/bank.php +++ b/resources/lang/fr_FR/bank.php @@ -1,8 +1,24 @@ . + */ declare(strict_types=1); - return [ - 'bunq_prerequisites_title' => 'Pré-requis pour un import depuis Bunq', - 'bunq_prerequisites_text' => 'Pour pouvoir importer depuis Bunq, vous avez besoin d\'obtenir une clé API. Vous pouvez faire celà depuis l\'appli.', ]; diff --git a/resources/lang/fr_FR/breadcrumbs.php b/resources/lang/fr_FR/breadcrumbs.php index 20ac87c186..9ddec46d34 100644 --- a/resources/lang/fr_FR/breadcrumbs.php +++ b/resources/lang/fr_FR/breadcrumbs.php @@ -1,16 +1,24 @@ . */ +declare(strict_types=1); return [ 'home' => 'Accueil', @@ -21,6 +29,7 @@ return [ 'preferences' => 'Préférences', 'profile' => 'Profil', 'changePassword' => 'Modifier le mot de passe', + 'change_email' => 'Changer votre adresse e-mail', 'bills' => 'Factures', 'newBill' => 'Nouvelle facture', 'edit_bill' => 'Editer la facture : ":name"', diff --git a/resources/lang/fr_FR/config.php b/resources/lang/fr_FR/config.php index 846407e08a..4db3999e58 100644 --- a/resources/lang/fr_FR/config.php +++ b/resources/lang/fr_FR/config.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'locale' => 'fr, French, fr_FR, fr_FR.utf8, fr_FR.UTF-8', @@ -21,5 +30,4 @@ return [ 'quarter_of_year' => '%B %Y', 'year' => '%Y', 'half_year' => '%B %Y', - ]; diff --git a/resources/lang/fr_FR/csv.php b/resources/lang/fr_FR/csv.php index 9d173e73e4..d61316b632 100644 --- a/resources/lang/fr_FR/csv.php +++ b/resources/lang/fr_FR/csv.php @@ -1,91 +1,24 @@ . */ - declare(strict_types=1); return [ - - // initial config - 'initial_title' => 'Importer la configuration (1/3) - Configuration de l\'importation CSV basique', - 'initial_text' => 'Pour pouvoir importer votre fichier correctement, veuillez validez les options ci-dessous.', - 'initial_box' => 'Options d’importation CSV basique', - 'initial_box_title' => 'Options d’importation CSV basique', - 'initial_header_help' => 'Cochez cette case si la première ligne de votre fichier CSV contient les entêtes des colonnes.', - 'initial_date_help' => 'Le format de la date et de l’heure dans votre fichier CSV. Utiliser le format comme indiqué sur cette page. La valeur par défaut va analyser les dates ressemblant à ceci : :dateExample.', - 'initial_delimiter_help' => 'Choisissez le délimiteur de champ qui est utilisé dans votre fichier d’entrée. Si vous n’êtes pas certain, la virgule est l’option la plus sûre.', - 'initial_import_account_help' => 'Si votre fichier CSV ne contient AUCUNE information concernant vos compte(s) actif, utilisez cette liste déroulante pour choisir à quel compte les opérations contenues dans le CSV font référence.', - 'initial_submit' => 'Passez à l’étape 2/3', - - // new options: - 'apply_rules_title' => 'Appliquer les règles', - 'apply_rules_description' => 'Appliquer les règles. Notez que cela ralentit considérablement l\'import.', - 'match_bills_title' => 'Faire correspondre les factures', - 'match_bills_description' => 'Faire correspondre vos factures aux retraits nouvellement créés. Notez que cela ralentit considérablement l\'import.', - - // roles config - 'roles_title' => 'Importer la configuration (1/3) - Définir le rôle de chaque colonne', - 'roles_text' => 'Chaque colonne de votre fichier CSV contient certaines données. Veuillez indiquer quel type de données, l’importateur doit attendre. L’option de « mapper » les données signifie que vous allez lier chaque entrée trouvée dans la colonne à une valeur dans votre base de données. Souvent une colonne est la colonne contenant l’IBAN du compte opposé. Qui peut être facilement adapté aux IBAN déjà présents dans votre base de données.', - 'roles_table' => 'Tableau', - 'roles_column_name' => 'Nom de colonne', - 'roles_column_example' => 'Données d’exemple de colonne', - 'roles_column_role' => 'Signification des données de colonne', - 'roles_do_map_value' => 'Mapper ces valeurs', - 'roles_column' => 'Colonne', - 'roles_no_example_data' => 'Pas de données disponibles', - 'roles_submit' => 'Passez à l’étape 3/3', - 'roles_warning' => 'La moindre des choses, c\'est de marquer une colonne comme colonne-montant. Il est conseillé de sélectionner également une colonne pour la description, la date et le compte opposé.', - - // map data - 'map_title' => 'Importer la configuration (3/3) - Connecter l\'importation des données aux données de Firefly III', - 'map_text' => 'Dans les tableaux suivants, la valeur gauche vous montre des informations trouvées dans votre fichier CSV téléchargé. C’est votre rôle de mapper cette valeur, si possible, une valeur déjà présente dans votre base de données. Firefly s’en tiendra à ce mappage. Si il n’y a pas de valeur correspondante, ou vous ne souhaitez pas la valeur spécifique de la carte, ne sélectionnez rien.', - 'map_field_value' => 'Valeur du champ', - 'map_field_mapped_to' => 'Mappé à', - 'map_do_not_map' => '(ne pas mapper)', - 'map_submit' => 'Démarrer l\'importation', - - // map things. - 'column__ignore' => '(ignorer cette colonne)', - 'column_account-iban' => 'Compte d’actif (IBAN)', - 'column_account-id' => 'Compte d\'actif (ID correspondant à Firefly)', - 'column_account-name' => 'Compte d’actif (nom)', - 'column_amount' => 'Montant', - 'column_amount_debet' => 'Montant (colonne débit)', - 'column_amount_credit' => 'Montant (colonne de crédit)', - 'column_amount-comma-separated' => 'Montant (virgule comme séparateur décimal)', - 'column_bill-id' => 'Facture (ID correspondant à Firefly)', - 'column_bill-name' => 'Nom de la facture', - 'column_budget-id' => 'Budget (ID correspondant à Firefly)', - 'column_budget-name' => 'Nom du budget', - 'column_category-id' => 'Catégorie (ID correspondant à Firefly)', - 'column_category-name' => 'Nom de la catégorie', - 'column_currency-code' => 'Code des monnaies (ISO 4217)', - 'column_currency-id' => 'Devise (ID correspondant à Firefly)', - 'column_currency-name' => 'Nom de la devise (correspondant à Firefly)', - 'column_currency-symbol' => 'Symbole de la devise (correspondant à Firefly)', - 'column_date-interest' => 'Date de calcul des intérêts', - 'column_date-book' => 'Date de valeur de la transaction', - 'column_date-process' => 'Date de traitement de la transaction', - 'column_date-transaction' => 'Date', - 'column_description' => 'Description', - 'column_opposing-iban' => 'Compte destination (IBAN)', - 'column_opposing-id' => 'ID du Compte destination(ID correspondant Firefly)', - 'column_external-id' => 'Identifiant externe', - 'column_opposing-name' => 'Compte destination (nom)', - 'column_rabo-debet-credit' => 'Indicateur spécifique débit/crédit à Rabobank', - 'column_ing-debet-credit' => 'Indicateur spécifique débit/crédit à ING', - 'column_sepa-ct-id' => 'SEPA Transfert Crédit ID de bout en bout', - 'column_sepa-ct-op' => 'SEPA Transfert Crédit compte opposé', - 'column_sepa-db' => 'SEPA débit immédiat', - 'column_tags-comma' => 'Mots-clés (séparé par des virgules)', - 'column_tags-space' => 'Mots-clés (séparé par des espaces)', - 'column_account-number' => 'Compte d’actif (numéro de compte)', - 'column_opposing-number' => 'Compte destination (numéro de compte)', ]; diff --git a/resources/lang/fr_FR/demo.php b/resources/lang/fr_FR/demo.php index 6466b291ac..0fc2018806 100644 --- a/resources/lang/fr_FR/demo.php +++ b/resources/lang/fr_FR/demo.php @@ -1,22 +1,33 @@ . */ +declare(strict_types=1); return [ - 'no_demo_text' => 'Désolé, il n’y a aucun texte supplémentaire de démonstration ou d\'explication pour cette page.', + 'no_demo_text' => 'Désolé, il n’y a aucun texte supplémentaire de démonstration ou d\'explication pour cette page.', 'see_help_icon' => 'Cependant, l\'icône située dans le coin supérieur droit peut vous en dire plus.', - 'index' => 'Bienvenue chez Firefly III ! Sur cette page, vous obtenez un aperçu rapide de vos finances. Pour plus d’informations, consultez comptes → Comptes d’actif et, bien sûr, les pages des Budgets et des rapports. Ou juste jetez un coup d’œil et voyez où vous vous retrouvez.', + 'index' => 'Bienvenue chez Firefly III ! Sur cette page, vous obtenez un aperçu rapide de vos finances. Pour plus d’informations, consultez comptes → Comptes d’actif et, bien sûr, les pages des Budgets et des rapports. Ou juste jetez un coup d’œil et voyez où vous vous retrouvez.', 'accounts-index' => 'Les comptes d’actifs sont vos comptes bancaires personnels. Les comptes de dépenses sont des comptes où vous dépensez de l’argent, comme les magasins et les amis. Les comptes de recettes sont des comptes où vous recevez de l’argent, comme votre travail, le gouvernement ou d’autres sources de revenu. Sur cette page, vous pouvez les modifier ou les supprimer.', 'budgets-index' => 'Cette page vous présente un aperçu de vos budgets. La barre du haut affiche le montant disponible à budgétiser. Cela peut être personnalisé pour toute période en cliquant sur le montant sur la droite. Le montant que vous avez réellement dépensé s’affiche dans la barre ci-dessous. Visualisez ainsi les dépenses budgétisées et votre prévisionnel.', - 'reports-index-start' => 'Firefly III prend en charge quatre types de rapports. Apprenez-en plus à leur sujet en cliquant sur l\'icône située dans le coin supérieur droit.', - 'reports-index-examples' => 'N’oubliez pas de consultez ces exemples : un aperçu financier mensuel, une vue d’ensemble financière annuelle ainsi qu’une présentation du budget.', + 'reports-index-start' => 'Firefly III prend en charge un certain nombre de types de rapports. Lisez-les en cliquant sur l\'icône dans le coin supérieur droit.', + 'reports-index-examples' => 'N’oubliez pas de consultez ces exemples : un aperçu financier mensuel, une vue d’ensemble financière annuelle ainsi qu’une présentation du budget.', 'currencies-index' => 'Firefly III prend en charge plusieurs devises. Bien que l\'Euro soit la devise par défaut, cette dernière peut être changée pour le Dollar américain et de nombreuses autres devises. Comme vous pouvez le remarquer une petite sélection des monnaies a été incluse, mais vous pouvez ajouter vos propres devises si vous le souhaitez. Gardez à l\'esprit que la modification de la devise par défaut ne modifie pas la monnaie des transactions existantes : Firefly III prend en charge l’utilisation de plusieurs devises en même temps.', 'transactions-index' => 'Ces dépenses, dépôts et transferts ne sont pas particulièrement imaginatifs. Ils ont été générés automatiquement.', 'piggy-banks-index' => 'Comme vous pouvez le voir, il y a trois tirelires. Utilisez les boutons plus et moins pour influer sur le montant d’argent dans chaque tirelire. Cliquez sur le nom de la tirelire pour voir l’administration pour chaque tirelire.', diff --git a/resources/lang/fr_FR/firefly.php b/resources/lang/fr_FR/firefly.php index 34a67766e1..7b6ae27046 100644 --- a/resources/lang/fr_FR/firefly.php +++ b/resources/lang/fr_FR/firefly.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ // general stuff: @@ -22,7 +31,7 @@ return [ 'today' => 'aujourd\'hui', 'customRange' => 'Etendue personnalisée', 'apply' => 'Appliquer', - 'select_date' => 'Sélectionner une date..', + 'select_date' => 'Sélectionner une date...', 'cancel' => 'Annuler', 'from' => 'Depuis', 'to' => 'A', @@ -42,7 +51,7 @@ return [ 'new_revenue_account' => 'Nouveau compte de recettes', 'new_budget' => 'Nouveau budget', 'new_bill' => 'Nouvelle facture', - 'block_account_logout' => 'Vous avez été déconnecté. Les comptes bloqués ne peuvent pas utiliser ce site. Vous êtes vous enregistrés avec une adresse e-mail valide ?', + 'block_account_logout' => 'Vous avez été déconnecté. Les comptes bloqués ne peuvent pas utiliser ce site. Vous êtes-vous enregistré avec une adresse e-mail valide ?', 'flash_success' => 'Terminé avec succès !', 'flash_info' => 'Message', 'flash_warning' => 'Attention !', @@ -61,11 +70,11 @@ return [ 'two_factor_lost_header' => 'Perdu votre authentification à deux facteurs ?', 'two_factor_lost_intro' => 'Malheureusement, ce n’est pas quelque chose que vous pouvez réinitialiser depuis l’interface web. Vous avez deux choix.', 'two_factor_lost_fix_self' => 'Si vous exécutez votre propre instance de Firefly III, vérifiez les logs dans storage/logs pour obtenir des instructions.', - 'two_factor_lost_fix_owner' => 'Dans le cas contraire, contactez le propriétaire du site par courriel : site_owner et demandez leur de réinitialiser votre authentification à deux facteurs.', + 'two_factor_lost_fix_owner' => 'Dans le cas contraire, contactez le propriétaire du site par courriel :site_owner et demandez-lui de réinitialiser votre authentification à deux facteurs.', 'warning_much_data' => ':days de données peuvent prendre un certain temps à charger.', 'registered' => 'Vous avez été enregistré avec succès !', 'Default asset account' => 'Compte d’actif par défaut', - 'no_budget_pointer' => 'Vous semblez n’avoir encore aucun budget. Vous devez en créer sur la page des budgets. Les budgets peuvent vous aider à garder une trace des dépenses.', + 'no_budget_pointer' => 'Vous semblez n’avoir encore aucun budget. Vous devez en créer un sur la page des budgets. Les budgets peuvent vous aider à garder une trace des dépenses.', 'Savings account' => 'Compte d’épargne', 'Credit card' => 'Carte de Crédit', 'source_accounts' => 'Compte(s) source', @@ -89,7 +98,7 @@ return [ 'left_in_budget_limit' => 'Reste à dépenser selon budget', 'current_period' => 'Période en cours', 'show_the_current_period_and_overview' => 'Afficher l’exercice en cours et sa vue d’ensemble', - 'pref_languages_locale' => 'Pour une langue autre que l’anglais pour fonctionner correctement, votre système d’exploitation doit être équipé avec les paramètres régionaux correctes. Si ils ne sont pas présents, les données de devises, les dates et les montants peuvent être mal formatés.', + 'pref_languages_locale' => 'Pour une langue autre que l’anglais et pour fonctionner correctement, votre système d’exploitation doit être équipé avec les paramètres régionaux correctes. Si ils ne sont pas présents, les données de devises, les dates et les montants peuvent être mal formatés.', 'budget_in_period' => 'Toutes les transactions pour le budget ":name" entre :start et :end', 'chart_budget_in_period' => 'Graphique pour toutes les transactions pour le budget ":name" entre :start et :end', 'chart_account_in_period' => 'Graphique pour toutes les transactions pour le compte ":name" entre :start et :end', @@ -98,7 +107,7 @@ return [ 'clone_withdrawal' => 'Cloner ce retrait', 'clone_deposit' => 'Cloner ce dépôt', 'clone_transfer' => 'Cloner ce transfert', - 'multi_select_no_selection' => 'Aucun selectionnez', + 'multi_select_no_selection' => 'Aucun sélectionné', 'multi_select_all_selected' => 'Tous sélectionnés', 'multi_select_filter_placeholder' => 'Rechercher..', 'between_dates_breadcrumb' => 'Entre :start et :end', @@ -125,14 +134,30 @@ return [ 'chart_all_journals_for_budget' => 'Graphique pour toutes les transactions pour le budget :name', 'journals_in_period_for_category' => 'Toutes les transactions pour la catégorie :name entre :start et :end', 'journals_in_period_for_tag' => 'Toutes les transactions de balise :tag entre :start et :end', - 'not_available_demo_user' => 'La fonctionnalité que vous essayez d’accéder n’est pas disponible pour les utilisateurs de la démo.', + 'not_available_demo_user' => 'La fonctionnalité à laquelle vous essayez d’accéder n’est pas disponible pour les utilisateurs de la démo.', 'exchange_rate_instructions' => 'Compte d’actif "@name" n’accepte que les transactions en @native_currency. Si vous souhaitez utiliser @foreign_currency à la place, assurez-vous que le montant en @native_currency est aussi bien connu :', - 'transfer_exchange_rate_instructions' => 'Compte d’actif source "@source_name" n’accepte que les transactions en @source_currency. Compte d’actif "@dest_name" de destination n’accepte que les transactions en @dest_currency. Vous devez fournir le montant transféré correctement dans les deux monnaies.', + 'transfer_exchange_rate_instructions' => 'Compte d’actif source "@source_name" n’accepte que les transactions en @source_currency. Compte d’actif "@dest_name" de destination n’accepte que les transactions en @dest_currency. Vous devez fournir le montant transféré correctement dans les deux devises.', 'transaction_data' => 'Données de transaction', 'invalid_server_configuration' => 'Configuration de serveur invalide', - 'invalid_locale_settings' => 'Firefly III ne parvient pas à formater les montants monétaires car il manque des paquets logiciels sur votre serveur. Voici des insctructions sur comment procéder.', + 'invalid_locale_settings' => 'Firefly III ne parvient pas à formater les montants monétaires car il manque des paquets logiciels sur votre serveur. Voici des instructions sur comment procéder.', 'quickswitch' => 'Changement rapide', + // check for updates: + 'update_check_title' => 'Check for updates', + 'admin_update_check_title' => 'Automatically check for update', + 'admin_update_check_explain' => 'Firefly III can check for updates automatically. When you enable this setting, it will contact Github to see if a new version of Firefly III is available. When it is, you will get a notification. You can test this notification using the button on the right. Please indicate below if you want Firefly III to check for updates.', + 'check_for_updates_permission' => 'Firefly III can check for updates, but it needs your permission to do so. Please go to the administration to indicate if you would like this feature to be enabled.', + 'updates_ask_me_later' => 'Ask me later', + 'updates_do_not_check' => 'Do not check for updates', + 'updates_enable_check' => 'Enable the check for updates', + 'admin_update_check_now_title' => 'Check for updates now', + 'admin_update_check_now_explain' => 'If you press the button, Firefly III will see if your current version is the latest.', + 'check_for_updates_button' => 'Check now!', + 'update_new_version_alert' => 'A new version is available. You are running v:your_version, the latest version is v:new_version which was released on :date.', + 'update_current_version_alert' => 'You are running v:version, which is the latest available release.', + 'update_newer_version_alert' => 'You are running v:your_version, which is newer than the latest release, v:new_version.', + 'update_check_error' => 'An error occurred while checking for updates. Please view the log files.', + // search 'search' => 'Rechercher', 'search_query' => 'Requête', @@ -163,7 +188,7 @@ return [ 'export_format' => 'Format d\'export', 'export_format_csv' => 'Valeurs séparées par des virgules (fichier CSV)', 'export_format_mt940' => 'Format compatible MT940', - 'include_old_uploads_help' => 'Firefly III ne détruit pas les fichier CSV originaux que vous avez déjà importé dans le passé. Vous pouvez les inclure dans votre exportation.', + 'include_old_uploads_help' => 'Firefly III ne détruit pas les fichiers CSV originaux que vous avez déjà importé dans le passé. Vous pouvez les inclure dans votre exportation.', 'do_export' => 'Exporter', 'export_status_never_started' => 'L’exportation n’a pas encore commencé', 'export_status_make_exporter' => 'Créer un export...', @@ -175,8 +200,8 @@ return [ 'export_status_created_journal_file' => 'Fichier d\'export créé!', 'export_status_collecting_attachments' => 'Collecte toutes vos pièces jointes...', 'export_status_collected_attachments' => 'Toutes vos pièces jointes sont collectées !', - 'export_status_collecting_old_uploads' => 'Tous vos précédent upload sont en cours de collecte...', - 'export_status_collected_old_uploads' => 'Tous vos précédent upload sont collectés !', + 'export_status_collecting_old_uploads' => 'Tous vos précédents uploads sont en cours de collecte...', + 'export_status_collected_old_uploads' => 'Tous vos précédents uploads sont collectés !', 'export_status_creating_zip_file' => 'Création d’un fichier zip...', 'export_status_created_zip_file' => 'Fichier zip créé!', 'export_status_finished' => 'L\'export s\'est terminé avec succès ! Yay !', @@ -193,13 +218,13 @@ return [ 'rule_priority_down' => 'Donner à la règle moins de priorité', 'make_new_rule_group' => 'Créer un nouveau groupe de règles', 'store_new_rule_group' => 'Créer un nouveau groupe de règles', - 'created_new_rule_group' => 'Le nouveau groupe de règles ": titre" est créé !', - 'updated_rule_group' => 'Groupe de règles ":title" mise à jour avec succès.', + 'created_new_rule_group' => 'Le nouveau groupe de règles ":title" est créé !', + 'updated_rule_group' => 'Groupe de règles ":title" mis à jour avec succès.', 'edit_rule_group' => 'Modifier le groupe de règles ":title"', 'delete_rule_group' => 'Supprimer le groupe de règles ":title"', - 'deleted_rule_group' => 'Groupe de règles ":title" supprimée', + 'deleted_rule_group' => 'Groupe de règles ":title" supprimé', 'update_rule_group' => 'Mettre à jour le groupe de règles', - 'no_rules_in_group' => 'Il n’y a pas de règles dans ce groupe', + 'no_rules_in_group' => 'Il n’y a pas de règle dans ce groupe', 'move_rule_group_up' => 'Monter le groupe de règles', 'move_rule_group_down' => 'Descendre le groupe de règles', 'save_rules_by_moving' => 'Enregistrer ces règles en les déplaçant vers un autre groupe de règles :', @@ -209,7 +234,7 @@ return [ 'stored_new_rule' => 'Nouvelle règle créée avec le titre ":title"', 'deleted_rule' => 'Règle supprimée avec le titre ":title"', 'store_new_rule' => 'Créer une nouvelle règle', - 'updated_rule' => 'Nouvelle règle enregistrée avec le titre ":title"', + 'updated_rule' => 'Nouvelle règle avec le titre ":title" enregistrée', 'default_rule_group_name' => 'Règles par défaut', 'default_rule_group_description' => 'Toutes vos règles n\'étant pas dans un groupe particulier.', 'default_rule_name' => 'Votre première règle par défaut', @@ -226,24 +251,24 @@ return [ 'action_value' => 'Valeur de l’action', 'stop_executing_other_actions' => 'Arrêter l’exécution des autres actions', 'add_rule_action' => 'Ajouter une nouvelle action', - 'edit_rule' => 'Modifier la règle ": titre"', - 'delete_rule' => 'Supprimer la règle ":titre"', + 'edit_rule' => 'Modifier la règle ":title"', + 'delete_rule' => 'Supprimer la règle ":title"', 'update_rule' => 'Mettre à jour la règle', 'test_rule_triggers' => 'Voir les opérations correspondantes', - 'warning_transaction_subset' => 'Pour des raisons de performances cette liste est limitée à :max_num_transactions et peut n\'afficher qu\'une partie des opérations correspondantes', - 'warning_no_matching_transactions' => 'Aucunes opérations correspondantes trouvées. Veuillez noter que pour des raisons de performances, seule les dernières :num_transactions opérations ont été vérifiées.', - 'warning_no_valid_triggers' => 'Aucun déclencheurs valide fourni.', + 'warning_transaction_subset' => 'Pour des raisons de performance cette liste est limitée à :max_num_transactions et peut n\'afficher qu\'une partie des opérations correspondantes', + 'warning_no_matching_transactions' => 'Aucune opération correspondante trouvée. Veuillez noter que pour des raisons de performance, seules les dernières :num_transactions opérations ont été vérifiées.', + 'warning_no_valid_triggers' => 'Aucun déclencheur valide fourni.', 'apply_rule_selection' => 'Appliquer la règle ":title" à une sélection de vos transactions', - 'apply_rule_selection_intro' => 'Les règles comme ":title" ne s\'appliquent normalement qu\'aux transactions nouvelles ou mises à jour, mais vous pouvez dire à Firefly III de l’exécuter sur une sélection de vos transactions existantes. Cela peut être utile lorsque vous avez mis à jour une règle et vous avez besoin que les modifications soit appliqué à l’ensemble de vos autres transactions.', - 'include_transactions_from_accounts' => 'Iclure les opérations depuis ces comptes', - 'applied_rule_selection' => 'La règle ":title" a été appliqué à votre sélection.', - 'execute' => 'Executer', + 'apply_rule_selection_intro' => 'Les règles comme ":title" ne s\'appliquent normalement qu\'aux transactions nouvelles ou mises à jour, mais vous pouvez dire à Firefly III de l’exécuter sur une sélection de vos transactions existantes. Cela peut être utile lorsque vous avez mis à jour une règle et avez besoin que les modifications soient appliquées à l’ensemble de vos autres transactions.', + 'include_transactions_from_accounts' => 'Inclure les opérations depuis ces comptes', + 'applied_rule_selection' => 'La règle ":title" a été appliquée à votre sélection.', + 'execute' => 'Exécuter', 'apply_rule_group_selection' => 'Appliquer le groupe de règles ":title" à une sélection de vos transactions', - 'apply_rule_group_selection_intro' => 'Les groupes de règles comme ":titre" ne s\'appliquent normalement qu\'aux transactions nouvelles ou mises à jour, mais vous pouvez dire à Firefly III d\'exécuter toutes les règles de ce groupe sur une sélection de vos transactions existantes. Cela peut être utile lorsque vous avez mis à jour un groupe de règles et que vous avez besoin des modifications à appliquer à toutes vos autres transactions.', + 'apply_rule_group_selection_intro' => 'Les groupes de règles comme ":title" ne s\'appliquent normalement qu\'aux transactions nouvelles ou mises à jour, mais vous pouvez dire à Firefly III d\'exécuter toutes les règles de ce groupe sur une sélection de vos transactions existantes. Cela peut être utile lorsque vous avez mis à jour un groupe de règles et avez besoin que les modifications soient appliquées à l’ensemble de vos autres transactions.', 'applied_rule_group_selection' => 'Le groupe de règles ":title" a été appliqué à votre sélection.', // actions and triggers - 'rule_trigger_user_action' => 'L\'action de l’utilisateur est ": trigger_value"', + 'rule_trigger_user_action' => 'L\'action de l’utilisateur est ":trigger_value"', 'rule_trigger_from_account_starts_choice' => 'Le compte source commence par..', 'rule_trigger_from_account_starts' => 'Le compte source commence par ":trigger_value"', 'rule_trigger_from_account_ends_choice' => 'Le compte source se termine par..', @@ -293,13 +318,13 @@ return [ 'rule_trigger_has_no_budget_choice' => 'N\'a pas de budget', 'rule_trigger_has_no_budget' => 'La transaction n\'a pas de budget', 'rule_trigger_has_any_budget_choice' => 'A un (des) budget', - 'rule_trigger_has_any_budget' => 'La transaction a un (des) budget', + 'rule_trigger_has_any_budget' => 'La transaction a un(des) budget(s)', 'rule_trigger_has_no_tag_choice' => 'N\'a pas de tag(s)', 'rule_trigger_has_no_tag' => 'La transaction n\'a pas de tag(s)', 'rule_trigger_has_any_tag_choice' => 'Dispose d\'un ou de plusieurs tags', 'rule_trigger_has_any_tag' => 'La transaction comporte un ou plusieurs tags', - 'rule_trigger_any_notes_choice' => 'A une (ou plusieurs) note', - 'rule_trigger_any_notes' => 'Transaction a une (ou plusieurs) note', + 'rule_trigger_any_notes_choice' => 'A une (ou plusieurs) note(s)', + 'rule_trigger_any_notes' => 'Transaction a une (ou plusieurs) note(s)', 'rule_trigger_no_notes_choice' => 'N\'a pas de note', 'rule_trigger_no_notes' => 'Transaction n\'a pas de note', 'rule_trigger_notes_are_choice' => 'Les notes sont..', @@ -343,9 +368,8 @@ return [ 'rule_action_set_notes_choice' => 'Remplacer les notes par..', 'rule_action_set_notes' => 'Remplacer les notes par ":action_value"', - 'rules_have_read_warning' => 'Avez-vous lu les avertissements ?', - 'apply_rule_warning' => 'Avertissement : exécuter une règle (ou un groupe) sur un grand nombre de transactions peut prendre très longtemps, et pourrait faire un time-out. Si c\'est le cas, alors la règle (ou le groupe) ne sera appliqué qu\'un sous-ensemble indéterminé de vos transactions. Cela peut faire dégâts sur votre gestion financière. S\'il vous plaît, faites attention.', + 'apply_rule_warning' => 'Avertissement : exécuter une règle ou un groupe de règles sur un grand nombre de transactions peut prendre beaucoup de temps, et pourrait entraîner un time-out. Si c\'est le cas, alors la règle ou le groupe de règles ne serait appliqué que sur une partie indéterminée de vos transactions. Cela peut engendrer des erreurs sur votre gestion financière. S\'il vous plaît, faites attention.', // tags 'store_new_tag' => 'Créer un nouveau tag', @@ -362,7 +386,7 @@ return [ // preferences 'pref_home_screen_accounts' => 'Comptes de l’écran d’accueil', - 'pref_home_screen_accounts_help' => 'Quel compte devrait être affiché sur l\'écran d’accueil?', + 'pref_home_screen_accounts_help' => 'Quel compte doit être affiché sur l\'écran d’accueil?', 'pref_view_range' => 'Voir l\'étendue', 'pref_view_range_help' => 'Certains graphiques sont automatiquement groupés par périodes. Quelle période préférez-vous ?', 'pref_1D' => 'Un jour', @@ -375,12 +399,12 @@ return [ 'pref_languages_help' => 'Firefly III prend en charge plusieurs langues. Laquelle préférez-vous ?', 'pref_custom_fiscal_year' => 'Paramètres fiscaux de l\'année', 'pref_custom_fiscal_year_label' => 'Activé', - 'pref_custom_fiscal_year_help' => 'Dans les pays qui utilisent une année financière autre que du 1er janvier au 31 décembre, vous pouvez le changer en spécifiant le jour de début et de fin de l\'année fiscale', + 'pref_custom_fiscal_year_help' => 'Dans les pays qui utilisent une année financière autre que du 1er janvier au 31 décembre, vous pouvez la changer en spécifiant le jour de début et de fin de l\'année fiscale', 'pref_fiscal_year_start_label' => 'Date du début de l\'année fiscale', 'pref_two_factor_auth' => 'Validation en 2 étapes', - 'pref_two_factor_auth_help' => 'Lorsque vous activez la validation en 2 étapes (également connu sous le nom de deux facteurs d’authentification), vous ajoutez une couche de sécurité supplémentaire à votre compte. Vous vous connecter avec quelque chose que vous connaissez (votre mot de passe) et quelque chose que vous avez (un code de vérification). Codes de vérification sont générés par une application sur votre téléphone, telles que Authy ou Google Authenticator.', + 'pref_two_factor_auth_help' => 'Lorsque vous activez la validation en 2 étapes (également connu sous le nom de deux facteurs d’authentification), vous ajoutez une couche de sécurité supplémentaire à votre compte. Vous vous connectez avec quelque chose que vous connaissez (votre mot de passe) et quelque chose que vous avez (un code de vérification). Les codes de vérification sont générés par une application sur votre téléphone, comme par exemple Authy ou Google Authenticator.', 'pref_enable_two_factor_auth' => 'Activez la validation en 2 étapes', - 'pref_two_factor_auth_disabled' => 'Le code de vérification en deux tapes a été enlevé et désactivé', + 'pref_two_factor_auth_disabled' => 'Le code de vérification en deux étapes a été enlevé et désactivé', 'pref_two_factor_auth_remove_it' => 'N’oubliez pas de supprimer ce compte de votre application d’authentification !', 'pref_two_factor_auth_code' => 'Vérifier le code', 'pref_two_factor_auth_code_help' => 'Scanner le code QR avec une application sur votre téléphone comme Authy ou Google Authenticator et entrez le code généré.', @@ -394,15 +418,15 @@ return [ 'preferences_security' => 'Sécurité', 'preferences_layout' => 'Mise en Page', 'pref_home_show_deposits' => 'Afficher les dépôts sur l\'écran d\'accueil', - 'pref_home_show_deposits_info' => 'L\'écran d\'accueil affiche déjà vos comptes de dépenses. Devrait-il aussi afficher vos comptes de revenus?', + 'pref_home_show_deposits_info' => 'L\'écran d\'accueil affiche déjà vos comptes de dépenses. Devrait-il aussi afficher vos comptes de revenus ?', 'pref_home_do_show_deposits' => 'Oui, montrez-les', 'successful_count' => 'dont :count avec succès', - 'transaction_page_size_title' => 'Taille de la page', - 'transaction_page_size_help' => 'N’importe quelle liste de transactions montre au plus ce nombre de transactions', - 'transaction_page_size_label' => 'Taille de la page', + 'list_page_size_title' => 'Page size', + 'list_page_size_help' => 'Any list of things (accounts, transactions, etc) shows at most this many per page.', + 'list_page_size_label' => 'Page size', 'between_dates' => '(:start et :end)', 'pref_optional_fields_transaction' => 'Champs optionnels pour les transactions', - 'pref_optional_fields_transaction_help' => 'Par défaut, tous les champs ne sont pas activés lors de la création d\'une nouvelle transaction (en raison du désordre). Ci-dessous, vous pouvez activer ces champs si vous pensez qu\'ils pourraient vous être utiles. Bien sûr, tout domaine désactivé, mais déjà rempli, sera visible quel que soit le paramètre.', + 'pref_optional_fields_transaction_help' => 'Par défaut, tous les champs ne sont pas activés lors de la création d\'une nouvelle transaction (en raison de possibles problèmes d', 'optional_tj_date_fields' => 'Champ date', 'optional_tj_business_fields' => 'Champs professionnels', 'optional_tj_attachment_fields' => 'Champs de pièces jointes', @@ -420,18 +444,17 @@ return [ 'optional_field_attachments' => 'Pièces jointes', 'optional_field_meta_data' => 'Métadonnées facultatives', - // profile: 'change_your_password' => 'Modifier votre mot de passe', 'delete_account' => 'Supprimer le compte', 'current_password' => 'Mot de passe actuel', 'new_password' => 'Nouveau mot de passe ', - 'new_password_again' => 'Nouveau mot de passe (encore)', + 'new_password_again' => 'Nouveau mot de passe (confirmation)', 'delete_your_account' => 'Supprimer votre compte', 'delete_your_account_help' => 'La suppression de votre compte supprimera également les comptes, les opérations, tout ce que vous pourriez avoir enregistré dans Firefly III. Tout sera SUPPRIME.', 'delete_your_account_password' => 'Entrez votre mot de passe pour continuer.', 'password' => 'Mot de passe', - 'are_you_sure' => 'Es-tu sûr ? Vous ne pourrez pas annuler cette action.', + 'are_you_sure' => 'Etes-vous sûr ? Vous ne pourrez pas annuler cette action.', 'delete_account_button' => 'SUPPRIMER votre compte', 'invalid_current_password' => 'Mot de passe actuel non valide!', 'password_changed' => 'Mot de passe modifié!', @@ -439,26 +462,24 @@ return [ 'invalid_password' => 'Mot de passe incorrect!', 'what_is_pw_security' => 'Qu\'est-ce que "vérifier la sécurité du mot de passe" ?', 'secure_pw_title' => 'Comment choisir un mot de passe sécurisé', - 'secure_pw_history' => 'En août 2017, le réputé chercheur en sécurité Troy Hunt a publié une liste de 306 millions de mots de passe volés. Ces mots de passe ont été volés lors de cambriolages à des entreprises comme LinkedIn, Adobe et NeoPets (et bien d’autres).', + 'secure_pw_history' => 'En août 2017, le réputé chercheur en sécurité Troy Hunt a publié une liste de 306 millions de mots de passe volés. Ces mots de passe ont été volés lors de cambriolages d\'entreprises comme LinkedIn, Adobe ou NeoPets (et bien d’autres).', 'secure_pw_check_box' => 'En cochant la case, Firefly III enverra l\'empreinte SHA1 de votre mot de passe au site Web de Troy Hunt pour voir si c’est sur la liste. Cela vous empêchera d\'utiliser des mots de passe dangereux comme cela est recommandé dans les dernières NIST Special Publication à ce sujet.', 'secure_pw_sha1' => 'Mais je pensais que SHA1 était cassé ?', - 'secure_pw_hash_speed' => 'Oui, mais pas dans ce contexte. Comme vous pouvez le lire sur le site Web détaillant comment ils ont cassé SHA1, c’est maintenant légèrement plus facile de trouver une « collision » : une autre chaîne qui aboutit à la même empreinte SHA1. Maintenant, cela prend seulement 10 000 ans, à l’aide d’une machine mono-GPU.', + 'secure_pw_hash_speed' => 'Oui, mais pas dans ce contexte. Comme vous pouvez le lire sur le site web détaillant comment ils ont cassé SHA1, c’est maintenant légèrement plus facile de trouver une « collision » : une autre chaîne qui aboutit à la même empreinte SHA1. Maintenant, cela prend seulement 10 000 ans, à l’aide d’une machine mono-GPU.', 'secure_pw_hash_security' => 'Cette collision ne serait pas égale à votre mot de passe, et ne serait pas utile sur (un site comme) Firefly III. Cette application n\'utilise pas SHA1 pour la vérification du mot de passe. Il est donc sûr de cocher cette case. Votre mot de passe est haché et envoyé par HTTPS.', 'secure_pw_should' => 'Dois-je cocher la case ?', - 'secure_pw_long_password' => 'Si vous venez de générer un long mot de passe unique pour Firefly III à l\'aide d\'un type de générateur de mot de passe : no.', - 'secure_pw_short' => 'Si vous venez d\'entrer le mot de passe que vous utilisez toujours : S\'il vous plaît, oui.', + 'secure_pw_long_password' => 'Si vous venez de générer un long mot de passe unique pour Firefly III à l\'aide d\'un type de générateur de mot de passe : non.', + 'secure_pw_short' => 'Si vous venez d\'entrer le mot de passe que vous utilisez toujours : oui.', 'personal_access_token' => 'Token d\'accès personnel', - 'explain_access_token' => 'Vous avez besoin de ce token pour exécuter des opérations optionnelles en ligne de commandes telles qu\'import et export de données. Sans celui-ci, te telles commandes sensibles ne fonctionneront pas. Personne ne vous le demandera, pas même moi. Si vous craignez de le perdre, ou si vous êtes parano, régénérez ce token à l\'aide du - bouton.', + 'explain_access_token' => 'Vous avez besoin de ce token pour exécuter des opérations optionnelles en ligne de commandes telles qu\'import et export de données. Sans celui-ci, de telles commandes sensibles ne fonctionneront pas. Personne ne vous le demandera, pas même moi. Si vous craignez de le perdre, ou si vous êtes parano, régénérez ce token à l\'aide du bouton.', 'regenerate_access_token' => 'Régénérer le token d\'accès', 'token_regenerated' => 'Un nouveau token a été généré', 'change_your_email' => 'Changer votre adresse e-mail', - 'email_verification' => 'Un e-mail sera envoyé à votre ancienne ET votre nouvelle adresse. Pour des raisons de sécurité, vous ne serez pas capable de vous connecter jusqu\'à ce que vous vérifiez votre nouvelle adresse. Si vous n\'êtes pas certain que votre installation de Firefly III soit capable d\'envoyer un e-mail, s\'il vous plait n\'utilisez pas cette fonctionnalité. Si vous êtes un administrateur, vous pouvez tester cela en allant à Administration.', + 'email_verification' => 'Un e-mail sera envoyé à votre ancienne ET votre nouvelle adresse. Pour des raisons de sécurité, vous ne pourrez pas vous connecter jusqu\'à ce que vous ayez vérifié votre nouvelle adresse. Si vous n\'êtes pas certain que votre installation de Firefly III soit capable d\'envoyer un e-mail, n\'utilisez pas cette fonctionnalité. Si vous êtes un administrateur, vous pouvez tester l\'envoi des e-mails en allant dans le menu Administration.', 'email_changed_logout' => 'Vous ne pouvez pas vous connecter tant que vous n\'aurez pas vérifié votre adresse e-mail.', 'login_with_new_email' => 'Vous pouvez désormais vous connecter avec votre nouvelle adresse e-mail.', 'login_with_old_email' => 'Vous pouvez à nouveau vous connecter à l\'aide de votre ancienne adresse e-mail.', - // attachments 'nr_of_attachments' => 'Une pièce jointe|:count pièces jointes', 'attachments' => 'Pièces jointes', @@ -497,14 +518,14 @@ return [ 'convert_Transfer_to_deposit' => 'Convertir ce transfert en dépôt', 'convert_Transfer_to_withdrawal' => 'Convertir ce transfert en retrait', 'convert_please_set_revenue_source' => 'Veuillez choisir le compte de recettes d\'où proviendra l’argent.', - 'convert_please_set_asset_destination' => 'Veuillez choisir le compte d\'actifs auquel l\'argent sera versé.', - 'convert_please_set_expense_destination' => 'Veuillez choisir le compte de dépense auquel l\'argent sera versé.', - 'convert_please_set_asset_source' => 'Veuillez choisir le compte d’actif d\'où proviendra l’argent.', + 'convert_please_set_asset_destination' => 'Veuillez choisir le compte d\'actifs sur lequel l\'argent sera versé.', + 'convert_please_set_expense_destination' => 'Veuillez choisir le compte de dépenses sur lequel l\'argent sera versé.', + 'convert_please_set_asset_source' => 'Veuillez choisir le compte d’actifs d\'où proviendra l’argent.', 'convert_explanation_withdrawal_deposit' => 'Si vous convertissez ce retrait en dépôt, :amount sera déposé dans :sourceName au lieu de le retirer.', - 'convert_explanation_withdrawal_transfer' => 'Si vous convertissez ce retrait en transfert, :amount sera transféré de :sourceName vers un nouveau compte d\'actif, au lieu d\'être payé à :DestinationName .', + 'convert_explanation_withdrawal_transfer' => 'Si vous convertissez ce retrait en transfert, :amount sera transféré de :sourceName vers un nouveau compte d\'actif, au lieu d\'être payé à :destinationName.', 'convert_explanation_deposit_withdrawal' => 'Si vous convertissez ce dépôt dans un retrait :amount sera supprimé de :destinationName au lieu d\'y être ajouté.', - 'convert_explanation_deposit_transfer' => 'Si vous convertissez ce dépôt en transfert, :amount sera transféré d\'un compte d\'actif de votre choix en : destinationName.', - 'convert_explanation_transfer_withdrawal' => 'Si vous convertissez ce transfert en retrait, le montant passera de :sourceName à une nouvelle destination comme une dépense, au lieu de :destinationName en tant que transfert.', + 'convert_explanation_deposit_transfer' => 'Si vous convertissez ce dépôt en transfert, :amount sera transféré d\'un compte d\'actif de votre choix en :destinationName.', + 'convert_explanation_transfer_withdrawal' => 'Si vous convertissez ce transfert en retrait, le montant passera de :sourceName à une nouvelle destination comme une dépense, au lieu de :destinationName en tant que transfert.', 'convert_explanation_transfer_deposit' => 'Si vous convertissez ce transfert en dépôt, :amount sera déposé dans le compte :destinationName au lieu d\'y être transféré.', 'converted_to_Withdrawal' => 'La transaction a été convertie en retrait', 'converted_to_Deposit' => 'La transaction a été convertie en dépôt', @@ -515,7 +536,7 @@ return [ 'create_new_withdrawal' => 'Creer un nouveau retrait', 'create_new_deposit' => 'Créer un nouveau dépôt', 'create_new_transfer' => 'Creer un nouveau transfert', - 'create_new_asset' => 'Créer le nouveau compte d’actif', + 'create_new_asset' => 'Créer un nouveau compte d’actif', 'create_new_expense' => 'Créer nouveau compte de dépenses', 'create_new_revenue' => 'Créer nouveau compte de recettes', 'create_new_piggy_bank' => 'Créer une nouvelle tirelire', @@ -531,7 +552,7 @@ return [ 'created_currency' => 'Devise ":name" créée', 'updated_currency' => 'Devise ":name" mise à jour', 'ask_site_owner' => 'Merci de demander à :owner pour ajouter, modifier ou supprimer des devises.', - 'currencies_intro' => 'Firefly III prend en charge diverses monnaies que vous pouvez configurer et activer ici.', + 'currencies_intro' => 'Firefly III prend en charge diverses devises que vous pouvez configurer et activer ici.', 'make_default_currency' => 'définir par défaut', 'default_currency' => 'par défaut', @@ -564,7 +585,6 @@ return [ 'suggested' => 'Suggéré', 'average_between' => 'Moyenne entre :start et :end', - // bills: 'matching_on' => 'Correspond à', 'between_amounts' => 'entre :low et :high.', @@ -587,15 +607,15 @@ return [ 'average_bill_amount_year' => 'Montant moyen des factures ( :year)', 'average_bill_amount_overall' => 'Montant moyen de la facture (global)', 'not_or_not_yet' => 'Pas du tout (pas encore)', - 'not_expected_period' => 'Cette période n\'est pas prévu', + 'not_expected_period' => 'Cette période n\'est pas prévue', 'bill_is_active' => 'Facture en cours', - 'bill_expected_between' => 'Expected between :start and :end', + 'bill_expected_between' => 'Attendu entre le :start et le :end', 'bill_will_automatch' => 'La facture sera automatiquement liée aux transactions correspondantes', 'skips_over' => 'saute', // accounts: 'details_for_asset' => 'Détails pour le compte d’actif ":name"', - 'details_for_expense' => 'Détail du compte de dépenses ":name"', + 'details_for_expense' => 'Détails du compte de dépenses ":name"', 'details_for_revenue' => 'Détails du comptes de recettes ":name"', 'details_for_cash' => 'Détails pour le compte de trésorerie ":name"', 'store_new_asset_account' => 'Créer un nouveau compte d’actif', @@ -631,8 +651,8 @@ return [ 'end_balance' => 'Solde de clotûre', 'update_balance_dates_instruction' => 'Faites correspondre les montants et les dates ci-dessus à votre relevé bancaire et appuyez sur "Démarrer le rapprochement"', 'select_transactions_instruction' => 'Sélectionnez les transactions qui apparaissent sur votre relevé bancaire.', - 'select_range_and_balance' => 'Vérifiez d\'abord la plage de dates et les soldes. Puis appuyez sur "Démarrer le rapprochement"', - 'date_change_instruction' => 'Si vous modifiez la plage de dates maintenant, toute progression sera perdue.', + 'select_range_and_balance' => 'Vérifiez d\'abord la plage des dates et les soldes. Puis appuyez sur "Démarrer le rapprochement"', + 'date_change_instruction' => 'Si vous modifiez la plage des dates maintenant, toute progression sera perdue.', 'update_selection' => 'Mettre à jour la sélection', 'store_reconcile' => 'Stocker le rapprochement', 'reconciliation_transaction' => 'Transaction de rapprochement', @@ -641,22 +661,22 @@ return [ 'reconcile_options' => 'Options de rapprochement', 'reconcile_range' => 'Plage de rapprochement', 'start_reconcile' => 'Commencer le rapprochement', - 'cash' => 'espèce', + 'cash' => 'espèces', 'account_type' => 'Type de compte', 'save_transactions_by_moving' => 'Enregistrer ces opération(s) en les déplaçant vers un autre compte :', 'stored_new_account' => 'Nouveau compte ":name" créé !', 'updated_account' => 'Nom du compte ":name"', 'credit_card_options' => 'Cartes de crédit', - 'no_transactions_account' => 'Il n\'y a pas de transactions (dans cette période) pour le compte d\'actif ":name".', + 'no_transactions_account' => 'Il n\'y a pas de transaction (dans cette période) pour le compte d\'actif ":name".', 'no_data_for_chart' => 'Il n\'y a pas assez d\'informations (pour le moment) pour générer ce graphique.', 'select_more_than_one_account' => 'Veuillez sélectionner plus d\'un compte', 'select_more_than_one_category' => 'Veuillez sélectionner plus d\'une catégorie', 'select_more_than_one_budget' => 'Veuillez sélectionner plus d\'un budget', 'select_more_than_one_tag' => 'Veuillez sélectionner plus d\'un tag', - 'account_default_currency' => 'Si vous sélectionnez une autre monnaie, les nouvelles transactions de ce compte auront cette monnaie pré-sélectionnées.', + 'account_default_currency' => 'Si vous sélectionnez une autre devise, les nouvelles transactions de ce compte auront cette devise pré-sélectionnée.', 'reconcile_has_more' => 'Votre registre Firefly III a plus d\'argent que ce que votre banque prétend que vous devriez avoir. Il y a plusieurs options. S\'il vous plaît choisir quoi faire. Ensuite, appuyez sur "Confirmer le rapprochement".', 'reconcile_has_less' => 'Votre registre Firefly III a moins d\'argent que ce que votre banque prétend que vous devriez avoir. Il y a plusieurs options. S\'il vous plaît choisir quoi faire. Ensuite, appuyez sur "Confirmer le rapprochement".', - 'reconcile_is_equal' => 'Votre registre Firefly III et vos relevés bancaires correspondent. Il n\'y a rien à faire. S\'il vous plaît appuyez sur "Confirmer le rapprochement" pour confirmer votre entrée.', + 'reconcile_is_equal' => 'Votre registre Firefly III et vos relevés bancaires correspondent. Il n\'y a rien à faire. Appuyez sur "Confirmer le rapprochement" pour confirmer votre entrée.', 'create_pos_reconcile_transaction' => 'Effacez les transactions sélectionnées et créez une correction en ajoutant :amount à ce compte d\'actif.', 'create_neg_reconcile_transaction' => 'Effacez les transactions sélectionnées et créez une correction en enlevant :amount à ce compte d\'actif.', 'reconcile_do_nothing' => 'Effacez les transactions sélectionnées, mais ne les corrigez pas.', @@ -700,15 +720,18 @@ return [ 'deleted_withdrawal' => 'Retrait ":name" correctement supprimé', 'deleted_deposit' => 'Dépot ":name" correctement supprimé', 'deleted_transfer' => 'Opération ":name" correctement supprimée', - 'stored_journal' => 'Opération créée avec succès ":description"', + 'stored_journal' => 'Opération ":description" créée avec succès', 'select_transactions' => 'Sélectionner des opérations', + 'rule_group_select_transactions' => 'Appliquer le groupe de règles ":title" sur les transactions', + 'rule_select_transactions' => 'Appliquer la règle ":title" sur les transactions', 'stop_selection' => 'Arrêter de sélectionner les transactions', 'reconcile_selected' => 'Rapproché', 'mass_delete_journals' => 'Supprimer un certain nombre de transactions', 'mass_edit_journals' => 'Modifier un certain nombre d’opérations', - 'cannot_edit_other_fields' => 'Vous ne peut pas modifier en masse d\'autres champs que ceux ici, car il n’y a pas de place pour tous les montrer. S’il vous plaît suivez le lien et modifiez les par un par un, si vous devez modifier ces champs.', + 'cannot_edit_other_fields' => 'Vous ne pouvez pas modifier en masse d\'autres champs que ceux-ci, car il n’y a pas de place pour tous les montrer. S’il vous plaît suivez le lien et modifiez les par un par un, si vous devez modifier ces champs.', 'no_budget' => '(pas de budget)', - 'perm-delete-many' => 'Supprimer de nombreux éléments en une seule fois peut être très problématique. Soyez prudent.', + 'no_budget_squared' => '(pas de budget)', + 'perm-delete-many' => 'Supprimer de nombreux éléments en une seule fois peut engendrer des erreurs. Soyez prudent.', 'mass_deleted_transactions_success' => 'Montant des opérations supprimées : :amount.', 'mass_edited_transactions_success' => 'Montant des opérations mises à jour : :amount', 'opt_group_no_account_type' => '(aucun type de compte)', @@ -717,15 +740,14 @@ return [ 'opt_group_sharedAsset' => 'Comptes d\'actifs partagés', 'opt_group_ccAsset' => 'Cartes de crédit', - // new user: 'welcome' => 'Bienvenue sur Firefly !', 'submit' => 'Soumettre', 'getting_started' => 'Mise en route', - 'to_get_started' => 'Il est bon de voir que vous avez installé Firefly III avec succès. Pour commencer avec cet outil, entrez le nom de votre banque et le solde de votre compte courant principal. Ne vous inquiétez pas encore si vous avez plusieurs comptes. Vous pouvez les ajouter plus tard. C\'est juste que Firefly III a besoin de quelque chose pour commencer.', - 'savings_balance_text' => 'Firefly III créera automatiquement un compte d\'épargne pour vous. Par défaut, il n\'y aura pas d\'argent dans votre compte d\'épargne, mais si vous dites à Firefly III, le solde sera stocké en tant que tel.', + 'to_get_started' => 'Vous venez d\'installer Firefly III avec succès. Pour commencer avec cet outil, entrez le nom de votre banque et le solde de votre compte courant principal. Ne vous inquiétez pas si vous avez plusieurs comptes. Vous pourrez les ajouter plus tard. Firefly III a simplement besoin de quelque chose pour commencer.', + 'savings_balance_text' => 'Firefly III créera automatiquement un compte d\'épargne pour vous. Par défaut, il n\'y aura pas d\'argent dans votre compte d\'épargne, mais si vous le dites à Firefly III, le solde sera stocké en tant que tel.', 'finish_up_new_user' => 'C\'est tout ! Vous pouvez continuer en appuyant sur Envoyer. Vous passerez à l\'index de Firefly III.', - 'stored_new_accounts_new_user' => 'Super ! Vos nouveaux comptes ont été créé.', + 'stored_new_accounts_new_user' => 'Super ! Vos nouveaux comptes ont été créés.', // home page: 'yourAccounts' => 'Vos comptes', @@ -765,6 +787,7 @@ return [ 'piggyBanks' => 'Tirelires', 'bills' => 'Factures', 'withdrawal' => 'Retrait', + 'opening_balance' => 'Solde d\'ouverture', 'deposit' => 'Dépôt', 'account' => 'Compte', 'transfer' => 'Transfert', @@ -784,11 +807,12 @@ return [ 'errors' => 'Erreurs', // reports: - 'report_default' => 'Rapport financier par défaut entre :start et :end', - 'report_audit' => 'Aperçu de l\'historique des transactions entre :start et :end', + 'report_default' => 'Rapport financier par défaut entre le :start et le :end', + 'report_audit' => 'Aperçu de l\'historique des transactions entre le :start et le :end', 'report_category' => 'Rapport de catégorie entre :start et :end', - 'report_budget' => 'Rapport du budget entre :start et :end', - 'report_tag' => 'Marquer le rapport entre :start and :end', + 'report_account' => 'Rapport de compte de dépenses / recettes entre le :start et le :end', + 'report_budget' => 'Rapport du budget entre le :start et le :end', + 'report_tag' => 'Marquer le rapport entre le :start et le :end', 'quick_link_reports' => 'Liens rapides', 'quick_link_default_report' => 'Rapport financier par défaut', 'quick_link_audit_report' => 'Historique des transactions', @@ -811,58 +835,59 @@ return [ 'inactive' => 'Désactivé', 'active' => 'Actif', 'difference' => 'Différence', - 'in' => 'Dans', - 'out' => 'Sorti', - 'topX' => 'en haut :number', + 'money_flowing_in' => 'In', + 'money_flowing_out' => 'Out', + 'topX' => ':number premiers', 'show_full_list' => 'Afficher la liste complète', - 'show_only_top' => 'Afficher uniquement en haut :number', + 'show_only_top' => 'Afficher uniquement :number premiers', 'report_type' => 'Type de rapport', 'report_type_default' => 'Rapport financier par défaut', 'report_type_audit' => 'Historique des transactions', 'report_type_category' => 'Rapport par catégories', 'report_type_budget' => 'Rapport du budget', 'report_type_tag' => 'Rapport de tag', - 'more_info_help' => 'Plus d’informations sur ces types de rapports se trouvent dans les pages d’aide. Appuyez sur l’icône ( ?) dans le coin supérieur droit.', + 'report_type_account' => 'Expense/revenue account report', + 'more_info_help' => 'Plus d’informations sur ces types de rapports se trouvent dans les pages d’aide. Appuyez sur l’icône (?) dans le coin supérieur droit.', 'report_included_accounts' => 'Comptes inclus', 'report_date_range' => 'Intervalle de dates', 'report_preset_ranges' => 'Pré-configurer les étendues', 'shared' => 'Partagé', 'fiscal_year' => 'Année fiscale', - 'income_entry' => 'Revenus du compte ":name" entre :start et :end', + 'income_entry' => 'Revenus du compte ":name" entre le :start et le :end', 'expense_entry' => 'Dépenses du compte ":name" entre le :start et le :end', 'category_entry' => 'Dépenses dans la catégorie ":name" entre le :start et le :end', 'budget_spent_amount' => 'Dépenses dans le budget ":budget" entre le :start et le :end', 'balance_amount' => 'Dépenses dans le budget ":budget" payé depuis le compte ":account" entre le :start et le :end', - 'no_audit_activity' => 'Aucune activité n\'a été enregistrée sur le compte :account_name entre :start et :end.', + 'no_audit_activity' => 'Aucune activité n\'a été enregistrée sur le compte :account_name entre le :start et le :end.', 'audit_end_balance' => 'Solde du compte de :account_name à la fin de :end était: :balance', 'reports_extra_options' => 'Options supplémentaires', 'report_has_no_extra_options' => 'Ce rapport n\'a pas d\'options supplémentaires', 'reports_submit' => 'Afficher le rapport', 'end_after_start_date' => 'La date de fin du rapport doit être postérieure à la date de début.', - 'select_category' => 'Sélectionner la/les catégorie(s)', + 'select_category' => 'Sélectionner la(les) catégorie(s)', 'select_budget' => 'Sélectionnez le(s) budget(s).', 'select_tag' => 'Sélectionnez le(s) tag(s).', - 'income_per_category' => 'Revenu par catégorie', + 'income_per_category' => 'Revenus par catégorie', 'expense_per_category' => 'Dépenses par catégorie', 'expense_per_budget' => 'Dépenses par budget', - 'income_per_account' => 'Revenu par compte', + 'income_per_account' => 'Revenus par compte', 'expense_per_account' => 'Dépenses par compte', 'expense_per_tag' => 'Dépenses par tag', - 'income_per_tag' => 'Revenu par tag', + 'income_per_tag' => 'Revenus par tag', 'include_expense_not_in_budget' => 'Frais inclus non compris dans le(s) budget(s) sélectionné(s)', 'include_expense_not_in_account' => 'Frais inclus non compris dans le(s) compte(s) sélectionné(s)', - 'include_expense_not_in_category' => 'Les dépenses incluses ne sont pas dans la (les) catégorie(s) sélectionnée(s)', - 'include_income_not_in_category' => 'Les revenus inclus ne sont pas dans la (les) catégorie(s) sélectionnée(s)', + 'include_expense_not_in_category' => 'Les dépenses incluses ne sont pas dans la(les) catégorie(s) sélectionnée(s)', + 'include_income_not_in_category' => 'Les revenus inclus ne sont pas dans la(les) catégorie(s) sélectionnée(s)', 'include_income_not_in_account' => 'Revenus inclus non compris dans le(s) compte(s) sélectionné(s)', 'include_income_not_in_tags' => 'Les revenus inclus ne sont pas dans la (les) catégorie(s) sélectionnée(s)', 'include_expense_not_in_tags' => 'Les dépenses incluses ne sont pas dans le(s) tag(s) sélectionnée(s)', 'everything_else' => 'Tout le reste', 'income_and_expenses' => 'Recettes et dépenses', - 'spent_average' => 'Dépensé (moyenne)', - 'income_average' => 'Revenu (moyenne)', + 'spent_average' => 'Dépenses (moyenne)', + 'income_average' => 'Revenus (moyenne)', 'transaction_count' => 'Nombre de transactions', 'average_spending_per_account' => 'Dépenses moyennes par compte', - 'average_income_per_account' => 'Revenu moyen par compte', + 'average_income_per_account' => 'Revenus moyens par compte', 'total' => 'Total', 'description' => 'Description', 'sum_of_period' => 'Somme pour la période', @@ -873,7 +898,10 @@ return [ 'account_role_ccAsset' => 'Carte de crédit', 'budget_chart_click' => 'Cliquez sur le nom du budget dans le tableau ci-dessus pour voir un graphique.', 'category_chart_click' => 'Cliquez sur un nom de catégorie dans le tableau ci-dessus pour voir un graphique.', - + 'in_out_accounts' => 'Gagné et dépensé par compte', + 'in_out_per_category' => 'Gagné et dépensé par catégorie', + 'out_per_budget' => 'Dépensé par budget', + 'select_expense_revenue' => 'Sélectionner le compte de dépenses / recettes', // charts: 'chart' => 'Diagramme', @@ -885,7 +913,6 @@ return [ 'earned' => 'Gagné', 'overspent' => 'Trop dépensé', 'left' => 'Reste', - 'no_budget' => '(pas de budget)', 'max-amount' => 'Montant maximum', 'min-amount' => 'Montant minimum', 'journal-amount' => 'Entrée de facture courante', @@ -943,7 +970,7 @@ return [ 'deleted_tag' => 'Tag ":tag" supprimé', 'new_tag' => 'Créer un nouveau tag', 'edit_tag' => 'Modifier le tag ":tag"', - 'updated_tag' => 'Mise à jour de la balise ": tag"', + 'updated_tag' => 'Mise à jour de la balise ":tag"', 'created_tag' => 'Tag ":tag" a été créé !', 'transaction_journal_information' => 'Informations sur les transactions', @@ -969,12 +996,11 @@ return [ 'total_size' => 'taille totale', 'budget_or_budgets' => 'budget(s)', 'budgets_with_limits' => 'budget(s) avec montant configuré', - 'rule_or_rules' => 'règle(s)', - 'rulegroup_or_groups' => 'groupe(s) de règles', - 'tag_or_tags' => 'tag (s)', + 'nr_of_rules_in_total_groups' => ':count_rules rule(s) in :count_groups rule group(s)', + 'tag_or_tags' => 'tag(s)', 'configuration_updated' => 'La configuration a été mise à jour', 'setting_is_demo_site' => 'Site de démonstration', - 'setting_is_demo_site_explain' => 'Si vous cochez cette case, cette installation se comportera comme si c\'était le site de démonstration, ce qui peut engendrer des effets secondaires étranges.', + 'setting_is_demo_site_explain' => 'Si vous cochez cette case, cette installation se comportera comme si c\'était le site de démonstration, ce qui comporte certaines limitations.', 'block_code_bounced' => 'Rebond des messages emails', 'block_code_expired' => 'Compte démo expiré', 'no_block_code' => 'Aucune raison pour le blocage ou utilisateur non bloqué', @@ -984,10 +1010,10 @@ return [ 'updated_user' => 'Les données utilisateur ont bien été modifiées.', 'delete_user' => 'Supprimer l\'utilisateur :email', 'user_deleted' => 'L\'utilisateur a été supprimé', - 'send_test_email' => 'Envoyer le message de test', - 'send_test_email_text' => 'Pour vérifier que votre installation est capable d\'envoyer des email, utilisez ce bouton. Vous ne verrez pas d\'erreur ici (s\'il y en a), elles seront reflérées dans les logs. Utilisez ce bouton autant de fois que vous le voulez, il n\'y a pas de contrôle de spam. Le message sera envoyé à :email et devrait arriver sous peu.', + 'send_test_email' => 'Envoyer un message de test', + 'send_test_email_text' => 'Pour vérifier que votre installation est capable d\'envoyer des emails, utilisez ce bouton. Vous ne verrez pas d\'erreur ici (s\'il y en a), elles seront enregistrées dans les logs. Utilisez ce bouton autant de fois que vous le voulez, il n\'y a pas de contrôle de spam. Le message sera envoyé à :email et devrait arriver sous peu.', 'send_message' => 'Envoyer le message', - 'send_test_triggered' => 'Le test a été initié. Vérifiez votre boîte de réception et les logs.', + 'send_test_triggered' => 'Le test a été initié. Vérifiez votre boîte de réception (et les logs si nécessaire).', // links 'journal_link_configuration' => 'Configuration des liens de transaction', @@ -1003,7 +1029,7 @@ return [ 'link_type_help_name' => 'C\'est à dire "Doublons"', 'link_type_help_inward' => 'C\'est à dire "doublons"', 'link_type_help_outward' => 'C\'est à dire "est dupliqué par"', - 'save_connections_by_moving' => 'Enregistrez le lien entre ces transaction(s) en les déplaçant vers un autre type de lien :', + 'save_connections_by_moving' => 'Enregistrez le lien entre ces transactions en les déplaçant vers un autre type de lien :', 'do_not_save_connection' => '(ne pas enregistrer la connexion)', 'link_transaction' => 'Lien transaction', 'link_to_other_transaction' => 'Lier cette transaction à une autre transaction', @@ -1036,7 +1062,6 @@ return [ '(partially) pays for_outward' => 'paye (partiellement) pour', '(partially) reimburses_outward' => 'rembourse (partiellement)', - // split a transaction: 'splits' => 'Scinder', 'add_another_split' => 'Ajouter une autre fraction', @@ -1047,7 +1072,7 @@ return [ 'split_this_transfer' => 'Scinder ce transfert', 'cannot_edit_multiple_source' => 'Vous ne pouvez pas modifier la transaction scindée #:id avec la description ":description" car elle contient plusieurs comptes sources.', 'cannot_edit_multiple_dest' => 'Vous ne pouvez pas modifier la transaction scindée #:id avec la description ":description" car elle contient plusieurs comptes de destination.', - 'cannot_edit_reconciled' => 'Vous ne pouvez pas modifier transaction #: id avec la description ": description" car elle a été marquée comme rapprochée.', + 'cannot_edit_reconciled' => 'Vous ne pouvez pas modifier transaction #:id avec la description ":description" car elle a été marquée comme rapprochée.', 'cannot_edit_opening_balance' => 'Vous ne pouvez pas modifier le solde d\'ouverture d\'un compte.', 'no_edit_multiple_left' => 'Vous n\'avez sélectionné aucune transaction valide à éditer.', 'cannot_convert_split_journal' => 'Vous ne pouvez pas convertir une transaction ventilée', @@ -1055,49 +1080,16 @@ return [ // import bread crumbs and titles: 'import' => 'Import', 'import_data' => 'Importer des données', + 'import_general_index_file' => 'Import a file', + 'import_from_bunq' => 'Import from bunq', + 'import_using_spectre' => 'Import using Spectre', + 'import_using_plaid' => 'Import using Plaid', + 'import_config_bread_crumb' => 'Configurez votre import', // import index page: 'import_index_title' => 'Importer des données dans Firefly III', 'import_index_sub_title' => 'Index', 'import_general_index_intro' => 'Bienvenue dans la routine d\'importation de Firefly. Il existe différentes façons d\'importer des données dans Firefly III, affichées ici sous forme de boutons.', - 'import_general_index_csv_file' => 'Importer un fichier CSV', - 'import_index_intro' => 'Cette routine vous aidera à importer des fichiers de votre banque dans Firefly III. Consultez les pages d\'aide en haut à droite.', - 'import_index_file' => 'Sélectionnez votre fichier', - 'import_index_config' => 'Si vous avez précédemment importé des données dans Firefly III, vous pouvez avoir un fichier de configuration qui définira les valeurs de configuration. Pour certaines banques, les autres utilisateurs ont bien voulu fournir leur fichier configuration.', - 'import_index_type' => 'Sélectionnez le type de fichier que vous allez télécharger', - 'import_index_start' => 'Démarrer l\'importation', - 'import_file' => 'Importer un fichier', - - // supported file types: - 'import_file_type_csv' => 'CSV (valeurs séparées par des virgules)', - - // import configuration routine: - 'import_config_sub_title' => 'Configurez votre fichier d\'importation', - 'import_config_bread_crumb' => 'Configurez votre fichier d\'importation', - - // import status page: - 'import_status_bread_crumb' => 'Statut d\'importation', - 'import_status_sub_title' => 'Statut d\'importation', - 'import_status_wait_title' => 'Veuillez patienter...', - 'import_status_wait_text' => 'Cette boîte disparaîtra dans un instant.', - 'import_status_ready_title' => 'L\'importation est prête à démarrer', - 'import_status_ready_text' => 'L\'importation est prête à démarrer. Toute la configuration que vous aviez à faire a été effectuée. Téléchargez le fichier de configuration. Cela vous aidera avec l\'importation si cela ne fonctionnait pas comme prévu. Pour exécuter l\'importation, vous pouvez soit exécuter la commande suivante dans votre console, soit exécuter l\'importation basée sur le Web. Selon votre configuration, l\'importation de la console vous donnera plus de détails.', - 'import_status_ready_config' => 'Télécharger la configuration', - 'import_status_ready_start' => 'Démarrer l\'importation', - 'import_status_ready_share' => 'Veuillez envisager de télécharger votre configuration et de la partager au centre de configuration d\'import. Cela permettra à d\'autres utilisateurs de Firefly III d\'importer leurs fichiers plus facilement.', - 'import_status_running_title' => 'L\'importation est en cours d\'exécution', - 'import_status_running_placeholder' => 'Attendez pour une mise à jour ...', - 'import_status_errors_title' => 'Erreurs lors de l\'importation', - 'import_status_errors_single' => 'Une erreur est survenue lors de l\'importation. Cela ne semble pas être fatal.', - 'import_status_errors_multi' => 'Certaines erreurs sont survenues lors de l\'importation. Ceux-ci ne semblent pas être fatal.', - 'import_status_fatal_title' => 'Une erreur fatale est survenue', - 'import_status_fatal_text' => 'Une erreur fatale est survenue, que l\'importation-routine ne peut pas récupérer. Voir l\'explication en rouge ci-dessous.', - 'import_status_fatal_more' => 'Si l\'erreur est un time-out, l\'importation sera arrêtée à mi-chemin. Pour certaines configurations de serveur, ce n\'est que le serveur qui s\'est arrêté alors que l\'importation continue de fonctionner en arrière-plan. Pour vérifier cela, consultez les fichiers journaux. Si le problème persiste, envisagez d\'importer plutôt par la ligne de commande.', - 'import_status_finished_title' => 'La routine d\'importation est terminée', - 'import_status_finished_text' => 'La routine d\'importation a importé votre fichier.', - 'import_status_finished_job' => 'Les transactions importées se trouvent dans la balise :tag.', - 'import_status_job_running' => 'L\'import est en cours d\'exécution...', - 'import_with_key' => 'Importer avec la touche \':key\'', // sandstorm.io errors and messages: 'sandstorm_not_available' => 'Cette fonction n\'est pas disponible lorsque vous utilisez Firefly III dans un environnement Sandstorm.io.', @@ -1109,27 +1101,27 @@ return [ 'no_accounts_create_asset' => 'Créer un compte d\'actif', 'no_accounts_title_expense' => 'Nous allons créer un compte de dépenses !', 'no_accounts_intro_expense' => 'Vous n\'avez pas encore de compte de dépenses. Les comptes de dépenses sont les endroits où vous dépensez, comme les magasins et les supermarchés.', - 'no_accounts_imperative_expense' => 'Les comptes de dépenses sont créés automatiquement lorsque vous créez des transactions, mais vous pouvez en créer une manuellement, si vous le souhaitez. Nous allons en créer un maintenant :', + 'no_accounts_imperative_expense' => 'Les comptes de dépenses sont créés automatiquement lorsque vous créez des transactions, mais vous pouvez en créer manuellement, si vous le souhaitez. Nous allons en créer un maintenant :', 'no_accounts_create_expense' => 'Créer un compte de dépenses', - 'no_accounts_title_revenue' => 'Nous allons créer un compte de recettes !', + 'no_accounts_title_revenue' => 'Nous allons créer un compte de revenus !', 'no_accounts_intro_revenue' => 'Vous n\'avez pas encore de compte de revenus. Les comptes de revenus sont les endroits où vous recevez de l\'argent, comme votre employeur.', - 'no_accounts_imperative_revenue' => 'Les comptes de revenus sont créés automatiquement lorsque vous créez des transactions, mais vous pouvez en créer une manuellement, si vous le souhaitez. Nous allons en créer un maintenant :', + 'no_accounts_imperative_revenue' => 'Les comptes de revenus sont créés automatiquement lorsque vous créez des transactions, mais vous pouvez en créer manuellement, si vous le souhaitez. Nous allons en créer un maintenant :', 'no_accounts_create_revenue' => 'Créer un compte de revenus', 'no_budgets_title_default' => 'Nous allons créer un budget', - 'no_budgets_intro_default' => 'Vous n\'avez pas encore de budget. Les budgets sont utilisés pour organiser vos dépenses dans des groupes logiques, auxquelles vous pouvez donner des plafonds pour limiter vos dépenses.', + 'no_budgets_intro_default' => 'Vous n\'avez pas encore de budget. Les budgets sont utilisés pour organiser vos dépenses dans des groupes logiques, auxquels vous pouvez donner des plafonds pour limiter vos dépenses.', 'no_budgets_imperative_default' => 'Les budgets sont les outils de base de la gestion financière. Nous allons en créer un maintenant :', 'no_budgets_create_default' => 'Créer un budget', 'no_categories_title_default' => 'Nous allons créer une catégorie !', - 'no_categories_intro_default' => 'Vous n\'avez pas encore de catégories. Les catégories sont utilisées pour affiner vos transactions et les étiqueter avec leur catégorie désignée.', - 'no_categories_imperative_default' => 'Les catégories sont créées automatiquement lorsque vous créez des transactions, mais vous pouvez en créer une manuellement. Nous allons en créer une maintenant :', + 'no_categories_intro_default' => 'Vous n\'avez pas encore de catégorie. Les catégories sont utilisées pour affiner vos transactions en associant avec.', + 'no_categories_imperative_default' => 'Les catégories sont créées automatiquement lorsque vous créez des transactions, mais vous pouvez en créer manuellement. Nous allons en créer une maintenant :', 'no_categories_create_default' => 'Créer une catégorie', 'no_tags_title_default' => 'Nous allons créer un tag !', - 'no_tags_intro_default' => 'Vous n\'avez pas encore de tags. Les tags sont utilisées pour affiner vos transactions et les étiqueter avec des mots-clés spécifiques.', - 'no_tags_imperative_default' => 'Les tags sont créés automatiquement lorsque vous créez des transactions, mais vous pouvez créer un manuellement trop. Nous allons en créer un maintenant :', - 'no_tags_create_default' => 'Créer une étiquette', + 'no_tags_intro_default' => 'Vous n\'avez pas encore de tags. Les tags sont utilisées pour affiner vos transactions en les associant avec des mots-clés spécifiques.', + 'no_tags_imperative_default' => 'Les tags sont créés automatiquement lorsque vous créez des transactions, mais vous pouvez en créer manuellement. Nous allons en créer un maintenant :', + 'no_tags_create_default' => 'Créer un tag', 'no_transactions_title_withdrawal' => 'Nous allons créer une dépense !', 'no_transactions_intro_withdrawal' => 'Vous n\'avez pas encore de dépenses. Vous devriez créer des dépenses pour commencer à gérer vos finances.', - 'no_transactions_imperative_withdrawal' => 'Avez-vous passé de l’argent ? Alors vous devriez l’écrire :', + 'no_transactions_imperative_withdrawal' => 'Avez-vous dépensé de l’argent ? Alors vous devriez l’écrire :', 'no_transactions_create_withdrawal' => 'Créer une dépense', 'no_transactions_title_deposit' => 'Nous allons créer un revenu !', 'no_transactions_intro_deposit' => 'Vous n\'avez pas encore enregistré de revenus. Vous devriez créer des entrées de revenus pour commencer à gérer vos finances.', @@ -1137,7 +1129,7 @@ return [ 'no_transactions_create_deposit' => 'Créer un dépôt', 'no_transactions_title_transfers' => 'Nous allons créer un transfert !', 'no_transactions_intro_transfers' => 'Vous n\'avez pas encore de transferts. Lorsque vous transférez de l\'argent entre les comptes d\'actifs, c\'est enregistré comme un transfert.', - 'no_transactions_imperative_transfers' => 'Avez vous déplacée de l’argent ? Alors vous devriez l’écrire :', + 'no_transactions_imperative_transfers' => 'Avez vous déplacé de l’argent ? Alors vous devriez l’écrire :', 'no_transactions_create_transfers' => 'Créer un transfert', 'no_piggies_title_default' => 'Nous allons créer une tirelire !', 'no_piggies_intro_default' => 'Vous n\'avez encore pas de tirelire. Vous pouvez créer des tirelires pour diviser vos économies et garder une trace de ce que vous économisez.', @@ -1147,6 +1139,4 @@ return [ 'no_bills_intro_default' => 'Vous n\'avez pas encore de factures. Vous pouvez créer des factures pour suivre les dépenses ordinaires, comme votre loyer ou l\'assurance.', 'no_bills_imperative_default' => 'Avez-vous des factures régulières ? Créez une facture et suivez vos paiements :', 'no_bills_create_default' => 'Créer une facture', - - ]; diff --git a/resources/lang/fr_FR/form.php b/resources/lang/fr_FR/form.php index 7c8f86d20e..e4bc3de2ff 100644 --- a/resources/lang/fr_FR/form.php +++ b/resources/lang/fr_FR/form.php @@ -1,18 +1,26 @@ . */ +declare(strict_types=1); return [ - // new user: 'bank_name' => 'Nom de la banque', 'bank_balance' => 'Solde', @@ -80,7 +88,6 @@ return [ 'convert_Deposit' => 'Convertir le dépôt', 'convert_Transfer' => 'Convertir le transfert', - 'amount' => 'Montant', 'date' => 'Date', 'interest_date' => 'Date de l’intérêt', @@ -137,7 +144,7 @@ return [ 'delete_user' => 'Supprimer l\'utilisateur ":email"', 'user_areYouSure' => 'Si vous supprimez l\'utilisateur ":email", tout disparaitra. Il n\'y a pas d\'annulation, de "dé-suppression" ou quoi que ce soit de la sorte. Si vous supprimez votre propre compte, vous n\'aurez plus accès à cette instance de Firefly III.', 'attachment_areYouSure' => 'Êtes-vous sûr de vouloir supprimer la pièce jointe nommée ":name" ?', - 'account_areYouSure' => 'Êtes-vous sûr de vouloir supprimer le compte nommé ": ame" ?', + 'account_areYouSure' => 'Êtes-vous sûr de vouloir supprimer le compte nommé ":name" ?', 'bill_areYouSure' => 'Êtes-vous sûr de vouloir supprimer la facture nommée ":name" ?', 'rule_areYouSure' => 'Êtes-vous sûr de vouloir supprimer la règle intitulée ":title" ?', 'ruleGroup_areYouSure' => 'Êtes-vous sûr de vouloir supprimer le groupe de règles intitulé ":title" ?', @@ -162,6 +169,7 @@ return [ 'budget_keep_transactions' => 'La seule opération liée à ce budget ne sera pas supprimée.|Les :count opérations liées à ce budget ne seront pas supprimées.', 'category_keep_transactions' => 'La seule opération liée à cette catégorie ne sera pas supprimée.|Les :count opérations liées à cette catégorie ne seront pas supprimées.', 'tag_keep_transactions' => 'La seule opération liée à ce tag ne sera pas supprimée.|Les :count opérations liées à ce tag ne seront pas supprimées.', + 'check_for_updates' => 'Check for updates', 'email' => 'Adresse Email', 'password' => 'Mot de passe', @@ -169,13 +177,11 @@ return [ 'blocked' => 'Est bloqué?', 'blocked_code' => 'Raison du blocage', - // admin 'domain' => 'Domaine', 'single_user_mode' => 'Désactiver le formulaire d\'inscription', 'is_demo_site' => 'Est un site de démonstration', - // import 'import_file' => 'Fichier à importer', 'configuration_file' => 'Fichier de configuration', @@ -186,7 +192,12 @@ return [ 'csv_delimiter' => 'Délimiteur de champ CSV', 'csv_import_account' => 'Compte d’importation par défaut', 'csv_config' => 'Configuration d\'importation CSV', - + 'client_id' => 'Identifiant', + 'service_secret' => 'Service secret', + 'app_secret' => 'App secret', + 'public_key' => 'Clé publique', + 'country_code' => 'Code pays', + 'provider_code' => 'Banque ou fournisseur de données', 'due_date' => 'Échéance', 'payment_date' => 'Date de paiement', diff --git a/resources/lang/fr_FR/import.php b/resources/lang/fr_FR/import.php new file mode 100644 index 0000000000..a9d043eccb --- /dev/null +++ b/resources/lang/fr_FR/import.php @@ -0,0 +1,163 @@ +. + */ +declare(strict_types=1); + +return [ + // status of import: + 'status_wait_title' => 'Veuillez patienter...', + 'status_wait_text' => 'Cette boîte disparaîtra dans un instant.', + 'status_fatal_title' => 'Une erreur fatale est survenue', + 'status_fatal_text' => 'Une erreur fatale est survenue que le traitement d\'importation ne peut pas récupérer. Voir l\'explication en rouge ci-dessous.', + 'status_fatal_more' => 'Si l\'erreur est un time-out, l\'importation sera arrêtée pendant son traitement. Pour certaines configurations de serveur, ce n\'est que le serveur qui s\'est arrêté alors que l\'importation continue de fonctionner en arrière-plan. Pour vérifier cela, consultez les fichiers journaux. Si le problème persiste, envisagez d\'importer plutôt par ligne de commande.', + 'status_ready_title' => 'L\'importation est prête à démarrer', + 'status_ready_text' => 'L\'importation est prête à démarrer. Toute la configuration requise été effectuée. Vous pouvez téléchargez le fichier de configuration. Cela vous permettra de recommencer rapidement l\'importation si tout ne fonctionnait pas comme prévu. Pour exécuter l\'importation, vous pouvez soit exécuter la commande suivante dans la console du serveur, soit exécuter l\'importation depuis cette page web. Selon votre configuration générale, l\'importation via la console vous donnera plus de détails.', + 'status_ready_noconfig_text' => 'L\'importation est prête à démarrer. Toute la configuration requise été effectuée. Pour exécuter l\'importation, vous pouvez soit exécuter la commande suivante dans la console du serveur, soit exécuter l\'importation depuis cette page web. Selon votre configuration générale, l\'importation via la console vous donnera plus de détails.', + 'status_ready_config' => 'Télécharger la configuration', + 'status_ready_start' => 'Démarrer l\'importation', + 'status_ready_share' => 'Vous pouvez télécharger votre configuration et de la partager dans le centre de configuration d\'import. Cela permettra à d\'autres utilisateurs de Firefly III d\'importer leurs fichiers plus facilement.', + 'status_job_new' => 'The job is brand new.', + 'status_job_configuring' => 'The import is being configured.', + 'status_job_configured' => 'The import is configured.', + 'status_job_running' => 'L\'importation est en cours... Veuillez patienter...', + 'status_job_error' => 'The job has generated an error.', + 'status_job_finished' => 'The import has finished!', + 'status_running_title' => 'L\'importation est en cours d\'exécution', + 'status_running_placeholder' => 'Attendez pour une mise à jour...', + 'status_finished_title' => 'Le traitement d\'importation est terminé', + 'status_finished_text' => 'Le traitement d\'importation a importé vos données.', + 'status_errors_title' => 'Erreurs lors de l\'importation', + 'status_errors_single' => 'Une erreur est survenue lors de l\'importation. Cela ne semble pas être fatal.', + 'status_errors_multi' => 'Certaines erreurs sont survenues lors de l\'importation. Celles-ci ne semblent pas être fatales.', + 'status_bread_crumb' => 'Statut d\'importation', + 'status_sub_title' => 'Statut d\'importation', + 'config_sub_title' => 'Configurez votre importation', + 'status_finished_job' => 'Les transactions importées peuvent être trouvées avec le mot-clé :tag.', + 'import_with_key' => 'Importer avec la clé \':key\'', + + // file, upload something + 'file_upload_title' => 'Configuration de l\'importation (1/4) - Téléchargez votre fichier', + 'file_upload_text' => 'Ce traitement vous aidera à importer des fichiers de votre banque dans Firefly III. Consultez les pages d\'aide en haut à droite.', + 'file_upload_fields' => 'Champs', + 'file_upload_help' => 'Sélectionnez votre fichier', + 'file_upload_config_help' => 'Si vous avez précédemment importé des données dans Firefly III, vous avez peut-être téléchargé un fichier de configuration qui définit les relations entre les différents champs. Pour certaines banques, des utilisateurs ont bien voulu partager leur fichier ici : fichiers de configuration.', + 'file_upload_type_help' => 'Sélectionnez le type de fichier que vous allez télécharger', + 'file_upload_submit' => 'Envoyer des fichiers', + + // file, upload types + 'import_file_type_csv' => 'CSV (valeurs séparées par des virgules)', + + // file, initial config for CSV + 'csv_initial_title' => 'Configuration d\'importation (2/4) - Configuration d\'importation CSV', + 'csv_initial_text' => 'To be able to import your file correctly, please validate the options below.', + 'csv_initial_box' => 'Basic CSV import setup', + 'csv_initial_box_title' => 'Basic CSV import setup options', + 'csv_initial_header_help' => 'Check this box if the first row of your CSV file are the column titles.', + 'csv_initial_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.', + 'csv_initial_delimiter_help' => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', + 'csv_initial_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.', + 'csv_initial_submit' => 'Continue with step 3/4', + + // file, new options: + 'file_apply_rules_title' => 'Apply rules', + 'file_apply_rules_description' => 'Apply your rules. Note that this slows the import significantly.', + 'file_match_bills_title' => 'Match bills', + 'file_match_bills_description' => 'Match your bills to newly created withdrawals. Note that this slows the import significantly.', + + // file, roles config + 'csv_roles_title' => 'Import setup (3/4) - Define each column\'s role', + 'csv_roles_text' => 'Each column in your CSV file contains certain data. Please indicate what kind of data the importer should expect. The option to "map" data means that you will link each entry found in the column to a value in your database. An often mapped column is the column that contains the IBAN of the opposing account. That can be easily matched to IBAN\'s present in your database already.', + 'csv_roles_table' => 'Table', + 'csv_roles_column_name' => 'Name of column', + 'csv_roles_column_example' => 'Column example data', + 'csv_roles_column_role' => 'Column data meaning', + 'csv_roles_do_map_value' => 'Map these values', + 'csv_roles_column' => 'Column', + 'csv_roles_no_example_data' => 'No example data available', + 'csv_roles_submit' => 'Continue with step 4/4', + 'csv_roles_warning' => 'At the very least, mark one column as the amount-column. It is advisable to also select a column for the description, date and the opposing account.', + + // file, map data + 'file_map_title' => 'Import setup (4/4) - Connect import data to Firefly III data', + 'file_map_text' => 'In the following tables, the left value shows you information found in your uploaded 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.', + 'file_map_field_value' => 'Field value', + 'file_map_field_mapped_to' => 'Mapped to', + 'map_do_not_map' => '(do not map)', + 'file_map_submit' => 'Start the import', + + // 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_debit' => 'Amount (debit column)', + 'column_amount_credit' => 'Amount (credit column)', + '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-debit-credit' => 'Rabobank specific debit/credit indicator', + 'column_ing-debit-credit' => 'ING specific debit/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 Debit', + '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)', + 'column_note' => 'Note(s)', + + // prerequisites + 'prerequisites' => 'Prerequisites', + + // bunq + 'bunq_prerequisites_title' => 'Prerequisites for an import from bunq', + 'bunq_prerequisites_text' => 'In order to import from bunq, you need to obtain an API key. You can do this through the app.', + + // Spectre + 'spectre_title' => 'Import using Spectre', + 'spectre_prerequisites_title' => 'Prerequisites for an import using Spectre', + 'spectre_prerequisites_text' => 'In order to import data using the Spectre API, you need to prove some secrets. They can be found on the secrets page.', + 'spectre_enter_pub_key' => 'The import will only work when you enter this public key on your security page.', + 'spectre_select_country_title' => 'Select a country', + 'spectre_select_country_text' => 'Firefly III has a large selection of banks and sites from which Spectre can download transactional data. These banks are sorted by country. Please not that there is a "Fake Country" for when you wish to test something. If you wish to import from other financial tools, please use the imaginary country called "Other financial applications". By default, Spectre only allows you to download data from fake banks. Make sure your status is "Live" on your Dashboard if you wish to download from real banks.', + 'spectre_select_provider_title' => 'Select a bank', + 'spectre_select_provider_text' => 'Spectre supports the following banks or financial services grouped under :country. Please pick the one you wish to import from.', + 'spectre_input_fields_title' => 'Input mandatory fields', + 'spectre_input_fields_text' => 'The following fields are mandated by ":provider" (from :country).', + 'spectre_instructions_english' => 'These instructions are provided by Spectre for your convencience. They are in English:', +]; diff --git a/resources/lang/fr_FR/intro.php b/resources/lang/fr_FR/intro.php index be721ae9cc..bb1a3a3c3d 100644 --- a/resources/lang/fr_FR/intro.php +++ b/resources/lang/fr_FR/intro.php @@ -1,13 +1,24 @@ . */ +declare(strict_types=1); return [ // index @@ -81,7 +92,7 @@ return [ // bill index 'bills_index_paid_in_period' => 'Ce champ indique quand la facture a été payée pour la dernière fois.', - 'bills_index_expected_in_period' => 'Ce champ indique pour chaque facture si et quand la prochaine facture devrait frapper.', + 'bills_index_expected_in_period' => 'Ce champ indique pour chaque facture si et quand la facture suivante est attendue.', // show bill 'bills_show_billInfo' => 'Ce tableau présente des informations générales sur cette facture.', diff --git a/resources/lang/fr_FR/list.php b/resources/lang/fr_FR/list.php index d857ad4361..fb3a23f5cd 100644 --- a/resources/lang/fr_FR/list.php +++ b/resources/lang/fr_FR/list.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'buttons' => 'Boutons', @@ -25,7 +34,7 @@ return [ 'currentBalance' => 'Solde courant', 'active' => 'Actif ?', 'lastActivity' => 'Activité récente', - 'balanceDiff' => 'Difference solde entre :start et :end', + 'balanceDiff' => 'Différence d\'équilibre', 'matchesOn' => 'Correspond à', 'account_type' => 'Type de compte', 'created_at' => 'Créé le', diff --git a/resources/lang/fr_FR/pagination.php b/resources/lang/fr_FR/pagination.php index 7d1b7f8bf6..252bd87674 100644 --- a/resources/lang/fr_FR/pagination.php +++ b/resources/lang/fr_FR/pagination.php @@ -1,19 +1,26 @@ . */ +declare(strict_types=1); return [ - 'previous' => '« Précédent', 'next' => 'Suivant »', - ]; diff --git a/resources/lang/fr_FR/passwords.php b/resources/lang/fr_FR/passwords.php index e14a1018c8..6c3698071d 100644 --- a/resources/lang/fr_FR/passwords.php +++ b/resources/lang/fr_FR/passwords.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'password' => 'Les mots de passe doivent contenir au moins six caractères et correspondre à la confirmation.', diff --git a/resources/lang/fr_FR/validation.php b/resources/lang/fr_FR/validation.php index 10dcb26b8a..64037ac30b 100644 --- a/resources/lang/fr_FR/validation.php +++ b/resources/lang/fr_FR/validation.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'iban' => 'Il ne s\'agit pas d\'un IBAN valide.', diff --git a/resources/lang/id_ID/auth.php b/resources/lang/id_ID/auth.php new file mode 100644 index 0000000000..0e216e497f --- /dev/null +++ b/resources/lang/id_ID/auth.php @@ -0,0 +1,37 @@ +. + */ +declare(strict_types=1); + +return [ + /* + |-------------------------------------------------------------------------- + | Authentication Language Lines + |-------------------------------------------------------------------------- + | + | The following language lines are used during authentication for various + | messages that we need to display to the user. You are free to modify + | these language lines according to your application's requirements. + | + */ + + 'failed' => 'Kredensial ini tidak sesuai dengan catatan kami.', + 'throttle' => 'Terlalu banyak upaya login. Silakan coba lagi dalam :seconds detik.', +]; diff --git a/public/js/ff/reports/category/all.js b/resources/lang/id_ID/bank.php similarity index 83% rename from public/js/ff/reports/category/all.js rename to resources/lang/id_ID/bank.php index 5a99dc19ab..ef0d636f91 100644 --- a/public/js/ff/reports/category/all.js +++ b/resources/lang/id_ID/bank.php @@ -1,5 +1,6 @@ -/* - * all.js +. + * along with Firefly III. If not, see . */ +declare(strict_types=1); +return [ +]; diff --git a/resources/lang/id_ID/breadcrumbs.php b/resources/lang/id_ID/breadcrumbs.php new file mode 100644 index 0000000000..1170d129ed --- /dev/null +++ b/resources/lang/id_ID/breadcrumbs.php @@ -0,0 +1,55 @@ +. + */ +declare(strict_types=1); + +return [ + 'home' => 'Beranda', + 'edit_currency' => 'Edit mata uang ":name"', + 'delete_currency' => 'Hapus mata uang ":name"', + 'newPiggyBank' => 'Buat celengan baru', + 'edit_piggyBank' => 'Edit celengan ":name"', + 'preferences' => 'Preferensi', + 'profile' => 'Profil', + 'changePassword' => 'Ubah kata sandi Anda', + 'change_email' => 'Ubah alamat email anda', + 'bills' => 'Tagihan', + 'newBill' => 'Tagihan baru', + 'edit_bill' => 'Edit tagihan ":name"', + 'delete_bill' => 'Hapus tagihan ":name"', + 'reports' => 'Laporan', + 'search_result' => 'Hasil pencarian untuk ":query"', + 'withdrawal_list' => 'Pengeluaran', + 'deposit_list' => 'Pendapatan, pemasukan, dan deposit', + 'transfer_list' => 'Transfer', + 'transfers_list' => 'Transfer', + 'reconciliation_list' => 'Rekonsiliasi', + 'create_withdrawal' => 'Buat penarikan baru', + 'create_deposit' => 'Buat deposit baru', + 'create_transfer' => 'Buat transfer baru', + 'edit_journal' => 'Edit transaksi ":description"', + 'edit_reconciliation' => 'Edit ":description"', + 'delete_journal' => 'Hapus transaksi ":description"', + 'tags' => 'Label', + 'createTag' => 'Buat label baru', + 'edit_tag' => 'Edit label ":tag"', + 'delete_tag' => 'Hapus label ":tag"', + 'delete_journal_link' => 'Hapus tautan antar transaksi', +]; diff --git a/resources/lang/id_ID/config.php b/resources/lang/id_ID/config.php new file mode 100644 index 0000000000..f3cde3d997 --- /dev/null +++ b/resources/lang/id_ID/config.php @@ -0,0 +1,33 @@ +. + */ +declare(strict_types=1); + +return [ + 'locale' => 'id, Bahasa Indonesia, id_ID, id_ID.utf8, id_ID.UTF-8', + 'month' => '%B %Y', + 'month_and_day' => '%e %B %Y', + 'date_time' => '%e %B %Y, @ %T', + 'specific_day' => '%e %B %Y', + 'week_in_year' => 'Minggu %W, %Y', + 'quarter_of_year' => '%B %Y', + 'year' => '%Y', + 'half_year' => '%B %Y', +]; diff --git a/public/js/ff/reports/budget/all.js b/resources/lang/id_ID/csv.php similarity index 83% rename from public/js/ff/reports/budget/all.js rename to resources/lang/id_ID/csv.php index 5a99dc19ab..d61316b632 100644 --- a/public/js/ff/reports/budget/all.js +++ b/resources/lang/id_ID/csv.php @@ -1,5 +1,6 @@ -/* - * all.js +. + * along with Firefly III. If not, see . */ +declare(strict_types=1); +return [ +]; diff --git a/resources/lang/id_ID/demo.php b/resources/lang/id_ID/demo.php new file mode 100644 index 0000000000..7334a1ecf9 --- /dev/null +++ b/resources/lang/id_ID/demo.php @@ -0,0 +1,37 @@ +. + */ +declare(strict_types=1); + +return [ + 'no_demo_text' => 'Maaf, tidak ada teks penjelasan-penjelasan tambahan laman halaman ini.', + 'see_help_icon' => 'Namun, ikon di pojok kanan atas mungkin memberi tahu Anda lebih banyak.', + 'index' => 'Selamat Datang di Firefly III! Di halaman ini Anda mendapatkan gambaran singkat tentang keuangan Anda. Untuk informasi lebih lanjut, lihat Akun → Setelan Akun dan tentu saja halaman Budgets123_4_6_32_23_32_19_7_321Reports. Atau hanya melihat-lihat dan melihat di mana Anda berakhir.', + 'accounts-index' => 'Akun aset adalah rekening bank pribadi Anda. Akun pengeluaran adalah akun yang Anda belanjakan, seperti toko dan teman. Akun pendapatan adalah rekening yang Anda terima dari, seperti pekerjaan Anda, pemerintah atau sumber pendapatan lainnya. Pada halaman ini Anda dapat mengedit atau menghapusnya.', + 'budgets-index' => 'Halaman ini menunjukkan ikhtisar anggaran Anda. Bagian atas menunjukkan jumlah yang tersedia untuk dianggarkan. Ini dapat disesuaikan untuk segala periode dengan mengklik jumlah di sebelah kanan. Jumlah yang sebenarnya Anda habiskan ditunjukkan di bilah di bawah ini. Di bawah ini adalah biaya per anggaran dan apa yang telah Anda anggarkan untuk mereka.', + 'reports-index-start' => 'Firefly III mendukung sejumlah jenis laporan. Baca tentang mereka dengan mengklik -icon di pojok kanan atas.', + 'reports-index-examples' => 'Pastikan untuk memeriksa contoh-contoh ini: gambaran keuangan bulanan, ikhtisar keuangan tahunan dan gambaran umum anggaran.', + 'currencies-index' => 'Firefly III mendukung banyak mata uang. Meski default ke Euro itu bisa diatur ke US Dollar dan banyak mata uang lainnya. Seperti yang bisa Anda lihat, sejumlah kecil mata uang telah disertakan namun Anda dapat menambahkannya sendiri jika menginginkannya. Mengubah mata uang default tidak akan mengubah mata uang dari transaksi yang ada namun: Firefly III mendukung penggunaan beberapa mata uang pada saat bersamaan.', + 'transactions-index' => 'Biaya ini, deposito dan transfer tidak terlalu imajinatif. Mereka telah dihasilkan secara otomatis.', + 'piggy-banks-index' => 'Seperti yang bisa Anda lihat, ada tiga celengan. Gunakan tombol plus dan minus untuk mempengaruhi jumlah uang di setiap celengan. Klik nama celengan untuk melihat administrasi masing-masing celengan.', + 'import-index' => 'Tentu saja, file CSV manapun bisa diimpor ke Firefly III', + 'import-configure-security' => 'Karena masalah keamanan, upload Anda telah diganti dengan file lokal.', + 'import-configure-configuration' => 'Konfigurasi yang Anda lihat di bawah ini benar untuk file lokal.', +]; diff --git a/resources/lang/id_ID/firefly.php b/resources/lang/id_ID/firefly.php new file mode 100644 index 0000000000..0929bdded7 --- /dev/null +++ b/resources/lang/id_ID/firefly.php @@ -0,0 +1,1142 @@ +. + */ +declare(strict_types=1); + +return [ + // general stuff: + 'close' => 'Dekat', + 'actions' => 'Tindakan', + 'edit' => 'Edit', + 'delete' => 'Menghapus', + 'welcomeBack' => 'Apa yang sedang diputar?', + 'everything' => 'Segala sesuatu', + 'today' => 'hari ini', + 'customRange' => 'Rentang khusus', + 'apply' => 'Menerapkan', + 'select_date' => 'Pilih tanggal..', + 'cancel' => 'Membatalkan', + 'from' => 'Dari', + 'to' => 'Untuk', + 'showEverything' => 'Tunjukkan semuanya', + 'never' => 'Tak pernah', + 'no_results_for_empty_search' => 'Pencarian Anda kosong, jadi tidak ada yang ditemukan.', + 'removed_amount' => 'Dihapus :amount', + 'added_amount' => 'Ditambahkan :amount', + 'asset_account_role_help' => 'Setiap pilihan tambahan yang dihasilkan dari pilihan Anda dapat diatur nanti.', + 'Opening balance' => 'Saldo awal', + 'create_new_stuff' => 'Buat barang baru', + 'new_withdrawal' => 'Penarikan baru', + 'new_deposit' => 'Deposit baru', + 'new_transfer' => 'Transfer baru', + 'new_asset_account' => 'Akun aset baru', + 'new_expense_account' => 'Akun pengeluaran baru', + 'new_revenue_account' => 'Akun pendapatan baru', + 'new_budget' => 'Anggaran baru', + 'new_bill' => 'Tagihan baru', + 'block_account_logout' => 'Kamu telah keluar Akun yang diblokir tidak dapat menggunakan situs ini. Apakah Anda mendaftar dengan alamat email yang benar?', + 'flash_success' => 'Keberhasilan!', + 'flash_info' => 'Pesan', + 'flash_warning' => 'PERINGATAN!', + 'flash_error' => 'Kesalahan!', + 'flash_info_multiple' => 'Ada satu pesan|Ada :count pesan', + 'flash_error_multiple' => 'Ada satu kesalahan|Ada :count kesalahan', + 'net_worth' => 'Nilai bersih', + 'route_has_no_help' => 'Tidak ada bantuan untuk rute ini.', + 'two_factor_welcome' => 'Halo, :user!', + 'two_factor_enter_code' => 'Untuk melanjutkan, masukkan kode otentikasi dua faktor Anda. Aplikasi Anda bisa menghasilkannya untuk Anda.', + 'two_factor_code_here' => 'Masukkan kode di sini', + 'two_factor_title' => 'Dua faktor otentikasi', + 'authenticate' => 'Otentikasi', + 'two_factor_forgot_title' => 'Kehilangan dua faktor otentikasi', + 'two_factor_forgot' => 'Saya lupa dua faktor saya.', + 'two_factor_lost_header' => 'Kehilangan autentikasi dua faktor Anda?', + 'two_factor_lost_intro' => 'Sayangnya, ini bukan sesuatu yang bisa Anda atur ulang dari antarmuka web. Anda punya dua pilihan.', + 'two_factor_lost_fix_self' => 'Jika Anda menjalankan contoh Firefly III Anda sendiri, periksa log di storage / logs untuk mendapatkan petunjuk.', + 'two_factor_lost_fix_owner' => 'Jika tidak, kirimkan email ke pemilik situs, :site_owner dan mintalah mereka untuk menyetel ulang autentikasi dua faktor Anda.', + 'warning_much_data' => ':days hari data mungkin perlu beberapa saat untuk memuat.', + 'registered' => 'Anda telah berhasil mendaftar!', + 'Default asset account' => 'Akun aset standar', + 'no_budget_pointer' => 'Anda tampaknya belum memiliki anggaran. Anda harus membuat beberapa di halaman budgets. Anggaran dapat membantu Anda melacak pengeluaran.', + 'Savings account' => 'Rekening tabungan', + 'Credit card' => 'Kartu kredit', + 'source_accounts' => 'Akun sumber', + 'destination_accounts' => 'Akun tujuan', + 'user_id_is' => 'Id pengguna Anda adalah :user', + 'field_supports_markdown' => 'Bidang ini mendukung Markdown.', + 'need_more_help' => 'Jika Anda memerlukan bantuan lebih banyak menggunakan Firefly III, silakan opsi tiket di Github.', + 'reenable_intro_text' => 'Anda juga dapat mengaktifkan panduan pendahuluan.', + 'intro_boxes_after_refresh' => 'Kotak pengantar akan muncul kembali saat Anda menyegarkan halaman.', + 'show_all_no_filter' => 'Tampilkan semua transaksi tanpa mengelompokkan mereka menurut tanggal.', + 'expenses_by_category' => 'Biaya berdasarkan kategori', + 'expenses_by_budget' => 'Biaya menurut anggaran', + 'income_by_category' => 'Penghasilan menurut kategori', + 'expenses_by_asset_account' => 'Beban menurut akun aset', + 'expenses_by_expense_account' => 'Beban menurut akun beban', + 'cannot_redirect_to_account' => 'Firefly III tidak bisa mengalihkan Anda ke halaman yang benar. Permintaan maaf.', + 'sum_of_expenses' => 'Jumlah pengeluaran', + 'sum_of_income' => 'Jumlah pendapatan', + 'spent_in_specific_budget' => 'Menghabiskan anggaran ":budget"', + 'sum_of_expenses_in_budget' => 'Menghabiskan total dalam anggaran ":budget"', + 'left_in_budget_limit' => 'Kiri untuk dibelanjakan sesuai budget', + 'current_period' => 'Periode sekarang', + 'show_the_current_period_and_overview' => 'Tunjukkan periode dan ikhtisar saat ini', + 'pref_languages_locale' => 'Agar bahasa selain bahasa Inggris berfungsi dengan benar, sistem operasi Anda harus dilengkapi dengan informasi lokal yang benar. Jika ini tidak ada, data mata uang, tanggal dan jumlah mungkin salah diformat.', + 'budget_in_period' => 'Semua transaksi untuk anggaran ":name" antara :start dan :end', + 'chart_budget_in_period' => 'Bagan untuk semua transaksi untuk anggaran ":name" antara :start dan :end', + 'chart_account_in_period' => 'Bagan untuk semua transaksi untuk akun ":name" antara :start dan :end', + 'chart_category_in_period' => 'Bagan untuk semua transaksi untuk kategori ":name" antara :start dan :end', + 'chart_category_all' => 'Bagan untuk semua transaksi untuk kategori ":name"', + 'clone_withdrawal' => 'Kloning penarikan ini', + 'clone_deposit' => 'Kloning deposit ini', + 'clone_transfer' => 'Kloning transfer ini', + 'multi_select_no_selection' => 'Tidak ada yang di pilih', + 'multi_select_all_selected' => 'Semua dipilih', + 'multi_select_filter_placeholder' => 'Menemukan..', + 'between_dates_breadcrumb' => 'Antara :start dan :end', + 'all_journals_without_budget' => 'Semua transaksi tanpa anggaran', + 'journals_without_budget' => 'Transaksi tanpa anggaran', + 'all_journals_without_category' => 'Semua transaksi tanpa kategori', + 'journals_without_category' => 'Transaksi tanpa kategori', + 'all_journals_for_account' => 'Semua transaksi untuk akun :name', + 'chart_all_journals_for_account' => 'Bagan semua transaksi untuk akun :name', + 'journals_in_period_for_account' => 'Semua transaksi untuk akun :name antara :start dan :end', + 'transferred' => 'Ditransfer', + 'all_withdrawal' => 'Semua biaya', + 'all_transactions' => 'Semua Transaksi', + 'title_withdrawal_between' => 'Semua biaya antara :start dan :end', + 'all_deposit' => 'Semua pendapatan', + 'title_deposit_between' => 'Semua pendapatan antara :start dan :end', + 'all_transfers' => 'Semua transfer', + 'title_transfers_between' => 'Semua transfer antara :start dan :end', + 'all_transfer' => 'Semua transfer', + 'all_journals_for_tag' => 'Semua transaksi untuk tag ":tag"', + 'title_transfer_between' => 'Semua transfer antara :start dan :end', + 'all_journals_for_category' => 'Semua transaksi untuk kategori :name', + 'all_journals_for_budget' => 'Semua transaksi untuk anggaran :name', + 'chart_all_journals_for_budget' => 'Bagan semua transaksi untuk anggaran :name', + 'journals_in_period_for_category' => 'Semua transaksi untuk kategori :name antara :start dan :end', + 'journals_in_period_for_tag' => 'Semua transaksi untuk tag :tag antara :start and :end', + 'not_available_demo_user' => 'Fitur yang Anda coba akses tidak tersedia untuk pengguna demo.', + 'exchange_rate_instructions' => 'Akun aset "@name" hanya menerima transaksi di @native_currency. Jika Anda ingin menggunakan @foreign_currency sebagai gantinya, pastikan jumlahnya di @native_currency juga diketahui:', + 'transfer_exchange_rate_instructions' => 'Akun aset sumber "@source_name" hanya menerima transaksi di @source_currency. Akun aset tujuan "@dest_name" hanya menerima transaksi di @dest_currency. Anda harus memberikan jumlah yang ditransfer dengan benar pada kedua mata uang tersebut.', + 'transaction_data' => 'Data transaksi', + 'invalid_server_configuration' => 'Konfigurasi server tidak valid', + 'invalid_locale_settings' => 'Firefly III tidak dapat memformat jumlah uang karena server Anda kehilangan paket yang dibutuhkan. Ada instructions bagaimana melakukan ini.', + 'quickswitch' => 'Quickswitch', + + // check for updates: + 'update_check_title' => 'Check for updates', + 'admin_update_check_title' => 'Automatically check for update', + 'admin_update_check_explain' => 'Firefly III can check for updates automatically. When you enable this setting, it will contact Github to see if a new version of Firefly III is available. When it is, you will get a notification. You can test this notification using the button on the right. Please indicate below if you want Firefly III to check for updates.', + 'check_for_updates_permission' => 'Firefly III can check for updates, but it needs your permission to do so. Please go to the administration to indicate if you would like this feature to be enabled.', + 'updates_ask_me_later' => 'Ask me later', + 'updates_do_not_check' => 'Do not check for updates', + 'updates_enable_check' => 'Enable the check for updates', + 'admin_update_check_now_title' => 'Check for updates now', + 'admin_update_check_now_explain' => 'If you press the button, Firefly III will see if your current version is the latest.', + 'check_for_updates_button' => 'Check now!', + 'update_new_version_alert' => 'A new version is available. You are running v:your_version, the latest version is v:new_version which was released on :date.', + 'update_current_version_alert' => 'You are running v:version, which is the latest available release.', + 'update_newer_version_alert' => 'You are running v:your_version, which is newer than the latest release, v:new_version.', + 'update_check_error' => 'An error occurred while checking for updates. Please view the log files.', + + // search + 'search' => 'Pencarian', + 'search_query' => 'Pertanyaan', + 'search_found_transactions' => 'Jumlah transaksi yang ditemukan:', + 'general_search_error' => 'Terjadi kesalahan saat mencari. Silakan periksa file log untuk informasi lebih lanjut.', + 'search_box' => 'Pencarian', + 'search_box_intro' => 'Selamat datang di fungsi pencarian Firefly III. Masukkan kueri penelusuran Anda di dalam kotak. Pastikan Anda memeriksa file bantuan karena pencariannya cukup canggih.', + 'search_error' => 'Kesalahan saat mencari', + 'search_searching' => 'Mencari...', + 'search_results' => 'Hasil Pencarian', + + // repeat frequencies: + 'repeat_freq_yearly' => 'tahunan', + 'repeat_freq_half-year' => 'setiap setengah tahun', + 'repeat_freq_quarterly' => 'triwulanan', + 'repeat_freq_monthly' => 'bulanan', + 'repeat_freq_weekly' => 'mingguan', + 'weekly' => 'mingguan', + 'quarterly' => 'triwulanan', + 'half-year' => 'setiap setengah tahun', + 'yearly' => 'tahunan', + + // export data: + 'import_and_export' => 'Impor dan ekspor', + 'export_data' => 'Data ekspor', + 'export_and_backup_data' => 'Ekspor dan backup', + 'export_data_intro' => 'Untuk keperluan backup, saat bermigrasi ke sistem lain atau saat melakukan migrasi ke instalasi Firefly III lainnya.', + 'export_format' => 'Format ekspor', + 'export_format_csv' => 'Nilai yang dipisahkan koma (file CSV)', + 'export_format_mt940' => 'Format MT940 yang kompatibel', + 'include_old_uploads_help' => 'Firefly III tidak membuang file CSV asli yang telah Anda impor sebelumnya. Anda bisa memasukkannya ke dalam ekspor Anda.', + 'do_export' => 'Ekspor', + 'export_status_never_started' => 'Ekspor belum dimulai', + 'export_status_make_exporter' => 'Membuat barang eksportir...', + 'export_status_collecting_journals' => 'Mengumpulkan transaksi Anda...', + 'export_status_collected_journals' => 'Mengumpulkan transaksi Anda!', + 'export_status_converting_to_export_format' => 'Mengubah transaksi Anda...', + 'export_status_converted_to_export_format' => 'Mengubah transaksi anda!', + 'export_status_creating_journal_file' => 'Membuat file ekspor...', + 'export_status_created_journal_file' => 'Membuat file ekspor!', + 'export_status_collecting_attachments' => 'Mengumpulkan semua lampiran Anda...', + 'export_status_collected_attachments' => 'Mengumpulkan semua lampiran Anda!', + 'export_status_collecting_old_uploads' => 'Mengumpulkan semua unggahan sebelumnya...', + 'export_status_collected_old_uploads' => 'Mengumpulkan semua upload sebelumnya!', + 'export_status_creating_zip_file' => 'Membuat file zip...', + 'export_status_created_zip_file' => 'Membuat file zip!', + 'export_status_finished' => 'Ekspor telah berhasil selesai! Yay!', + 'export_data_please_wait' => 'Mohon tunggu...', + + // rules + 'rules' => 'Aturan', + 'rule_name' => 'Nama aturan', + 'rule_triggers' => 'Aturan pemicu kapan', + 'rule_actions' => 'Aturan akan', + 'new_rule' => 'Aturan baru', + 'new_rule_group' => 'Kelompok aturan baru', + 'rule_priority_up' => 'Berikan peraturan prioritas lebih', + 'rule_priority_down' => 'Berikan peraturan kurang prioritas', + 'make_new_rule_group' => 'Buat grup aturan baru', + 'store_new_rule_group' => 'Simpan grup aturan baru', + 'created_new_rule_group' => 'Kelompok aturan baru ":title" disimpan!', + 'updated_rule_group' => 'Grup aturan yang berhasil diperbarui ":title".', + 'edit_rule_group' => 'Edit grup aturan ":title"', + 'delete_rule_group' => 'Hapus grup aturan ":title"', + 'deleted_rule_group' => 'Grup aturan yang dihapus ":title"', + 'update_rule_group' => 'Perbarui grup aturan', + 'no_rules_in_group' => 'Tidak ada aturan dalam kelompok ini', + 'move_rule_group_up' => 'Pindahkan grup aturan ke atas', + 'move_rule_group_down' => 'Pindahkan grup aturan ke bawah', + 'save_rules_by_moving' => 'Simpan aturan ini dengan memindahkannya ke grup aturan lain:', + 'make_new_rule' => 'Buat aturan baru di grup aturan ":title"', + 'rule_help_stop_processing' => 'Saat Anda mencentang kotak ini, nanti aturan dalam grup ini tidak akan dijalankan.', + 'rule_help_active' => 'Aturan tidak aktif tidak akan pernah menyala.', + 'stored_new_rule' => 'Aturan baru yang tersimpan dengan judul ":title"', + 'deleted_rule' => 'Aturan yang dihapus dengan judul ":title"', + 'store_new_rule' => 'Simpan peraturan baru', + 'updated_rule' => 'Aturan yang diperbarui dengan judul ":title"', + 'default_rule_group_name' => 'Aturan baku', + 'default_rule_group_description' => 'Semua peraturan Anda tidak ada dalam kelompok tertentu.', + 'default_rule_name' => 'Aturan default pertama Anda', + 'default_rule_description' => 'Aturan ini adalah sebuah contoh. Anda bisa menghapusnya dengan aman.', + 'default_rule_trigger_description' => 'Orang yang menjual dunia', + 'default_rule_trigger_from_account' => 'David Bowie', + 'default_rule_action_prepend' => 'Membeli dunia dari', + 'default_rule_action_set_category' => 'Biaya besar', + 'trigger' => 'Pelatuk', + 'trigger_value' => 'Memicu nilai', + 'stop_processing_other_triggers' => 'Berhenti memproses pemicu lainnya', + 'add_rule_trigger' => 'Tambahkan pemicu baru', + 'action' => 'Tindakan', + 'action_value' => 'Nilai tindakan', + 'stop_executing_other_actions' => 'Berhenti mengeksekusi tindakan lainnya', + 'add_rule_action' => 'Tambahkan tindakan baru', + 'edit_rule' => 'Edit aturan ":title"', + 'delete_rule' => 'Hapus aturan ":title"', + 'update_rule' => 'Perbarui aturan', + 'test_rule_triggers' => 'Lihat transaksi yang sesuai', + 'warning_transaction_subset' => 'Untuk alasan kinerja daftar ini terbatas pada :max_num_transactions dan mungkin hanya menampilkan subset dari transaksi yang cocok', + 'warning_no_matching_transactions' => 'Tidak ada transaksi yang cocok ditemukan. Harap dicatat bahwa untuk alasan kinerja, hanya yang terakhir transaksi :num_transactions telah diperiksa.', + 'warning_no_valid_triggers' => 'Tidak ada pemicu yang valid.', + 'apply_rule_selection' => 'Terapkan aturan ":title" untuk pilihan transaksi Anda', + 'apply_rule_selection_intro' => 'Aturan seperti ":title" biasanya hanya diterapkan pada transaksi baru atau yang telah diperbarui, namun Anda bisa memberi tahu Firefly III untuk menjalankannya pada pilihan transaksi Anda yang ada. Ini bisa berguna bila Anda telah memperbarui peraturan dan Anda memerlukan perubahan yang akan diterapkan pada semua transaksi Anda yang lain.', + 'include_transactions_from_accounts' => 'Sertakan transaksi dari akun ini', + 'applied_rule_selection' => 'Aturan ":title" telah diterapkan pada pilihan Anda.', + 'execute' => 'Menjalankan', + 'apply_rule_group_selection' => 'Terapkan grup aturan ":title" ke pilihan transaksi Anda', + 'apply_rule_group_selection_intro' => 'Kelompok aturan seperti ":title" biasanya hanya diterapkan pada transaksi baru atau yang diperbarui, namun Anda dapat memberi tahu Firefly III untuk menjalankan semua aturan dalam grup ini pada pilihan transaksi Anda saat ini. Ini bisa berguna bila Anda telah memperbarui sekumpulan aturan dan Anda memerlukan perubahan yang akan diterapkan pada semua transaksi Anda yang lain.', + 'applied_rule_group_selection' => 'Rule group ":title" telah diterapkan pada pilihan Anda.', + + // actions and triggers + 'rule_trigger_user_action' => 'Tindakan pengguna adalah ":trigger_value"', + 'rule_trigger_from_account_starts_choice' => 'Akun sumber dimulai dengan..', + 'rule_trigger_from_account_starts' => 'Akun sumber dimulai dengan ":trigger_value"', + 'rule_trigger_from_account_ends_choice' => 'Akun sumber diakhiri dengan..', + 'rule_trigger_from_account_ends' => 'Akun sumber diakhiri dengan ":trigger_value"', + 'rule_trigger_from_account_is_choice' => 'Akun sumber..', + 'rule_trigger_from_account_is' => 'Akun sumber adalah ":trigger_value"', + 'rule_trigger_from_account_contains_choice' => 'Akun sumber berisi..', + 'rule_trigger_from_account_contains' => 'Akun sumber berisi ":trigger_value"', + 'rule_trigger_to_account_starts_choice' => 'Akun tujuan dimulai dengan..', + 'rule_trigger_to_account_starts' => 'Akun tujuan dimulai dengan ":trigger_value"', + 'rule_trigger_to_account_ends_choice' => 'Akun tujuan diakhiri dengan..', + 'rule_trigger_to_account_ends' => 'Akun tujuan diakhiri dengan ":trigger_value"', + 'rule_trigger_to_account_is_choice' => 'Akun tujuan..', + 'rule_trigger_to_account_is' => 'Akun tujuan adalah ":trigger_value"', + 'rule_trigger_to_account_contains_choice' => 'Akun tujuan berisi..', + 'rule_trigger_to_account_contains' => 'Akun tujuan berisi ":trigger_value"', + 'rule_trigger_transaction_type_choice' => 'Transaksi adalah tipe..', + 'rule_trigger_transaction_type' => 'Transaksi adalah tipe ":trigger_value"', + 'rule_trigger_category_is_choice' => 'Kategori adalah..', + 'rule_trigger_category_is' => 'Kategori adalah ":trigger_value"', + 'rule_trigger_amount_less_choice' => 'Jumlahnya kurang dari..', + 'rule_trigger_amount_less' => 'Jumlahnya kurang dari :trigger_value', + 'rule_trigger_amount_exactly_choice' => 'Jumlahnya..', + 'rule_trigger_amount_exactly' => 'Jumlahnya adalah:trigger_value', + 'rule_trigger_amount_more_choice' => 'Jumlahnya lebih dari..', + 'rule_trigger_amount_more' => 'Jumlahnya lebih dari :trigger_value', + 'rule_trigger_description_starts_choice' => 'Deskripsi dimulai dengan..', + 'rule_trigger_description_starts' => 'Deskripsi dimulai dengan ":trigger_value"', + 'rule_trigger_description_ends_choice' => 'Deskripsi diakhiri dengan..', + 'rule_trigger_description_ends' => 'Deskripsi diakhiri dengan ":trigger_value"', + 'rule_trigger_description_contains_choice' => 'Deskripsi berisi..', + 'rule_trigger_description_contains' => 'Deskripsi berisi ":trigger_value"', + 'rule_trigger_description_is_choice' => 'Deskripsi adalah..', + 'rule_trigger_description_is' => 'Deskripsi adalah ":trigger_value"', + 'rule_trigger_budget_is_choice' => 'Anggaran adalah..', + 'rule_trigger_budget_is' => 'Anggaran adalah ":trigger_value"', + 'rule_trigger_tag_is_choice' => '(A) tag adalah..', + 'rule_trigger_tag_is' => 'Tag adalah ":trigger_value"', + 'rule_trigger_has_attachments_choice' => 'Paling tidak banyak keterikatan ini', + 'rule_trigger_has_attachments' => 'Paling tidak:trigger_value attachment (s)', + 'rule_trigger_store_journal' => 'Saat transaksi dibuat', + 'rule_trigger_update_journal' => 'Saat transaksi diperbarui', + 'rule_trigger_has_no_category_choice' => 'Tidak memiliki kategori', + 'rule_trigger_has_no_category' => 'Transaksi tidak memiliki kategori', + 'rule_trigger_has_any_category_choice' => 'Memiliki kategori (apapun)', + 'rule_trigger_has_any_category' => 'Transaksi tidak memiliki kategori (apapun)', + 'rule_trigger_has_no_budget_choice' => 'Tidak memiliki anggaran', + 'rule_trigger_has_no_budget' => 'Transaksi tidak memiliki anggaran', + 'rule_trigger_has_any_budget_choice' => 'Memiliki anggaran (apapun)', + 'rule_trigger_has_any_budget' => 'Transaksi memiliki anggaran (apapun)', + 'rule_trigger_has_no_tag_choice' => 'Tidak memiliki tag', + 'rule_trigger_has_no_tag' => 'Transaksi tidak memiliki tag(s)', + 'rule_trigger_has_any_tag_choice' => 'Memiliki satu atau beberapa tag (apapun)', + 'rule_trigger_has_any_tag' => 'Transaksi memiliki satu atau lebih tag (apapun)', + 'rule_trigger_any_notes_choice' => 'Telah ada catatan', + 'rule_trigger_any_notes' => 'Transaksi memiliki (ada) catatan', + 'rule_trigger_no_notes_choice' => 'Tidak memiliki catatan', + 'rule_trigger_no_notes' => 'Transaksi tidak memiliki catatan', + 'rule_trigger_notes_are_choice' => 'Catatan adalah..', + 'rule_trigger_notes_are' => 'Catatan adalah ":trigger_value"', + 'rule_trigger_notes_contain_choice' => 'Catatan berisi..', + 'rule_trigger_notes_contain' => 'Catatan berisi ":trigger_value"', + 'rule_trigger_notes_start_choice' => 'Catatan dimulai dengan..', + 'rule_trigger_notes_start' => 'Catatan dimulai dengan ":trigger_value"', + 'rule_trigger_notes_end_choice' => 'Catatan diakhiri dengan..', + 'rule_trigger_notes_end' => 'Catatan diakhiri dengan ":trigger_value"', + 'rule_action_set_category' => 'Tetapkan kategori ke ":action_value"', + 'rule_action_clear_category' => 'Kategori yang jelas', + 'rule_action_set_budget' => 'Tetapkan anggaran ke ":action_value"', + 'rule_action_clear_budget' => 'Jelas anggaran', + 'rule_action_add_tag' => 'Tambahkan tag ":action_value"', + 'rule_action_remove_tag' => 'Hapus tag ":action_value"', + 'rule_action_remove_all_tags' => 'Hapus semua tag', + 'rule_action_set_description' => 'Tetapkan deskripsi ke ":action_value"', + 'rule_action_append_description' => 'Tambahkan deskripsi dengan ":action_value"', + 'rule_action_prepend_description' => 'Masukan dulu deskripsi dengan ":action_value"', + 'rule_action_set_category_choice' => 'Tetapkan kategori ke..', + 'rule_action_clear_category_choice' => 'Kosongkan kategori apapun', + 'rule_action_set_budget_choice' => 'Tetapkan anggaran ke..', + 'rule_action_clear_budget_choice' => 'Kosongkan anggaran', + 'rule_action_add_tag_choice' => 'Tambahkan tag..', + 'rule_action_remove_tag_choice' => 'Hapus tanda..', + 'rule_action_remove_all_tags_choice' => 'Hapus semua tag', + 'rule_action_set_description_choice' => 'Setel deskripsi ke..', + 'rule_action_append_description_choice' => 'Tambahkan deskripsi dengan..', + 'rule_action_prepend_description_choice' => 'Tambahkan deskripsi dengan..', + 'rule_action_set_source_account_choice' => 'Tetapkan akun sumber ke...', + 'rule_action_set_source_account' => 'Tetapkan akun sumber ke :action_value', + 'rule_action_set_destination_account_choice' => 'Tetapkan akun tujuan ke...', + 'rule_action_set_destination_account' => 'Tetapkan akun tujuan ke :action_value', + 'rule_action_append_notes_choice' => 'Tambahkan catatan dengan..', + 'rule_action_append_notes' => 'Tambahkan catatan dengan ":action_value"', + 'rule_action_prepend_notes_choice' => 'Prepend catatan dengan..', + 'rule_action_prepend_notes' => 'Catatan prepend dengan ":action_value"', + 'rule_action_clear_notes_choice' => 'Hapus catatan apapun', + 'rule_action_clear_notes' => 'Hapus catatan apapun', + 'rule_action_set_notes_choice' => 'Tetapkan catatan ke..', + 'rule_action_set_notes' => 'Tetapkan catatan ke ":action_value"', + + 'rules_have_read_warning' => 'Sudahkah anda membaca peringatannya?', + 'apply_rule_warning' => 'Peringatan: menjalankan aturan (grup) pada banyak pilihan transaksi bisa memakan waktu lama, dan bisa time-out. Jika ya, aturan (grup) hanya akan diterapkan ke subkumpulan transaksi yang tidak diketahui. Ini mungkin akan membuat administrasi keuangan Anda berantakan. Tolong hati-hati.', + + // tags + 'store_new_tag' => 'Simpan tag baru', + 'update_tag' => 'Perbarui tag', + 'no_location_set' => 'Tidak ada lokasi yang ditetapkan', + 'meta_data' => 'Data meta', + 'location' => 'Lokasi', + 'without_date' => 'Tanpa tanggal', + 'result' => 'Hasil', + 'sums_apply_to_range' => 'Semua jumlah berlaku untuk rentang yang dipilih', + 'mapbox_api_key' => 'Untuk menggunakan peta, dapatkan kunci API dari Mapbox. Buka file .env en masukkan kode ini setelah MAPBOX_API_KEY = .', + 'press_tag_location' => 'Klik kanan atau tekan agak lama untuk mengatur lokasi tag.', + 'clear_location' => 'Lokasi yang jelas', + + // preferences + 'pref_home_screen_accounts' => 'Akun layar utama', + 'pref_home_screen_accounts_help' => 'Akun mana yang harus ditampilkan di beranda?', + 'pref_view_range' => 'Rentang tampilan', + 'pref_view_range_help' => 'Beberapa grafik secara otomatis dikelompokkan dalam beberapa periode. Periode apa yang anda inginkan?', + 'pref_1D' => 'Suatu hari', + 'pref_1W' => 'Satu minggu', + 'pref_1M' => 'Satu bulan', + 'pref_3M' => 'Tiga bulan (seperempat)', + 'pref_6M' => 'Enam bulan', + 'pref_1Y' => 'Satu tahun', + 'pref_languages' => 'Bahasa', + 'pref_languages_help' => 'Firefly III mendukung beberapa bahasa. Mana yang kamu suka?', + 'pref_custom_fiscal_year' => 'Pengaturan tahun fiskal', + 'pref_custom_fiscal_year_label' => 'Diaktifkan', + 'pref_custom_fiscal_year_help' => 'Di negara-negara yang menggunakan tahun keuangan selain 1 Januari sampai 31 Desember, Anda dapat mengaktifkannya dan menentukan hari-hari awal / akhir dari tahun fiskal', + 'pref_fiscal_year_start_label' => 'Tahun anggaran mulai tanggal', + 'pref_two_factor_auth' => 'Verifikasi 2 langkah', + 'pref_two_factor_auth_help' => 'Bila Anda mengaktifkan verifikasi 2 langkah (juga dikenal sebagai autentikasi dua faktor), Anda menambahkan lapisan keamanan ekstra ke akun Anda. Anda masuk dengan sesuatu yang Anda tahu (kata sandi Anda) dan sesuatu yang Anda miliki (kode verifikasi). Kode verifikasi dihasilkan oleh aplikasi di ponsel Anda, seperti Authy atau Google Authenticator.', + 'pref_enable_two_factor_auth' => 'Aktifkan verifikasi 2 langkah', + 'pref_two_factor_auth_disabled' => 'Kode verifikasi 2 langkah dihapus dan dinonaktifkan', + 'pref_two_factor_auth_remove_it' => 'Jangan lupa menghapus akun dari aplikasi autentikasi Anda!', + 'pref_two_factor_auth_code' => 'Kode verifikasi', + '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' => 'Setel ulang kode verifikasi', + 'pref_two_factor_auth_remove_code' => 'Hapus kode verifikasi', + 'pref_two_factor_auth_remove_will_disable' => '(ini juga akan menonaktifkan autentikasi dua faktor)', + 'pref_save_settings' => 'Simpan Pengaturan', + 'saved_preferences' => 'Preferensi disimpan!', + 'preferences_general' => 'Umum', + 'preferences_frontpage' => 'Tampilan depan', + 'preferences_security' => 'Keamanan', + 'preferences_layout' => 'Tata ruang', + 'pref_home_show_deposits' => 'Tampilkan deposito pada layar awal', + 'pref_home_show_deposits_info' => 'Layar awal sudah menunjukkan rekening pengeluaran Anda. Harus itu juga menunjukkan akun pendapatan Anda?', + 'pref_home_do_show_deposits' => 'Ya, menunjukkan kepada mereka', + 'successful_count' => ':count menghitung sukses', + 'list_page_size_title' => 'Ukuran halaman', + 'list_page_size_help' => 'Setiap daftar hal-hal (rekening, transaksi, dll) menunjukkan paling ini banyak per halaman.', + 'list_page_size_label' => 'Ukuran halaman', + 'between_dates' => '(:start dan :end)', + 'pref_optional_fields_transaction' => 'Bidang opsional untuk transaksi', + 'pref_optional_fields_transaction_help' => 'Secara default tidak semua bidang diaktifkan saat membuat transaksi baru (karena kekacauan). Di bawah, Anda dapat mengaktifkan bidang ini jika Anda berpikir mereka bisa berguna bagi Anda. Tentu saja, setiap bidang yang dinonaktifkan, tapi sudah diisi, akan terlihat terlepas dari pengaturan.', + 'optional_tj_date_fields' => 'Bidang tanggal', + 'optional_tj_business_fields' => 'Bidang usaha', + 'optional_tj_attachment_fields' => 'Bidang lampiran', + 'pref_optional_tj_interest_date' => 'Tanggal bunga', + 'pref_optional_tj_book_date' => 'Buku tanggal', + 'pref_optional_tj_process_date' => 'Tanggal pengolahan', + 'pref_optional_tj_due_date' => 'Batas tanggal terakhir', + 'pref_optional_tj_payment_date' => 'Tanggal pembayaran', + 'pref_optional_tj_invoice_date' => 'Tanggal faktur', + 'pref_optional_tj_internal_reference' => 'Referensi internal', + 'pref_optional_tj_notes' => 'Catatan', + 'pref_optional_tj_attachments' => 'Lampiran', + 'optional_field_meta_dates' => 'Tanggal', + 'optional_field_meta_business' => 'Bisnis', + 'optional_field_attachments' => 'Lampiran', + 'optional_field_meta_data' => 'Data meta opsional', + + // profile: + 'change_your_password' => 'Ubah password Anda', + 'delete_account' => 'Hapus akun', + 'current_password' => 'Kata sandi saat ini', + 'new_password' => 'Kata sandi baru', + 'new_password_again' => 'Password Baru Lagi)', + 'delete_your_account' => 'Hapus akun anda', + 'delete_your_account_help' => 'Menghapus akun juga akan menghapus akun, transaksi, semua Anda mungkin telah disimpan ke Firefly III. Ini akan HILANG.', + 'delete_your_account_password' => 'Masukkan kata sandi Anda untuk melanjutkan.', + 'password' => 'Kata sandi', + 'are_you_sure' => 'Apakah Anda yakin? Anda tidak dapat membatalkan ini.', + 'delete_account_button' => 'Hapus akun anda', + 'invalid_current_password' => 'Kata sandi tidak valid saat ini!', + 'password_changed' => 'Sandi berubah!', + 'should_change' => 'Idenya adalah untuk mengubah password Anda.', + 'invalid_password' => 'Kata sandi salah!', + 'what_is_pw_security' => 'Apa itu "memverifikasi keamanan password"?', + 'secure_pw_title' => 'Bagaimana memilih sebuah password yang aman', + 'secure_pw_history' => 'Pada Agustus 2017 terkenal peneliti keamanan Troy berburu merilis daftar 306 juta password dicuri. password tersebut dicuri selama breakins di perusahaan seperti LinkedIn, Adobe dan Neopets (dan banyak lagi).', + 'secure_pw_check_box' => 'Dengan mencentang kotaknya, Firefly III akan mengirimkan hash SHA1 dari kata sandi Anda ke situs web dari Troy Hunt untuk melihat apakah itu ada dalam daftar. Ini akan menghentikan Anda untuk menggunakan kata kunci yang tidak aman seperti yang disarankan di Publikasi Khusus NIST atas Subjek ini.', + 'secure_pw_sha1' => 'Tapi saya pikir SHA1 rusak?', + 'secure_pw_hash_speed' => 'Ya, tapi tidak dalam konteks ini. Seperti yang bisa Anda baca di situs web yang merinci bagaimana mereka melanggar SHA1, sekarang sedikit lebih mudah untuk menemukan "tabrakan": string lain yang menghasilkan sama SHA1-hash Sekarang hanya membutuhkan waktu 10.000 tahun dengan menggunakan mesin GPU tunggal.', + 'secure_pw_hash_security' => 'Tabrakan ini tidak akan sama dengan kata sandi Anda, juga tidak akan berguna di (situs seperti) Firefly III. Aplikasi ini tidak menggunakan SHA1 untuk verifikasi kata sandi. Jadi aman untuk mencentang kotak ini. Kata sandi Anda hashed dan dikirim melalui HTTPS.', + 'secure_pw_should' => 'Haruskah saya mencentang kotaknya?', + 'secure_pw_long_password' => 'Jika Anda baru saja menghasilkan kata sandi penggunaan tunggal yang hebat untuk Firefly III menggunakan beberapa jenis generator kata kunci: tidak.', + 'secure_pw_short' => 'Jika Anda baru memasukkan kata sandi yang selalu Anda gunakan: Please yes.', + 'personal_access_token' => 'Token akses pribadi', + 'explain_access_token' => 'Anda memerlukan token ini untuk melakukan opsi baris perintah, seperti mengimpor atau mengekspor data. Tanpa itu, perintah sensitif semacam itu tidak akan berhasil. Jangan berbagi token akses Anda. Tidak ada yang akan menanyakan token ini, bahkan saya pun tidak. Jika Anda takut kehilangan ini, atau saat Anda paranoid, pulihkan token ini dengan menggunakan tombolnya.', + 'regenerate_access_token' => 'Regenerasi token akses', + 'token_regenerated' => 'Token baru dihasilkan', + 'change_your_email' => 'Ubah alamat email anda', + 'email_verification' => 'Pesan email akan dikirim ke alamat email lama DAN baru Anda. Untuk tujuan keamanan, Anda tidak dapat masuk sampai Anda memverifikasi alamat email baru Anda. Jika Anda tidak yakin apakah instalasi Firefly III Anda bisa mengirim email, tolong jangan gunakan fitur ini. Jika Anda seorang administrator, Anda dapat mengujinya di Administrasi.', + 'email_changed_logout' => 'Sampai Anda memverifikasi alamat email Anda, Anda tidak dapat login.', + 'login_with_new_email' => 'Anda sekarang bisa masuk dengan alamat email baru Anda.', + 'login_with_old_email' => 'Anda sekarang dapat login dengan alamat email lama Anda lagi.', + + // attachments + 'nr_of_attachments' => 'Satu lampiran |:count lampiran', + 'attachments' => 'Lampiran', + 'edit_attachment' => 'Edit lampiran ":name"', + 'update_attachment' => 'Perbarui lampiran', + 'delete_attachment' => 'Hapus lampiran ":name"', + 'attachment_deleted' => 'Lampiran yang dihapus ":name"', + 'attachment_updated' => 'Lampiran yang diperbarui ":name"', + 'upload_max_file_size' => 'Ukuran file maksimum: :size', + + // transaction index + 'title_expenses' => 'Beban', + 'title_withdrawal' => 'Beban', + 'title_revenue' => 'Pendapatan / penghasilan', + 'title_deposit' => 'Pendapatan / penghasilan', + 'title_transfer' => 'Transfer', + 'title_transfers' => 'Transfer', + + // convert stuff: + 'convert_is_already_type_Withdrawal' => 'Transaksi ini sudah menjadi penarikan', + 'convert_is_already_type_Deposit' => 'Transaksi ini sudah menjadi deposit', + 'convert_is_already_type_Transfer' => 'Transaksi ini sudah di transfer', + 'convert_to_Withdrawal' => 'Convert ":description" ke penarikan', + 'convert_to_Deposit' => 'Convert ":description" ke deposit', + 'convert_to_Transfer' => 'Convert ":description" ke sebuah transfer', + 'convert_options_WithdrawalDeposit' => 'Mengkonversi penarikan menjadi deposit', + 'convert_options_WithdrawalTransfer' => 'Mengkonversi penarikan ke dalam transfer', + 'convert_options_DepositTransfer' => 'Mengkonversi deposit ke transfer', + 'convert_options_DepositWithdrawal' => 'Mengkonversi deposit menjadi penarikan', + 'convert_options_TransferWithdrawal' => 'Mengkonversi transfer menjadi penarikan', + 'convert_options_TransferDeposit' => 'Mengkonversi transfer menjadi deposit', + 'convert_Withdrawal_to_deposit' => 'Mengkonversi penarikan ini ke deposit', + 'convert_Withdrawal_to_transfer' => 'Mengkonversi penarikan ini ke transfer', + 'convert_Deposit_to_withdrawal' => 'Convert this deposit to a withdrawal', + 'convert_Deposit_to_transfer' => 'Konversikan deposit ini ke transfer', + 'convert_Transfer_to_deposit' => 'Mengkonversi transfer ini ke deposit', + 'convert_Transfer_to_withdrawal' => 'Mengkonversi transfer ini ke penarikan', + 'convert_please_set_revenue_source' => 'Silakan pilih akun pendapatan dari mana uang itu berasal.', + 'convert_please_set_asset_destination' => 'Silakan pilih akun aset dimana uangnya akan digunakan.', + 'convert_please_set_expense_destination' => 'Tolong pilih rekening pengeluaran yang akan digunakan untuk uang.', + 'convert_please_set_asset_source' => 'Silakan pilih akun aset dari mana uang itu berasal.', + 'convert_explanation_withdrawal_deposit' => 'Jika Anda mengubah penarikan ini menjadi deposit, :amount akan disetorkan ke :sourceName alih-alih diambil darinya.', + 'convert_explanation_withdrawal_transfer' => 'Jika Anda mengubah penarikan ini menjadi transfer, :amount akan ditransfer dari :sourceName ke akun aset baru, alih-alih dibayar ke :destinationName.', + 'convert_explanation_deposit_withdrawal' => 'Jika Anda mengonversi setoran ini menjadi penarikan, :amount akan dihapus dari :destinationName alih-alih ditambahkan ke penarikan tersebut.', + 'convert_explanation_deposit_transfer' => 'Jika Anda mengonversi setoran ini menjadi transfer, :amount akan ditransfer dari akun aset pilihan Anda ke :destinationName .', + 'convert_explanation_transfer_withdrawal' => 'Jika Anda mengubah transfer ini menjadi penarikan, :amount akan beralih dari :sourceName ke tujuan baru sebagai biaya, alih-alih :destinationName sebagai transfer.', + 'convert_explanation_transfer_deposit' => 'Jika Anda mengubah transfer ini menjadi deposit, :amount akan disetorkan ke akun :destinationName alih-alih ditransfer ke sana.', + 'converted_to_Withdrawal' => 'Transaksi telah dikonversi menjadi penarikan', + 'converted_to_Deposit' => 'Transaksi telah dikonversi menjadi deposit', + 'converted_to_Transfer' => 'Transaksi telah dikonversi menjadi transfer', + 'invalid_convert_selection' => 'Akun yang telah Anda pilih sudah digunakan dalam transaksi ini atau tidak ada.', + + // create new stuff: + 'create_new_withdrawal' => 'Buat penarikan baru', + 'create_new_deposit' => 'Buat deposit baru', + 'create_new_transfer' => 'Buat transfer baru', + 'create_new_asset' => 'Buat akun aset baru', + 'create_new_expense' => 'Buat akun biaya baru', + 'create_new_revenue' => 'Buat akun pendapatan baru', + 'create_new_piggy_bank' => 'Buat celengan baru', + 'create_new_bill' => 'Buat tagihan baru', + + // currencies: + 'create_currency' => 'Buat mata uang baru', + 'store_currency' => 'Simpan mata uang baru', + 'update_currency' => 'Perbarui mata uang', + 'new_default_currency' => ' :name sekarang adalah mata uang default.', + 'cannot_delete_currency' => 'Tidak dapat menghapus :name karena masih digunakan.', + 'deleted_currency' => 'Mata uang :name dihapus', + 'created_currency' => 'Mata uang :name dibuat', + 'updated_currency' => 'Mata uang :name diperbarui', + 'ask_site_owner' => 'Harap bertanya :owner untuk menambahkan, menghapus atau mengedit mata uang.', + 'currencies_intro' => 'Firefly III mendukung berbagai mata uang yang dapat Anda atur dan aktifkan di sini.', + 'make_default_currency' => 'membuat default', + 'default_currency' => 'default', + + // forms: + 'mandatoryFields' => 'Bidang wajib', + 'optionalFields' => 'Bidang pilihan', + 'options' => 'Pilihan', + + // budgets: + 'create_new_budget' => 'Buat anggaran baru', + 'store_new_budget' => 'Simpan anggaran baru', + 'stored_new_budget' => 'Anggaran baru tersimpan ":name"', + 'available_between' => 'Tersedia antara :start dan :end', + 'transactionsWithoutBudget' => 'Biaya tanpa anggaran', + 'transactions_no_budget' => 'Biaya tanpa anggaran antara :start dan :end', + 'spent_between' => 'Menghabiskan antara :start dan :end', + 'createBudget' => 'Anggaran baru', + 'inactiveBudgets' => 'Anggaran tidak aktif', + 'without_budget_between' => 'Transaksi tanpa anggaran antara :start dan :end', + 'delete_budget' => 'Hapus anggaran ":name"', + 'deleted_budget' => 'Anggaran yang telah dihapus ":name"', + 'edit_budget' => 'Edit anggaran ":name"', + 'updated_budget' => 'Anggaran yang diperbarui ":name"', + 'update_amount' => 'Perbarui jumlah', + 'update_budget' => 'Perbarui anggaran', + 'update_budget_amount_range' => 'Update (expected) jumlah yang tersedia antara :start and :end', + 'budget_period_navigator' => 'Navigator periode', + 'info_on_available_amount' => 'Apa yang telah tersedia?', + 'available_amount_indication' => 'Gunakan jumlah ini untuk mendapatkan indikasi berapa total anggaran Anda.', + 'suggested' => 'Disarankan', + 'average_between' => 'Rata-rata antara :start dan :end', + + // bills: + 'matching_on' => 'Cocok di', + 'between_amounts' => 'antara :low dan :high.', + 'repeats' => 'Berulang', + 'connected_journals' => 'Transaksi yang terhubung', + 'auto_match_on' => 'Secara otomatis dicocokkan dengan Firefly', + 'auto_match_off' => 'Tidak secara otomatis dicocokkan dengan Firefly', + 'next_expected_match' => 'Pertandingan yang diharapkan berikutnya', + 'delete_bill' => 'Hapus tagihan ":name"', + 'deleted_bill' => 'Tagihan yang dihapus ":name"', + 'edit_bill' => 'Edit tagihan ":name"', + 'more' => 'Lebih', + 'rescan_old' => 'Rescan transaksi lama', + 'update_bill' => 'Perbarui tagihan', + 'updated_bill' => 'Diperbarui tagihan ":name"', + 'store_new_bill' => 'Simpan tagihan baru', + 'stored_new_bill' => 'Stored tagihan baru ":name"', + 'cannot_scan_inactive_bill' => 'Tagihan tidak aktif tidak dapat dipindai.', + 'rescanned_bill' => 'Rescanned semuanya.', + 'average_bill_amount_year' => 'Jumlah tagihan rata-rata (:year)', + 'average_bill_amount_overall' => 'Jumlah tagihan rata-rata (keseluruhan)', + 'not_or_not_yet' => 'Belum)', + 'not_expected_period' => 'Tidak diharapkan periode ini', + 'bill_is_active' => 'Tagihan aktif', + 'bill_expected_between' => 'Diharapkan antara :start dan :end', + 'bill_will_automatch' => 'Tagihan akan secara otomatis terhubung ke transaksi yang sesuai', + 'skips_over' => 'melompati', + + // accounts: + 'details_for_asset' => 'Rincian akun aset ":name"', + 'details_for_expense' => 'Rincian untuk akun biaya ":name"', + 'details_for_revenue' => 'Rincian untuk akun pendapatan ":name"', + 'details_for_cash' => 'Rincian untuk rekening kas ":name"', + 'store_new_asset_account' => 'Simpan akun aset baru', + 'store_new_expense_account' => 'Simpan akun pengeluaran baru', + 'store_new_revenue_account' => 'Simpan akun pendapatan baru', + 'edit_asset_account' => 'Edit akun aset ":name"', + 'edit_expense_account' => 'Edit akun biaya ":name"', + 'edit_revenue_account' => 'Edit akun pendapatan ":name"', + 'delete_asset_account' => 'Hapus akun aset ":name"', + 'delete_expense_account' => 'Hapus akun pengeluaran ":name"', + 'delete_revenue_account' => 'Hapus akun pendapatan ":name"', + 'asset_deleted' => 'Berhasil menghapus akun aset ":name"', + 'expense_deleted' => 'Akun pengeluaran yang berhasil dihapus ":name"', + 'revenue_deleted' => 'Berhasil menghapus akun pendapatan ":name"', + 'update_asset_account' => 'Perbarui akun aset', + 'update_expense_account' => 'Rekening pengeluaran pembaruan', + 'update_revenue_account' => 'Perbarui akun pendapatan', + 'make_new_asset_account' => 'Buat akun aset baru', + 'make_new_expense_account' => 'Buat akun pengeluaran baru', + 'make_new_revenue_account' => 'Buat akun pendapatan baru', + 'asset_accounts' => 'Akun aset', + 'expense_accounts' => 'Rekening pengeluaran', + 'revenue_accounts' => 'Akun pendapatan', + 'cash_accounts' => 'Akun kas', + 'Cash account' => 'Akun kas', + 'reconcile_account' => 'Rekonsiliasi akun ":account"', + 'delete_reconciliation' => 'Hapus rekonsiliasi', + 'update_reconciliation' => 'Rekonsiliasi pembaruan', + 'amount_cannot_be_zero' => 'Jumlah tersebut tidak dapat menjadi nol', + 'end_of_reconcile_period' => 'Akhir periode rekonsiliasi: :period', + 'start_of_reconcile_period' => 'Mulai dari periode rekonsiliasi: :period', + 'start_balance' => 'Saldo awal', + 'end_balance' => 'Saldo akhir', + 'update_balance_dates_instruction' => 'Sesuai jumlah dan tanggal di atas pernyataan bank Anda, dan tekan "Mulai rekonsiliasi"', + 'select_transactions_instruction' => 'Pilih transaksi yang muncul di laporan bank Anda.', + 'select_range_and_balance' => 'Pertama memverifikasi rentang tanggal dan saldo. Kemudian tekan "Mulai rekonsiliasi"', + 'date_change_instruction' => 'Jika Anda mengubah rentang tanggal sekarang, kemajuan akan hilang.', + 'update_selection' => 'Memperbarui pilihan', + 'store_reconcile' => 'Rekonsiliasi toko', + 'reconciliation_transaction' => 'Transaksi rekonsiliasi', + 'Reconciliation' => 'Rekonsiliasi', + 'reconciliation' => 'Rekonsiliasi', + 'reconcile_options' => 'Pilihan rekonsiliasi', + 'reconcile_range' => 'Jangkauan rekonsiliasi', + 'start_reconcile' => 'Mulai rekonsiliasi', + 'cash' => 'tunai', + 'account_type' => 'Jenis akun', + 'save_transactions_by_moving' => 'Menyimpan transaksi tersebut(s) dengan memindahkan mereka ke akun lain:', + 'stored_new_account' => 'Akun baru ":name" disimpan!', + 'updated_account' => 'Memperbarui akun ":name"', + 'credit_card_options' => 'Pilihan kartu kredit', + 'no_transactions_account' => 'Tidak ada transaksi (dalam periode ini) untuk akun aset ":name".', + 'no_data_for_chart' => 'Tidak ada informasi yang cukup (belum) untuk menghasilkan grafik ini.', + 'select_more_than_one_account' => 'Silakan pilih lebih dari satu akun', + 'select_more_than_one_category' => 'Silakan pilih lebih dari satu kategori', + 'select_more_than_one_budget' => 'Silakan pilih lebih dari satu anggaran', + 'select_more_than_one_tag' => 'Silakan pilih lebih dari satu tag', + 'account_default_currency' => 'Jika Anda memilih mata uang lain, transaksi baru dari akun ini akan memiliki mata uang ini pra-dipilih.', + 'reconcile_has_more' => 'Buku Firefly III Anda memiliki lebih banyak uang di dalamnya dari bank Anda klaim Anda harus. Ada beberapa pilihan. Silahkan memilih apa yang harus dilakukan. Kemudian, tekan "Konfirmasi rekonsiliasi".', + 'reconcile_has_less' => 'Buku Firefly III Anda memiliki sedikit uang di dalamnya daripada bank Anda klaim Anda harus. Ada beberapa pilihan. Silahkan memilih apa yang harus dilakukan. Kemudian, tekan "Konfirmasi rekonsiliasi".', + 'reconcile_is_equal' => 'Buku Firefly III Anda dan pernyataan bank Anda cocok. Tidak ada hubungannya. Silahkan tekan "Konfirmasi rekonsiliasi" untuk mengkonfirmasi masukan Anda.', + 'create_pos_reconcile_transaction' => 'Menghapus transaksi yang dipilih, dan membuat koreksi menambahkan :amount ke akun aset ini.', + 'create_neg_reconcile_transaction' => 'Menghapus transaksi yang dipilih, dan membuat koreksi menghapus:amount dari akun aset ini.', + 'reconcile_do_nothing' => 'Menghapus transaksi yang dipilih, tetapi tidak benar.', + 'reconcile_go_back' => 'Anda selalu dapat mengedit atau menghapus koreksi kemudian.', + 'must_be_asset_account' => 'Anda hanya bisa mendamaikan akun aset', + 'reconciliation_stored' => 'Rekonsiliasi disimpan', + 'reconcilliation_transaction_title' => 'Rekonsiliasi (:from ke :to)', + 'reconcile_this_account' => 'Rekonsiliasi akun ini', + 'confirm_reconciliation' => 'Konfirmasikan rekonsiliasi', + 'submitted_start_balance' => 'Saldo awal yang dikirim', + 'selected_transactions' => 'Transaksi yang dipilih (:count)', + 'already_cleared_transactions' => 'Sudah dibersihkan transaksi (:count)', + 'submitted_end_balance' => 'Saldo akhir yang dikirim', + + // categories: + 'new_category' => 'Kategori baru', + 'create_new_category' => 'Buat kategori baru', + 'without_category' => 'Tanpa kategori', + 'update_category' => 'Perbarui kategori', + 'updated_category' => 'Kategori yang Diperbarui ":name"', + 'categories' => 'Kategori', + 'edit_category' => 'Edit kategori ":name"', + 'no_category' => '(tidak ada kategori)', + 'category' => 'Kategori', + 'delete_category' => 'Hapus kategori ":name"', + 'deleted_category' => 'Kategori yang dihapus ":name"', + 'store_category' => 'Simpan kategori baru', + 'stored_category' => 'Stored new category ":name"', + 'without_category_between' => 'Tanpa kategori antara :start dan :end', + + // transactions: + 'update_withdrawal' => 'Perbarui penarikan', + 'update_deposit' => 'Perbarui setoran', + 'update_transfer' => 'Perbarui transfer', + 'updated_withdrawal' => 'Penarikan yang telah diupdate ":description"', + 'updated_deposit' => 'Deposit Diperbarui ":description"', + 'updated_transfer' => 'Transfer yang diperbarui ":description"', + 'delete_withdrawal' => 'Hapus penarikan ":description"', + 'delete_deposit' => 'Hapus deposit ":description"', + 'delete_transfer' => 'Hapus transfer ":description"', + 'deleted_withdrawal' => 'Penarikan yang berhasil dihapus ":description"', + 'deleted_deposit' => 'Berhasil menghapus deposit ":description"', + 'deleted_transfer' => 'Berhasil menghapus transfer ":description"', + 'stored_journal' => 'Berhasil membuat transaksi baru ":description"', + 'select_transactions' => 'Pilih transaksi', + 'rule_group_select_transactions' => 'Terapkan ":title" untuk transaksi', + 'rule_select_transactions' => 'Terapkan ":title" untuk transaksi', + 'stop_selection' => 'Berhentilah memilih transaksi', + 'reconcile_selected' => 'Mendamaikan', + 'mass_delete_journals' => 'Hapus sejumlah transaksi', + 'mass_edit_journals' => 'Edit sejumlah transaksi', + 'cannot_edit_other_fields' => 'Anda tidak bisa menyunting bidang lain dari yang lain di sini, karena tidak ada ruang untuk ditunjukkan kepada mereka. Ikuti tautan dan edit dengan satu per satu, jika Anda perlu mengedit bidang ini.', + 'no_budget' => '(no budget)', + 'no_budget_squared' => '(tidak ada anggaran)', + 'perm-delete-many' => 'Menghapus banyak barang dalam satu go bisa sangat mengganggu. Harap berhati-hati.', + 'mass_deleted_transactions_success' => 'Dihapus:amount transaksi.', + 'mass_edited_transactions_success' => 'Diperbarui:amount transaksi', + 'opt_group_no_account_type' => '(tidak ada jenis akun)', + 'opt_group_defaultAsset' => 'Akun aset standar', + 'opt_group_savingAsset' => 'Menyimpan akun', + 'opt_group_sharedAsset' => 'Akun aset bersama', + 'opt_group_ccAsset' => 'Kartu kredit', + + // new user: + 'welcome' => 'Selamat datang di Firefly!', + 'submit' => 'Menyerahkan', + 'getting_started' => 'Mulai', + 'to_get_started' => 'Senang melihat Anda berhasil memasang Firefly III. Untuk memulai dengan alat ini, harap masukkan nama bank dan saldo rekening giro utama Anda. Jangan khawatir jika Anda memiliki banyak akun. Anda bisa menambahkannya nanti. Hanya saja Firefly III butuh sesuatu untuk memulai.', + 'savings_balance_text' => 'Firefly III secara otomatis akan membuat rekening tabungan untuk Anda. Secara default, tidak akan ada uang di rekening tabungan Anda, tapi jika Anda memberi tahu Firefly III, saldo itu akan disimpan seperti itu.', + 'finish_up_new_user' => 'Itu dia! Anda dapat melanjutkan dengan menekan Kirim. Anda akan dibawa ke indeks Firefly III.', + 'stored_new_accounts_new_user' => 'Yay! Akun baru Anda telah disimpan.', + + // home page: + 'yourAccounts' => 'Akun anda', + 'budgetsAndSpending' => 'Anggaran dan belanja', + 'savings' => 'Tabungan', + 'newWithdrawal' => 'Biaya baru', + 'newDeposit' => 'Deposit baru', + 'newTransfer' => 'Transfer baru', + 'bills_to_pay' => 'Bills untuk membayar', + 'per_day' => 'Per hari', + 'left_to_spend_per_day' => 'Kiri untuk dibelanjakan per hari', + 'bills_paid' => 'Tagihan dibayar', + + // menu and titles, should be recycled as often as possible: + 'currency' => 'Mata uang', + 'preferences' => 'Preferensi', + 'logout' => 'Keluar', + 'toggleNavigation' => 'Toggle navigation', + 'searchPlaceholder' => 'Pencarian...', + 'version' => 'Versi', + 'dashboard' => 'Dasbor', + 'currencies' => 'Mata uang', + 'accounts' => 'Akun', + 'Asset account' => 'Akun aset', + 'Default account' => 'Akun aset', + 'Expense account' => 'Rekening pengeluaran', + 'Revenue account' => 'Akun pendapatan', + 'Initial balance account' => 'Akun saldo awal', + 'budgets' => 'Anggaran', + 'tags' => 'Tag', + 'reports' => 'Laporan', + 'transactions' => 'Transaksi', + 'expenses' => 'Beban', + 'income' => 'Pendapatan / penghasilan', + 'transfers' => 'Transfer', + 'moneyManagement' => 'Manajemen keuangan', + 'piggyBanks' => 'Celengan babi', + 'bills' => 'Tagihan', + 'withdrawal' => 'Penarikan', + 'opening_balance' => 'Saldo awal', + 'deposit' => 'Deposito', + 'account' => 'Rekening', + 'transfer' => 'Transfer', + 'Withdrawal' => 'Penarikan', + 'Deposit' => 'Deposit', + 'Transfer' => 'Transfer', + 'bill' => 'Tagihan', + 'yes' => 'Iya', + 'no' => 'Tidak', + 'amount' => 'Jumlah', + 'overview' => 'Ikhtisar', + 'saveOnAccount' => 'Simpan di rekening', + 'unknown' => 'Tidak diketahui', + 'daily' => 'Harian', + 'monthly' => 'Bulanan', + 'profile' => 'Profil', + 'errors' => 'Kesalahan', + + // reports: + 'report_default' => 'Laporan keuangan standar antara :start dan :end', + 'report_audit' => 'Ikhtisar riwayat transaksi antara :start dan :end', + 'report_category' => 'Kategori laporan antara :start dan :end', + 'report_account' => 'Laporan biaya / pendapatan antara :start dan :end', + 'report_budget' => 'Laporan anggaran antara :start dan :end', + 'report_tag' => 'Tag laporan antara :start dan :end', + 'quick_link_reports' => 'Tautan langsung', + 'quick_link_default_report' => 'Laporan keuangan standar', + 'quick_link_audit_report' => 'Ikhtisar sejarah transaksi', + 'report_this_month_quick' => 'Bulan ini, semua akun', + 'report_this_year_quick' => 'Tahun berjalan, semua akun', + 'report_this_fiscal_year_quick' => 'Tahun fiskal berjalan, semua akun', + 'report_all_time_quick' => 'Semua waktu, semua akun', + 'reports_can_bookmark' => 'Ingat bahwa laporan bisa di bookmark.', + 'incomeVsExpenses' => 'Penghasilan vs beban', + 'accountBalances' => 'Saldo akun', + 'balanceStart' => 'Saldo awal periode', + 'balanceEnd' => 'Saldo akhir periode', + 'splitByAccount' => 'Dibagi oleh akun', + 'coveredWithTags' => 'Ditutupi dengan tag', + 'leftUnbalanced' => 'Meninggalkan tidak seimbang', + 'leftInBudget' => 'Yang tersisa di anggaran', + 'sumOfSums' => 'Jumlah dari jumlah', + 'noCategory' => '(Tidak ada kategori)', + 'notCharged' => 'Tidak dikenakan biaya (belum)', + 'inactive' => 'Tidak-aktif', + 'active' => 'Aktif', + 'difference' => 'Perbedaan', + 'money_flowing_in' => 'Dalam', + 'money_flowing_out' => 'Keluar', + 'topX' => 'atas :number', + 'show_full_list' => 'Tampilkan seluruh daftar', + 'show_only_top' => 'Tampilkan hanya atas :number', + 'report_type' => 'Tipe laporan', + 'report_type_default' => 'Laporan keuangan standar', + 'report_type_audit' => 'Gambaran riwayat transaksi (audit)', + 'report_type_category' => 'Laporan Kategori', + 'report_type_budget' => 'Laporan anggaran', + 'report_type_tag' => 'Tag laporan', + 'report_type_account' => 'Laporan akun/pendapatan Beban', + 'more_info_help' => 'Informasi lebih lanjut tentang jenis laporan dapat ditemukan di halaman bantuan. Tekan ikon (?) Di sudut kanan atas.', + 'report_included_accounts' => 'Termasuk akun', + 'report_date_range' => 'Rentang tanggal', + 'report_preset_ranges' => 'Rentang pre-set', + 'shared' => 'Bagikan', + 'fiscal_year' => 'Tahun fiskal', + 'income_entry' => 'Penghasilan dari akun ":name" antara :start dan :end', + 'expense_entry' => 'Biaya untuk akun ":name" antara :start dan :end', + 'category_entry' => 'Biaya dalam kategori ":name" antara :start dan :end', + 'budget_spent_amount' => 'Biaya anggaran ":budget" antara :start dan :end', + 'balance_amount' => 'Biaya dalam anggaran ":budget" dibayar dari rekening ":account" antara :start dan :end', + 'no_audit_activity' => 'Tidak ada aktivitas yang tercatat dalam akun :account_name antara :start and :end.', + 'audit_end_balance' => 'Saldo akun :account_name di akhir :end adalah :balance', + 'reports_extra_options' => 'Pilihan ekstra', + 'report_has_no_extra_options' => 'Laporan ini tidak memiliki pilihan tambahan', + 'reports_submit' => 'Melihat laporan', + 'end_after_start_date' => 'Tanggal akhir laporan harus setelah tanggal mulai.', + 'select_category' => 'Pilih kategori (ies)', + 'select_budget' => 'Pilih anggaran.', + 'select_tag' => 'Pilih tag.', + 'income_per_category' => 'Pendapatan per kategori', + 'expense_per_category' => 'Biaya per kategori', + 'expense_per_budget' => 'Biaya per anggaran', + 'income_per_account' => 'Pendapatan per rekening', + 'expense_per_account' => 'Biaya per akun', + 'expense_per_tag' => 'Biaya per tag', + 'income_per_tag' => 'Penghasilan per tag', + 'include_expense_not_in_budget' => 'Termasuk biaya tidak dalam anggaran yang dipilih', + 'include_expense_not_in_account' => 'Termasuk biaya yang tidak termasuk dalam akun yang dipilih', + 'include_expense_not_in_category' => 'Termasuk biaya yang tidak termasuk dalam kategori yang dipilih', + 'include_income_not_in_category' => 'Termasuk pendapatan tidak dalam kategori yang dipilih (ies)', + 'include_income_not_in_account' => 'Termasuk pendapatan tidak dalam akun yang dipilih(s)', + 'include_income_not_in_tags' => 'Termasuk pendapatan tidak dalam tag yang dipilih', + 'include_expense_not_in_tags' => 'Termasuk biaya yang tidak termasuk dalam tag yang dipilih', + 'everything_else' => 'Yang lainnya', + 'income_and_expenses' => 'Penghasilan dan beban', + 'spent_average' => 'Menghabiskan (rata-rata)', + 'income_average' => 'Penghasilan (rata-rata)', + 'transaction_count' => 'Jumlah transaksi', + 'average_spending_per_account' => 'Rata-rata pengeluaran per akun', + 'average_income_per_account' => 'Pendapatan rata-rata per rekening', + 'total' => 'Total', + 'description' => 'Deskripsi', + 'sum_of_period' => 'Jumlah periode', + 'average_in_period' => 'Rata-rata dalam periode', + 'account_role_defaultAsset' => 'Akun aset standar', + 'account_role_sharedAsset' => 'Akun aset bersama', + 'account_role_savingAsset' => 'Rekening tabungan', + 'account_role_ccAsset' => 'Kartu kredit', + 'budget_chart_click' => 'Silahkan klik nama anggaran pada tabel di atas untuk melihat grafik.', + 'category_chart_click' => 'Silahkan klik pada nama kategori pada tabel di atas untuk melihat grafik.', + 'in_out_accounts' => 'Diperoleh dan dihabiskan per kombinasi', + 'in_out_per_category' => 'Diperoleh dan dibelanjakan per kategori', + 'out_per_budget' => 'Menghabiskan per anggaran', + 'select_expense_revenue' => 'Pilih akun biaya / pendapatan', + + // charts: + 'chart' => 'Grafik', + 'month' => 'Bulan', + 'budget' => 'Anggaran', + 'spent' => 'Menghabiskan', + 'spent_in_budget' => 'Menghabiskan anggaran', + 'left_to_spend' => 'Kiri untuk dibelanjakan', + 'earned' => 'Diperoleh', + 'overspent' => 'Overspent', + 'left' => 'Kiri', + 'max-amount' => 'Jumlah maksimum', + 'min-amount' => 'Jumlah Minumum', + 'journal-amount' => 'Entri tagihan saat ini', + 'name' => 'Nama', + 'date' => 'Tanggal', + 'paid' => 'Dibayar', + 'unpaid' => 'Tidak dibayar', + 'day' => 'Hari', + 'budgeted' => 'Dianggarkan', + 'period' => 'Periode', + 'balance' => 'Keseimbangan', + 'sum' => 'Jumlah', + 'average' => 'Rata-rata', + 'balanceFor' => 'Saldo untuk :name', + + // piggy banks: + 'add_money_to_piggy' => 'Tambahkan uang ke celengan ":name"', + 'piggy_bank' => 'Celengan', + 'new_piggy_bank' => 'Celengan baru', + 'store_piggy_bank' => 'Simpan celengan baru', + 'stored_piggy_bank' => 'Simpan celengan baru ":name"', + 'account_status' => 'Status akun', + 'left_for_piggy_banks' => 'Kiri untuk celengan', + 'sum_of_piggy_banks' => 'Jumlah celengan', + 'saved_so_far' => 'Disimpan sejauh ini', + 'left_to_save' => 'Kiri untuk menyimpan', + 'suggested_amount' => 'Jumlah bulanan yang disarankan untuk disimpan', + 'add_money_to_piggy_title' => 'Tambahkan uang ke celengan ":name"', + 'remove_money_from_piggy_title' => 'Hapus uang dari celengan ":name"', + 'add' => 'Menambahkan', + 'no_money_for_piggy' => 'Anda tidak punya uang untuk dimasukkan ke dalam celengan ini.', + + 'remove' => 'Menghapus', + 'max_amount_add' => 'Jumlah maksimum yang bisa Anda tambahkan adalah', + 'max_amount_remove' => 'Jumlah maksimal yang bisa Anda hapus adalah', + 'update_piggy_button' => 'Update celengan', + 'update_piggy_title' => 'Update piggy bank ":name"', + 'updated_piggy_bank' => 'Diperbarui piggy bank ":name"', + 'details' => 'Rincian', + 'events' => 'Acara', + 'target_amount' => 'Jumlah target', + 'start_date' => 'Mulai tanggal', + 'target_date' => 'Tanggal target', + 'no_target_date' => 'Tidak ada tanggal target', + 'table' => 'Meja', + 'delete_piggy_bank' => 'Hapus celengan ":name"', + 'cannot_add_amount_piggy' => 'Tidak dapat menambahkan:amount ke ":name".', + 'cannot_remove_from_piggy' => 'Tidak dapat menghapus:amount dari ":name".', + 'deleted_piggy_bank' => 'Dihapus celengan ":name"', + 'added_amount_to_piggy' => 'Ditambahkan:amount ke ":name"', + 'removed_amount_from_piggy' => 'Dihapus:amount dari ":name"', + + // tags + 'delete_tag' => 'Hapus tag " :tag"', + 'deleted_tag' => 'Tag dihapus " :tag"', + 'new_tag' => 'Buat tag baru', + 'edit_tag' => 'Edit tag " :tag"', + 'updated_tag' => 'Diperbarui tag " :tag"', + 'created_tag' => 'Tag " :tag" telah dibuat!', + + 'transaction_journal_information' => 'Informasi transaksi', + 'transaction_journal_meta' => 'Informasi meta', + 'total_amount' => 'Jumlah total', + 'number_of_decimals' => 'Jumlah desimal', + + // administration + 'administration' => 'Administrasi', + 'user_administration' => 'Administrasi pengguna', + 'list_all_users' => 'Semua pengguna', + 'all_users' => 'Semua pengguna', + 'instance_configuration' => 'Konfigurasi', + 'firefly_instance_configuration' => 'Pilihan konfigurasi untuk Firefly III', + 'setting_single_user_mode' => 'Mode pengguna tunggal', + 'setting_single_user_mode_explain' => 'Secara default, Firefly III hanya menerima satu (1) registrasi: anda. Ini adalah tindakan pengamanan, mencegah orang lain menggunakan contoh Anda kecuali jika Anda mengizinkannya melakukannya. Pendaftaran di masa depan diblokir Bila Anda tidak mencentang kotak ini, orang lain dapat menggunakan contoh Anda dengan baik, dengan asumsi mereka dapat mencapainya (bila terhubung ke internet).', + 'store_configuration' => 'Konfigurasi toko', + 'single_user_administration' => 'Administrasi pengguna untuk :email', + 'edit_user' => 'Edit pengguna :email', + 'hidden_fields_preferences' => 'Tidak semua bidang terlihat sekarang. Anda harus mengaktifkannya di setelan Anda.', + 'user_data_information' => 'Data pengguna', + 'user_information' => 'Informasi pengguna', + 'total_size' => 'ukuran total', + 'budget_or_budgets' => 'anggaran', + 'budgets_with_limits' => 'anggaran dengan jumlah yang dikonfigurasi', + 'nr_of_rules_in_total_groups' => ':count_rules aturan di:count_groups rule group (s)', + 'tag_or_tags' => 'tag (s)', + 'configuration_updated' => 'Konfigurasi telah diperbarui', + 'setting_is_demo_site' => 'Situs demo', + 'setting_is_demo_site_explain' => 'Jika Anda mencentang kotak ini, instalasi ini akan berperilaku seolah-olah itu adalah situs demo, yang dapat memiliki efek samping yang aneh.', + 'block_code_bounced' => 'Pesan email terpental', + 'block_code_expired' => 'Akun demo kadaluarsa', + 'no_block_code' => 'Tidak ada alasan untuk memblokir atau pengguna tidak diblokir', + 'block_code_email_changed' => 'Pengguna belum mengkonfirmasi alamat email baru', + 'admin_update_email' => 'Bertentangan dengan halaman profil, pengguna TIDAK akan diberitahu alamat email mereka telah berubah!', + 'update_user' => 'Perbarui pengguna', + 'updated_user' => 'Data pengguna telah diubah.', + 'delete_user' => 'Hapus pengguna :email', + 'user_deleted' => 'Pengguna telah dihapus', + 'send_test_email' => 'Kirim pesan email percobaan', + 'send_test_email_text' => 'Untuk melihat apakah pemasangan Anda mampu mengirim email, tekan tombol ini. Anda tidak akan melihat kesalahan di sini (jika ada), file log akan mencerminkan kesalahan. Anda bisa menekan tombol ini sebanyak yang Anda mau. Tidak ada kontrol spam. Pesan akan dikirim ke :email dan akan segera tiba.', + 'send_message' => 'Mengirim pesan', + 'send_test_triggered' => 'Uji dipicu. Periksa kotak masuk dan file log Anda.', + + // links + 'journal_link_configuration' => 'Konfigurasi link transaksi', + 'create_new_link_type' => 'Buat jenis tautan baru', + 'store_new_link_type' => 'Simpan jenis tautan baru', + 'update_link_type' => 'Perbarui jenis tautan', + 'edit_link_type' => 'Edit jenis tautan ":name"', + 'updated_link_type' => 'Jenis tautan yang diperbarui ":name"', + 'delete_link_type' => 'Hapus jenis tautan ":name"', + 'deleted_link_type' => 'Jenis tautan yang dihapus ":name"', + 'stored_new_link_type' => 'Simpan jenis tautan baru ":name"', + 'cannot_edit_link_type' => 'Tidak dapat mengedit jenis tautan ":name"', + 'link_type_help_name' => 'Yaitu. "Duplikat"', + 'link_type_help_inward' => 'Yaitu. "duplikat"', + 'link_type_help_outward' => 'Yaitu. "diduplikasi oleh"', + 'save_connections_by_moving' => 'Simpan tautan antara transaksi ini dengan memindahkannya ke jenis tautan yang lain:', + 'do_not_save_connection' => '(jangan simpan koneksi)', + 'link_transaction' => 'Transaksi link', + 'link_to_other_transaction' => 'Tautkan transaksi ini ke transaksi lain', + 'select_transaction_to_link' => 'Pilih transaksi untuk menautkan transaksi ini', + 'this_transaction' => 'Transaksi ini', + 'transaction' => 'Transaksi', + 'comments' => 'Komentar', + 'to_link_not_found' => 'Jika transaksi yang ingin Anda taut tidak terdaftar, cukup masukkan ID-nya.', + 'invalid_link_selection' => 'Tidak dapat menautkan transaksi ini', + 'journals_linked' => 'Transaksi terkait.', + 'journals_error_linked' => 'Transaksi ini sudah tertaut.', + 'journal_links' => 'Link transaksi', + 'this_withdrawal' => 'Penarikan ini', + 'this_deposit' => 'Deposit ini', + 'this_transfer' => 'Transfer ini', + 'overview_for_link' => 'Ikhtisar untuk jenis tautan ":name"', + 'source_transaction' => 'Transaksi sumber', + 'link_description' => 'Deskripsi tautan', + 'destination_transaction' => 'Transaksi tujuan', + 'delete_journal_link' => 'Delete the link between :source and :destination', + 'deleted_link' => 'Tautan dihapus', + + // link translations: + 'relates to_inward' => 'berhubungan dengan', + 'is (partially) refunded by_inward' => '(sebagian) dikembalikan oleh', + 'is (partially) paid for by_inward' => 'adalah (sebagian) dibayar oleh', + 'is (partially) reimbursed by_inward' => '(sebagian) diganti oleh', + 'relates to_outward' => 'berhubungan dengan', + '(partially) refunds_outward' => '(sebagian) pengembalian uang', + '(partially) pays for_outward' => '(sebagian) membayar', + '(partially) reimburses_outward' => '(sebagian) penggantian', + + // split a transaction: + 'splits' => 'Perpecahan', + 'add_another_split' => 'Tambahkan perpecahan lagi', + 'split-transactions' => 'Split transaksi', + 'do_split' => 'Lakukan perpecahan', + 'split_this_withdrawal' => 'Pisahkan penarikan ini', + 'split_this_deposit' => 'Pisahkan deposit ini', + 'split_this_transfer' => 'Pisahkan transfer ini', + 'cannot_edit_multiple_source' => 'Anda tidak dapat mengedit transaksi splitted #:id dengan deskripsi ":description" karena berisi beberapa akun sumber.', + 'cannot_edit_multiple_dest' => 'Anda tidak dapat mengedit transaksi splitted #:id dengan deskripsi ":description" karena berisi beberapa akun tujuan.', + 'cannot_edit_reconciled' => 'Anda tidak dapat mengedit transaksi #:id dengan deskripsi ":description" karena telah ditandai sebagai didamaikan.', + 'cannot_edit_opening_balance' => 'Anda tidak dapat mengedit saldo awal akun.', + 'no_edit_multiple_left' => 'Anda tidak memilih transaksi yang sah untuk diedit.', + 'cannot_convert_split_journal' => 'Tidak dapat mengonversi transaksi split', + + // import bread crumbs and titles: + 'import' => 'Impor', + 'import_data' => 'Impor data', + 'import_general_index_file' => 'Impor file', + 'import_from_bunq' => 'Impor dari bunq', + 'import_using_spectre' => 'Impor menggunakan momok', + 'import_using_plaid' => 'Impor menggunakan Plaid', + 'import_config_bread_crumb' => 'Siapkan impor Anda', + + // import index page: + 'import_index_title' => 'Impor data ke Firefly III', + 'import_index_sub_title' => 'Indeks', + 'import_general_index_intro' => 'Selamat datang di rutinitas impor Firefly. Ada beberapa cara untuk mengimpor data ke Firefly III, yang ditampilkan di sini sebagai tombol.', + + // sandstorm.io errors and messages: + 'sandstorm_not_available' => 'Fungsi ini tidak tersedia saat Anda menggunakan Firefly III di dalam lingkungan Sandstorm.io.', + + // empty lists? no objects? instructions: + 'no_accounts_title_asset' => 'Mari buat akun aset!', + 'no_accounts_intro_asset' => 'Anda belum memiliki akun aset. Akun aset adalah akun utama Anda: rekening giro, rekening tabungan, rekening bersama atau bahkan kartu kredit Anda.', + 'no_accounts_imperative_asset' => 'Untuk mulai menggunakan Firefly III Anda harus membuat setidaknya satu akun aset. Mari kita lakukan sekarang:', + 'no_accounts_create_asset' => 'Buat akun aset', + 'no_accounts_title_expense' => 'Mari buat akun pengeluaran!', + 'no_accounts_intro_expense' => 'Anda belum memiliki rekening pengeluaran. Akun pengeluaran adalah tempat Anda menghabiskan uang, seperti toko dan supermarket.', + 'no_accounts_imperative_expense' => 'Akun pengeluaran dibuat secara otomatis saat Anda membuat transaksi, namun Anda dapat membuatnya secara manual juga, jika Anda mau. Mari kita ciptakan sekarang:', + 'no_accounts_create_expense' => 'Buat akun pengeluaran', + 'no_accounts_title_revenue' => 'Mari buat akun pendapatan!', + 'no_accounts_intro_revenue' => 'Anda belum memiliki akun pendapatan. Akun pendapatan adalah tempat di mana Anda menerima uang dari, seperti atasan Anda.', + 'no_accounts_imperative_revenue' => 'Akun pendapatan dibuat secara otomatis saat Anda membuat transaksi, namun Anda dapat membuatnya secara manual juga, jika Anda mau. Mari kita ciptakan sekarang:', + 'no_accounts_create_revenue' => 'Buat akun pendapatan', + 'no_budgets_title_default' => 'Mari buat anggaran', + 'no_budgets_intro_default' => 'Anda belum memiliki anggaran. Anggaran digunakan untuk mengatur pengeluaran Anda ke dalam kelompok logis, yang bisa Anda berikan topi lunak untuk membatasi pengeluaran Anda.', + 'no_budgets_imperative_default' => 'Anggaran adalah alat dasar pengelolaan keuangan. Mari kita ciptakan sekarang:', + 'no_budgets_create_default' => 'Buat anggaran', + 'no_categories_title_default' => 'Mari buat kategori!', + 'no_categories_intro_default' => 'Anda belum memiliki kategori. Kategori digunakan untuk menyesuaikan transaksi Anda dan memberi label mereka dengan kategori yang ditentukan.', + 'no_categories_imperative_default' => 'Kategori dibuat secara otomatis saat Anda membuat transaksi, namun Anda juga bisa membuatnya secara manual. Mari kita ciptakan sekarang:', + 'no_categories_create_default' => 'Buat sebuah kategori', + 'no_tags_title_default' => 'Mari buat tag!', + 'no_tags_intro_default' => 'Kamu belum punya tag Tag digunakan untuk menyempurnakan transaksi Anda dan memberi label pada kata kunci tertentu.', + 'no_tags_imperative_default' => 'Tag dibuat secara otomatis saat Anda membuat transaksi, namun Anda bisa membuatnya secara manual juga. Mari kita ciptakan sekarang:', + 'no_tags_create_default' => 'Buat tag', + 'no_transactions_title_withdrawal' => 'Mari buat biaya!', + 'no_transactions_intro_withdrawal' => 'Anda belum memiliki biaya. Anda harus menciptakan biaya untuk mulai mengelola keuangan Anda.', + 'no_transactions_imperative_withdrawal' => 'Sudahkah anda mengeluarkan uang? Maka Anda harus menuliskannya:', + 'no_transactions_create_withdrawal' => 'Buat biaya', + 'no_transactions_title_deposit' => 'Mari buat penghasilan!', + 'no_transactions_intro_deposit' => 'Anda belum memiliki penghasilan yang tercatat. Anda harus membuat entri pendapatan untuk mulai mengelola keuangan Anda.', + 'no_transactions_imperative_deposit' => 'Sudahkah kamu menerima sejumlah uang? Maka Anda harus menuliskannya:', + 'no_transactions_create_deposit' => 'Buat deposit', + 'no_transactions_title_transfers' => 'Mari buat transfer!', + 'no_transactions_intro_transfers' => 'Anda belum memiliki transfer. Bila Anda memindahkan uang antar rekening aset, itu tercatat sebagai transfer.', + 'no_transactions_imperative_transfers' => 'Sudahkah kamu memindahkan sejumlah uang? Maka Anda harus menuliskannya:', + 'no_transactions_create_transfers' => 'Buat transfer', + 'no_piggies_title_default' => 'Ayo buat celengan!', + 'no_piggies_intro_default' => 'Anda belum memiliki piggy bank. Anda dapat membuat bank-bank piggy untuk membagi tabungan Anda dan melacak apa yang Anda menabung.', + 'no_piggies_imperative_default' => 'Apakah Anda memiliki barang-barang yang Anda simpan untuk uang? Buat piggy bank dan tetap track:', + 'no_piggies_create_default' => 'Buat celengan baru', + 'no_bills_title_default' => 'Mari buat tagihan!', + 'no_bills_intro_default' => 'Anda belum memiliki tagihan. Anda bisa membuat tagihan untuk mencatat pengeluaran rutin, seperti sewa atau asuransi Anda.', + 'no_bills_imperative_default' => 'Apakah Anda memiliki tagihan reguler seperti itu? Buat tagihan dan lacak pembayaran Anda:', + 'no_bills_create_default' => 'Buat tagihan', +]; diff --git a/resources/lang/id_ID/form.php b/resources/lang/id_ID/form.php new file mode 100644 index 0000000000..ffccb90c16 --- /dev/null +++ b/resources/lang/id_ID/form.php @@ -0,0 +1,209 @@ +. + */ +declare(strict_types=1); + +return [ + // new user: + 'bank_name' => 'Nama Bank', + 'bank_balance' => 'Keseimbangan', + 'savings_balance' => 'Saldo tabungan', + 'credit_card_limit' => 'Batas kartu kredit', + 'automatch' => 'Cocokkan secara otomatis', + 'skip' => 'Melewatkan', + 'name' => 'Nama', + 'active' => 'Aktif', + 'amount_min' => 'Jumlah minimal', + 'amount_max' => 'Jumlah maksimum', + 'match' => 'Cocok di', + 'repeat_freq' => 'Berulang', + 'journal_currency_id' => 'Mata uang', + 'currency_id' => 'Mata uang', + 'attachments' => 'Lampiran', + 'journal_amount' => 'Jumlah', + 'journal_source_account_name' => 'Akun pendapatan (sumber)', + 'journal_source_account_id' => 'Akun aset (sumber)', + 'BIC' => 'BIC', + 'verify_password' => 'Verifikasi keamanan kata sandi', + 'source_account' => 'Akun sumber', + 'destination_account' => 'Akun tujuan', + 'journal_destination_account_id' => 'Akun aset (tujuan)', + 'asset_destination_account' => 'Akun aset (tujuan)', + 'asset_source_account' => 'Akun aset (sumber)', + 'journal_description' => 'Deskripsi', + 'note' => 'Catatan', + 'split_journal' => 'Pisahkan transaksi ini', + 'split_journal_explanation' => 'Split transaksi ini di banyak bagian', + 'currency' => 'Mata uang', + 'account_id' => 'Akun aset', + 'budget_id' => 'Anggaran', + 'openingBalance' => 'Saldo awal', + 'tagMode' => 'Mode Tag', + 'tag_position' => 'Lokasi tag', + 'virtualBalance' => 'Saldo virtual', + 'targetamount' => 'Jumlah target', + 'accountRole' => 'Peran akun', + 'openingBalanceDate' => 'Membuka tanggal saldo', + 'ccType' => 'Rencana pembayaran kartu kredit', + 'ccMonthlyPaymentDate' => 'Credit card monthly payment date', + 'piggy_bank_id' => 'Celengan', + 'returnHere' => 'Kembali ke sini', + 'returnHereExplanation' => 'Setelah menyimpan, kembali ke sini untuk membuat yang lain.', + 'returnHereUpdateExplanation' => 'Setelah update, kembali ke sini.', + 'description' => 'Deskripsi', + 'expense_account' => 'Rekening pengeluaran', + 'revenue_account' => 'Akun pendapatan', + 'decimal_places' => 'Tempat desimal', + 'exchange_rate_instruction' => 'Mata uang asing', + 'source_amount' => 'Jumlah (sumber)', + 'destination_amount' => 'Jumlah (tujuan)', + 'native_amount' => 'Jumlah asli', + 'new_email_address' => 'Alamat email baru', + 'verification' => 'Verifikasi', + 'api_key' => 'Kunci API', + + 'source_account_asset' => 'Akun sumber (akun aset)', + 'destination_account_expense' => 'Akun tujuan (akun pengeluaran)', + 'destination_account_asset' => 'Akun tujuan (akun aset)', + 'source_account_revenue' => 'Akun sumber (akun pendapatan)', + 'type' => 'Mengetik', + 'convert_Withdrawal' => 'Mengkonversi penarikan', + 'convert_Deposit' => 'Convert deposit', + 'convert_Transfer' => 'Mengkonversi transfer', + + 'amount' => 'Jumlah', + 'date' => 'Tanggal', + 'interest_date' => 'Tanggal bunga', + 'book_date' => 'Tanggal buku', + 'process_date' => 'Tanggal pemrosesan', + 'category' => 'Kategori', + 'tags' => 'Tag', + 'deletePermanently' => 'Hapus secara permanen', + 'cancel' => 'Membatalkan', + 'targetdate' => 'Tanggal target', + 'startdate' => 'Mulai tanggal', + 'tag' => 'Menandai', + 'under' => 'Dibawah', + 'symbol' => 'Simbol', + 'code' => 'Kode', + 'iban' => 'IBAN', + 'accountNumber' => 'Nomor akun', + 'creditCardNumber' => 'Nomor kartu kredit', + 'has_headers' => 'Judul', + 'date_format' => 'Format tanggal', + 'specifix' => 'Perbaikan spesifik bank atau berkas', + 'attachments[]' => 'Lampiran', + 'store_new_withdrawal' => 'Simpan penarikan baru', + 'store_new_deposit' => 'Simpan deposit baru', + 'store_new_transfer' => 'Simpan transfer baru', + 'add_new_withdrawal' => 'Tambahkan penarikan baru', + 'add_new_deposit' => 'Tambahkan deposit baru', + 'add_new_transfer' => 'Tambahkan transfer baru', + 'title' => 'Judul', + 'notes' => 'Catatan', + 'filename' => 'Nama file', + 'mime' => 'Tipe mime', + 'size' => 'Ukuran', + 'trigger' => 'Pelatuk', + 'stop_processing' => 'Berhenti memproses', + 'start_date' => 'Mulai dari jangkauan', + 'end_date' => 'Akhir rentang', + 'export_start_range' => 'Mulai dari rentang ekspor', + 'export_end_range' => 'Akhir rentang ekspor', + 'export_format' => 'Format file', + 'include_attachments' => 'Sertakan lampiran yang diunggah', + 'include_old_uploads' => 'Sertakan data yang diimpor', + 'accounts' => 'Mengekspor transaksi dari akun ini', + 'delete_account' => 'Delete account ":name"', + 'delete_bill' => 'Hapus tagihan ":name"', + 'delete_budget' => 'Hapus anggaran ":name"', + 'delete_category' => 'Hapus kategori ":name"', + 'delete_currency' => 'Hapus mata uang ":name"', + 'delete_journal' => 'Hapus transaksi dengan deskripsi ":description"', + 'delete_attachment' => 'Hapus lampiran ":name"', + 'delete_rule' => 'Hapus aturan ":title"', + 'delete_rule_group' => 'Hapus grup aturan ":title"', + 'delete_link_type' => 'Hapus jenis tautan ":name"', + 'delete_user' => 'Hapus pengguna ":email"', + 'user_areYouSure' => 'Jika Anda menghapus pengguna ":email", semuanya akan hilang. Tidak ada undo, undelete atau apapun. Jika Anda menghapus diri Anda sendiri, Anda akan kehilangan akses ke Firefly III ini.', + 'attachment_areYouSure' => 'Yakin ingin menghapus lampiran yang bernama ":name"?', + 'account_areYouSure' => 'Yakin ingin menghapus akun dengan nama ":name"?', + 'bill_areYouSure' => 'Yakin ingin menghapus tagihan yang bernama ":name"?', + 'rule_areYouSure' => 'Yakin ingin menghapus aturan yang berjudul ":title"?', + 'ruleGroup_areYouSure' => 'Yakin ingin menghapus grup aturan yang berjudul ":title"?', + 'budget_areYouSure' => 'Yakin ingin menghapus anggaran dengan nama ":name"?', + 'category_areYouSure' => 'Yakin ingin menghapus kategori yang bernama ":name"?', + 'currency_areYouSure' => 'Yakin ingin menghapus mata uang dengan nama ":name"?', + 'piggyBank_areYouSure' => 'Yakin ingin menghapus piggy bank yang bernama ":name"?', + 'journal_areYouSure' => 'Yakin ingin menghapus transaksi yang dijelaskan ":description"?', + 'mass_journal_are_you_sure' => 'Yakin ingin menghapus transaksi ini?', + 'tag_areYouSure' => 'Yakin ingin menghapus tag ":tag"?', + 'journal_link_areYouSure' => 'Yakin ingin menghapus tautan antara :source and :destination?', + 'linkType_areYouSure' => 'Yakin ingin menghapus jenis tautan ":name" (":inward" / ":outward")?', + 'permDeleteWarning' => 'Menghapus barang dari Firely bersifat permanen dan tidak dapat dibatalkan.', + 'mass_make_selection' => 'Anda masih dapat mencegah agar item dihapus dengan menghapus kotak centang.', + 'delete_all_permanently' => 'Hapus yang dipilih secara permanen', + 'update_all_journals' => 'Perbarui transaksi ini', + 'also_delete_transactions' => 'Satu-satunya transaksi yang terhubung ke akun ini akan dihapus juga. | Semua :count transaksi yang terhubung ke akun ini akan dihapus juga.', + 'also_delete_connections' => 'Satu-satunya transaksi yang terkait dengan jenis link ini akan kehilangan koneksi ini. Semua :count transaksi yang terkait dengan jenis link ini akan kehilangan koneksi mereka.', + 'also_delete_rules' => 'Aturan satu-satunya yang terhubung ke grup aturan ini akan dihapus juga. Aturan All :count yang terhubung ke grup aturan ini akan dihapus juga.', + 'also_delete_piggyBanks' => 'Satu-satunya piggy bank yang terhubung ke akun ini akan dihapus juga. Semua :count piggy bank yang terhubung ke akun ini akan dihapus juga.', + 'bill_keep_transactions' => 'Satu-satunya transaksi yang terhubung dengan tagihan ini tidak akan dihapus. Semua :count transaksi yang terhubung ke tagihan ini akan terhindar dari penghapusan.', + 'budget_keep_transactions' => 'Satu-satunya transaksi yang terhubung dengan anggaran ini tidak akan dihapus. Semua :count transaksi yang terhubung dengan anggaran ini akan terhindar dari penghapusan.', + 'category_keep_transactions' => 'Satu-satunya transaksi yang terhubung ke kategori ini tidak akan dihapus. Semua :count transaksi yang terhubung ke kategori ini akan terhindar dari penghapusan.', + 'tag_keep_transactions' => 'Satu-satunya transaksi yang terhubung ke tag ini tidak akan dihapus. Semua :count transaksi yang terhubung ke tag ini akan terhindar dari penghapusan.', + 'check_for_updates' => 'Check for updates', + + 'email' => 'Alamat email', + 'password' => 'Kata sandi', + 'password_confirmation' => 'Password (lagi)', + 'blocked' => 'Apakah diblokir?', + 'blocked_code' => 'Alasan untuk blok', + + // admin + 'domain' => 'Domain', + 'single_user_mode' => 'Nonaktifkan pendaftaran pengguna', + 'is_demo_site' => 'Apakah situs demo', + + // import + 'import_file' => 'Impor file', + 'configuration_file' => 'File konfigurasi', + 'import_file_type' => 'Impor jenis file', + 'csv_comma' => 'Koma (,)', + 'csv_semicolon' => 'Titik koma (;)', + 'csv_tab' => 'Tab (tak terlihat)', + 'csv_delimiter' => 'Pembatas lapangan CSV', + 'csv_import_account' => 'Akun impor default', + 'csv_config' => 'Konfigurasi impor CSV', + 'client_id' => 'ID klien', + 'service_secret' => 'Rahasia layanan', + 'app_secret' => 'Rahasia app', + 'public_key' => 'Kunci publik', + 'country_code' => 'Kode negara', + 'provider_code' => 'Bank atau penyedia data', + + 'due_date' => 'Batas tanggal terakhir', + 'payment_date' => 'Tanggal pembayaran', + 'invoice_date' => 'Tanggal faktur', + 'internal_reference' => 'Referensi internal', + 'inward' => 'Deskripsi dalam', + 'outward' => 'Deskripsi luar', + 'rule_group_id' => 'Kelompok aturan', +]; diff --git a/resources/lang/id_ID/import.php b/resources/lang/id_ID/import.php new file mode 100644 index 0000000000..2a0166a207 --- /dev/null +++ b/resources/lang/id_ID/import.php @@ -0,0 +1,163 @@ +. + */ +declare(strict_types=1); + +return [ + // status of import: + 'status_wait_title' => 'Tolong tunggu sebentar...', + 'status_wait_text' => 'Kotak ini akan hilang dalam sekejap.', + 'status_fatal_title' => 'Sebuah kesalahan fatal terjadi', + 'status_fatal_text' => 'Kesalahan fatal terjadi, dimana rutinitas impor tidak dapat dipulihkan. Silakan lihat penjelasannya di bawah ini.', + 'status_fatal_more' => 'Jika kesalahannya adalah time-out, impor akan berhenti setengah jalan. Untuk beberapa konfigurasi server, hanya server yang berhenti sementara impor terus berjalan di latar belakang. Untuk memverifikasi ini, periksa file log. Jika masalah berlanjut, pertimbangkan untuk mengimpor lebih dari baris perintah.', + 'status_ready_title' => 'Impor sudah siap untuk memulai', + 'status_ready_text' => 'Impor sudah siap dimulai. Semua konfigurasi yang perlu Anda lakukan sudah selesai. Silahkan download file konfigurasi. Ini akan membantu Anda dengan impor seandainya tidak berjalan seperti yang direncanakan. Untuk benar-benar menjalankan impor, Anda dapat menjalankan perintah berikut di konsol Anda, atau menjalankan impor berbasis web. Bergantung pada konfigurasi Anda, impor konsol akan memberi Anda lebih banyak umpan balik.', + 'status_ready_noconfig_text' => 'Impor sudah siap dimulai. Semua konfigurasi yang perlu Anda lakukan sudah selesai. Untuk benar-benar menjalankan impor, Anda dapat menjalankan perintah berikut di konsol Anda, atau menjalankan impor berbasis web. Bergantung pada konfigurasi Anda, impor konsol akan memberi Anda lebih banyak umpan balik.', + 'status_ready_config' => 'Download konfigurasi', + 'status_ready_start' => 'Mulai impor', + 'status_ready_share' => 'Harap pertimbangkan untuk mendownload konfigurasi Anda dan membagikannya di pusat konfigurasi impor. Ini akan memungkinkan pengguna Firefly III lainnya untuk mengimpor file mereka dengan lebih mudah.', + 'status_job_new' => 'Pekerjaan itu baru.', + 'status_job_configuring' => 'Impor sedang dikonfigurasi.', + 'status_job_configured' => 'Impor dikonfigurasi.', + 'status_job_running' => 'Impor sedang berjalan.. mohon menunggu..', + 'status_job_error' => 'Pekerjaan telah menimbulkan kesalahan.', + 'status_job_finished' => 'Impor telah selesai!', + 'status_running_title' => 'Impor sedang berjalan', + 'status_running_placeholder' => 'Silakan tunggu update...', + 'status_finished_title' => 'Rutin impor selesai', + 'status_finished_text' => 'Rutin impor telah mengimpor data Anda.', + 'status_errors_title' => 'Kesalahan selama impor', + 'status_errors_single' => 'Terjadi kesalahan saat mengimpor. Itu tidak tampak berakibat fatal.', + 'status_errors_multi' => 'Beberapa kesalahan terjadi saat impor. Ini tidak tampak berakibat fatal.', + 'status_bread_crumb' => 'Status impor', + 'status_sub_title' => 'Status impor', + 'config_sub_title' => 'Siapkan impor Anda', + 'status_finished_job' => 'Transaksi yang diimpor dapat ditemukan di tag :tag.', + 'import_with_key' => 'Impor dengan kunci \':key\'', + + // file, upload something + 'file_upload_title' => 'Impor setup (1/4) - Upload file Anda', + 'file_upload_text' => 'Rutin ini akan membantu Anda mengimpor file dari bank Anda ke Firefly III. Silakan periksa halaman bantuan di pojok kanan atas.', + 'file_upload_fields' => 'Bidang', + 'file_upload_help' => 'Pilih file anda', + 'file_upload_config_help' => 'Jika sebelumnya Anda mengimpor data ke Firefly III, Anda mungkin memiliki file konfigurasi, yang akan menetapkan nilai konfigurasi untuk Anda. Untuk beberapa bank, pengguna lain dengan ramah memberikan berkas konfigurasi mereka', + 'file_upload_type_help' => 'Pilih jenis file yang akan anda upload', + 'file_upload_submit' => 'Unggah berkas', + + // file, upload types + 'import_file_type_csv' => 'CSV (nilai yang dipisahkan koma)', + + // file, initial config for CSV + 'csv_initial_title' => 'Penyiapan impor (2/4) - Penyiapan impor CSV dasar', + 'csv_initial_text' => 'Untuk dapat mengimpor file Anda dengan benar, mohon validasi pilihan di bawah ini.', + 'csv_initial_box' => 'Penyiapan impor CSV dasar', + 'csv_initial_box_title' => 'Opsi penyiapan impor CSV dasar', + 'csv_initial_header_help' => 'Centang kotak ini jika baris pertama file CSV Anda adalah judul kolom.', + 'csv_initial_date_help' => 'Format waktu tanggal di CSV Anda. Ikuti format seperti laman ini menunjukkan. Nilai default akan mengurai tanggal yang terlihat seperti ini: :dateExample.', + 'csv_initial_delimiter_help' => 'Pilih pembatas lapangan yang digunakan dalam file masukan Anda. Jika tidak yakin, koma adalah pilihan teraman.', + 'csv_initial_import_account_help' => 'Jika file CSV TIDAK berisi informasi tentang akun aset Anda, gunakan dropdown ini untuk memilih akun mana yang menjadi tempat transaksi di CSV.', + 'csv_initial_submit' => 'Lanjutkan dengan langkah 3/4', + + // file, new options: + 'file_apply_rules_title' => 'Terapkan aturan', + 'file_apply_rules_description' => 'Terapkan peraturan Anda Perhatikan bahwa ini memperlambat impor secara signifikan.', + 'file_match_bills_title' => 'Cocokkan tagihan', + 'file_match_bills_description' => 'Cocokkan tagihan Anda dengan penarikan yang baru dibuat. Perhatikan bahwa ini memperlambat impor secara signifikan.', + + // file, roles config + 'csv_roles_title' => 'Pengaturan impor (3/4) - Tentukan peran masing-masing kolom', + 'csv_roles_text' => 'Setiap kolom dalam file CSV Anda berisi data tertentu. Tolong tunjukkan jenis data yang harus diharapkan oleh importir. Pilihan untuk "memetakan" data berarti Anda akan menghubungkan setiap entri yang ditemukan di kolom ke nilai di database Anda. Kolom yang sering dipetakan adalah kolom yang berisi IBAN dari akun lawan. Itu bisa dengan mudah disesuaikan dengan keberadaan IBAN di database Anda.', + 'csv_roles_table' => 'Meja', + 'csv_roles_column_name' => 'Nama kolom', + 'csv_roles_column_example' => 'Kolom contoh data', + 'csv_roles_column_role' => 'Data kolom berarti', + 'csv_roles_do_map_value' => 'Peta nilai-nilai ini', + 'csv_roles_column' => 'Kolom', + 'csv_roles_no_example_data' => 'Tidak ada data contoh yang tersedia', + 'csv_roles_submit' => 'Lanjutkan dengan langkah 4/4', + 'csv_roles_warning' => 'Paling tidak, tandai satu kolom sebagai kolom jumlah. Sebaiknya pilih juga kolom untuk deskripsi, tanggal dan akun lawan.', + + // file, map data + 'file_map_title' => 'Pengaturan impor (4/4) - Sambungkan data impor ke data Firefly III', + 'file_map_text' => 'Pada tabel berikut, nilai kiri menunjukkan informasi yang Anda temukan di file yang Anda upload. Adalah tugas Anda untuk memetakan nilai ini, jika mungkin, ke nilai yang sudah ada di database Anda. Firefly akan menempel pada pemetaan ini. Jika tidak ada nilai untuk dipetakan, atau Anda tidak ingin memetakan nilai spesifiknya, pilih yang tidak ada.', + 'file_map_field_value' => 'Nilai lapangan', + 'file_map_field_mapped_to' => 'Dipetakan ke', + 'map_do_not_map' => '(jangan memetakan)', + 'file_map_submit' => 'Mulai impor', + + // map things. + 'column__ignore' => '(abaikan kolom ini)', + 'column_account-iban' => 'Akun aset (IBAN)', + 'column_account-id' => 'ID akun aset (cocok dengan Firefly)', + 'column_account-name' => 'Akun aset (nama)', + 'column_amount' => 'Jumlah', + 'column_amount_debit' => 'Jumlah (kolom debit)', + 'column_amount_credit' => 'Jumlah (kolom kredit)', + 'column_amount-comma-separated' => 'Jumlah (koma sebagai pemisah desimal)', + 'column_bill-id' => 'Bill ID (pencocokan Firefly)', + 'column_bill-name' => 'Nama tagihan', + 'column_budget-id' => 'ID Anggaran (cocok dengan Firefly)', + 'column_budget-name' => 'Nama anggaran', + 'column_category-id' => 'ID Kategori (cocok dengan Firefly)', + 'column_category-name' => 'Nama Kategori', + 'column_currency-code' => 'Kode mata uang (ISO 4217)', + 'column_currency-id' => 'ID mata uang (cocok dengan Firefly)', + 'column_currency-name' => 'Nama mata uang (cocok dengan Firefly)', + 'column_currency-symbol' => 'Simbol mata uang (cocok dengan Firefly)', + 'column_date-interest' => 'Tanggal perhitungan bunga', + 'column_date-book' => 'Tanggal pemesanan transaksi', + 'column_date-process' => 'Tanggal proses transaksi', + 'column_date-transaction' => 'Tanggal', + 'column_description' => 'Deskripsi', + 'column_opposing-iban' => 'Akun lawan (IBAN)', + 'column_opposing-id' => 'Menentang ID akun (cocok dengan Firefly)', + 'column_external-id' => 'ID eksternal', + 'column_opposing-name' => 'Akun lawan (nama)', + 'column_rabo-debit-credit' => 'Indikator debit / kredit khusus Rabobank', + 'column_ing-debit-credit' => 'Indikator debit / kredit ING yang spesifik', + 'column_sepa-ct-id' => 'ID Transfer Kredit SEPA end-to-end', + 'column_sepa-ct-op' => 'Akun lawan kredit SEPA yang berlawanan', + 'column_sepa-db' => 'SEPA Direct Debit', + 'column_tags-comma' => 'Tag (dipisahkan koma)', + 'column_tags-space' => 'Tag (spasi terpisah)', + 'column_account-number' => 'Akun aset (nomor rekening)', + 'column_opposing-number' => 'Akun lawan (nomor rekening)', + 'column_note' => 'Catatan (s)', + + // prerequisites + 'prerequisites' => 'Prerequisites', + + // bunq + 'bunq_prerequisites_title' => 'Prasyarat untuk impor dari bunq', + 'bunq_prerequisites_text' => 'Untuk mengimpor dari bunq, Anda perlu mendapatkan kunci API. Anda bisa melakukan ini melalui aplikasi.', + + // Spectre + 'spectre_title' => 'Impor menggunakan momok', + 'spectre_prerequisites_title' => 'Prasyarat untuk impor menggunakan momok', + 'spectre_prerequisites_text' => 'Untuk mengimpor data menggunakan API momok, Anda perlu membuktikan beberapa rahasia. Mereka dapat ditemukan di halaman rahasia.', + 'spectre_enter_pub_key' => 'Impor hanya akan berfungsi saat Anda memasukkan kunci publik ini di halaman keamanan Anda.', + 'spectre_select_country_title' => 'Pilih negara', + 'spectre_select_country_text' => 'Firefly III memiliki banyak pilihan bank dan lokasi dari mana Spectre dapat mendownload data transaksional. Bank-bank ini diurutkan berdasarkan negara. Tolong jangan sampai ada "Negara Palsu" saat Anda ingin menguji sesuatu. Jika Anda ingin mengimpor dari alat keuangan lainnya, mohon gunakan negara imajiner yang disebut "aplikasi keuangan lainnya". Secara default, momok hanya memungkinkan Anda mendownload data dari bank palsu. Pastikan status Anda "Langsung" di Dasbor jika ingin men-download dari bank sebenarnya.', + 'spectre_select_provider_title' => 'Pilih bank', + 'spectre_select_provider_text' => 'Momok mendukung bank atau layanan keuangan berikut yang dikelompokkan di bawah :country. Silakan pilih yang ingin Anda impor.', + 'spectre_input_fields_title' => 'Masukkan bidang wajib', + 'spectre_input_fields_text' => 'Bidang berikut diamanatkan oleh ":provider" (dari :country).', + 'spectre_instructions_english' => 'Petunjuk ini diberikan oleh momok untuk convencience Anda. Mereka berbahasa Inggris:', +]; diff --git a/resources/lang/id_ID/intro.php b/resources/lang/id_ID/intro.php new file mode 100644 index 0000000000..3940aa8d52 --- /dev/null +++ b/resources/lang/id_ID/intro.php @@ -0,0 +1,133 @@ +. + */ +declare(strict_types=1); + +return [ + // index + 'index_intro' => 'Selamat datang di halaman indeks Firefly III. Mohon luangkan waktu untuk menelusuri pengantar ini melihat bagaimana Firefly III bekerja.', + 'index_accounts-chart' => 'Bagan ini menunjukkan saldo akun aset anda saat ini, Anda dapat memilih akun yang terlihat di sini dalam preferensi anda.', + 'index_box_out_holder' => 'Kotak kecil dan kotak di samping kotak ini akan memberi anda gambaran singkat tentang situasi keuangan anda.', + 'index_help' => 'Jika anda memerlukan bantuan dengan halaman atau formulir, tekan tombol ini.', + 'index_outro' => 'Sebagian besar halaman Firefly III akan dimulai dengan petunjuk kecil seperti ini. Silahkan hubungi saya bila ada pertanyaan atau komentar. Selamat mencoba!', + 'index_sidebar-toggle' => 'Untuk membuat transakisi baru, akun atau hal lainnya, gunakan menu di bawah gambar ini.', + + // create account: + 'accounts_create_iban' => 'Berikan akun anda IBAN yang benar. Hal ini bisa membuat data impor sangat mudah di masa yang akan datang.', + 'accounts_create_asset_opening_balance' => 'Akun aset dapat memiliki "saldo awal", yang menandakan dimulainya riwayat pada akun ini di firefly.', + 'accounts_create_asset_currency' => 'Firelfly III mendukung berbagai mata uang. Akun aset memiliki satu mata uang utama, yang yang harus anda tetapkan.', + 'accounts_create_asset_virtual' => 'Kadang-kadang itu dapat membantu memberi akun anda saldo virtual: jumlah tambahan yang selalu ditambahkan atau dihapus dari saldo sebenarnya.', + + // budgets index + 'budgets_index_intro' => 'Anggaran yang digunakan untuk mengelola keuangan anda dan membentuk salah satu fungsi inti dari Firefly III.', + 'budgets_index_set_budget' => 'Tetapkan total anggaran anda untuk setiap periode sehingga Firefly dapat memberi tahu anda jika anda sudah menganggarkan semua uang yang tersedia.', + 'budgets_index_see_expenses_bar' => 'Menghabiskan uang secara perlahan dengan mengisi di bar ini.', + 'budgets_index_navigate_periods' => 'Menavigasi melalui periode dengan mudah menetapkan anggaraan sebelumnya.', + 'budgets_index_new_budget' => 'Buat anggaran baru sesuai keinginan anda.', + 'budgets_index_list_of_budgets' => 'Gunakan tabel ini untuk menetapkan jumlah setiap anggaran daan melihat bagaimana keadaan anda.', + 'budgets_index_outro' => 'Untuk mempelajari lebih lanjut tentang anggaran, periksa ikon bantuan di pojok kanan atas.', + + // reports (index) + 'reports_index_intro' => 'Gunakan laporan ini untuk mendapatkan wawasan terperinci dalam keuangan anda.', + 'reports_index_inputReportType' => 'Pilih sebuah jenis laporan. Periksa bantuan halaman untuk melihat apa yang ditunjukkan pada laporan anda.', + 'reports_index_inputAccountsSelect' => 'Anda dapat mengecualikan atau menyertakan akun aset sesuai keinginan anda.', + 'reports_index_inputDateRange' => 'Rentang tanggal yang dipilih sepenuhnya terserah anda: dari satu hari sampai 10 tahun.', + 'reports_index_extra-options-box' => 'Bergantung pada laporan yang anda pilih, anda dapat memilih filter dan opsi tambahan di sini. Lihat kotak ini saat anda mengubah jenis laporan.', + + // reports (reports) + 'reports_report_default_intro' => 'Laporan ini akan memberi gambaran singkat tentang keuanggan anda secara cepat dan menyeluruh. Jika anda ingin melihat yang lain, jangan ragu untuk menghubungi saya!', + 'reports_report_audit_intro' => 'Laporan ini memberikan anda pengetahuan rnci dalam akun aset anda.', + 'reports_report_audit_optionsBox' => 'Gunakan kotak centang ini untuk menampilkan atau menyembunyikan kolom yang anda suka.', + + 'reports_report_category_intro' => 'Laporan ini akan memberi anda pengetahuan pada satu atau beberapa kategori.', + 'reports_report_category_pieCharts' => 'Bagan ini memberi anda pengetahuan tentang biaya dan pendapatan per kategori atau per akun.', + 'reports_report_category_incomeAndExpensesChart' => 'Bagan ini menunjukkan pengeluaran dan pendapatan anda per kategori.', + + 'reports_report_tag_intro' => 'Laporan ini memberi anda pengetahuan dalam satu atau beberapa label.', + 'reports_report_tag_pieCharts' => 'Bagan ini memberikan anda pengetahuan tentang biaya dan pendapatan per label, akun, kategori atau anggaran.', + 'reports_report_tag_incomeAndExpensesChart' => 'Bagan ini menunjukkan pengeluaran dan pendapatan anda per label.', + + 'reports_report_budget_intro' => 'Laporan ini memberikan anda pengetahuan tentang satu atau beberapa anggaran.', + 'reports_report_budget_pieCharts' => 'Bagan ini memberikan anda pengetahuan tentang biaya per anggaran atau per akun.', + 'reports_report_budget_incomeAndExpensesChart' => 'Bagan ini menunjukkan pengeluaran anda per anggaran.', + + // create transaction + 'transactions_create_switch_box' => 'Gunakan tombol-tombol ini dengan cepat untuk mengganti jenis transaksi yang ingin anda simpan.', + 'transactions_create_ffInput_category' => 'Anda bisa dengan bebas mengetik di bidang ini. Kategori yang dibuat sebelumnya yang akan disarankan.', + 'transactions_create_withdrawal_ffInput_budget' => 'Tautkan penarikan anda ke anggaraan untuk mendapatkan kontrol keuangan yang lebih baik.', + 'transactions_create_withdrawal_currency_dropdown_amount' => 'Gunakan dropdown ini saat penarikan anda dalam mata uang lainnya.', + 'transactions_create_deposit_currency_dropdown_amount' => 'Gunakan dropdown ini saat deposit anda berada dalam mata uang lainnya.', + 'transactions_create_transfer_ffInput_piggy_bank_id' => 'Pilihlah celengan dan hubungkan transfer ini ke tabungan anda.', + + // piggy banks index: + 'piggy-banks_index_saved' => 'Bagian ini menunjukkan berapa banyak yang telah anda simpan di setiap celengan.', + 'piggy-banks_index_button' => 'Di samping bilah kemajuan ini ada dua tombol (+ dan -) untuk menanmbahkan atau menghapus uang dari masing-masing celengan.', + 'piggy-banks_index_accountStatus' => 'Untuk setiap akun aset dengan sedikitnya satu celenggan, statusnya terdaftar dalam tabel ini.', + + // create piggy + 'piggy-banks_create_name' => 'Apa tujuanmu? Sofa baru, kamera baru, uang untuk keadaan darurat?', + 'piggy-banks_create_date' => 'Anda dapat menetapkan tanggal target atau tenggat waktu untuk celengan anda.', + + // show piggy + 'piggy-banks_show_piggyChart' => 'Bagan ini akan menunjukkan riwayat celengan.', + 'piggy-banks_show_piggyDetails' => 'Beberapa rincian tentang celengan anda', + 'piggy-banks_show_piggyEvents' => 'Setiap tambahan atau kepindahan juga tercantum di sini.', + + // bill index + 'bills_index_paid_in_period' => 'Bagian ini menunjukkan kapan tagihan terakhir dibayarkan.', + 'bills_index_expected_in_period' => 'Bagian ini menunjukkan setiap tagihan jika dan kapan tagihan berikutnya diperkirakan akan dibayar.', + + // show bill + 'bills_show_billInfo' => 'Tabel ini menunjukkan beberapa informasi umum tentang tagihan ini.', + 'bills_show_billButtons' => 'Gunakan tombol ini untuk memindai ulang transaksi lama sehingga cocok dengan tagihan ini.', + 'bills_show_billChart' => 'Bagan ini menunjukkan transaksi yang terkait dengan tagihan ini.', + + // create bill + 'bills_create_name' => 'Gunakan nama yang deskriptif seperti "Rent" atau "Health insurance".', + 'bills_create_match' => 'Untuk mencocokan transaksi, gunakan persyaratan dari transaksi tersebut atau akun biaya yang terlibat. Semua kata harus sesuai.', + 'bills_create_amount_min_holder' => 'Pilih jumlah minimum dan maksimum untuk tagihan ini.', + 'bills_create_repeat_freq_holder' => 'Sebagian besar tagihan diulang setiap bulannya, tapi anda bisa mengatur frekuensi lain di sini.', + 'bills_create_skip_holder' => 'Jika tagihan berulang setiap 2 minggu misalnya, bagian "lewati" harus ditetapkan ke "1" untuk melewati setiap minggu lainnya.', + + // rules index + 'rules_index_intro' => 'Firefly III memungkinkan anda mengatur peraturan-peraturan, yang otomatis akan diterapkan pada transaksi yang anda buat atau edit.', + 'rules_index_new_rule_group' => 'Anda dapat menggabungkan aturan dalam kelompok untuk memudahkan pengelolaan.', + 'rules_index_new_rule' => 'Buat aturan sebanyak yang anda suka.', + 'rules_index_prio_buttons' => 'Memesannya sesuai keinginan anda.', + 'rules_index_test_buttons' => 'Anda bisa menguji peraturan anda atau menerapkannya pada transaksi yang ada.', + 'rules_index_rule-triggers' => 'Aturan memiliki "pemicu" dan "tindakan" yang dapat anda pesan dengan drag-and-drop.', + 'rules_index_outro' => 'Pastikan untuk periksa halaman bantuan menggunakan ikon (?) di bagian kanan atas!', + + // create rule: + 'rules_create_mandatory' => 'Pilih judul deskriptif dan tentukan kapan aturan harus dijalankan.', + 'rules_create_ruletriggerholder' => 'Tambahkan sebanyak mungkin trigger sebanyak yang kamu sukai, tap ingat bahwa SEMUA trigger harus cocok sebelum tindakan dijalankan.', + 'rules_create_test_rule_triggers' => 'Gunakan tombol ini untuk melihat transaksi mana yang sesuai dengan peraturan anda.', + 'rules_create_actions' => 'Tentukan sebanyak mungkin tindakan yang anda inginkan.', + + // preferences + 'preferences_index_tabs' => 'Pilihan lainnya tersedia dibalik tab ini.', + + // currencies + 'currencies_index_intro' => 'Firefly III mendukung banyak mata uang, yang dapat anda ubah di halaman ini.', + 'currencies_index_default' => 'Firefly III memiliki satu mata uang standar. Anda selalu dapat beralih ke mata uang lainnya dengan menggunakan tombol-tombol ini.', + + // create currency + 'currencies_create_code' => 'Kode ini harus sesuai dengan ISO (Google untuk mata uang baru anda).', +]; diff --git a/resources/lang/id_ID/list.php b/resources/lang/id_ID/list.php new file mode 100644 index 0000000000..8efad5ca02 --- /dev/null +++ b/resources/lang/id_ID/list.php @@ -0,0 +1,102 @@ +. + */ +declare(strict_types=1); + +return [ + 'buttons' => 'Tombol', + 'icon' => 'Ikon', + 'id' => 'ID', + 'create_date' => 'Dibuat pada', + 'update_date' => 'Diperbarui pada', + 'updated_at' => 'Diperbarui pada', + 'balance_before' => 'Saldo Sebelumnya', + 'balance_after' => 'Saldo setelahnya', + 'name' => 'Nama', + 'role' => 'Peran', + 'currentBalance' => 'Saldo saat ini', + 'active' => 'Aktif?', + 'lastActivity' => 'Aktifitas terakhir', + 'balanceDiff' => 'Perbedaan saldo', + 'matchesOn' => 'Cocok di', + 'account_type' => 'Jenis akun', + 'created_at' => 'Dibuat di', + 'account' => 'Akun', + 'matchingAmount' => 'Jumlah', + 'split_number' => 'Split #', + 'destination' => 'Tujuan', + 'source' => 'Sumber', + 'next_expected_match' => 'Transaksi yang diharapkan berikutnya', + 'automatch' => 'Pencocokan otomatis?', + 'repeat_freq' => 'Berulang', + 'description' => 'Deskripsi', + 'amount' => 'Jumlah', + 'internal_reference' => 'Referensi Internal', + 'date' => 'Tanggal', + 'interest_date' => 'Tanggal Bunga', + 'book_date' => 'Tanggal Buku', + 'process_date' => 'Tanggal pemrosesan', + 'due_date' => 'Tenggat waktu', + 'payment_date' => 'Tanggal pembayaran', + 'invoice_date' => 'Tanggal Faktur', + 'interal_reference' => 'Referensi Internal', + 'notes' => 'Catatan', + 'from' => 'Dari', + 'piggy_bank' => 'Celengan', + 'to' => 'Untuk', + 'budget' => 'Anggaran', + 'category' => 'Kategori', + 'bill' => 'Tagihan', + 'withdrawal' => 'Penarikan', + 'deposit' => 'Simpanan', + 'transfer' => 'Transfer', + 'type' => 'Jenis', + 'completed' => 'Lengkap', + 'iban' => 'IBAN', + 'paid_current_period' => 'Membayar periode ini', + 'email' => 'Email', + 'registered_at' => 'Terdaftar di', + 'is_blocked' => 'Diblokir', + 'is_admin' => 'Apakah admin', + 'has_two_factor' => 'Memiliki 2FA', + 'blocked_code' => 'Kode blok', + 'source_account' => 'Akun sumber', + 'destination_account' => 'Akun tujuan', + 'accounts_count' => 'Jumlah rekening', + 'journals_count' => 'Jumlah transaksi', + 'attachments_count' => 'Jumlah lampiran', + 'bills_count' => 'Jumlah tagihan', + 'categories_count' => 'Jumlah kategori', + 'export_jobs_count' => 'Jumlah pekerjaan ekspor', + 'import_jobs_count' => 'Jumlah pekerjaan impor', + 'budget_count' => 'Jumlah anggaran', + 'rule_and_groups_count' => 'Jumlah aturan dan kelompok aturan', + 'tags_count' => 'Jumlah label', + 'inward' => 'Deskripsi dalam', + 'outward' => 'Deskripsi luar', + 'number_of_transactions' => 'Jumlah transaksi', + 'total_amount' => 'Jumlah total', + 'sum' => 'Jumlah', + 'sum_excluding_transfers' => 'Jumlah (tidak termasuk transfer)', + 'sum_withdrawals' => 'Jumlah penarikan', + 'sum_deposits' => 'Jumlah simpanan', + 'sum_transfers' => 'Jumlah transfer', + 'reconcile' => 'Menyesuaikan', +]; diff --git a/public/js/ff/reports/tag/all.js b/resources/lang/id_ID/pagination.php similarity index 75% rename from public/js/ff/reports/tag/all.js rename to resources/lang/id_ID/pagination.php index 5a99dc19ab..0e720cc21c 100644 --- a/public/js/ff/reports/tag/all.js +++ b/resources/lang/id_ID/pagination.php @@ -1,5 +1,6 @@ -/* - * all.js +. + * along with Firefly III. If not, see . */ +declare(strict_types=1); +return [ + 'previous' => '« Sebelumnya', + 'next' => 'Selanjutnya »', +]; diff --git a/resources/lang/id_ID/passwords.php b/resources/lang/id_ID/passwords.php new file mode 100644 index 0000000000..5cf403a495 --- /dev/null +++ b/resources/lang/id_ID/passwords.php @@ -0,0 +1,30 @@ +. + */ +declare(strict_types=1); + +return [ + 'password' => 'Sandi minimal harus 6 karakter dan cocok dengan konfirmasi.', + 'user' => 'Kami tidak dapat menemukan pengguna dengan alamat e-mail itu.', + 'token' => 'Token reset kata sandi ini tidak valid.', + 'sent' => 'Kami telah mengirimi ulang tautan reset kata sandi anda!', + 'reset' => 'Kata sandi anda sudah direset!', + 'blocked' => 'Usaha yang bagus.', +]; diff --git a/resources/lang/id_ID/validation.php b/resources/lang/id_ID/validation.php new file mode 100644 index 0000000000..68e8f4f71e --- /dev/null +++ b/resources/lang/id_ID/validation.php @@ -0,0 +1,102 @@ +. + */ +declare(strict_types=1); + +return [ + 'iban' => 'Ini bukan IBAN yang valid.', + 'unique_account_number_for_user' => 'Sepertinya nomor rekening ini sudah digunakan.', + 'deleted_user' => 'Kerena kendala keamanan, anda tidak bisa mendaftar menggunkan alamat email ini.', + 'rule_trigger_value' => 'Nilai ini tidak validi untuk trigger yang dipilih.', + 'rule_action_value' => 'Nilai ini tidak valid untuk tindakan yang dipilih.', + 'file_already_attached' => 'Upload file ";name" sudah terpasang pada objek ini.', + 'file_attached' => 'File yang diupload dengan sukses ":name.', + 'file_invalid_mime' => 'File ":name" adalah tipe ":mime" yang tidak diterima sebagai upload baru.', + 'file_too_large' => 'File "; name" terlalu besar.', + 'belongs_to_user' => 'Nilai dari :attribute tidak diketahui', + 'accepted' => ':attribute harus diterima.', + 'bic' => 'Ini bukan BIC yang valid.', + 'more' => ':attribute harus lebih besar dari nol.', + 'active_url' => ':attribute bukan URL yang valid.', + 'after' => ':attribute harus tanggal setelah :date.', + 'alpha' => ':attribute hanya boleh berisi huruf.', + 'alpha_dash' => ':attribute hanya boleh berisi huruf, angka dan tanda hubung.', + 'alpha_num' => ':attribute hanya boleh berisi huruf dan angka.', + 'array' => ':attribute harus berupa array.', + 'unique_for_user' => 'Sudah ada entri dengan :attribute ini.', + 'before' => ':attribute harus tanggal sebelum :date.', + 'unique_object_for_user' => 'Nama ini sudah digunakan', + 'unique_account_for_user' => 'Nama akun ini sudah digunakan', + 'between.numeric' => ':attribute harus antara :min dan :max.', + 'between.file' => ':attribute harus antara :min dan :max kilobyte.', + 'between.string' => ':attribute harus antara :min dan :max karakter.', + 'between.array' => ':attribute harus antara :min dan :max item.', + 'boolean' => 'Bidang :attribute harus benar atau salah.', + 'confirmed' => 'Konfirmasi :attribute tidak cocok.', + 'date' => ':attribute bukan tanggal yang valid.', + 'date_format' => ':attribute tidak cocok dengan the format :format.', + 'different' => ':attribute dan :other harus berbeda.', + 'digits' => ':attribute harus angka :digits.', + 'digits_between' => ':attribute harus antara :min dan :max angka.', + 'email' => ':attribute harus alamat email yang valid.', + 'filled' => 'Bidang :attribute diperlukan.', + 'exists' => ':attribute yang dipilih tidak valid.', + 'image' => ':attribute harus gambar.', + 'in' => ':attribute yang dipilih tidak valid.', + 'integer' => ':attribute harus bilangan bulat.', + 'ip' => ':attribute harus alamat IP yang valid.', + 'json' => ':attribute harus string JSON yang valid.', + 'max.numeric' => ':attribute tidak boleh lebih besar dari :max.', + 'max.file' => ':attribute tidak boleh lebih besar dari kilobyte :max.', + 'max.string' => ':attribute tidak boleh lebih besar dari karakter :max.', + 'max.array' => ':attribute tidak boleh memiliki lebih dari item :max.', + 'mimes' => ':attribute harus jenis file: :values.', + 'min.numeric' => ':attribute harus sedikitnya :min.', + 'min.file' => 'Atribut harus minimal kilobyte :min.', + 'min.string' => ':attribute harus minimal karakter :min.', + 'min.array' => ':attribute harus minimal item :min.', + 'not_in' => ':attribute yang dipilih tidak valid.', + 'numeric' => ':attribute harus angka.', + 'regex' => 'Format :attribute tidak valid.', + 'required' => 'Bidang :attribute diperlukan.', + 'required_if' => 'Bidang :attribute diperlukan ketika :other adalah :value.', + 'required_unless' => 'Bidang :attribute diperlukan minimal :other adalah dalam :values.', + 'required_with' => 'Bidang :attribute diperlukan ketika :values terdapat nilai.', + 'required_with_all' => 'Bidang :attribute diperlukan ketika :values ada.', + 'required_without' => 'Bidang :attribute diperlukan ketika :values tidak ada.', + 'required_without_all' => 'Bidang :attribute diperlukan ketika tidak ada satupun :values ada.', + 'same' => ':attribute dan :other harus cocok.', + 'size.numeric' => ':attribute harus :size.', + 'size.file' => ':attribute harus kilobyte :size.', + 'size.string' => ':attribute harus karakter :size.', + 'size.array' => ':attribute harus berisi item :size.', + 'unique' => ':attribute sudah diambil.', + 'string' => ':attribute harus sebuah string.', + 'url' => 'Format atribut tidak valid.', + 'timezone' => ':attribute harus zona yang valid.', + '2fa_code' => 'Bidang :attribute tidak valid.', + 'dimensions' => ':attribute memiliki dimensi gambar yang tidak valid.', + 'distinct' => 'Bidang :attribute memiliki nilai duplikat.', + 'file' => ':attribute harus berupa file.', + 'in_array' => 'Bidang :attribute tidak ada in :other.', + 'present' => 'Bidang :attribute harus ada.', + 'amount_zero' => 'Jumlah total tidak boleh nol', + 'secure_password' => 'Ini bukan kata sandi yang aman. Silahkan coba lagi. Untuk informasi lebih lanjut, kunjungi https://goo.gl/NCh2tN', +]; diff --git a/resources/lang/nl_NL/auth.php b/resources/lang/nl_NL/auth.php index b89dee9b5b..be5f29709a 100644 --- a/resources/lang/nl_NL/auth.php +++ b/resources/lang/nl_NL/auth.php @@ -1,18 +1,26 @@ . */ +declare(strict_types=1); return [ - /* |-------------------------------------------------------------------------- | Authentication Language Lines @@ -25,6 +33,5 @@ return [ */ 'failed' => 'Deze gegevens zijn niet correct.', - 'throttle' => 'Te veel inlogpogingen. Probeer opnieuw in: seconden seconden.', - + 'throttle' => 'Te veel inlogpogingen. Probeer opnieuw in :seconds seconden.', ]; diff --git a/resources/lang/nl_NL/bank.php b/resources/lang/nl_NL/bank.php index 9afeaf242d..ef0d636f91 100644 --- a/resources/lang/nl_NL/bank.php +++ b/resources/lang/nl_NL/bank.php @@ -1,8 +1,24 @@ . + */ declare(strict_types=1); - return [ - 'bunq_prerequisites_title' => 'Voorwaarden voor een import van bunq', - 'bunq_prerequisites_text' => 'Om transacties bij bunq te importeren heb je een API sleutel nodig. Dit kan via de app.', ]; diff --git a/resources/lang/nl_NL/breadcrumbs.php b/resources/lang/nl_NL/breadcrumbs.php index 5e56c5e727..e137f106cb 100644 --- a/resources/lang/nl_NL/breadcrumbs.php +++ b/resources/lang/nl_NL/breadcrumbs.php @@ -1,16 +1,24 @@ . */ +declare(strict_types=1); return [ 'home' => 'Home', @@ -21,6 +29,7 @@ return [ 'preferences' => 'Voorkeuren', 'profile' => 'Profiel', 'changePassword' => 'Verander je wachtwoord', + 'change_email' => 'Verander je emailadres', 'bills' => 'Contracten', 'newBill' => 'Nieuw contract', 'edit_bill' => 'Wijzig contract ":name"', diff --git a/resources/lang/nl_NL/config.php b/resources/lang/nl_NL/config.php index c69f3c6fb3..c0e26bebd1 100644 --- a/resources/lang/nl_NL/config.php +++ b/resources/lang/nl_NL/config.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'locale' => 'nl, Dutch, nl_NL, nl_NL.utf8, nl_NL.UTF-8', @@ -21,5 +30,4 @@ return [ 'quarter_of_year' => '%B %Y', 'year' => '%Y', 'half_year' => '%B %Y', - ]; diff --git a/resources/lang/nl_NL/csv.php b/resources/lang/nl_NL/csv.php index 52fc84ce26..d61316b632 100644 --- a/resources/lang/nl_NL/csv.php +++ b/resources/lang/nl_NL/csv.php @@ -1,91 +1,24 @@ . */ - declare(strict_types=1); return [ - - // initial config - 'initial_title' => 'Importinstellingen (1/3) - Algemene CVS importinstellingen', - 'initial_text' => 'Om je bestand goed te kunnen importeren moet je deze opties verifiëren.', - 'initial_box' => 'Algemene CVS importinstellingen', - 'initial_box_title' => 'Algemene CVS importinstellingen', - 'initial_header_help' => 'Vink hier als de eerste rij kolomtitels bevat.', - 'initial_date_help' => 'Datum/tijd formaat in jouw CSV bestand. Volg het formaat zoals ze het op deze pagina uitleggen. Het standaardformaat ziet er zo uit: :dateExample.', - 'initial_delimiter_help' => 'Kies het veldscheidingsteken dat in jouw bestand wordt gebruikt. Als je het niet zeker weet, is de komma de beste optie.', - 'initial_import_account_help' => 'Als jouw CSV bestand geen referenties bevat naar jouw rekening(en), geef dan hier aan om welke rekening het gaat.', - 'initial_submit' => 'Ga verder met stap 2/3', - - // new options: - 'apply_rules_title' => 'Regels toepassen', - 'apply_rules_description' => 'Past regels toe tijdens de import. Dit vertraagt de import behoorlijk.', - 'match_bills_title' => 'Match contracten', - 'match_bills_description' => 'Checkt of bestaande contracten matchen met nieuwe uitgaves. Dit vertraagt de import behoorlijk.', - - // roles config - 'roles_title' => 'Importinstellingen (2/3) - rol van elke kolom definiëren', - 'roles_text' => 'Elke kolom in je CSV-bestand bevat bepaalde gegevens. Gelieve aan te geven wat voor soort gegevens de import-routine kan verwachten. De optie "maak een link" betekent dat u elke vermelding in die kolom linkt aan een waarde uit je database. Een vaak gelinkte kolom is die met de IBAN-code van de tegenrekening. Die kan je dan linken aan de IBAN in jouw database.', - 'roles_table' => 'Tabel', - 'roles_column_name' => 'Kolomnaam', - 'roles_column_example' => 'Voorbeeldgegevens', - 'roles_column_role' => 'Kolomrol', - 'roles_do_map_value' => 'Maak een link', - 'roles_column' => 'Kolom', - 'roles_no_example_data' => 'Geen voorbeeldgegevens', - 'roles_submit' => 'Ga verder met stap 3/3', - 'roles_warning' => 'Geef minstens de kolom aan waar het bedrag in staat. Als het even kan, ook een kolom voor de omschrijving, datum en de andere rekening.', - - // map data - 'map_title' => 'Importinstellingen (3/3) - Link importgegevens aan Firefly III-gegevens', - 'map_text' => 'In deze tabellen is de linkerwaarde een waarde uit je CSV bestand. Jij moet de link leggen, als mogelijk, met een waarde uit jouw database. Firefly houdt zich hier aan. Als er geen waarde is, selecteer dan ook niets.', - 'map_field_value' => 'Veldwaarde', - 'map_field_mapped_to' => 'Gelinkt aan', - 'map_do_not_map' => '(niet linken)', - 'map_submit' => 'Start importeren', - - // map things. - 'column__ignore' => '(negeer deze kolom)', - 'column_account-iban' => 'Betaalrekening (IBAN)', - 'column_account-id' => 'Betaalrekening (ID gelijk aan Firefly)', - 'column_account-name' => 'Betaalrekeningnaam', - 'column_amount' => 'Bedrag', - 'column_amount_debet' => 'Bedrag (debetkolom)', - 'column_amount_credit' => 'Bedrag (creditkolom)', - 'column_amount-comma-separated' => 'Bedrag (komma as decimaalscheidingsteken)', - 'column_bill-id' => 'Contract (ID gelijk aan Firefly)', - 'column_bill-name' => 'Contractnaam', - 'column_budget-id' => 'Budget (ID gelijk aan Firefly)', - 'column_budget-name' => 'Budgetnaam', - 'column_category-id' => 'Categorie (ID gelijk aan Firefly)', - 'column_category-name' => 'Categorienaam', - 'column_currency-code' => 'Valutacode (ISO 4217)', - 'column_currency-id' => 'Valuta (ID gelijk aan Firefly)', - 'column_currency-name' => 'Valutanaam', - 'column_currency-symbol' => 'Valutasymbool', - 'column_date-interest' => 'Datum (renteberekening)', - 'column_date-book' => 'Datum (boeking)', - 'column_date-process' => 'Datum (verwerking)', - 'column_date-transaction' => 'Datum', - 'column_description' => 'Omschrijving', - 'column_opposing-iban' => 'Tegenrekening (IBAN)', - 'column_opposing-id' => 'Tegenrekening (ID gelijk aan Firefly)', - 'column_external-id' => 'Externe ID', - 'column_opposing-name' => 'Tegenrekeningnaam', - 'column_rabo-debet-credit' => 'Rabobankspecifiek bij/af indicator', - 'column_ing-debet-credit' => 'ING-specifieke bij/af indicator', - 'column_sepa-ct-id' => 'SEPA transactienummer', - 'column_sepa-ct-op' => 'SEPA tegenrekeningnummer', - 'column_sepa-db' => 'SEPA "direct debet"-nummer', - 'column_tags-comma' => 'Tags (kommagescheiden)', - 'column_tags-space' => 'Tags (spatiegescheiden)', - 'column_account-number' => 'Betaalrekening (rekeningnummer)', - 'column_opposing-number' => 'Tegenrekening (rekeningnummer)', ]; diff --git a/resources/lang/nl_NL/demo.php b/resources/lang/nl_NL/demo.php index 631ff2236e..a5f8bcd9a6 100644 --- a/resources/lang/nl_NL/demo.php +++ b/resources/lang/nl_NL/demo.php @@ -1,13 +1,24 @@ . */ +declare(strict_types=1); return [ 'no_demo_text' => 'Sorry, er is geen extra uitleg voor deze pagina.', @@ -15,7 +26,7 @@ return [ 'index' => 'Welkom bij Firefly III! Op deze pagina krijg je een overzicht van je financiën. Meer diepgaande informatie vindt je onder Rekeningen →Betaalrekeningen en natuurlijk onder Budgetten- en Overzichten. Klik gerust rond en en kijk waar je terecht komt.', 'accounts-index' => 'Betaalrekeningen zijn je persoonlijke bankrekeningen. Crediteuren zijn rekeningen waar jij geld uit geeft, zoals bij winkels of aan vrienden. Debiteuren zijn rekeningen waar jij geld van krijgt, zoals je werk, de overheid of andere bronnen van inkomsten. Op deze pagina kan je ze wijzigen of verwijderen.', 'budgets-index' => 'Op deze pagina zie je je budgetten. De bovenste balk is het bedrag dat je kan gaan budgetteren. Dat kan je zelf aanpassen door op het bedrag te klikken. Wat je daadwerkelijk hebt uitgegeven zie je in de balk er onder. Daar weer onder zie je elk budget en wat je er voor gebudgetteerd hebt.', - 'reports-index-start' => 'Firefly III ondersteunt vier soorten rapporten. Je kan meer over ze lezen door op het -icoontje te klikken (rechtsboven).', + 'reports-index-start' => 'Firefly III ondersteunt een aantal soorten rapporten. Je kan meer over ze lezen door op het -icoontje te klikken (rechtsboven).', 'reports-index-examples' => 'Bekijk eens deze voorbeelden: een maandelijks financieel overzicht, een jaarlijks financieel overzicht en een budgetrapport.', 'currencies-index' => 'Firefly ondersteunt meerdere valuta\'s. Hoewel het standaard de Euro is kan je ook kiezen voor de US dollar of een van de vele anderen. Er is een kleine selectie valuta meegeleverd maar je kan je eigen valuta toevoegen. Het veranderen van de standaardvaluta verandert de bestaande transacties niet: Firefly III ondersteunt het gebruik van meerdere valuta op hetzelfde moment.', 'transactions-index' => 'Deze uitgaven, inkomsten en overschrijvingen zijn niet heel fantasierijk. Ze zijn automatisch gegenereerd.', diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.php index 77a7f0b8b4..5b90aeaf84 100644 --- a/resources/lang/nl_NL/firefly.php +++ b/resources/lang/nl_NL/firefly.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ // general stuff: @@ -127,12 +136,28 @@ return [ 'journals_in_period_for_tag' => 'Alle transacties voor tag :tag tussen :start en :end', 'not_available_demo_user' => 'De functie die je probeert te gebruiken is niet beschikbaar voor gebruikers van de demo.', 'exchange_rate_instructions' => 'Betaalrekening "@naam" accepteert alleen boekingen in @native_currency. Als je @foreign_currency wilt gebruiken moet je ook het bedrag in @native_currency opgeven:', - 'transfer_exchange_rate_instructions' => 'Bronbetaalrekening "@source_name" accepteert alleen overschrijvingen in @source_currency. Doelbetaalrekening "@dest_name: accepteert alleen overschrijvingen in @dest_currency. Je moet het juiste bedrag in beide valuta opgeven.', + 'transfer_exchange_rate_instructions' => 'Bronbetaalrekening "@source_name" accepteert alleen overschrijvingen in @source_currency. Doelbetaalrekening "@dest_name" accepteert alleen overschrijvingen in @dest_currency. Je moet het juiste bedrag in beide valuta opgeven.', 'transaction_data' => 'Transactiegegevens', 'invalid_server_configuration' => 'Ongeldige serverconfiguratie', 'invalid_locale_settings' => 'Firefly III kan geldbedragen niet goed weergeven omdat je server de vereiste software mist. Er zijn instructies hoe dit te doen.', 'quickswitch' => 'Quickswitch', + // check for updates: + 'update_check_title' => 'Op updates controleren', + 'admin_update_check_title' => 'Controleer automatisch op updates', + 'admin_update_check_explain' => 'Firefly III kan automatisch op updates controleren. Wanneer je deze instelling inschakelt, neemt Firefly III contact op met Github om te kijken of er een nieuwe versie van Firefly III beschikbaar is. Wanneer dit het geval is, ontvang je een melding. Je kan deze melding testen met de knop aan de rechterkant. Geef hieronder aan of je Firefly III wilt laten controleren op updates.', + 'check_for_updates_permission' => 'Firefly III kan controleren op updates, maar heeft hiervoor je toestemming nodig. Ga naar de admin om aan te geven of deze functie moet worden ingeschakeld.', + 'updates_ask_me_later' => 'Later vragen', + 'updates_do_not_check' => 'Niet controleren op nieuwe versies', + 'updates_enable_check' => 'Controleren op nieuwe versies', + 'admin_update_check_now_title' => 'Op updates controleren', + 'admin_update_check_now_explain' => 'Als u op de knop drukt, kijkt Firefly III of je huidige versie de nieuwste is.', + 'check_for_updates_button' => 'Controleer nu!', + 'update_new_version_alert' => 'Er is een nieuwe versie beschikbaar. Je gebruikt v:your_version, de nieuwste versie is v:new_version die werd uitgebracht op :date.', + 'update_current_version_alert' => 'Je gebruikt v:version, de nieuwste beschikbare versie.', + 'update_newer_version_alert' => 'Je gebruikt v:your_version, wat nieuwer is dan de nieuwste versie, v:new_version.', + 'update_check_error' => 'Er is een fout opgetreden bij het controleren op updates. Bekijk de logbestanden.', + // search 'search' => 'Zoeken', 'search_query' => 'Zoekopdracht', @@ -343,7 +368,6 @@ return [ 'rule_action_set_notes_choice' => 'Verander notitie in..', 'rule_action_set_notes' => 'Verander notitie in ":action_value"', - 'rules_have_read_warning' => 'Heb je de waarschuwing gelezen?', 'apply_rule_warning' => 'Let op! Het kan heel lang duren voor een regel(groep) is toegepast op een grote selectie transacties. Er kan een time-out optreden. Als dat gebeurt is de regel(groep) niet toegepast op alle transacties, en dat kan je administratie behoorlijk verprutsen. Wees dus voorzichtig.', @@ -397,9 +421,9 @@ return [ 'pref_home_show_deposits_info' => 'De homepagina laat al crediteuren zien. Wil je ook je debiteuren zien?', 'pref_home_do_show_deposits' => 'Ja, kom maar op', 'successful_count' => 'waarvan :count met succes', - 'transaction_page_size_title' => 'Paginalengte', - 'transaction_page_size_help' => 'Elke lijst met transacties er op is zo lang', - 'transaction_page_size_label' => 'Paginalengte', + 'list_page_size_title' => 'Paginalengte', + 'list_page_size_help' => 'Per lijst met dingen (accounts, transacties, enz.) zie je hooguit zoveel items.', + 'list_page_size_label' => 'Paginalengte', 'between_dates' => '(:start en :end)', 'pref_optional_fields_transaction' => 'Optionele velden voor transacties', 'pref_optional_fields_transaction_help' => 'Standaard staan niet alle velden aan (vanwege het overzicht). Hier kan je zulke extra velden alsnog aanzetten, als je denkt dat ze handig zijn. Als je een veld uitzet, maar deze heeft wel degelijk een waarde, dan is-ie altijd zichtbaar, wat je ook doet.', @@ -420,7 +444,6 @@ return [ 'optional_field_attachments' => 'Bijlagen', 'optional_field_meta_data' => 'Optionele meta-gegevens', - // profile: 'change_your_password' => 'Verander je wachtwoord', 'delete_account' => 'Verwijder je account', @@ -457,7 +480,6 @@ return [ 'login_with_new_email' => 'Je kan nu inloggen met je nieuwe emailadres.', 'login_with_old_email' => 'Je kan nu weer inloggen met je oude emailadres.', - // attachments 'nr_of_attachments' => 'Eén bijlage|:count bijlagen', 'attachments' => 'Bijlagen', @@ -563,7 +585,6 @@ return [ 'suggested' => 'Gesuggereerd', 'average_between' => 'Gemiddelde tussen :start en :end', - // bills: 'matching_on' => 'Wordt herkend', 'between_amounts' => 'tussen :low en :high.', @@ -701,12 +722,15 @@ return [ 'deleted_transfer' => 'Overschrijving ":description" verwijderd', 'stored_journal' => 'Nieuw transactie ":description" opgeslagen', 'select_transactions' => 'Selecteer transacties', + 'rule_group_select_transactions' => '":title" op transacties toepassen', + 'rule_select_transactions' => '":title" op transacties toepassen', 'stop_selection' => 'Stop met selecteren', 'reconcile_selected' => 'Verrekenen', 'mass_delete_journals' => 'Verwijder een aantal transacties', 'mass_edit_journals' => 'Wijzig een aantal transacties', 'cannot_edit_other_fields' => 'Je kan andere velden dan de velden die je hier ziet niet groepsgewijs wijzigen. Er is geen ruimte om ze te laten zien. Als je deze velden toch wilt wijzigen, volg dan de link naast de transactie en wijzig ze stuk voor stuk.', 'no_budget' => '(geen budget)', + 'no_budget_squared' => '(geen budget)', 'perm-delete-many' => 'Veel items in één keer verwijderen kan zeer storend zijn. Wees voorzichtig.', 'mass_deleted_transactions_success' => 'Verwijder :amount transactie(s).', 'mass_edited_transactions_success' => 'Wijzig :amount transactie(s)', @@ -716,7 +740,6 @@ return [ 'opt_group_sharedAsset' => 'Gedeelde betaalrekeningen', 'opt_group_ccAsset' => 'Creditcards', - // new user: 'welcome' => 'Welkom bij Firefly!', 'submit' => 'Invoeren', @@ -764,6 +787,7 @@ return [ 'piggyBanks' => 'Spaarpotjes', 'bills' => 'Contracten', 'withdrawal' => 'Uitgave', + 'opening_balance' => 'Startsaldo', 'deposit' => 'Inkomsten', 'account' => 'Rekening', 'transfer' => 'Overschrijving', @@ -786,6 +810,7 @@ return [ 'report_default' => 'Standaard financieel rapport (:start tot :end)', 'report_audit' => 'Transactiehistorie-overzicht van :start tot :end', 'report_category' => 'Categorierapport van :start tot :end', + 'report_account' => 'Debiteuren/crediteurenrapport tussen :start en :end', 'report_budget' => 'Budgetrapport van :start tot :end', 'report_tag' => 'Tagrapport van :start tot :end', 'quick_link_reports' => 'Snelle links', @@ -810,8 +835,8 @@ return [ 'inactive' => 'Niet actief', 'active' => 'Actief', 'difference' => 'Verschil', - 'in' => 'In', - 'out' => 'Uit', + 'money_flowing_in' => 'In', + 'money_flowing_out' => 'Uit', 'topX' => 'top :number', 'show_full_list' => 'Laat hele lijst zien', 'show_only_top' => 'Alleen top :number', @@ -821,6 +846,7 @@ return [ 'report_type_category' => 'Categorierapport', 'report_type_budget' => 'Budgetrapport', 'report_type_tag' => 'Tagrapport', + 'report_type_account' => 'Debiteuren/crediteurenrapport', 'more_info_help' => 'Meer informatie over deze rapporten vind je in de hulppagina\'s. Klik daarvoor op het (?) icoontje rechtsboven.', 'report_included_accounts' => 'Accounts in rapport', 'report_date_range' => 'Datumbereik', @@ -872,7 +898,10 @@ return [ 'account_role_ccAsset' => 'Credit card', 'budget_chart_click' => 'Klik op een budgetnaam in de tabel hierboven om een ​​grafiek te zien.', 'category_chart_click' => 'Klik op een categorienaam in de tabel hierboven om een ​​grafiek te zien.', - + 'in_out_accounts' => 'Inkomsten en uitgaven per combinatie', + 'in_out_per_category' => 'Verdiend en uitgegeven per categorie', + 'out_per_budget' => 'Uitgaven per budget', + 'select_expense_revenue' => 'Selecteer debiteur+crediteur', // charts: 'chart' => 'Diagram', @@ -884,7 +913,6 @@ return [ 'earned' => 'Verdiend', 'overspent' => 'Teveel uitgegeven', 'left' => 'Over', - 'no_budget' => '(geen budget)', 'max-amount' => 'Maximumbedrag', 'min-amount' => 'Minimumbedrag', 'journal-amount' => 'Bedrag voor dit contract', @@ -968,8 +996,7 @@ return [ 'total_size' => 'totale grootte', 'budget_or_budgets' => 'budget(ten)', 'budgets_with_limits' => 'budget(ten) met een ingesteld bedrag', - 'rule_or_rules' => 'regel(s)', - 'rulegroup_or_groups' => 'regelgroep(en)', + 'nr_of_rules_in_total_groups' => ':count_rules regel(s) in :count_groups regelgroep(en)', 'tag_or_tags' => 'tag(s)', 'configuration_updated' => 'De configuratie is bijgewerkt', 'setting_is_demo_site' => 'Demo website', @@ -1035,7 +1062,6 @@ return [ '(partially) pays for_outward' => 'betaalt (deels) voor', '(partially) reimburses_outward' => 'vergoedt (deels)', - // split a transaction: 'splits' => 'Splitten', 'add_another_split' => 'Voeg een split toe', @@ -1046,7 +1072,7 @@ return [ 'split_this_transfer' => 'Splits deze overschrijving', 'cannot_edit_multiple_source' => 'Je kan transactie #:id met omschrijving ":description" niet splitsen, want deze bevat meerdere bronrekeningen.', 'cannot_edit_multiple_dest' => 'Je kan transactie #:id met omschrijving ":description" niet wijzigen, want deze bevat meerdere doelrekeningen.', - 'cannot_edit_reconciled' => 'U kunt transactie #:id met omschrijving ": description" niet bewerken omdat deze is gemarkeerd als afgestemd (verrekend).', + 'cannot_edit_reconciled' => 'Je kunt transactie #:id met omschrijving ":description" niet bewerken omdat deze is gemarkeerd als afgestemd (verrekend).', 'cannot_edit_opening_balance' => 'Je kan het startsaldo van een rekening niet wijzigen via dit scherm.', 'no_edit_multiple_left' => 'Je hebt geen geldige transacties geselecteerd.', 'cannot_convert_split_journal' => 'Kan geen gesplitste transactie omzetten', @@ -1054,49 +1080,16 @@ return [ // import bread crumbs and titles: 'import' => 'Import', 'import_data' => 'Importeer data', + 'import_general_index_file' => 'Importeer een bestand', + 'import_from_bunq' => 'Importeer uit bunq', + 'import_using_spectre' => 'Importeer via Spectre', + 'import_using_plaid' => 'Importeer via Plaid', + 'import_config_bread_crumb' => 'Instellen van je import', // import index page: 'import_index_title' => 'Gegevens importeren in Firefly III', 'import_index_sub_title' => 'Index', 'import_general_index_intro' => 'Dit is de import-routine van Firefly. Er zijn verschillende manieren om gegevens te importeren in Firefly III, hier als knoppen weergegeven.', - 'import_general_index_csv_file' => 'Importeer een (CSV) bestand', - 'import_index_intro' => 'Deze pagina\'s helpen je bestanden van je bank te importeren in Firefly III. Gebruik de hulp-pagina\'s linksboven voor meer informatie.', - 'import_index_file' => 'Selecteer je bestand', - 'import_index_config' => 'Als je eerder gegevens hebt geïmporteerd in Firefly III, heb je wellicht een configuratiebestand, dat een aantal zaken alvast voor je kan instellen. Voor bepaalde banken hebben andere gebruikers uit de liefde van hun hart het benodigde configuratiebestand gedeeld.', - 'import_index_type' => 'Selecteer het type bestand dat je zal uploaden', - 'import_index_start' => 'Start met importeren', - 'import_file' => 'Importeer een bestand', - - // supported file types: - 'import_file_type_csv' => 'CSV (kommagescheiden waardes)', - - // import configuration routine: - 'import_config_sub_title' => 'Instellen van je gegevensbestand', - 'import_config_bread_crumb' => 'Instellen van je gegevensbestand', - - // import status page: - 'import_status_bread_crumb' => 'Status van importeren', - 'import_status_sub_title' => 'Status van importeren', - 'import_status_wait_title' => 'Momentje...', - 'import_status_wait_text' => 'Dit vak verdwijnt zometeen.', - 'import_status_ready_title' => 'De import is klaar om te beginnen', - 'import_status_ready_text' => 'De import kan beginnen. Alle configuratie is opgeslagen. Download dit bestand. Het kan schelen als je de import opnieuw moet doen. Om daadwerkelijk te beginnen, gebruik je of het commando in je console, of de website. Afhankelijk van hoe je Firefly III hebt ingesteld, geeft de console-methode meer feedback.', - 'import_status_ready_config' => 'Download importconfiguratie', - 'import_status_ready_start' => 'Start importeren', - 'import_status_ready_share' => 'Overweeg om je configuratiebestand te downloaden en te delen op de configuratiebestand-wiki. Hiermee kan je het andere Firefly III gebruikers weer makkelijker maken.', - 'import_status_running_title' => 'De import is bezig', - 'import_status_running_placeholder' => 'Wacht even voor een update...', - 'import_status_errors_title' => 'Fouten tijdens het importeren', - 'import_status_errors_single' => 'Er is een niet-fatale fout opgetreden tijdens het importeren.', - 'import_status_errors_multi' => 'Er zijn een aantal niet-fatale fouten opgetreden tijdens het importeren.', - 'import_status_fatal_title' => 'Er is een fatale fout opgetreden', - 'import_status_fatal_text' => 'Een fatale fout opgetreden, waar de import-routine niet van terug heeft. Zie de uitleg in het rood hieronder.', - 'import_status_fatal_more' => 'Als de fout een time-out is, zal de import-routine halverwege gestopt zijn. Bij bepaalde serverconfiguraties is het alleen maar de server die gestopt terwijl de import-routine op de achtergrond doorloopt. Controleer de logboekbestanden om te zien wat er aan de hand is. Als het probleem zich blijft voordoen, gebruik dan de command-line opdracht.', - 'import_status_finished_title' => 'Importeren is klaar', - 'import_status_finished_text' => 'Je gegevensbestand is geïmporteerd.', - 'import_status_finished_job' => 'De geimporteerde transacties kan je vinden onder tag :tag.', - 'import_status_job_running' => 'De import is bezig...', - 'import_with_key' => 'Import met code \':key\'', // sandstorm.io errors and messages: 'sandstorm_not_available' => 'Deze functie werkt niet als je Firefly III gebruikt in combinatie met Sandstorm.IO.', @@ -1146,6 +1139,4 @@ return [ 'no_bills_intro_default' => 'Je hebt nog geen contracten. Je kan contracten gebruiken om terugkerende uitgaven bij te houden, zoals de huur of verzekeringen.', 'no_bills_imperative_default' => 'Heb je zulke uitgaven? Maak dan een contract en houd de betalingen bij:', 'no_bills_create_default' => 'Maak een contract', - - ]; diff --git a/resources/lang/nl_NL/form.php b/resources/lang/nl_NL/form.php index 6e395b39b1..b85de3dd06 100644 --- a/resources/lang/nl_NL/form.php +++ b/resources/lang/nl_NL/form.php @@ -1,18 +1,26 @@ . */ +declare(strict_types=1); return [ - // new user: 'bank_name' => 'Banknaam', 'bank_balance' => 'Saldo', @@ -80,7 +88,6 @@ return [ 'convert_Deposit' => 'Verander inkomsten', 'convert_Transfer' => 'Verander overschrijving', - 'amount' => 'Bedrag', 'date' => 'Datum', 'interest_date' => 'Rentedatum', @@ -162,6 +169,7 @@ return [ 'budget_keep_transactions' => 'De transactie verbonden aan dit budget blijft bewaard.|De :count transacties verbonden aan dit budget blijven bewaard.', 'category_keep_transactions' => 'De transactie verbonden aan deze categorie blijft bewaard.|De :count transacties verbonden aan deze categorie blijven bewaard.', 'tag_keep_transactions' => 'De transactie verbonden aan deze tag blijft bewaard.|De :count transacties verbonden aan deze tag blijven bewaard.', + 'check_for_updates' => 'Op updates controleren', 'email' => 'E-mailadres', 'password' => 'Wachtwoord', @@ -169,13 +177,11 @@ return [ 'blocked' => 'Is geblokkeerd?', 'blocked_code' => 'Reden voor blokkade', - // admin 'domain' => 'Domein', 'single_user_mode' => 'Registratie uitgeschakelen', 'is_demo_site' => 'Is demo website', - // import 'import_file' => 'Importbestand', 'configuration_file' => 'Configuratiebestand', @@ -186,7 +192,12 @@ return [ 'csv_delimiter' => 'CSV scheidingsteken', 'csv_import_account' => 'Standaard rekening voor importeren', 'csv_config' => 'Configuratiebestand', - + 'client_id' => 'Client ID', + 'service_secret' => 'Service secret', + 'app_secret' => 'App secret', + 'public_key' => 'Publieke sleutel', + 'country_code' => 'Landcode', + 'provider_code' => 'Bank of gegevensprovider', 'due_date' => 'Vervaldatum', 'payment_date' => 'Betalingsdatum', diff --git a/resources/lang/nl_NL/import.php b/resources/lang/nl_NL/import.php new file mode 100644 index 0000000000..633d1bb239 --- /dev/null +++ b/resources/lang/nl_NL/import.php @@ -0,0 +1,163 @@ +. + */ +declare(strict_types=1); + +return [ + // status of import: + 'status_wait_title' => 'Momentje...', + 'status_wait_text' => 'Dit vak verdwijnt zometeen.', + 'status_fatal_title' => 'Er is een fatale fout opgetreden', + 'status_fatal_text' => 'Een fatale fout opgetreden, waar de import-routine niet van terug heeft. Zie de uitleg in het rood hieronder.', + 'status_fatal_more' => 'Als de fout een time-out is, zal de import-routine halverwege gestopt zijn. Bij bepaalde serverconfiguraties is het alleen maar de server die gestopt terwijl de import-routine op de achtergrond doorloopt. Controleer de logboekbestanden om te zien wat er aan de hand is. Als het probleem zich blijft voordoen, gebruik dan de command-line opdracht.', + 'status_ready_title' => 'De import is klaar om te beginnen', + 'status_ready_text' => 'De import kan beginnen. Alle configuratie is opgeslagen. Download dit bestand. Het kan schelen als je de import opnieuw moet doen. Om daadwerkelijk te beginnen, gebruik je of het commando in je console, of de website. Afhankelijk van hoe je Firefly III hebt ingesteld, geeft de console-methode meer feedback.', + 'status_ready_noconfig_text' => 'De import kan beginnen. Alle configuratie is opgeslagen. Om daadwerkelijk te beginnen, gebruik je of het commando in je console, of de website. Afhankelijk van hoe je Firefly III hebt ingesteld, geeft de console-methode meer feedback.', + 'status_ready_config' => 'Download importconfiguratie', + 'status_ready_start' => 'Start importeren', + 'status_ready_share' => 'Overweeg om je configuratiebestand te downloaden en te delen op de configuratiebestand-wiki. Hiermee kan je het andere Firefly III gebruikers weer makkelijker maken.', + 'status_job_new' => 'De import is gloednieuw.', + 'status_job_configuring' => 'De import wordt geconfigureerd.', + 'status_job_configured' => 'De import is geconfigureerd.', + 'status_job_running' => 'De import is bezig.. Momentje..', + 'status_job_error' => 'De import heeft een fout gegenereerd.', + 'status_job_finished' => 'Het importeren is voltooid!', + 'status_running_title' => 'De import is bezig', + 'status_running_placeholder' => 'Wacht even voor een update...', + 'status_finished_title' => 'Importeren is klaar', + 'status_finished_text' => 'De import is klaar.', + 'status_errors_title' => 'Fouten tijdens het importeren', + 'status_errors_single' => 'Er is een niet-fatale fout opgetreden tijdens het importeren.', + 'status_errors_multi' => 'Er zijn een aantal niet-fatale fouten opgetreden tijdens het importeren.', + 'status_bread_crumb' => 'Status van importeren', + 'status_sub_title' => 'Status van importeren', + 'config_sub_title' => 'Instellen van je import', + 'status_finished_job' => 'De geimporteerde transacties kan je vinden onder tag :tag.', + 'import_with_key' => 'Import met code \':key\'', + + // file, upload something + 'file_upload_title' => 'Importinstellingen (1/4) - Upload je bestand', + 'file_upload_text' => 'Deze pagina\'s helpen je bestanden van je bank te importeren in Firefly III. Gebruik de hulp-pagina\'s linksboven voor meer informatie.', + 'file_upload_fields' => 'Velden', + 'file_upload_help' => 'Selecteer je bestand', + 'file_upload_config_help' => 'Als je eerder gegevens hebt geïmporteerd in Firefly III, heb je wellicht een configuratiebestand, dat een aantal zaken alvast voor je kan instellen. Voor bepaalde banken hebben andere gebruikers uit de liefde van hun hart het benodigde configuratiebestand gedeeld', + 'file_upload_type_help' => 'Selecteer het type bestand dat je zal uploaden', + 'file_upload_submit' => 'Bestanden uploaden', + + // file, upload types + 'import_file_type_csv' => 'CSV (kommagescheiden waardes)', + + // file, initial config for CSV + 'csv_initial_title' => 'Importinstellingen (2/4) - Algemene CVS importinstellingen', + 'csv_initial_text' => 'Om je bestand goed te kunnen importeren moet je deze opties verifiëren.', + 'csv_initial_box' => 'Algemene CVS importinstellingen', + 'csv_initial_box_title' => 'Algemene CVS importinstellingen', + 'csv_initial_header_help' => 'Vink hier als de eerste rij kolomtitels bevat.', + 'csv_initial_date_help' => 'Datum/tijd formaat in jouw CSV bestand. Volg het formaat zoals ze het op deze pagina uitleggen. Het standaardformaat ziet er zo uit: :dateExample.', + 'csv_initial_delimiter_help' => 'Kies het veldscheidingsteken dat in jouw bestand wordt gebruikt. Als je het niet zeker weet, is de komma de beste optie.', + 'csv_initial_import_account_help' => 'Als jouw CSV bestand geen referenties bevat naar jouw rekening(en), geef dan hier aan om welke rekening het gaat.', + 'csv_initial_submit' => 'Ga verder met stap 3/4', + + // file, new options: + 'file_apply_rules_title' => 'Regels toepassen', + 'file_apply_rules_description' => 'Past regels toe tijdens de import. Dit vertraagt de import behoorlijk.', + 'file_match_bills_title' => 'Match contracten', + 'file_match_bills_description' => 'Checkt of bestaande contracten matchen met nieuwe uitgaves. Dit vertraagt de import behoorlijk.', + + // file, roles config + 'csv_roles_title' => 'Importinstellingen (3/4) - rol van elke kolom definiëren', + 'csv_roles_text' => 'Elke kolom in je CSV-bestand bevat bepaalde gegevens. Gelieve aan te geven wat voor soort gegevens de import-routine kan verwachten. De optie "maak een link" betekent dat u elke vermelding in die kolom linkt aan een waarde uit je database. Een vaak gelinkte kolom is die met de IBAN-code van de tegenrekening. Die kan je dan linken aan de IBAN in jouw database.', + 'csv_roles_table' => 'Tabel', + 'csv_roles_column_name' => 'Kolomnaam', + 'csv_roles_column_example' => 'Voorbeeldgegevens', + 'csv_roles_column_role' => 'Kolomrol', + 'csv_roles_do_map_value' => 'Maak een link', + 'csv_roles_column' => 'Kolom', + 'csv_roles_no_example_data' => 'Geen voorbeeldgegevens', + 'csv_roles_submit' => 'Ga verder met stap 4/4', + 'csv_roles_warning' => 'Geef minstens de kolom aan waar het bedrag in staat. Als het even kan, ook een kolom voor de omschrijving, datum en de andere rekening.', + + // file, map data + 'file_map_title' => 'Importinstellingen (4/4) - Link importgegevens aan Firefly III-gegevens', + 'file_map_text' => 'In deze tabellen is de linkerwaarde een waarde uit je CSV bestand. Jij moet de link leggen, als mogelijk, met een waarde uit jouw database. Firefly houdt zich hier aan. Als er geen waarde is, selecteer dan ook niets.', + 'file_map_field_value' => 'Veldwaarde', + 'file_map_field_mapped_to' => 'Gelinkt aan', + 'map_do_not_map' => '(niet linken)', + 'file_map_submit' => 'Start importeren', + + // map things. + 'column__ignore' => '(negeer deze kolom)', + 'column_account-iban' => 'Betaalrekening (IBAN)', + 'column_account-id' => 'Betaalrekening (ID gelijk aan Firefly)', + 'column_account-name' => 'Betaalrekeningnaam', + 'column_amount' => 'Bedrag', + 'column_amount_debit' => 'Bedrag (debetkolom)', + 'column_amount_credit' => 'Bedrag (creditkolom)', + 'column_amount-comma-separated' => 'Bedrag (komma as decimaalscheidingsteken)', + 'column_bill-id' => 'Contract (ID gelijk aan Firefly)', + 'column_bill-name' => 'Contractnaam', + 'column_budget-id' => 'Budget (ID gelijk aan Firefly)', + 'column_budget-name' => 'Budgetnaam', + 'column_category-id' => 'Categorie (ID gelijk aan Firefly)', + 'column_category-name' => 'Categorienaam', + 'column_currency-code' => 'Valutacode (ISO 4217)', + 'column_currency-id' => 'Valuta (ID gelijk aan Firefly)', + 'column_currency-name' => 'Valutanaam', + 'column_currency-symbol' => 'Valutasymbool', + 'column_date-interest' => 'Datum (renteberekening)', + 'column_date-book' => 'Datum (boeking)', + 'column_date-process' => 'Datum (verwerking)', + 'column_date-transaction' => 'Datum', + 'column_description' => 'Omschrijving', + 'column_opposing-iban' => 'Tegenrekening (IBAN)', + 'column_opposing-id' => 'Tegenrekening (ID gelijk aan Firefly)', + 'column_external-id' => 'Externe ID', + 'column_opposing-name' => 'Tegenrekeningnaam', + 'column_rabo-debit-credit' => 'Rabobankspecifiek bij/af indicator', + 'column_ing-debit-credit' => 'ING-specifieke bij/af indicator', + 'column_sepa-ct-id' => 'SEPA end-to-end transactienummer', + 'column_sepa-ct-op' => 'SEPA tegenrekeningnummer', + 'column_sepa-db' => 'SEPA "direct debet"-nummer', + 'column_tags-comma' => 'Tags (kommagescheiden)', + 'column_tags-space' => 'Tags (spatiegescheiden)', + 'column_account-number' => 'Betaalrekening (rekeningnummer)', + 'column_opposing-number' => 'Tegenrekening (rekeningnummer)', + 'column_note' => 'Opmerking(en)', + + // prerequisites + 'prerequisites' => 'Vereisten', + + // bunq + 'bunq_prerequisites_title' => 'Voorwaarden voor een import van bunq', + 'bunq_prerequisites_text' => 'Om transacties bij bunq te importeren heb je een API sleutel nodig. Dit kan via de app.', + + // Spectre + 'spectre_title' => 'Importeer via Spectre', + 'spectre_prerequisites_title' => 'Voorwaarden voor een import via Spectre', + 'spectre_prerequisites_text' => 'Als je gegevens wilt importeren via de Spectre API, moet je een aantal geheime codes bezitten. Ze zijn te vinden op de secrets pagina.', + 'spectre_enter_pub_key' => 'Het importeren werkt alleen als je deze publieke sleutel op uw security pagina invoert.', + 'spectre_select_country_title' => 'Selecteer een land', + 'spectre_select_country_text' => 'Firefly III bevat een groot aantal banken en sites waaruit Spectre transactiegegevens voor je kan downloaden. Deze banken zijn gesorteerd per land. Let op: er is een "Fake Country" voor wanneer je dingen wilt testen. Als je uit andere financiële apps wilt importeren, gebruik dan het denkbeeldige land "Andere financiële applicaties". In Spectre kun je standaard alleen gegevens van nep-banken downloaden. Zorg ervoor dat je status "Live" is op je Dashboard als je wilt downloaden van echte banken.', + 'spectre_select_provider_title' => 'Selecteer een bank', + 'spectre_select_provider_text' => 'Spectre ondersteunt de volgende banken of financiële apps onder :country. Kies degene waaruit je wilt importeren.', + 'spectre_input_fields_title' => 'Verplichte velden', + 'spectre_input_fields_text' => 'De volgende velden zijn verplicht voor ":provider" (uit :country).', + 'spectre_instructions_english' => 'Deze instructies worden door Spectre verstrekt. Ze zijn in het Engels:', +]; diff --git a/resources/lang/nl_NL/intro.php b/resources/lang/nl_NL/intro.php index b175eac5be..e51c843e37 100644 --- a/resources/lang/nl_NL/intro.php +++ b/resources/lang/nl_NL/intro.php @@ -1,13 +1,24 @@ . */ +declare(strict_types=1); return [ // index diff --git a/resources/lang/nl_NL/list.php b/resources/lang/nl_NL/list.php index 2678a80cd3..f0f84251eb 100644 --- a/resources/lang/nl_NL/list.php +++ b/resources/lang/nl_NL/list.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'buttons' => 'Knoppen', @@ -25,7 +34,7 @@ return [ 'currentBalance' => 'Huidig saldo', 'active' => 'Actief?', 'lastActivity' => 'Laatste activiteit', - 'balanceDiff' => 'Saldoverschil tussen :start en :end', + 'balanceDiff' => 'Saldoverschil', 'matchesOn' => 'Wordt herkend', 'account_type' => 'Accounttype', 'created_at' => 'Gemaakt op', diff --git a/resources/lang/nl_NL/pagination.php b/resources/lang/nl_NL/pagination.php index 82de8727a0..d463290e50 100644 --- a/resources/lang/nl_NL/pagination.php +++ b/resources/lang/nl_NL/pagination.php @@ -1,19 +1,26 @@ . */ +declare(strict_types=1); return [ - 'previous' => '« Vorige', 'next' => 'Volgende »', - ]; diff --git a/resources/lang/nl_NL/passwords.php b/resources/lang/nl_NL/passwords.php index 83ed725b7d..089589d0fa 100644 --- a/resources/lang/nl_NL/passwords.php +++ b/resources/lang/nl_NL/passwords.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'password' => 'Wachtwoorden moeten zes karakters lang zijn, en natuurlijk 2x hetzelfde invoeren.', diff --git a/resources/lang/nl_NL/validation.php b/resources/lang/nl_NL/validation.php index de20c75a0c..f33540d621 100644 --- a/resources/lang/nl_NL/validation.php +++ b/resources/lang/nl_NL/validation.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'iban' => 'Dit is niet een geldige IBAN.', diff --git a/resources/lang/pl_PL/auth.php b/resources/lang/pl_PL/auth.php index a743bd1901..4dd2d48fa1 100644 --- a/resources/lang/pl_PL/auth.php +++ b/resources/lang/pl_PL/auth.php @@ -1,18 +1,26 @@ . */ +declare(strict_types=1); return [ - /* |-------------------------------------------------------------------------- | Authentication Language Lines @@ -26,5 +34,4 @@ return [ 'failed' => 'Te poÅ›wiadczenia nie zgadzajÄ… siÄ™ z naszymi danymi.', 'throttle' => 'Zbyt wiele prób logowania. Spróbuj ponownie za :seconds sekund.', - ]; diff --git a/resources/lang/pl_PL/bank.php b/resources/lang/pl_PL/bank.php index 7f2f4c5db0..ef0d636f91 100644 --- a/resources/lang/pl_PL/bank.php +++ b/resources/lang/pl_PL/bank.php @@ -1,8 +1,24 @@ . + */ declare(strict_types=1); - return [ - 'bunq_prerequisites_title' => 'Wymagania wstÄ™pne dotyczÄ…ce importowania z bunq', - 'bunq_prerequisites_text' => 'Aby zaimportować dane z bunq, musisz uzyskać klucz API. Możesz to zrobić za poÅ›rednictwem aplikacji.', ]; diff --git a/resources/lang/pl_PL/breadcrumbs.php b/resources/lang/pl_PL/breadcrumbs.php index 8f05e92cee..942d10c8ed 100644 --- a/resources/lang/pl_PL/breadcrumbs.php +++ b/resources/lang/pl_PL/breadcrumbs.php @@ -1,16 +1,24 @@ . */ +declare(strict_types=1); return [ 'home' => 'Strona główna', @@ -21,6 +29,7 @@ return [ 'preferences' => 'Preferencje', 'profile' => 'Profil', 'changePassword' => 'ZmieÅ„ swoje hasÅ‚o', + 'change_email' => 'ZmieÅ„ swój adres e-mail', 'bills' => 'Rachunki', 'newBill' => 'Nowy rachunek', 'edit_bill' => 'Modyfikuj rachunek ":name"', @@ -31,12 +40,12 @@ return [ 'deposit_list' => 'Przychody, dochody oraz depozyty', 'transfer_list' => 'Transfery', 'transfers_list' => 'Transfery', - 'reconciliation_list' => 'Reconciliations', + 'reconciliation_list' => 'Rozrachunki', 'create_withdrawal' => 'Utwórz nowÄ… wypÅ‚atÄ™', 'create_deposit' => 'Utwórz nowÄ… wpÅ‚atÄ™', 'create_transfer' => 'Utwórz nowy transfer', 'edit_journal' => 'Modyfikuj transakcjÄ™ ":description"', - 'edit_reconciliation' => 'Edit ":description"', + 'edit_reconciliation' => 'Edytuj ":description"', 'delete_journal' => 'UsuÅ„ transakcjÄ™ ":description"', 'tags' => 'Tagi', 'createTag' => 'Utwórz nowy tag', diff --git a/resources/lang/pl_PL/config.php b/resources/lang/pl_PL/config.php index 526668d33e..1dabe6d74c 100644 --- a/resources/lang/pl_PL/config.php +++ b/resources/lang/pl_PL/config.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'locale' => 'pl, Polish, polski, pl_PL, pl_PL.utf8, pl_PL.UTF-8', @@ -21,5 +30,4 @@ return [ 'quarter_of_year' => '%B %Y', 'year' => '%Y', 'half_year' => '%B %Y', - ]; diff --git a/resources/lang/pl_PL/csv.php b/resources/lang/pl_PL/csv.php index c78ddf0f9e..d61316b632 100644 --- a/resources/lang/pl_PL/csv.php +++ b/resources/lang/pl_PL/csv.php @@ -1,91 +1,24 @@ . */ - declare(strict_types=1); return [ - - // initial config - 'initial_title' => 'Konfiguracja importu (1/3) - Podstawowa konfiguracja importu CSV', - 'initial_text' => 'AbyÅ› mógÅ‚ poprawnie zaimportować plik, sprawdź poprawność poniższych opcji.', - 'initial_box' => 'Podstawowa konfiguracja importu CSV', - 'initial_box_title' => 'Podstawowe opcje konfiguracji importu CSV', - 'initial_header_help' => 'Zaznacz to pole, jeÅ›li pierwszy wiersz w pliku CSV to nazwy kolumn.', - 'initial_date_help' => 'Format daty i czasu w pliku CSV. Format powinien być zgodny z opisem na tej stronie. Wartość domyÅ›lna bÄ™dzie analizować daty, które wyglÄ…dajÄ… nastÄ™pujÄ…co: :dateExample.', - 'initial_delimiter_help' => 'Wybierz separator pola, który jest używany w pliku wejÅ›ciowym. JeÅ›li nie jesteÅ› pewien, przecinek jest najbezpieczniejszym rozwiÄ…zaniem.', - 'initial_import_account_help' => 'JeÅ›li plik CSV NIE zawiera informacji na temat Twojego konta aktywów, skorzystaj z tego menu rozwijanego, aby wybrać, do którego konta należą transakcje z CSV.', - 'initial_submit' => 'Przejdź do kroku 2/3', - - // new options: - 'apply_rules_title' => 'Apply rules', - 'apply_rules_description' => 'Apply your rules. Note that this slows the import significantly.', - 'match_bills_title' => 'Match bills', - 'match_bills_description' => 'Match your bills to newly created withdrawals. Note that this slows the import significantly.', - - // roles config - 'roles_title' => 'Konfiguracja importu (2/3) - OkreÅ›l rolÄ™ każdej z kolumn', - 'roles_text' => 'Każda kolumna w pliku CSV zawiera pewne dane. ProszÄ™ podać, jakich danych importer powinien oczekiwać. Opcja "mapowania" oznacza powiÄ…zanie każdego wpisu znalezionego w kolumnie z wartoÅ›ciÄ… w bazie danych. CzÄ™sto mapowanÄ… kolumnÄ… jest kolumna, która zawiera IBAN przeciwnego konta. Można to Å‚atwo dopasować do obecnego w bazie danych IBAN.', - 'roles_table' => 'Tabela', - 'roles_column_name' => 'Nazwa kolumny', - 'roles_column_example' => 'PrzykÅ‚adowe dane w kolumnie', - 'roles_column_role' => 'Znaczenie danych w kolumnie', - 'roles_do_map_value' => 'Zmapuj te wartoÅ›ci', - 'roles_column' => 'Kolumna', - 'roles_no_example_data' => 'Brak przykÅ‚adowych danych', - 'roles_submit' => 'Przejdź do kroku 3/3', - 'roles_warning' => 'At the very least, mark one column as the amount-column. It is advisable to also select a column for the description, date and the opposing account.', - - // map data - 'map_title' => 'Konfiguracja importu (3/3) - Połącz importowane dane z danymi w Firefly III', - '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.', - 'map_field_value' => 'Wartość pola', - 'map_field_mapped_to' => 'Zmapowane na', - 'map_do_not_map' => '(nie mapuj)', - 'map_submit' => 'Rozpocznij Importowanie', - - // map things. - 'column__ignore' => '(ignoruj tÄ™ kolumnÄ™)', - 'column_account-iban' => 'Konto aktywów (IBAN)', - 'column_account-id' => 'ID konta aktywów (taki sam jak w Firefly)', - 'column_account-name' => 'Konto aktywów (nazwa)', - 'column_amount' => 'Kwota', - 'column_amount_debet' => 'Amount (debet column)', - 'column_amount_credit' => 'Amount (credit column)', - 'column_amount-comma-separated' => 'Kwota (przecinek jako separator dziesiÄ™tny)', - 'column_bill-id' => 'ID rachunku (taki sam jak w Firefly)', - 'column_bill-name' => 'Nazwa rachunku', - 'column_budget-id' => 'ID budżetu (taki sam jak w Firefly)', - 'column_budget-name' => 'Nazwa budżetu', - 'column_category-id' => 'ID kategorii (taki sam jak w Firefly)', - 'column_category-name' => 'Nazwa kategorii', - 'column_currency-code' => 'Kod waluty (ISO 4217)', - 'column_currency-id' => 'ID waluty (taki sam jak w Firefly)', - 'column_currency-name' => 'Nazwa waluty (taka sama jak w Firefly)', - 'column_currency-symbol' => 'Symbol waluty (taki sam jak w Firefly)', - 'column_date-interest' => 'Data naliczenia odsetek', - 'column_date-book' => 'Data ksiÄ™gowania transakcji', - 'column_date-process' => 'Transaction process date', - 'column_date-transaction' => 'Data', - 'column_description' => 'Opis', - 'column_opposing-iban' => 'Opposing account (IBAN)', - 'column_opposing-id' => 'Opposing account ID (matching Firefly)', - 'column_external-id' => 'ZewnÄ™trzne 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' => 'Tagi (oddzielone przecinkami)', - 'column_tags-space' => 'Tagi (oddzielone spacjami)', - 'column_account-number' => 'Konto aktywów (numer konta)', - 'column_opposing-number' => 'Opposing account (account number)', ]; diff --git a/resources/lang/pl_PL/demo.php b/resources/lang/pl_PL/demo.php index 094bff01a7..94833ad8f1 100644 --- a/resources/lang/pl_PL/demo.php +++ b/resources/lang/pl_PL/demo.php @@ -1,26 +1,37 @@ . */ +declare(strict_types=1); return [ - 'no_demo_text' => 'Sorry, there is no extra demo-explanation text for this page.', + 'no_demo_text' => 'Niestety, nie ma dodatkowego tekstu wyjaÅ›niajÄ…cego demo dla tej strony.', 'see_help_icon' => 'Jednakże ikona w prawym górnym rogu może powiedzieć Ci wiÄ™cej.', 'index' => 'Witaj w Firefly III! Na tej stronie znajduje siÄ™ szybki przeglÄ…d Twoich finansów. Aby uzyskać wiÄ™cej informacji sprawdź Konta → Konta aktywów oraz oczywiÅ›cie strony Budżety oraz Raporty. Lub po prostu siÄ™ rozejrzyj i zobacz gdzie trafisz w koÅ„cu.', 'accounts-index' => 'Konta aktywów sÄ… Twoimi osobistymi kontami bankowymi. Konta wydatków to konta na które wydajesz pieniÄ…dze takie jak sklepy oraz przyjaciele. Kona przychodów sÄ… kontami, z których otrzymujesz pieniÄ…dze takie jak twoja praca, zwrot podatków lub inne źródÅ‚a przychodów. Na tej stronie możesz je modyfikować oraz usuwać.', - 'budgets-index' => 'This page shows you an overview of your budgets. The top bar shows the amount that is available to be budgeted. This can be customized for any period by clicking the amount on the right. The amount you\'ve actually spent is shown in the bar below. Below that are the expenses per budget and what you\'ve budgeted for them.', - 'reports-index-start' => 'Firefly III supports four types of reports. Read about them by clicking on the -icon in the top right corner.', - 'reports-index-examples' => 'Be sure to check out these examples: a monthly financial overview, a yearly financial overview and a budget overview.', - 'currencies-index' => 'Firefly III supports multiple currencies. Although it defaults to the Euro it can be set to the US Dollar and many other currencies. As you can see a small selection of currencies has been included but you can add your own if you wish to. Changing the default currency will not change the currency of existing transactions however: Firefly III supports the use of multiple currencies at the same time.', - 'transactions-index' => 'These expenses, deposits and transfers are not particularly imaginative. They have been generated automatically.', - 'piggy-banks-index' => 'As you can see, there are three piggy banks. Use the plus and minus buttons to influence the amount of money in each piggy bank. Click the name of the piggy bank to see the administration for each piggy bank.', - 'import-index' => 'Of course, any CSV file can be imported into Firefly III', - 'import-configure-security' => 'Because of security concerns, your upload has been replaced with a local file.', + 'budgets-index' => 'Ta strona zawiera przeglÄ…d budżetów. Górny pasek pokazuje kwotÄ™, która jest dostÄ™pna do budżetowania. Można jÄ… dostosować dla dowolnego okresu, klikajÄ…c kwotÄ™ po prawej stronie. Kwota, którÄ… faktycznie wydaÅ‚eÅ›, jest pokazana na pasku ponizej. Pod tym znajdujÄ… siÄ™ wydatki na budżet oraz co przeznaczyÅ‚eÅ› na nie.', + 'reports-index-start' => 'Firefly III obsÅ‚uguje wiele typów raportów. Możesz przeczytać o nich klikajÄ…c ikonÄ™ w prawym górnym rogu.', + 'reports-index-examples' => 'Sprawdź te przykÅ‚ady: miesiÄ™czny przeglÄ…d finansowy, roczny przeglÄ…d finansowy i przeglÄ…d budżetu.', + 'currencies-index' => 'Firefly obsÅ‚uguje wiele walut. Chociaż domyÅ›lnie jest to euro, można go ustawić na dolara amerykaÅ„skiego i wiele innych walut. Jak widać niewielki wybór walut zostaÅ‚ uwzglÄ™dniony, ale możesz dodać wÅ‚asne, jeÅ›li chcesz. Zmiana domyÅ›lnej waluty nie zmieni waluty istniejÄ…cych transakcji, jednak: Firefly III obsÅ‚uguje korzystanie z wielu walut w tym samym czasie.', + 'transactions-index' => 'Te wydatki, depozyty i transfery nie sÄ… szczególnie pomysÅ‚owe. ZostaÅ‚y wygenerowane automatycznie.', + 'piggy-banks-index' => 'Jak widać, istniejÄ… trzy skarbonki. Użyj przycisków plus i minus, aby wpÅ‚ynąć na ilość pieniÄ™dzy w każdej skarbonce. Kliknij nazwÄ™ skarbonki, aby zobaczyć administracjÄ™ każdej skarbonki.', + 'import-index' => 'OczywiÅ›cie każdy plik CSV można zaimportować do Firefly III', + 'import-configure-security' => 'Ze wzglÄ™dów bezpieczeÅ„stwa przesyÅ‚anie zostaÅ‚o zastÄ…pione lokalnym plikiem.', 'import-configure-configuration' => 'Konfiguracja, która widzisz poniżej jest prawidÅ‚owa dla lokalnego pliku.', ]; diff --git a/resources/lang/pl_PL/firefly.php b/resources/lang/pl_PL/firefly.php index 6709e20631..f61c03df21 100644 --- a/resources/lang/pl_PL/firefly.php +++ b/resources/lang/pl_PL/firefly.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ // general stuff: @@ -71,7 +80,7 @@ return [ 'source_accounts' => 'Konto(a) źródÅ‚owe', 'destination_accounts' => 'Konto(a) docelowe', 'user_id_is' => 'Twój identyfikator użytkownika to :user', - 'field_supports_markdown' => 'To pole obsÅ‚uguje Markdown.', + 'field_supports_markdown' => 'To pole obsÅ‚uguje Markdown.', 'need_more_help' => 'JeÅ›li potrzebujesz dodatkowej pomocy w korzystaniu z Firefly III, proszÄ™ opisz go w zgÅ‚oszeniu na Githubie.', 'reenable_intro_text' => 'Możesz także ponownie włączyć samouczek.', 'intro_boxes_after_refresh' => 'Samouczek pojawi siÄ™ po odÅ›wieżeniu strony.', @@ -89,7 +98,7 @@ return [ 'left_in_budget_limit' => 'Możliwe do wydania wg budżetu', 'current_period' => 'Bieżący okres', 'show_the_current_period_and_overview' => 'Pokaż bieżący okres oraz przeglÄ…d', - 'pref_languages_locale' => 'For a language other than English to work properly, your operating system must be equipped with the correct locale-information. If these are not present, currency data, dates and amounts may be formatted wrong.', + 'pref_languages_locale' => 'Aby jÄ™zyk inny niż angielski dziaÅ‚aÅ‚ poprawnie, twój system operacyjny musi być wyposażony w odpowiednie informacje o lokalizacji. JeÅ›li nie sÄ… one obecne, dane walutowe, daty i kwoty mogÄ… być źle sformatowane.', 'budget_in_period' => 'Wszystkie transakcje dla budżetu ":name" od :start do :end', 'chart_budget_in_period' => 'Wykres wszystkich transakcji dla budżetu ":name" od :start do :end', 'chart_account_in_period' => 'Wykres wszystkich transakcji dla konta ":name" od :start do :end', @@ -112,7 +121,7 @@ return [ 'transferred' => 'PrzesÅ‚ano', 'all_withdrawal' => 'Wszystkie wydatki', 'all_transactions' => 'Wszystkie transakcje', - 'title_withdrawal_between' => 'Wszystkie wydatki do :start do :koniec', + 'title_withdrawal_between' => 'Wszystkie wydatki do :start do :end', 'all_deposit' => 'Wszystkie przychody', 'title_deposit_between' => 'Wszystkie przychody do :start do :end', 'all_transfers' => 'Wszystkie transfery', @@ -133,6 +142,22 @@ return [ 'invalid_locale_settings' => 'Firefly III nie może sformatować kwot, ponieważ brakuje wymaganych pakietów na Twoim serwerze. Sprawdźinstrukcje jak je zainstalować (po angielsku).', 'quickswitch' => 'Szybki przełącznik', + // check for updates: + 'update_check_title' => 'Sprawdź aktualizacje', + 'admin_update_check_title' => 'Automatycznie sprawdzaj dostÄ™pność aktualizacji', + 'admin_update_check_explain' => 'Firefly III może automatycznie sprawdzać dostÄ™pność aktualizacji. Po włączeniu tej opcji bÄ™dzie kontaktować siÄ™ z Githubem w celu sprawdzenia czy dostÄ™pna jest nowa wersja Firefly III. Jeżeli bÄ™dzie, otrzymasz powiadomienie. Możesz przetestować to powiadomienie używajÄ…c przycisku po prawej stronie. Wskaż proszÄ™ czy chcesz, aby Firefly III sprawdzaÅ‚o dostÄ™pność aktualizacji.', + 'check_for_updates_permission' => 'Firefly III może sprawdzić dostÄ™pność aktualizacji, ale potrzebuje Twojej zgody, aby to robić. Przejdź do administracji, aby okreÅ›lić, czy ta funkcja ma być włączona.', + 'updates_ask_me_later' => 'Zapytaj mnie później', + 'updates_do_not_check' => 'Nie sprawdzaj dostÄ™pnoÅ›ci aktualizacji', + 'updates_enable_check' => 'Włącz sprawdzanie aktualizacji', + 'admin_update_check_now_title' => 'Sprawdź dostÄ™pność aktualizacji', + 'admin_update_check_now_explain' => 'JeÅ›li naciÅ›niesz przycisk, Firefly III sprawdzi, czy używasz najnowszej wersji.', + 'check_for_updates_button' => 'Sprawdź teraz!', + 'update_new_version_alert' => 'DostÄ™pna jest nowa wersja. Używasz wersji :your_version, najnowsza wersja to :new_version wydana :date.', + 'update_current_version_alert' => 'Używasz wersji :version, która jest najnowszÄ… dostÄ™pnÄ… wersjÄ….', + 'update_newer_version_alert' => 'Używasz wersji :your_version, która jest nowsza niż najnowsza wersja, :new_version.', + 'update_check_error' => 'WystÄ…piÅ‚ błąd podczas sprawdzania aktualizacji. Przejrzyj pliki dziennika.', + // search 'search' => 'Szukaj', 'search_query' => 'Zapytanie', @@ -159,24 +184,24 @@ return [ 'import_and_export' => 'Import / eksport', 'export_data' => 'Eksportuj dane', 'export_and_backup_data' => 'Eksport i kopia zapasowa', - 'export_data_intro' => 'For backup purposes, when migrating to another system or when migrating to another Firefly III installation.', + 'export_data_intro' => 'Do celów tworzenia kopii zapasowych, migracji do innego systemu lub migracji do innej instalacji Firefly III.', 'export_format' => 'Format eksportu', 'export_format_csv' => 'WartoÅ›ci oddzielone przecinkami (plik CSV)', 'export_format_mt940' => 'Format kompatybilny z MT940', - '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.', + 'include_old_uploads_help' => 'Firefly III nie wyrzuca oryginalnych plików CSV zaimportowanych w przeszÅ‚oÅ›ci. Możesz uwzglÄ™dnić je w eksporcie.', 'do_export' => 'Eksportuj', 'export_status_never_started' => 'Eksport nie zostaÅ‚ jeszcze rozpoczÄ™ty', '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_collecting_journals' => 'Zbieranie Twoich transakcji...', + 'export_status_collected_journals' => 'Zebrano twoje transakcje!', + 'export_status_converting_to_export_format' => 'Konwertowanie Twoich transakcji...', 'export_status_converted_to_export_format' => 'Przekonwertowano twoje transakcje!', 'export_status_creating_journal_file' => 'Tworzenie pliku eksportu...', 'export_status_created_journal_file' => 'Utworzono plik eksportu!', - 'export_status_collecting_attachments' => 'Collecting all your attachments...', + 'export_status_collecting_attachments' => 'Zbieram wszystkie Twoje załączniki...', 'export_status_collected_attachments' => 'Zebrano wszystkie twoje załączniki!', - 'export_status_collecting_old_uploads' => 'Collecting all your previous uploads...', - 'export_status_collected_old_uploads' => 'Collected all your previous uploads!', + 'export_status_collecting_old_uploads' => 'Zbieram Twoje wszystkie przesÅ‚ane pliki...', + 'export_status_collected_old_uploads' => 'Zebrano wszystkie poprzednie pliki!', 'export_status_creating_zip_file' => 'Tworzenie pliku zip...', 'export_status_created_zip_file' => 'Utworzono plik zip!', 'export_status_finished' => 'Eksport zostaÅ‚ pomyÅ›lnie zakoÅ„czony! Yay!', @@ -214,7 +239,7 @@ return [ 'default_rule_group_description' => 'Wszystkie twoje reguÅ‚y, które nie znajdujÄ… siÄ™ w okreÅ›lonej grupie.', 'default_rule_name' => 'Twoja pierwsza reguÅ‚a domyÅ›lna', 'default_rule_description' => 'Ta reguÅ‚a jest przykÅ‚adem. Możesz jÄ… bezpiecznie usunąć.', - 'default_rule_trigger_description' => 'The Man Who Sold the World', + 'default_rule_trigger_description' => 'CzÅ‚owiek, który sprzedaÅ‚ Å›wiat', 'default_rule_trigger_from_account' => 'David Bowie', 'default_rule_action_prepend' => 'KupiÅ‚ Å›wiat od ', 'default_rule_action_set_category' => 'Duże wydatki', @@ -343,7 +368,6 @@ return [ 'rule_action_set_notes_choice' => 'Ustaw notatki na..', 'rule_action_set_notes' => 'Ustaw notatki na ":action_value"', - 'rules_have_read_warning' => 'Czy przeczytaÅ‚eÅ› ostrzeżenie?', 'apply_rule_warning' => 'Ostrzeżenie: uruchomienie reguÅ‚y (lub grupy reguÅ‚) na dużej liczbie transakcji może potrwać wieki i może przekroczyć limit czasu. W takiej sytuacji reguÅ‚a (lub grupa reguÅ‚) zostanie zastosowana do nieznanego podzbioru Twoich transakcji. To może zostawić TwojÄ… administracjÄ™ finansowÄ… w strzÄ™pach. ProszÄ™, bÄ…dź ostrożny.', @@ -396,10 +420,10 @@ return [ 'pref_home_show_deposits' => 'Pokaż przychody na stronie domowej', 'pref_home_show_deposits_info' => 'Ekran główny pokazuje już konta wydatków. Czy chcesz wyÅ›wietlać również konta przychodów?', 'pref_home_do_show_deposits' => 'Tak, pokaż je', - 'successful_count' => 'of which :count successful', - 'transaction_page_size_title' => 'Rozmiar strony', - 'transaction_page_size_help' => 'Dowolna lista transakcji bÄ™dzie pokazywać maksymalnie tyle transakcji', - 'transaction_page_size_label' => 'Rozmiar strony', + 'successful_count' => 'z których :count zakoÅ„czone pomyÅ›lnie', + 'list_page_size_title' => 'Rozmiar strony', + 'list_page_size_help' => 'Każda lista rzeczy (konta, transakcje itp.) pokazuje co najwyżej tyle na stronÄ™.', + 'list_page_size_label' => 'Rozmiar strony', 'between_dates' => '(:start i :end)', 'pref_optional_fields_transaction' => 'Opcjonalne pola dla transakcji', 'pref_optional_fields_transaction_help' => 'DomyÅ›lnie nie wszystkie pola sÄ… aktywne podczas tworzenia nowej transakcji (aby uniknąć baÅ‚aganu). Poniżej możesz włączyć te pola, jeÅ›li uważasz, że mogÄ… one być przydatne dla Ciebie. OczywiÅ›cie każde pole, które jest wyłączone, ale już wypeÅ‚nione, bÄ™dzie widoczne niezależnie od ustawienia.', @@ -420,7 +444,6 @@ return [ 'optional_field_attachments' => 'Załączniki', 'optional_field_meta_data' => 'Opcjonalne metadane', - // profile: 'change_your_password' => 'ZmieÅ„ swoje hasÅ‚o', 'delete_account' => 'UsuÅ„ konto', @@ -452,12 +475,11 @@ return [ 'regenerate_access_token' => 'Wygeneruj nowy kod', 'token_regenerated' => 'Nowy kod dostÄ™powy zostaÅ‚ wygenerowany', 'change_your_email' => 'ZmieÅ„ swój adres e-mail', - 'email_verification' => 'An email message will be sent to your old AND new email address. For security purposes, you will not be able to login until you verify your new email address. If you are unsure if your Firefly III installation is capable of sending email, please do not use this feature. If you are an administrator, you can test this in the Administration.', + 'email_verification' => 'Wiadomość e-mail zostanie wysÅ‚ana na stary ORAZ nowy adres e-mail. Ze wzglÄ™dów bezpieczeÅ„stwa, nie bÄ™dziesz mógÅ‚ siÄ™ zalogować, dopóki nie zweryfikujesz nowego adresu e-mail. JeÅ›li nie masz pewnoÅ›ci, czy twoja instalacja Firefly III umożliwia wysyÅ‚anie wiadomoÅ›ci e-mail, nie korzystaj z tej funkcji. JeÅ›li jesteÅ› administratorem, możesz przetestować to w panelu administracyjnym.', 'email_changed_logout' => 'Dopóki nie zweryfikujesz swojego adresu e-mail, nie możesz siÄ™ zalogować.', 'login_with_new_email' => 'Teraz możesz logować siÄ™ nowym adresem e-mail.', 'login_with_old_email' => 'Teraz ponownie możesz logować siÄ™ starym adresem e-mail.', - // attachments 'nr_of_attachments' => 'Jeden załącznik |:count załączników', 'attachments' => 'Załączniki', @@ -556,21 +578,20 @@ return [ 'updated_budget' => 'Zmodyfikowano budżet ":name"', 'update_amount' => 'Aktualizuj kwotÄ™', 'update_budget' => 'Aktualizuj budżet', - 'update_budget_amount_range' => 'Update (expected) available amount between :start and :end', - 'budget_period_navigator' => 'Period navigator', + 'update_budget_amount_range' => 'Zaktualizuj (spodziewanÄ…) dostÄ™pnÄ… kwotÄ™ miÄ™dzy :start a :end', + 'budget_period_navigator' => 'Nawigator okresowy', 'info_on_available_amount' => 'Co mam do dyspozycji?', 'available_amount_indication' => 'Skorzystaj z tych kwot, aby uzyskać wskazówkÄ™ ile może wynosić Twój caÅ‚kowity budżet.', 'suggested' => 'Sugerowane', 'average_between' => 'Åšrednia pomiÄ™dzy :start a :end', - // bills: 'matching_on' => 'Pasuje do', 'between_amounts' => 'miÄ™dzy :low i :high.', 'repeats' => 'Powtarza siÄ™', 'connected_journals' => 'PowiÄ…zane transakcje', 'auto_match_on' => 'Automatycznie dopasowane przez Firefly', - 'auto_match_off' => 'Not automatically matched by Firefly', + 'auto_match_off' => 'Niedopasowane automatycznie przez Firefly', 'next_expected_match' => 'NastÄ™pne oczekiwane dopasowanie', 'delete_bill' => 'UsuÅ„ rachunek ":name"', 'deleted_bill' => 'UsuniÄ™to rachunek ":name"', @@ -588,7 +609,7 @@ return [ 'not_or_not_yet' => 'Nie (jeszcze)', 'not_expected_period' => 'Nie oczekiwany w tym okresie', 'bill_is_active' => 'Rachunek jest aktywny', - 'bill_expected_between' => 'Expected between :start and :end', + 'bill_expected_between' => 'Oczekiwano miÄ™dzy :start a :end', 'bill_will_automatch' => 'Rachunek bÄ™dzie automatycznie powiÄ…zany z pasujÄ…cymi transakcjami', 'skips_over' => 'pomija', @@ -620,26 +641,26 @@ return [ 'revenue_accounts' => 'Konta przychodów', 'cash_accounts' => 'Konta gotówkowe', 'Cash account' => 'Konto gotówkowe', - 'reconcile_account' => 'Reconcile account ":account"', - 'delete_reconciliation' => 'Delete reconciliation', - 'update_reconciliation' => 'Update reconciliation', - 'amount_cannot_be_zero' => 'The amount cannot be zero', - 'end_of_reconcile_period' => 'End of reconcile period: :period', - 'start_of_reconcile_period' => 'Start of reconcile period: :period', - 'start_balance' => 'Start balance', - 'end_balance' => 'End balance', - 'update_balance_dates_instruction' => 'Match the amounts and dates above to your bank statement, and press "Start reconciling"', - 'select_transactions_instruction' => 'Select the transactions that appear on your bank statement.', - 'select_range_and_balance' => 'First verify the date-range and balances. Then press "Start reconciling"', - 'date_change_instruction' => 'If you change the date range now, any progress will be lost.', - 'update_selection' => 'Update selection', - 'store_reconcile' => 'Store reconciliation', - 'reconciliation_transaction' => 'Reconciliation transaction', - 'Reconciliation' => 'Reconciliation', - 'reconciliation' => 'Reconciliation', - 'reconcile_options' => 'Reconciliation options', - 'reconcile_range' => 'Reconciliation range', - 'start_reconcile' => 'Start reconciling', + 'reconcile_account' => 'Uzgodnij konto ":account"', + 'delete_reconciliation' => 'UsuÅ„ uzgodnienie', + 'update_reconciliation' => 'Zaktualizuj uzgodnienie', + 'amount_cannot_be_zero' => 'Kwota nie może wynosić zero', + 'end_of_reconcile_period' => 'Koniec okresu uzgodnienia: :period', + 'start_of_reconcile_period' => 'PoczÄ…tek okresu uzgodnienia: :period', + 'start_balance' => 'Saldo poczÄ…tkowe', + 'end_balance' => 'Saldo koÅ„cowe', + 'update_balance_dates_instruction' => 'Dopasuj powyższe kwoty oraz daty do wyciÄ…gu bankowego i naciÅ›nij "Rozpocznij uzgadnianie"', + 'select_transactions_instruction' => 'Wybierz transakcje które pojawiajÄ… siÄ™ na wyciÄ…gu bankowym.', + 'select_range_and_balance' => 'Najpierw sprawdź zakres dat i salda. NastÄ™pnie naciÅ›nij "Rozpocznij uzgadnianie"', + 'date_change_instruction' => 'JeÅ›li teraz zmienisz zakres dat, jakikolwiek postÄ™p zostanie utracony.', + 'update_selection' => 'Zaktualizuj wybór', + 'store_reconcile' => 'Zapisz uzgodnienia', + 'reconciliation_transaction' => 'Transakcja uzgadniania', + 'Reconciliation' => 'Rozrachunek', + 'reconciliation' => 'Rozrachunek', + 'reconcile_options' => 'Opcje uzgadniania', + 'reconcile_range' => 'Zakres rozrachunku', + 'start_reconcile' => 'Rozpocznij uzgadnianie', 'cash' => 'gotówka', 'account_type' => 'Typ konta', 'save_transactions_by_moving' => 'Zapisz te transakcje, przenoszÄ…c je do innego konta:', @@ -653,22 +674,22 @@ return [ 'select_more_than_one_budget' => 'ProszÄ™ wybierz wiÄ™cej niż jeden budżet', 'select_more_than_one_tag' => 'ProszÄ™ wybierz wiÄ™cej niż jeden tag', 'account_default_currency' => 'JeÅ›li wybierzesz innÄ… walutÄ™, nowe transakcje z tego konta bÄ™dÄ… miaÅ‚y tÄ™ walutÄ™ wstÄ™pnie wybranÄ….', - 'reconcile_has_more' => 'Your Firefly III ledger has more money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".', - 'reconcile_has_less' => 'Your Firefly III ledger has less money in it than your bank claims you should have. There are several options. Please choose what to do. Then, press "Confirm reconciliation".', - 'reconcile_is_equal' => 'Your Firefly III ledger and your bank statements match. There is nothing to do. Please press "Confirm reconciliation" to confirm your input.', - 'create_pos_reconcile_transaction' => 'Clear the selected transactions, and create a correction adding :amount to this asset account.', - 'create_neg_reconcile_transaction' => 'Clear the selected transactions, and create a correction removing :amount from this asset account.', - 'reconcile_do_nothing' => 'Clear the selected transactions, but do not correct.', - 'reconcile_go_back' => 'You can always edit or delete a correction later.', - 'must_be_asset_account' => 'You can only reconcile asset accounts', - 'reconciliation_stored' => 'Reconciliation stored', - 'reconcilliation_transaction_title' => 'Reconciliation (:from to :to)', - 'reconcile_this_account' => 'Reconcile this account', - 'confirm_reconciliation' => 'Confirm reconciliation', - 'submitted_start_balance' => 'Submitted start balance', - 'selected_transactions' => 'Selected transactions (:count)', - 'already_cleared_transactions' => 'Already cleared transactions (:count)', - 'submitted_end_balance' => 'Submitted end balance', + 'reconcile_has_more' => 'Twoja ksiÄ™ga główna Firefly III ma wiÄ™cej pieniÄ™dzy niż bank twierdzi, że powinieneÅ› mieć. Istnieje kilka opcji. Wybierz, co zrobić. NastÄ™pnie naciÅ›nij "Potwierdź uzgodnienie".', + 'reconcile_has_less' => 'Twoja ksiÄ™ga główna Firefly III ma mniej pieniÄ™dzy niż bank twierdzi, że powinieneÅ› mieć. Istnieje kilka opcji. Wybierz, co zrobić. NastÄ™pnie naciÅ›nij "Potwierdź uzgodnienie".', + 'reconcile_is_equal' => 'Twoja ksiÄ™ga główna Firefly III i wyciÄ…gi bankowe sÄ… zgodne. Nie ma nic do zrobienia. NaciÅ›nij "Potwierdź uzgodnienie" aby potwierdzić twój wybór.', + 'create_pos_reconcile_transaction' => 'Oznacz wybrane transakcje jako uzgodnione i utwórz korektÄ™ dodajÄ…c :amount do tego konta aktywów.', + 'create_neg_reconcile_transaction' => 'Oznacz wybrane transakcje jako uzgodnione i utwórz korektÄ™ usuwajÄ…c :amount z tego konta aktywów.', + 'reconcile_do_nothing' => 'Oznacz wybrane transakcje jako uzgodnione, ale nic nie poprawiaj.', + 'reconcile_go_back' => 'Możesz zawsze zmodyfikować lub usunąć korektÄ™ później.', + 'must_be_asset_account' => 'Możesz uzgodnić tylko konta aktywów', + 'reconciliation_stored' => 'Uzgodnienie zapisane', + 'reconcilliation_transaction_title' => 'Uzgodnienie (:from do :to)', + 'reconcile_this_account' => 'Uzgodnij to konto', + 'confirm_reconciliation' => 'Potwierdź uzgodnienie', + 'submitted_start_balance' => 'PrzesÅ‚ane saldo poczÄ…tkowe', + 'selected_transactions' => 'Wybrane transakcje (:count)', + 'already_cleared_transactions' => 'Transakcje uzgodnione wczeÅ›niej (:count)', + 'submitted_end_balance' => 'PrzesÅ‚ane saldo koÅ„cowe', // categories: 'new_category' => 'Nowa kategoria', @@ -701,12 +722,15 @@ return [ 'deleted_transfer' => 'PomyÅ›lnie usuniÄ™to transfer ":description"', 'stored_journal' => 'PomyÅ›lnie utworzono nowÄ… transakcjÄ™ ":description"', 'select_transactions' => 'Wybierz transakcje', + 'rule_group_select_transactions' => 'Zastosuj ":title" do transakcji', + 'rule_select_transactions' => 'Zastosuj ":title" do transakcji', 'stop_selection' => 'PrzestaÅ„ wybierać transakcje', 'reconcile_selected' => 'Uzgodnij', 'mass_delete_journals' => 'UsuÅ„ wiele transakcji', 'mass_edit_journals' => 'Modyfikuj wiele transakcji', 'cannot_edit_other_fields' => 'Nie możesz masowo modyfikować innych pól niż te tutaj, ponieważ nie ma miejsca, aby je pokazać. ProszÄ™ użyć ikony edycji i edytować je jedno po drugim, jeÅ›li chcesz edytować te pola.', 'no_budget' => '(bez budżetu)', + 'no_budget_squared' => '(brak budżetu)', 'perm-delete-many' => 'Usuwanie wielu elementów jednoczeÅ›nie może być bardzo destrukcyjne. ProszÄ™ zachować ostrożność.', 'mass_deleted_transactions_success' => 'UsuniÄ™to :amount transakcjÄ™(i).', 'mass_edited_transactions_success' => 'Zaktualizowano :amount transakcjÄ™(i)', @@ -716,14 +740,13 @@ return [ 'opt_group_sharedAsset' => 'Współdzielone konta aktywów', 'opt_group_ccAsset' => 'Karty kredytowe', - // new user: 'welcome' => 'Witaj w Firefly!', 'submit' => 'PrzeÅ›lij', 'getting_started' => 'Pierwsze kroki', - 'to_get_started' => 'It is good to see you have successfully installed Firefly III. To get started with this tool please enter your bank\'s name and the balance of your main checking account. Do not worry yet if you have multiple accounts. You can add those later. It\'s just that Firefly III needs something to start with.', - 'savings_balance_text' => 'Firefly III will automatically create a savings account for you. By default, there will be no money in your savings account, but if you tell Firefly III the balance it will be stored as such.', - 'finish_up_new_user' => 'That\'s it! You can continue by pressing Submit. You will be taken to the index of Firefly III.', + 'to_get_started' => 'Dobrze, że udaÅ‚o ci siÄ™ zainstalować Firefly III. Aby rozpocząć korzystanie z tego narzÄ™dzia, wprowadź nazwÄ™ swojego banku i saldo głównego rachunku bieżącego. Nie martw siÄ™, jeÅ›li masz wiele kont. Możesz dodać je później. Po prostu Firefly III potrzebuje czegoÅ› na poczÄ…tek.', + 'savings_balance_text' => 'Firefly III automatycznie utworzy dla ciebie konto oszczÄ™dnoÅ›ciowe. DomyÅ›lnie na twoim koncie oszczÄ™dnoÅ›ciowym nie ma pieniÄ™dzy, ale jeÅ›li chcesz, Firefly III może je tam przechowywać.', + 'finish_up_new_user' => 'To wszystko! Możesz kontynuować, naciskajÄ…c Zatwierdź. Zostaniesz przeniesiony do strony głównej Firefly III.', 'stored_new_accounts_new_user' => 'Yay! Twoje nowe konta zostaÅ‚y zapisane.', // home page: @@ -764,6 +787,7 @@ return [ 'piggyBanks' => 'Skarbonki', 'bills' => 'Rachunki', 'withdrawal' => 'WypÅ‚ata', + 'opening_balance' => 'Saldo poczÄ…tkowe', 'deposit' => 'WpÅ‚ata', 'account' => 'Konto', 'transfer' => 'Transfer', @@ -786,6 +810,7 @@ return [ 'report_default' => 'DomyÅ›lny raport finansowy miÄ™dzy :start i :end', 'report_audit' => 'PrzeglÄ…d historii transakcji miÄ™dzy :start i :end', 'report_category' => 'Raport kategorii miÄ™dzy :start a :end', + 'report_account' => 'Raport dotyczÄ…cy wydatków/przychodów miÄ™dzy :start a :end', 'report_budget' => 'Raport budżetów miÄ™dzy :start a :end', 'report_tag' => 'Raport tagów miÄ™dzy :start a :end', 'quick_link_reports' => 'Szybkie linki', @@ -800,18 +825,18 @@ return [ 'accountBalances' => 'Salda kont', 'balanceStart' => 'Saldo na poczÄ…tku okresu', 'balanceEnd' => 'Saldo na koÅ„cu okresu', - 'splitByAccount' => 'Split by account', - 'coveredWithTags' => 'Covered with tags', - 'leftUnbalanced' => 'Left unbalanced', + 'splitByAccount' => 'Podziel wedÅ‚ug konta', + 'coveredWithTags' => 'ObjÄ™te tagami', + 'leftUnbalanced' => 'Pozostawiono niewyważone', 'leftInBudget' => 'PozostaÅ‚o w budżecie', 'sumOfSums' => 'Suma sum', 'noCategory' => '(bez kategorii)', - 'notCharged' => 'Not charged (yet)', + 'notCharged' => 'Brak opÅ‚aty (jeszcze)', 'inactive' => 'Nieaktywne', 'active' => 'Aktywne', 'difference' => 'Różnica', - 'in' => 'In', - 'out' => 'Out', + 'money_flowing_in' => 'PrzychodzÄ…ce', + 'money_flowing_out' => 'WychodzÄ…ce', 'topX' => 'top :number', 'show_full_list' => 'Pokaż całą listÄ™', 'show_only_top' => 'Show only top :number', @@ -821,13 +846,14 @@ return [ 'report_type_category' => 'Raport kategorii', 'report_type_budget' => 'Raport budżetów', 'report_type_tag' => 'Raport tagów', - '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_type_account' => 'Raport dotyczÄ…cy konta wydatków/przychodów', + 'more_info_help' => 'WiÄ™cej informacji na temat typów raportów można znaleźć na stronach pomocy. NaciÅ›nij ikonÄ™ (?) w prawym górnym rogu.', 'report_included_accounts' => 'UwzglÄ™dnione konta', 'report_date_range' => 'Zakres dat', 'report_preset_ranges' => 'Predefiniowane zakresy', 'shared' => 'UdostÄ™pnione', 'fiscal_year' => 'Rok podatkowy', - 'income_entry' => 'Dochód z konta ":nazwa" miÄ™dzy: :start a :end', + 'income_entry' => 'Dochód z konta ":name" miÄ™dzy: :start a :end', 'expense_entry' => 'Wydatki na konto ":name" miÄ™dzy :start a :end', 'category_entry' => 'Wydatki w kategorii ":name" miÄ™dzy :start i :end', 'budget_spent_amount' => 'Wydatki w budżecie ":budget" miÄ™dzy :start i :end', @@ -872,7 +898,10 @@ return [ 'account_role_ccAsset' => 'Karta kredytowa', 'budget_chart_click' => 'Kliknij na nazwÄ™ budżetu w tabeli powyżej, aby zobaczyć wykres.', 'category_chart_click' => 'Kliknij na nazwÄ™ kategorii w tabeli powyżej, aby zobaczyć wykres.', - + 'in_out_accounts' => 'Zarobione oraz wydane wg kombinacji', + 'in_out_per_category' => 'Zarobione oraz wydane wg kategorii', + 'out_per_budget' => 'Wydane wg budżetu', + 'select_expense_revenue' => 'Wybierz konto wydatków/przychodów', // charts: 'chart' => 'Wykres', @@ -884,7 +913,6 @@ return [ 'earned' => 'Zarobiono', 'overspent' => 'PrzepÅ‚acono', 'left' => 'PozostaÅ‚o', - 'no_budget' => '(no budget)', 'max-amount' => 'Maksymalna kwota', 'min-amount' => 'Minimalna kwota', 'journal-amount' => 'Faktyczna kwota', @@ -960,7 +988,7 @@ return [ 'setting_single_user_mode' => 'Tryb pojedynczego użytkownika', 'setting_single_user_mode_explain' => 'DomyÅ›lnie, Firefly III pozwala na jednego (1) użytkownika: Ciebie. Jest to Å›rodek bezpieczeÅ„stwa uniemożliwiajÄ…cy innym używanie Twojej instalacji, chyba że im pozwolisz. Kolejne rejestracje sÄ… zablokowane. Jeżeli odznaczysz to pole, inne osoby bÄ™dÄ… mogÅ‚y używać Twojej instalacji Firefly III (zakÅ‚adajÄ…c, że jest ona dostÄ™pna w Internecie).', 'store_configuration' => 'Zapisz konfiguracjÄ™', - 'single_user_administration' => 'User administration for :email', + 'single_user_administration' => 'Administracja użytkownika dla :email', 'edit_user' => 'Modyfikuj użytkownika :email', 'hidden_fields_preferences' => 'Nie wszystkie pola sÄ… teraz widoczne. Należy je włączyć w ustawieniach.', 'user_data_information' => 'Dane użytkownika', @@ -968,8 +996,7 @@ return [ 'total_size' => 'łączny rozmiar', 'budget_or_budgets' => 'budżet(y)', 'budgets_with_limits' => 'budżet(y) z okreÅ›lonÄ… kwotÄ…', - 'rule_or_rules' => 'reguÅ‚a(y)', - 'rulegroup_or_groups' => 'grupa(y) reguÅ‚', + 'nr_of_rules_in_total_groups' => ':count_rules reguÅ‚a(y) w :count_groups grupa(ch) reguÅ‚', 'tag_or_tags' => 'tag(ów)', 'configuration_updated' => 'Konfiguracja zostaÅ‚a zaktualizowana', 'setting_is_demo_site' => 'Strona demonstracyjna', @@ -983,10 +1010,10 @@ return [ 'updated_user' => 'Dane użytkownika zostaÅ‚y zmienione.', 'delete_user' => 'UsuÅ„ użytkownika :email', 'user_deleted' => 'Użytkownik zostaÅ‚ usuniÄ™ty', - 'send_test_email' => 'Send test email message', - 'send_test_email_text' => 'To see if your installation is capable of sending email, please press this button. You will not see an error here (if any), the log files will reflect any errors. You can press this button as many times as you like. There is no spam control. The message will be sent to :email and should arrive shortly.', - 'send_message' => 'Send message', - 'send_test_triggered' => 'Test was triggered. Check your inbox and the log files.', + 'send_test_email' => 'WyÅ›lij testowÄ… wiadomość e-mail', + 'send_test_email_text' => 'Aby sprawdzić, czy Twoja instalacja umożliwia wysyÅ‚anie wiadomoÅ›ci e-mail, naciÅ›nij ten przycisk. Nie zobaczysz tutaj błędu (jeÅ›li jest), pliki dziennika bÄ™dÄ… odzwierciedlać wszelkie błędy. Możesz nacisnąć ten przycisk tyle razy, ile chcesz. Nie ma kontroli spamu. Wiadomość zostanie wysÅ‚ana do :email i powinna wkrótce nadejść.', + 'send_message' => 'WyÅ›lij wiadomość', + 'send_test_triggered' => 'Test zostaÅ‚ uruchomiony. Sprawdź swojÄ… skrzynkÄ™ odbiorczÄ… i pliki dziennika.', // links 'journal_link_configuration' => 'Konfiguracja łączy miÄ™dzy transakcjami', @@ -994,7 +1021,7 @@ return [ 'store_new_link_type' => 'Zapisz nowy typ łącza', 'update_link_type' => 'Modyfikuj typ łącza', 'edit_link_type' => 'Modyfikuj typ łącza ":name"', - 'updated_link_type' => 'Zaktualizowano typ łącza ":nazwa"', + 'updated_link_type' => 'Zaktualizowano typ łącza ":name"', 'delete_link_type' => 'UsuÅ„ typ łącza ":name"', 'deleted_link_type' => 'UsuniÄ™to typ łącza ":name"', 'stored_new_link_type' => 'Zapisz nowy typ łącza ":name"', @@ -1026,15 +1053,14 @@ return [ 'deleted_link' => 'UsuniÄ™to powiÄ…zanie', // link translations: - 'relates to_inward' => 'relates to', - 'is (partially) refunded by_inward' => 'is (partially) refunded by', - 'is (partially) paid for by_inward' => 'is (partially) paid for by', - 'is (partially) reimbursed by_inward' => 'is (partially) reimbursed by', - 'relates to_outward' => 'relates to', - '(partially) refunds_outward' => '(partially) refunds', - '(partially) pays for_outward' => '(partially) pays for', - '(partially) reimburses_outward' => '(partially) reimburses', - + 'relates to_inward' => 'odnosi siÄ™ do', + 'is (partially) refunded by_inward' => 'jest (częściowo) zwracane przez', + 'is (partially) paid for by_inward' => 'jest (częściowo) opÅ‚acane przez', + 'is (partially) reimbursed by_inward' => 'jest (częściowo) refundowany przez', + 'relates to_outward' => 'odnosi siÄ™ do', + '(partially) refunds_outward' => '(częściowo) refundowany', + '(partially) pays for_outward' => '(częściowo) pÅ‚aci za', + '(partially) reimburses_outward' => '(częściowo) refundowany', // split a transaction: 'splits' => 'PodziaÅ‚y', @@ -1044,59 +1070,26 @@ return [ 'split_this_withdrawal' => 'Podziel tÄ… wypÅ‚atÄ™', 'split_this_deposit' => 'Podziel tÄ… wpÅ‚atÄ™', 'split_this_transfer' => 'Podziel ten 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.', - 'cannot_edit_reconciled' => 'You cannot edit transaction #:id with description ":description" because it has been marked as reconciled.', - 'cannot_edit_opening_balance' => 'You cannot edit the opening balance of an account.', + 'cannot_edit_multiple_source' => 'Nie można edytować podzielonej transakcji #:id z opisem ":description", ponieważ zawiera ona wiele kont źródÅ‚owych.', + 'cannot_edit_multiple_dest' => 'Nie można edytować podzielonej transakcji #:id z opisem ":description", ponieważ zawiera ona wiele kont docelowych.', + 'cannot_edit_reconciled' => 'Nie można edytować transakcji #:id z opisem ":description", ponieważ zostaÅ‚a ona zaznaczona jako uzgodniona.', + 'cannot_edit_opening_balance' => 'Nie możesz edytować wstÄ™pnego salda konta.', 'no_edit_multiple_left' => 'Nie wybraÅ‚eÅ› żadnych poprawnych transakcji do edycji.', 'cannot_convert_split_journal' => 'Nie można przekonwertować podzielonej transakcji', // import bread crumbs and titles: 'import' => 'Importuj', 'import_data' => 'Importuj dane', + 'import_general_index_file' => 'Importuj plik', + 'import_from_bunq' => 'Importuj z bunq', + 'import_using_spectre' => 'Importuj za pomocÄ… Spectre', + 'import_using_plaid' => 'Importuj za pomocÄ… Plaid', + 'import_config_bread_crumb' => 'Skonfiguruj swój import', // import index page: 'import_index_title' => 'Importuj dane do Firefly III', 'import_index_sub_title' => 'Indeks', 'import_general_index_intro' => 'Witamy w procedurze importu Firefly III. Istnieje kilka sposobów importowania danych do Firefly III.', - 'import_general_index_csv_file' => 'Importuj plik CSV', - 'import_index_intro' => 'Ta procedura pomoże Ci zaimportować pliki z Twojego banku do Firefly III. ProszÄ™ sprawdzić stronÄ™ pomocy w prawym górnym rogu.', - 'import_index_file' => 'Wybierz swój plik', - 'import_index_config' => 'JeÅ›li wczeÅ›niej importowaÅ‚eÅ› dane do Firefly III, może posiadać plik konfiguracji, który wstÄ™pnie ustawi wartoÅ›ci parametrów konfiguracyjnych dla Ciebie. Dla niektórych banków, inni użytkownicy uprzejmie dostarczyli swoje pliki konfiguracji.', - 'import_index_type' => 'Wybierz typ pliku, który bÄ™dziesz przesyÅ‚ać', - 'import_index_start' => 'Rozpocznij import', - 'import_file' => 'Importuj plik', - - // supported file types: - 'import_file_type_csv' => 'CSV (wartoÅ›ci oddzielone przecinkami)', - - // import configuration routine: - 'import_config_sub_title' => 'Skonfiguruj swój importowany plik', - 'import_config_bread_crumb' => 'Skonfiguruj swój plik', - - // import status page: - 'import_status_bread_crumb' => 'Status importu', - 'import_status_sub_title' => 'Status importu', - 'import_status_wait_title' => 'ProszÄ™ czekać...', - 'import_status_wait_text' => 'To pole za chwilÄ™ zniknie.', - 'import_status_ready_title' => 'Import jest gotowy do uruchomienia', - 'import_status_ready_text' => 'Import jest gotowy do uruchomienia. Wszystkie potrzebne ustawienia zostaÅ‚y skonfigurowane. Pobierz proszÄ™ plik konfiguracyjny. Pomoże Ci on gdy import nie pójdzie zgodnie z planem. Aby rzeczywiÅ›cie uruchomić import, można wykonać nastÄ™pujÄ…ce polecenie w konsoli lub uruchomić importowanie z poziomu strony www. W zależnoÅ›ci od konfiguracji, import przez konsolÄ™ da Ci wiÄ™cej informacji zwrotnych.', - 'import_status_ready_config' => 'Pobierz konfiguracjÄ™', - 'import_status_ready_start' => 'Rozpocznij Importowanie', - 'import_status_ready_share' => 'Rozważ proszÄ™ pobranie swojej konfiguracji i udostÄ™pnienie jej w centrum konfiguracji importu. Pozwoli to innym użytkownikom Firefly III Å‚atwo importować swoje pliki.', - 'import_status_running_title' => 'Importowanie jest uruchomione', - 'import_status_running_placeholder' => 'ProszÄ™ czekać na aktualizacjÄ™...', - 'import_status_errors_title' => 'Błędy podczas importowania', - 'import_status_errors_single' => 'WystÄ…piÅ‚ błąd podczas importowania. Nie wydaje siÄ™ być krytyczny.', - 'import_status_errors_multi' => 'WystÄ…piÅ‚y błędy podczas importowania. Nie wydajÄ… siÄ™ być Å›miertelne.', - 'import_status_fatal_title' => 'WystÄ…piÅ‚ krytyczny błąd', - 'import_status_fatal_text' => 'WystÄ…piÅ‚ błąd krytyczny, którego procedura importu nie naprawić. ProszÄ™ sprawdzić wyjaÅ›nienia na czerwono poniżej.', - 'import_status_fatal_more' => 'JeÅ›li przekroczono limitu czasu, import zostanie zatrzymany w poÅ‚owie. W przypadku niektórych konfiguracji serwerów, jedynie serwer przestaÅ‚ odpowiadać podczas gdy importowanie nadal dziaÅ‚a w tle. Aby to sprawdzić, należy sprawdzić pliki dziennika. JeÅ›li problem bÄ™dzie siÄ™ powtarzaÅ‚, zamiast tego, należy rozważyć Importowanie poprzez konsolÄ™.', - 'import_status_finished_title' => 'Importowanie zakoÅ„czone', - 'import_status_finished_text' => 'Procedura importu pomyÅ›lnie zaimportowaÅ‚a Twój plik.', - 'import_status_finished_job' => 'Zaimportowane transakcje znajdujÄ… siÄ™ w tagu :tag.', - 'import_status_job_running' => 'The import is running...', - 'import_with_key' => 'Import z kluczem \':key\'', // sandstorm.io errors and messages: 'sandstorm_not_available' => 'Ta funkcja nie jest dostÄ™pna, gdy używasz Firefly III w Å›rodowisku Sandstorm.io.', @@ -1107,24 +1100,24 @@ return [ 'no_accounts_imperative_asset' => 'Aby rozpocząć korzystanie z Firefly III należy utworzyć co najmniej jedno konto aktywów. Zróbmy je wiÄ™c teraz:', 'no_accounts_create_asset' => 'Utwórz konto aktywów', 'no_accounts_title_expense' => 'Stwórzmy konto wydatków!', - 'no_accounts_intro_expense' => 'You have no expense accounts yet. Expense accounts are the places where you spend money, such as shops and supermarkets.', - 'no_accounts_imperative_expense' => 'Expense accounts are created automatically when you create transactions, but you can create one manually too, if you want. Let\'s create one now:', + 'no_accounts_intro_expense' => 'Nie masz jeszcze żadnych kont wydatków. Konta wydatków to miejsca, w których wydajesz pieniÄ…dze, takie jak sklepy i supermarkety.', + 'no_accounts_imperative_expense' => 'Konta wydatków sÄ… tworzone automatycznie podczas tworzenia transakcji, ale możesz również utworzyć je rÄ™cznie, jeÅ›li chcesz. Stwórzmy jedno teraz:', 'no_accounts_create_expense' => 'Utwórz konto wydatków', 'no_accounts_title_revenue' => 'Stwórzmy konto przychodów!', - 'no_accounts_intro_revenue' => 'You have no revenue accounts yet. Revenue accounts are the places where you receive money from, such as your employer.', - 'no_accounts_imperative_revenue' => 'Revenue accounts are created automatically when you create transactions, but you can create one manually too, if you want. Let\'s create one now:', + 'no_accounts_intro_revenue' => 'Nie masz jeszcze żadnych kont przychodów. Konta przychodów to miejsca, z których dostajesz pieniÄ…dze, takie jak pracodawca.', + 'no_accounts_imperative_revenue' => 'Konta przychodów sÄ… tworzone automatycznie podczas tworzenia transakcji, ale możesz również utworzyć je rÄ™cznie, jeÅ›li chcesz. Stwórzmy jedno teraz:', 'no_accounts_create_revenue' => 'Utwórz konto przychodów', 'no_budgets_title_default' => 'Stwórzmy budżet', - 'no_budgets_intro_default' => 'You have no budgets yet. Budgets are used to organise your expenses into logical groups, which you can give a soft-cap to limit your expenses.', - 'no_budgets_imperative_default' => 'Budgets are the basic tools of financial management. Let\'s create one now:', + 'no_budgets_intro_default' => 'Nie masz jeszcze żadnych budżetów. Budżety sÄ… wykorzystywane do organizowania twoich wydatków w logiczne grupy, które możesz obserwować, aby ograniczyć swoje wydatki.', + 'no_budgets_imperative_default' => 'Budżety sÄ… podstawowymi narzÄ™dziami zarzÄ…dzania finansami. Stwórzmy jeden teraz:', 'no_budgets_create_default' => 'Stwórz budżet', 'no_categories_title_default' => 'Stwórzmy kategoriÄ™!', - 'no_categories_intro_default' => 'You have no categories yet. Categories are used to fine tune your transactions and label them with their designated category.', - 'no_categories_imperative_default' => 'Categories are created automatically when you create transactions, but you can create one manually too. Let\'s create one now:', - 'no_categories_create_default' => 'Create a category', + 'no_categories_intro_default' => 'Nie masz jeszcze żadnych kategorii. Kategorie sÅ‚użą do precyzyjnego dostrajania transakcji i oznaczania ich zgodnie z wyznaczonÄ… kategoriÄ….', + 'no_categories_imperative_default' => 'Kategorie sÄ… tworzone automatycznie podczas tworzenia transakcji, ale możesz również utworzyć je rÄ™cznie, jeÅ›li chcesz. Stwórzmy jednÄ… teraz:', + 'no_categories_create_default' => 'Stwórz kategoriÄ™', 'no_tags_title_default' => 'Stwórzmy tag!', - 'no_tags_intro_default' => 'You have no tags yet. Tags are used to fine tune your transactions and label them with specific keywords.', - 'no_tags_imperative_default' => 'Tags are created automatically when you create transactions, but you can create one manually too. Let\'s create one now:', + 'no_tags_intro_default' => 'Nie masz jeszcze tagów. Tagi sÅ‚użą do precyzyjnego dostrajania transakcji i oznaczania ich zgodnie konkretnymi sÅ‚owami kluczowymi.', + 'no_tags_imperative_default' => 'Tagi sÄ… tworzone automatycznie podczas tworzenia transakcji, ale możesz również utworzyć je rÄ™cznie. Stwórzmy jeden teraz:', 'no_tags_create_default' => 'Utwórz tag', 'no_transactions_title_withdrawal' => 'Stwórzmy wydatek!', 'no_transactions_intro_withdrawal' => 'Jeszcze nie masz wydatków. PowinieneÅ› utworzyć wydatki aby rozpocząć zarzÄ…dzanie swoimi finansami.', @@ -1133,19 +1126,17 @@ return [ 'no_transactions_title_deposit' => 'Stwórzmy przychód!', 'no_transactions_intro_deposit' => 'Jeszcze nie masz przychodów. PowinieneÅ› utworzyć przychody aby rozpocząć zarzÄ…dzanie swoimi finansami.', 'no_transactions_imperative_deposit' => 'OtrzymaÅ‚eÅ› trochÄ™ pieniÄ™dzy? Zatem powinieneÅ› je zapisać:', - 'no_transactions_create_deposit' => 'Create a deposit', + 'no_transactions_create_deposit' => 'Stwórz depozyt', 'no_transactions_title_transfers' => 'Stwórzmy transfer!', - 'no_transactions_intro_transfers' => 'You have no transfers yet. When you move money between asset accounts, it is recorded as a transfer.', - 'no_transactions_imperative_transfers' => 'Have you moved some money around? Then you should write it down:', + 'no_transactions_intro_transfers' => 'Nie masz jeszcze żadnych transferów. PrzenoszÄ…c pieniÄ…dze miÄ™dzy kontami aktywów, rejestruje siÄ™ je jako transfer.', + 'no_transactions_imperative_transfers' => 'Czy przenosiÅ‚eÅ› trochÄ™ pieniÄ™dzy? Zatem powinieneÅ› to zapisać:', 'no_transactions_create_transfers' => 'Utwórz transfer', 'no_piggies_title_default' => 'Stwórzmy skarbonkÄ™!', 'no_piggies_intro_default' => 'Nie posiadasz jeszcze żadnych skarbonek. Możesz stworzyć skarbonki aby dzielić swoje oszczÄ™dnoÅ›ci i Å›ledzić na co oszczÄ™dzasz.', 'no_piggies_imperative_default' => 'OszczÄ™dzasz pieniÄ…dze na coÅ›? Utwórz skarbonkÄ™ i Å›ledź:', 'no_piggies_create_default' => 'Utwórz nowÄ… skarbonkÄ™', 'no_bills_title_default' => 'Stwórzmy rachunek!', - 'no_bills_intro_default' => 'You have no bills yet. You can create bills to keep track of regular expenses, like your rent or insurance.', - 'no_bills_imperative_default' => 'Do you have such regular bills? Create a bill and keep track of your payments:', + 'no_bills_intro_default' => 'Nie masz jeszcze żadnych rachunków. Można tworzyć rachunki, aby Å›ledzić regularne wydatki, takie jak czynsz czy ubezpieczenie.', + 'no_bills_imperative_default' => 'Czy masz takie regularne rachunki? Utwórz rachunek i Å›ledź swoje pÅ‚atnoÅ›ci:', 'no_bills_create_default' => 'Utwórz rachunek', - - ]; diff --git a/resources/lang/pl_PL/form.php b/resources/lang/pl_PL/form.php index 396568faf3..b95f872fc6 100644 --- a/resources/lang/pl_PL/form.php +++ b/resources/lang/pl_PL/form.php @@ -1,18 +1,26 @@ . */ +declare(strict_types=1); return [ - // new user: 'bank_name' => 'Nazwa banku', 'bank_balance' => 'Saldo', @@ -47,7 +55,7 @@ return [ 'account_id' => 'Konto aktywów', 'budget_id' => 'Budżet', 'openingBalance' => 'Bilans otwarcia', - 'tagMode' => 'Tag mode', + 'tagMode' => 'Tryb tagów', 'tag_position' => 'Lokalizacja taga', 'virtualBalance' => 'Wirtualne saldo', 'targetamount' => 'Kwota docelowa', @@ -80,7 +88,6 @@ return [ 'convert_Deposit' => 'Konwertuj wpÅ‚atÄ™', 'convert_Transfer' => 'Konwertuj transfer', - 'amount' => 'Kwota', 'date' => 'Data', 'interest_date' => 'Data odsetek', @@ -91,8 +98,8 @@ return [ 'deletePermanently' => 'UsuÅ„ trwale', 'cancel' => 'Anuluj', 'targetdate' => 'Data docelowa', - 'startdate' => 'Start date', - 'tag' => 'Tag', + 'startdate' => 'Data rozpoczÄ™cia', + 'tag' => 'Znacznik', 'under' => 'Poniżej', 'symbol' => 'Symbol', 'code' => 'Kod', @@ -101,7 +108,7 @@ return [ 'creditCardNumber' => 'Numer karty kredytowej', 'has_headers' => 'Nagłówki', 'date_format' => 'Format daty', - 'specifix' => 'Bank- or file specific fixes', + 'specifix' => 'Poprawki dla banku lub pliku', 'attachments[]' => 'Załączniki', 'store_new_withdrawal' => 'Zapisz nowÄ… wypÅ‚atÄ™', 'store_new_deposit' => 'Zapisz nowÄ… wpÅ‚atÄ™', @@ -151,17 +158,18 @@ return [ 'journal_link_areYouSure' => 'Czy na pewno chcesz usunąć powiÄ…zanie miÄ™dzy :source a :destination?', 'linkType_areYouSure' => 'Czy na pewno chcesz usunąć typ łącza ":name" (":inward" / ":outward")?', 'permDeleteWarning' => 'Usuwanie rzeczy z Firefly jest trwaÅ‚e i nie można tego cofnąć.', - 'mass_make_selection' => 'You can still prevent items from being deleted by removing the checkbox.', + 'mass_make_selection' => 'Nadal można zapobiec usuwaniu plików, usuwajÄ…c zaznaczenie.', 'delete_all_permanently' => 'Trwale usuÅ„ zaznaczone', 'update_all_journals' => 'Zmodyfikuj te transakcje', - '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_connections' => 'The only transaction linked with this link type will lose this connection.|All :count transactions linked with this link type will lose their connection.', - '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.', + 'also_delete_transactions' => 'Jedynie transakcja zwiÄ…zana z tym kontem zostanie również usuniÄ™ta. |Wszystkie :count transakcji powiÄ…zanych z tym kontem zostanie również usuniÄ™ta.', + 'also_delete_connections' => 'Jedynie transakcja połączona z tym typem łącza utraci to połączenie. |Wszystkie :count transakcji połączone tym typem łącza utracÄ… swoje połączenie.', + 'also_delete_rules' => 'Jedynie reguÅ‚a połączona z tÄ… grupÄ… reguÅ‚ utraci to połączenie. |Wszystkie :count reguÅ‚y połączone tÄ… grupÄ… reguÅ‚ zostanÄ… również usuniÄ™te.', + 'also_delete_piggyBanks' => 'Jedynie skarbonka połączona z tym kontem zostanie również usuniÄ™ta. |Wszystkie :count skarbonek połączone z tym kontem zostanÄ… usuniÄ™te.', + 'bill_keep_transactions' => 'Jedyna transakcja zwiÄ…zana z tym rachunkiem nie zostanie usuniÄ™ta. | Wszystkie :count transakcje zwiÄ…zane z tym rachunkiem zostanÄ… oszczÄ™dzone.', + 'budget_keep_transactions' => 'Jedynie transakcja zwiÄ…zana z tym rachunkiem nie zostanie usuniÄ™ta. |Wszystkie :count transakcji połączonych z tym rachunkiem zostanÄ… oszczÄ™dzone.', + 'category_keep_transactions' => 'Jedynie transakcja zwiÄ…zana z tÄ… kategoriÄ… nie zostanie usuniÄ™ta. |Wszystkie :count transakcje połączone z tÄ… kategoriÄ… zostanÄ… oszczÄ™dzone.', + 'tag_keep_transactions' => 'Jedynie transakcja połączona z tym tagiem nie zostanie usuniÄ™ta. |Wszystkie :count transakcji połączonych z tym tagiem zostanÄ… oszczÄ™dzone.', + 'check_for_updates' => 'Sprawdź aktualizacje', 'email' => 'Adres email', 'password' => 'HasÅ‚o', @@ -169,13 +177,11 @@ return [ 'blocked' => 'Jest zablokowany?', 'blocked_code' => 'Powód blokady', - // admin 'domain' => 'Domena', 'single_user_mode' => 'Wyłącz rejestracjÄ™ użytkowników', 'is_demo_site' => 'Jest stronÄ… demo', - // import 'import_file' => 'Importuj plik', 'configuration_file' => 'Plik konfiguracyjny', @@ -183,10 +189,15 @@ return [ 'csv_comma' => 'Przecinek (,)', 'csv_semicolon' => 'Åšrednik (;)', 'csv_tab' => 'Tabulator (niewidoczny)', - 'csv_delimiter' => 'CSV field delimiter', + 'csv_delimiter' => 'Ogranicznik pola CSV', 'csv_import_account' => 'DomyÅ›lne konto importu', 'csv_config' => 'Konfiguracja importu CSV', - + 'client_id' => 'ID klienta', + 'service_secret' => 'Sekret usÅ‚ugi', + 'app_secret' => 'Sekret aplikacji', + 'public_key' => 'Klucz publiczny', + 'country_code' => 'Kod kraju', + 'provider_code' => 'Dostawca banku lub danych', 'due_date' => 'Termin realizacji', 'payment_date' => 'Data pÅ‚atnoÅ›ci', diff --git a/resources/lang/pl_PL/import.php b/resources/lang/pl_PL/import.php new file mode 100644 index 0000000000..84d4183933 --- /dev/null +++ b/resources/lang/pl_PL/import.php @@ -0,0 +1,163 @@ +. + */ +declare(strict_types=1); + +return [ + // status of import: + 'status_wait_title' => 'ProszÄ™ czekać...', + 'status_wait_text' => 'To pole za chwilÄ™ zniknie.', + 'status_fatal_title' => 'WystÄ…piÅ‚ błąd krytyczny', + 'status_fatal_text' => 'WystÄ…piÅ‚ błąd krytyczny, którego procedura importu nie może odzyskać. Zobacz wyjaÅ›nienie na czerwono poniżej.', + 'status_fatal_more' => 'JeÅ›li przekroczono limit czasu, import zostanie zatrzymany w poÅ‚owie. W przypadku niektórych konfiguracji serwerów, jedynie serwer przestaÅ‚ odpowiadać podczas gdy importowanie nadal dziaÅ‚a w tle. Aby to zweryfikować, należy sprawdzić pliki dziennika. JeÅ›li problem bÄ™dzie siÄ™ powtarzaÅ‚, należy rozważyć Importowanie poprzez konsolÄ™.', + 'status_ready_title' => 'Import jest gotowy do uruchomienia', + 'status_ready_text' => 'Import jest gotowy do uruchomienia. CaÅ‚a konfiguracja, którÄ… musisz wykonać, zostaÅ‚a wykonana. ProszÄ™ pobierz plik konfiguracyjny. Pomoże ci w imporcie, jeÅ›li nie pójdzie zgodnie z planem. Aby faktycznie uruchomić import, możesz wykonać nastÄ™pujÄ…ce polecenie w konsoli lub uruchomić importowanie przez Internet. W zależnoÅ›ci od konfiguracji import przez konsolÄ™ daje wiÄ™cej informacji zwrotnych.', + 'status_ready_noconfig_text' => 'Import jest gotowy do uruchomienia. CaÅ‚a konfiguracja, którÄ… musisz wykonać, zostaÅ‚a wykonana. Aby faktycznie uruchomić import, możesz wykonać nastÄ™pujÄ…ce polecenie w konsoli lub uruchomić importowanie przez Internet. W zależnoÅ›ci od konfiguracji import przez konsolÄ™ daje wiÄ™cej informacji zwrotnych.', + 'status_ready_config' => 'Pobierz konfiguracjÄ™', + 'status_ready_start' => 'Rozpocznij import', + 'status_ready_share' => 'Rozważ pobranie konfiguracji i udostÄ™pnienie jej w centrum konfiguracyjnym portali. Umożliwi to innym użytkownikom Firefly III Å‚atwiejsze importowanie plików.', + 'status_job_new' => 'Zadanie jest zupeÅ‚nie nowe.', + 'status_job_configuring' => 'Import jest konfigurowany.', + 'status_job_configured' => 'Import jest skonfigurowany.', + 'status_job_running' => 'Import w toku... ProszÄ™ czekać..', + 'status_job_error' => 'Zadanie wygenerowaÅ‚o błąd.', + 'status_job_finished' => 'Importowanie zostaÅ‚o zakoÅ„czone!', + 'status_running_title' => 'Trwa importowanie', + 'status_running_placeholder' => 'ProszÄ™ czekać na aktualizacjÄ™...', + 'status_finished_title' => 'ZakoÅ„czono procedurÄ™ importu', + 'status_finished_text' => 'Twoje dane zostaÅ‚y zaimportowane.', + 'status_errors_title' => 'Błędy podczas importowania', + 'status_errors_single' => 'WystÄ…piÅ‚ błąd podczas importowania. Nie wydaje siÄ™ być krytyczny.', + 'status_errors_multi' => 'WystÄ…piÅ‚ błąd podczas importowania. Nie wydaje siÄ™ być krytyczny.', + 'status_bread_crumb' => 'Status importu', + 'status_sub_title' => 'Status importu', + 'config_sub_title' => 'Skonfiguruj import', + 'status_finished_job' => 'Zaimportowane transakcje można znaleźć w tagu :tag.', + 'import_with_key' => 'Import z kluczem \':key\'', + + // file, upload something + 'file_upload_title' => 'Konfiguracja importu (1/4) - PrzeÅ›lij swój plik', + 'file_upload_text' => 'Ta procedura pomoże Ci importować pliki z twojego banku do Firefly III. Sprawdź stronÄ™ pomocy w prawym górnym rogu.', + 'file_upload_fields' => 'Pola', + 'file_upload_help' => 'Wybierz swój plik', + 'file_upload_config_help' => 'JeÅ›li wczeÅ›niej importowaÅ‚eÅ› dane do Firefly III, możesz posiadać plik konfiguracji, który wstÄ™pnie ustawi wartoÅ›ci parametrów konfiguracyjnych za Ciebie. Dla niektórych banków, inni użytkownicy uprzejmie dostarczyli swoje pliki konfiguracji', + 'file_upload_type_help' => 'Wybierz typ pliku, który bÄ™dziesz przesyÅ‚ać', + 'file_upload_submit' => 'PrzeÅ›lij pliki', + + // file, upload types + 'import_file_type_csv' => 'CSV (wartoÅ›ci oddzielone przecinkami)', + + // file, initial config for CSV + 'csv_initial_title' => 'Konfiguracja importu (2/4) - Podstawowa konfiguracja importu CSV', + 'csv_initial_text' => 'Aby móc poprawnie zaimportować plik, sprawdź poprawność poniższych opcji.', + 'csv_initial_box' => 'Podstawowa konfiguracja importu CSV', + 'csv_initial_box_title' => 'Podstawowe opcje konfiguracji importu CSV', + 'csv_initial_header_help' => 'Zaznacz to pole, jeÅ›li pierwszy wiersz w pliku CSV to nazwy kolumn.', + 'csv_initial_date_help' => 'Format daty i czasu w pliku CSV. Format powinien być zgodny z opisem na tej stronie. Wartość domyÅ›lna bÄ™dzie analizować daty, które wyglÄ…dajÄ… nastÄ™pujÄ…co: :dateExample.', + 'csv_initial_delimiter_help' => 'Wybierz separator pola, który jest używany w pliku wejÅ›ciowym. JeÅ›li nie jesteÅ› pewien, przecinek jest najbezpieczniejszym rozwiÄ…zaniem.', + 'csv_initial_import_account_help' => 'JeÅ›li Twój plik CSV NIE zawiera informacji o Twoich kontach aktywów, użyj tego menu, aby wybrać, do którego konta należą transakcje w pliku CSV.', + 'csv_initial_submit' => 'Przejdź do kroku 3/4', + + // file, new options: + 'file_apply_rules_title' => 'Zastosuj reguÅ‚y', + 'file_apply_rules_description' => 'Zastosuj swoje zasady. Zwróć uwagÄ™, że znacznie spowalnia to imprtowanie.', + 'file_match_bills_title' => 'Dopasuj rachunki', + 'file_match_bills_description' => 'Dopasuj swoje rachunki do nowo utworzonych wypÅ‚at. Zwróć uwagÄ™, że znacznie spowalnia to importowanie.', + + // file, roles config + 'csv_roles_title' => 'Konfiguracja importu (3/4) - Zdefiniuj rolÄ™ każdej kolumny', + 'csv_roles_text' => 'Każda kolumna w pliku CSV zawiera okreÅ›lone dane. ProszÄ™ wskazać, jakiego rodzaju danych importer powinien oczekiwać. Opcja "mapowania" danych oznacza, że każdy wpis znaleziony w kolumnie zostanie połączony z wartoÅ›ciÄ… w bazie danych. CzÄ™sto odwzorowywana kolumna to kolumna zawierajÄ…ca numer IBAN konta przeciwnego. Można go Å‚atwo dopasować do obecnego numeru IBAN w bazie danych.', + 'csv_roles_table' => 'Tabela', + 'csv_roles_column_name' => 'Nazwa kolumny', + 'csv_roles_column_example' => 'PrzykÅ‚adowe dane kolumny', + 'csv_roles_column_role' => 'Znaczenie danych w kolumnie', + 'csv_roles_do_map_value' => 'Zmapuj te wartoÅ›ci', + 'csv_roles_column' => 'Kolumna', + 'csv_roles_no_example_data' => 'Brak dostÄ™pnych przykÅ‚adowych danych', + 'csv_roles_submit' => 'Przejdź do kroku 4/4', + 'csv_roles_warning' => 'Zaznacz jednÄ… z kolumn jako kolumnÄ™ z kwotami. Wskazane jest również wybranie kolumny dla opisu, daty oraz konta przeciwnego.', + + // file, map data + 'file_map_title' => 'Ustawienia importu (4/4) - Połącz dane importu z danymi Firefly III', + 'file_map_text' => 'W poniższych tabelach lewa wartość pokazuje informacje znalezione w przesÅ‚anym pliku. Twoim zadaniem jest zamapowanie tej wartoÅ›ci, jeÅ›li to możliwe, na wartość już obecnÄ… w bazie danych. Firefly bÄ™dzie trzymać siÄ™ tego mapowania. JeÅ›li nie ma wartoÅ›ci do odwzorowania lub nie chcesz mapować okreÅ›lonej wartoÅ›ci, nie wybieraj niczego.', + 'file_map_field_value' => 'Wartość pola', + 'file_map_field_mapped_to' => 'Zmapowane do', + 'map_do_not_map' => '(nie mapuj)', + 'file_map_submit' => 'Rozpocznij import', + + // map things. + 'column__ignore' => '(zignoruj tÄ™ kolumnÄ™)', + 'column_account-iban' => 'Rachunek aktywów (IBAN)', + 'column_account-id' => 'ID konta aktywów (taki sam jak w Firefly)', + 'column_account-name' => 'Konto aktywów (nazwa)', + 'column_amount' => 'Kwota', + 'column_amount_debit' => 'Kwota (kolumna debetowa)', + 'column_amount_credit' => 'Kwota (kolumna kredytowa)', + 'column_amount-comma-separated' => 'Kwota (przecinek jako separator dziesiÄ™tny)', + 'column_bill-id' => 'ID rachunku (taki sam jak w Firefly)', + 'column_bill-name' => 'Nazwa rachunku', + 'column_budget-id' => 'ID budżetu (taki sam jak w Firefly)', + 'column_budget-name' => 'Nazwa budżetu', + 'column_category-id' => 'ID kategorii (taki sam jak w Firefly)', + 'column_category-name' => 'Nazwa kategorii', + 'column_currency-code' => 'Kod waluty (ISO 4217)', + 'column_currency-id' => 'ID waluty (taki sam jak w Firefly)', + 'column_currency-name' => 'Nazwa waluty (taka sama jak w Firefly)', + 'column_currency-symbol' => 'Symbol waluty (taki sam jak w Firefly)', + 'column_date-interest' => 'Data obliczenia odsetek', + 'column_date-book' => 'Data rezerwacji transakcji', + 'column_date-process' => 'Data rezerwacji transkacji', + 'column_date-transaction' => 'Data', + 'column_description' => 'Opis', + 'column_opposing-iban' => 'Przeciwstawne konto (IBAN)', + 'column_opposing-id' => 'Przeciwstawne konto (takie same jak w Firefly)', + 'column_external-id' => 'ZewnÄ™trzne ID', + 'column_opposing-name' => 'Przeciwstawne konto (nazwa)', + 'column_rabo-debit-credit' => 'Rabobank okreÅ›lony wskaźnik obciążenia/kredytu', + 'column_ing-debit-credit' => 'Specyficzny wskaźnik obciążenia/kredytu ING', + 'column_sepa-ct-id' => 'SEPA transferu od koÅ„ca do koÅ„ca ID', + 'column_sepa-ct-op' => 'SEPA przelew na przeciwne konto', + 'column_sepa-db' => 'SEPA polecenie zapÅ‚aty', + 'column_tags-comma' => 'Tagi (oddzielaj przecinkami)', + 'column_tags-space' => 'Tagi (oddzielone spacjami)', + 'column_account-number' => 'Konto aktywów (numer konta)', + 'column_opposing-number' => 'Konto przeciwne (numer konta)', + 'column_note' => 'Uwagi', + + // prerequisites + 'prerequisites' => 'Wymagania', + + // bunq + 'bunq_prerequisites_title' => 'Wymagania wstÄ™pne dla importu z bunq', + 'bunq_prerequisites_text' => 'Aby zaimportować z bunq, musisz uzyskać klucz API. Możesz to zrobić za pomocÄ… aplikacji.', + + // Spectre + 'spectre_title' => 'Importuj za pomocÄ… Spectre', + 'spectre_prerequisites_title' => 'Wymagania wstÄ™pne do importowania za pomocÄ… Spectre', + 'spectre_prerequisites_text' => 'Aby importować dane za pomocÄ… interfejsu Spectre API, musisz udowodnić pewne sekrety. Można je znaleźć na stronie sekretów.', + 'spectre_enter_pub_key' => 'Importowanie bÄ™dzie dziaÅ‚ać tylko po wpisaniu tego klucza publicznego na stronie zabezpieczeÅ„.', + 'spectre_select_country_title' => 'Wybierz kraj', + 'spectre_select_country_text' => 'Firefly III ma duży wybór banków i stron, z których Spectre może pobierać dane transakcyjne. Te banki sÄ… sortowane wedÅ‚ug krajów. ProszÄ™ nie pamiÄ™tać, że istnieje "FaÅ‚szywy Kraj", gdy chce siÄ™ coÅ› przetestować. JeÅ›li chcesz importować z innych narzÄ™dzi finansowych, użyj wyimaginowanego kraju o nazwie "Inne aplikacje finansowe". DomyÅ›lnie Spectre pozwala tylko pobierać dane z faÅ‚szywych banków. Upewnij siÄ™, że Twój status jest "Na żywo" na Twojejdesce rozdzielczej, jeÅ›li chcesz pobierać z prawdziwych banków.', + 'spectre_select_provider_title' => 'Wybierz swój bank', + 'spectre_select_provider_text' => 'Spectre obsÅ‚uguje nastÄ™pujÄ…ce banki lub usÅ‚ugi finansowe pogrupowane pod :country. Wybierz ten, z którego chcesz importować.', + 'spectre_input_fields_title' => 'Wprowadź obowiÄ…zkowe pola', + 'spectre_input_fields_text' => 'NastÄ™pujÄ…ce pola sÄ… wymagane przez ":provider" (z: :country).', + 'spectre_instructions_english' => 'Instrukcje te sÄ… dostarczane przez Spectre dla PaÅ„stwa komfortu. SÄ… one w jÄ™zyku angielskim:', +]; diff --git a/resources/lang/pl_PL/intro.php b/resources/lang/pl_PL/intro.php index 056a2ae65d..df12a3ed33 100644 --- a/resources/lang/pl_PL/intro.php +++ b/resources/lang/pl_PL/intro.php @@ -1,13 +1,24 @@ . */ +declare(strict_types=1); return [ // index @@ -30,23 +41,23 @@ return [ 'budgets_index_see_expenses_bar' => 'Wydawanie pieniÄ™dzy powoli wypeÅ‚nia ten pasek.', 'budgets_index_navigate_periods' => 'Przejrzyj okresy, aby Å‚atwiej ustawić przyszÅ‚e budżety.', 'budgets_index_new_budget' => 'Utwórz nowe budżety zgodnie z Twoimi potrzebami.', - 'budgets_index_list_of_budgets' => 'Use this table to set the amounts for each budget and see how you are doing.', + 'budgets_index_list_of_budgets' => 'Skorzystaj z tej tabeli, aby ustawić kwoty dla każdego budżetu i sprawdź jak ci idzie.', 'budgets_index_outro' => 'Aby dowiedzieć siÄ™ wiÄ™cej o budżetowaniu, użyj ikonki pomocy w prawym górnym rogu.', // reports (index) - 'reports_index_intro' => 'Use these reports to get detailed insights in your finances.', - 'reports_index_inputReportType' => 'Pick a report type. Check out the help pages to see what each report shows you.', - 'reports_index_inputAccountsSelect' => 'You can exclude or include asset accounts as you see fit.', - 'reports_index_inputDateRange' => 'The selected date range is entirely up to you: from one day to 10 years.', - 'reports_index_extra-options-box' => 'Depending on the report you have selected, you can select extra filters and options here. Watch this box when you change report types.', + 'reports_index_intro' => 'Skorzystaj z tych raportów, aby uzyskać szczegółowe informacje o swoich finansach.', + 'reports_index_inputReportType' => 'Wybierz typ raportu. Sprawdź stronÄ™ pomocy, aby zobaczyć, co pokazuje każdy raport.', + 'reports_index_inputAccountsSelect' => 'Możesz wykluczyć lub uwzglÄ™dnić konta zasobów wedÅ‚ug wÅ‚asnego uznania.', + 'reports_index_inputDateRange' => 'Wybrany zakres dat zależy wyłącznie od ciebie: od jednego dnia do 10 lat.', + 'reports_index_extra-options-box' => 'W zależnoÅ›ci od wybranego raportu możesz wybrać dodatkowe filtry i opcje tutaj. Obserwuj to pole, gdy zmieniasz typy raportów.', // reports (reports) - 'reports_report_default_intro' => 'This report will give you a quick and comprehensive overview of your finances. If you wish to see anything else, please don\'t hestitate to contact me!', - 'reports_report_audit_intro' => 'This report will give you detailed insights in your asset accounts.', - 'reports_report_audit_optionsBox' => 'Use these check boxes to show or hide the columns you are interested in.', + 'reports_report_default_intro' => 'Raport ten zapewni szybki i wszechstronny przeglÄ…d twoich finansów. JeÅ›li chcesz zobaczyć cokolwiek innego, nie wahaj siÄ™ ze mnÄ… skontaktować!', + 'reports_report_audit_intro' => 'Ten raport zawiera szczegółowe informacje na temat kont zasobów.', + 'reports_report_audit_optionsBox' => 'Użyj tych pól wyboru aby pokazać lub ukryć kolumny, które ciÄ™ interesujÄ….', - 'reports_report_category_intro' => 'This report will give you insight in one or multiple categories.', - 'reports_report_category_pieCharts' => 'These charts will give you insight in expenses and income per category or per account.', + 'reports_report_category_intro' => 'Ten raport daje wglÄ…d w jednÄ… lub wiele kategorii.', + 'reports_report_category_pieCharts' => 'Te wykresy dajÄ… wglÄ…d w wydatki i dochody wedÅ‚ug kategorii lub konta.', 'reports_report_category_incomeAndExpensesChart' => 'This chart shows your expenses and income per category.', 'reports_report_tag_intro' => 'This report will give you insight in one or multiple tags.', @@ -98,9 +109,9 @@ return [ // rules index 'rules_index_intro' => 'Firefly III allows you to manage rules, that will automagically be applied to any transaction you create or edit.', 'rules_index_new_rule_group' => 'You can combine rules in groups for easier management.', - 'rules_index_new_rule' => 'Create as many rules as you like.', - 'rules_index_prio_buttons' => 'Order them any way you see fit.', - 'rules_index_test_buttons' => 'You can test your rules or apply them to existing transactions.', + 'rules_index_new_rule' => 'Twórz dowolnÄ… liczbÄ™ reguÅ‚.', + 'rules_index_prio_buttons' => 'Zamów je w sposób, jaki uznasz za stosowny.', + 'rules_index_test_buttons' => 'Możesz przetestować swoje zasady lub zastosować je do istniejÄ…cych transakcji.', 'rules_index_rule-triggers' => 'Rules have "triggers" and "actions" that you can order by drag-and-drop.', 'rules_index_outro' => 'Be sure to check out the help pages using the (?) icon in the top right!', diff --git a/resources/lang/pl_PL/list.php b/resources/lang/pl_PL/list.php index b32a13c8ba..2358e5fb9d 100644 --- a/resources/lang/pl_PL/list.php +++ b/resources/lang/pl_PL/list.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'buttons' => 'Przyciski', @@ -25,7 +34,7 @@ return [ 'currentBalance' => 'Bieżące saldo', 'active' => 'Jest aktywny?', 'lastActivity' => 'Ostatnia aktywność', - 'balanceDiff' => 'Różnica salda miÄ™dzy :start oraz :end', + 'balanceDiff' => 'Różnica sald', 'matchesOn' => 'Dopasowanie', 'account_type' => 'Typ konta', 'created_at' => 'Utworzono', @@ -89,5 +98,5 @@ return [ 'sum_withdrawals' => 'Suma wypÅ‚at', 'sum_deposits' => 'Suma wpÅ‚at', 'sum_transfers' => 'Suma transferów', - 'reconcile' => 'Reconcile', + 'reconcile' => 'Uzgodnij', ]; diff --git a/resources/lang/pl_PL/pagination.php b/resources/lang/pl_PL/pagination.php index 478654dd97..bb11d2362e 100644 --- a/resources/lang/pl_PL/pagination.php +++ b/resources/lang/pl_PL/pagination.php @@ -1,19 +1,26 @@ . */ +declare(strict_types=1); return [ - 'previous' => '« Poprzednia', 'next' => 'NastÄ™pna »', - ]; diff --git a/resources/lang/pl_PL/passwords.php b/resources/lang/pl_PL/passwords.php index 519a6ccd14..fe468dc88d 100644 --- a/resources/lang/pl_PL/passwords.php +++ b/resources/lang/pl_PL/passwords.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'password' => 'HasÅ‚o musi zawierać przynajmniej 6 znaków i musi siÄ™ zgadzać z potwierdzeniem.', diff --git a/resources/lang/pl_PL/validation.php b/resources/lang/pl_PL/validation.php index 84e7df6be6..04c5c453ab 100644 --- a/resources/lang/pl_PL/validation.php +++ b/resources/lang/pl_PL/validation.php @@ -1,15 +1,24 @@ . */ +declare(strict_types=1); return [ 'iban' => 'To nie jest prawidÅ‚owy IBAN.', @@ -20,7 +29,7 @@ return [ 'file_already_attached' => 'PrzesÅ‚any plik ":name" jest już dołączony do tego obiektu.', 'file_attached' => 'PomyÅ›lnie wgrano plik ":name".', 'file_invalid_mime' => 'Plik ":name" jest typu ":mime", który nie jest akceptowany jako nowy plik do przekazania.', - 'file_too_large' => 'Plik ": nazwa" jest zbyt duży.', + 'file_too_large' => 'Plik ":name" jest zbyt duży.', 'belongs_to_user' => 'Wartość :attribute jest nieznana', 'accepted' => ':attribute musi zostać zaakceptowany.', 'bic' => 'To nie jest prawidÅ‚owy BIC.', @@ -31,7 +40,7 @@ return [ 'alpha_dash' => ':attribute może zawierać litery, cyfry oraz myÅ›lniki.', 'alpha_num' => ':attribute może zawierać jedynie litery oraz cyfry.', 'array' => ':attribute musi być tablicÄ….', - 'unique_for_user' => 'Istnieje już wpis z tym: attribute.', + 'unique_for_user' => 'Istnieje już wpis z tym :attribute.', 'before' => ':attribute musi być wczeÅ›niejszÄ… datÄ… w stosunku do :date.', 'unique_object_for_user' => 'Ta nazwa jest już w użyciu', 'unique_account_for_user' => 'Ta nazwa konta jest już w użyciu', diff --git a/resources/stubs/binary.bin b/resources/stubs/binary.bin index 25602c8fbc..32e418ee18 100644 Binary files a/resources/stubs/binary.bin and b/resources/stubs/binary.bin differ diff --git a/resources/stubs/demo-configuration.json b/resources/stubs/demo-configuration.json index c69c8bfe71..ed3e7a60b1 100644 --- a/resources/stubs/demo-configuration.json +++ b/resources/stubs/demo-configuration.json @@ -1,37 +1,37 @@ { - "has-headers": true, - "date-format": "Y-m-d", - "delimiter": ",", - "import-account": 1, - "specifics": [], - "column-count": 7, - "column-roles": [ - "account-iban", - "opposing-name", - "amount", - "date-transaction", - "description", - "category-name", - "budget-name" - ], - "column-do-mapping": [ - true, - true, - false, - false, - false, - false, - false - ], - "column-roles-complete": false, - "column-mapping-config": { - "0": { - "NL11XOLA6707795988": 1, - "NL81RCQZ7160379858": 3 - }, - "1": [], - "5": [], - "6": [] + "has-headers": true, + "date-format": "Y-m-d", + "delimiter": ",", + "import-account": 1, + "specifics": [], + "column-count": 7, + "column-roles": [ + "account-iban", + "opposing-name", + "amount", + "date-transaction", + "description", + "category-name", + "budget-name" + ], + "column-do-mapping": [ + true, + true, + false, + false, + false, + false, + false + ], + "column-roles-complete": false, + "column-mapping-config": { + "0": { + "NL11XOLA6707795988": 1, + "NL81RCQZ7160379858": 3 }, - "column-mapping-complete": false + "1": [], + "5": [], + "6": [] + }, + "column-mapping-complete": false } \ No newline at end of file diff --git a/resources/views/accounts/create.twig b/resources/views/accounts/create.twig index 25c7c3b25c..50c35a5eae 100644 --- a/resources/views/accounts/create.twig +++ b/resources/views/accounts/create.twig @@ -1,6 +1,6 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, what) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, what) }} {% endblock %} {% block content %} diff --git a/resources/views/accounts/delete.twig b/resources/views/accounts/delete.twig index 919ee63a76..9e8dcb0868 100644 --- a/resources/views/accounts/delete.twig +++ b/resources/views/accounts/delete.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, account) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, account) }} {% endblock %} {% block content %} diff --git a/resources/views/accounts/edit.twig b/resources/views/accounts/edit.twig index 2384ee57fb..a3ed653d29 100644 --- a/resources/views/accounts/edit.twig +++ b/resources/views/accounts/edit.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute().getName(), account) }} + {{ Breadcrumbs.render(Route.getCurrentRoute().getName(), account) }} {% endblock %} {% block content %} @@ -53,7 +53,7 @@ - {% if Session.get('preFilled').accountRole == 'ccAsset' %} + {% if preFilled.accountRole == 'ccAsset' %}

{{ 'credit_card_options'|_ }}

diff --git a/resources/views/accounts/index.twig b/resources/views/accounts/index.twig index 1585fd39b2..1783050235 100644 --- a/resources/views/accounts/index.twig +++ b/resources/views/accounts/index.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, what) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, what) }} {% endblock %} {% block content %} @@ -32,7 +32,8 @@
- {% else %} + {% endif %} + {% if accounts.count == 0 and page == 0 %} {% include 'partials.empty' with {what: what, type: 'accounts',route: route('accounts.create', [what])} %} {% endif %} {% endblock %} diff --git a/resources/views/accounts/reconcile/edit.twig b/resources/views/accounts/reconcile/edit.twig index dff6c8c6dc..8eac4a85e4 100644 --- a/resources/views/accounts/reconcile/edit.twig +++ b/resources/views/accounts/reconcile/edit.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, journal) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, journal) }} {% endblock %} {% block content %} diff --git a/resources/views/accounts/reconcile/index.twig b/resources/views/accounts/reconcile/index.twig index 70b82ee4b2..23754353b1 100644 --- a/resources/views/accounts/reconcile/index.twig +++ b/resources/views/accounts/reconcile/index.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, account, moment, start, end) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, account, moment, start, end) }} {% endblock %} {% block content %} diff --git a/resources/views/accounts/reconcile/overview.twig b/resources/views/accounts/reconcile/overview.twig index abc2fe9af3..78502d20af 100644 --- a/resources/views/accounts/reconcile/overview.twig +++ b/resources/views/accounts/reconcile/overview.twig @@ -15,7 +15,7 @@ {% for id in transactionIds %} - + {% endfor %} @@ -33,14 +33,14 @@ - + @@ -60,36 +60,36 @@ {% endif %} {% if diffCompare != 0 %} -
-
-
-
-
-
-
- +
+
+
+ +
-
-

- {{ 'reconcile_go_back'|_ }} -

+

+ {{ 'reconcile_go_back'|_ }} +

{% endif %}
-
{{ 'submitted_end_balance'|_ }} (date){{ formatAmountByAccount(account, endBalance)}}{{ formatAmountByAccount(account, endBalance) }}
{{ 'difference'|_ }} {{ formatAmountByAccount(account, difference) }} - +
\ No newline at end of file + diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twig index 4d9f0a5b72..74fdaf1889 100644 --- a/resources/views/accounts/show.twig +++ b/resources/views/accounts/show.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, account, moment, start, end) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, account, moment, start, end) }} {% endblock %} {% block content %} diff --git a/resources/views/admin/configuration/index.twig b/resources/views/admin/configuration/index.twig index 950011a87f..f04b387783 100644 --- a/resources/views/admin/configuration/index.twig +++ b/resources/views/admin/configuration/index.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists }} + {{ Breadcrumbs.render }} {% endblock %} {% block content %}
diff --git a/resources/views/admin/index.twig b/resources/views/admin/index.twig index 7d1bf24bd8..527f15dc08 100644 --- a/resources/views/admin/index.twig +++ b/resources/views/admin/index.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists }} + {{ Breadcrumbs.render }} {% endblock %} {% block content %} @@ -55,7 +56,4 @@ - - - -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/resources/views/admin/link/create.twig b/resources/views/admin/link/create.twig index cb69f859df..83d7fe947c 100644 --- a/resources/views/admin/link/create.twig +++ b/resources/views/admin/link/create.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName) }} {% endblock %} {% block content %} diff --git a/resources/views/admin/link/delete.twig b/resources/views/admin/link/delete.twig index 7b94903ed9..884bf0da93 100644 --- a/resources/views/admin/link/delete.twig +++ b/resources/views/admin/link/delete.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, linkType) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, linkType) }} {% endblock %} {% block content %} diff --git a/resources/views/admin/link/edit.twig b/resources/views/admin/link/edit.twig index 1bd8599f70..80b7833500 100644 --- a/resources/views/admin/link/edit.twig +++ b/resources/views/admin/link/edit.twig @@ -1,47 +1,47 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, linkType) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, linkType) }} {% endblock %} {% block content %} {{ Form.model(linkType, {'class' : 'form-horizontal','id' : 'update','url' : route('admin.links.update', linkType.id) } ) }} - - -
-
-
-
-

{{ 'mandatoryFields'|_ }}

-
-
- {{ ExpandedForm.text('name', null, {helpText: trans('firefly.link_type_help_name')}) }} - {{ ExpandedForm.text('inward', null, {helpText: trans('firefly.link_type_help_inward')}) }} - {{ ExpandedForm.text('outward', null, {helpText: trans('firefly.link_type_help_outward')}) }} -
+ + +
+
+
+
+

{{ 'mandatoryFields'|_ }}

+
+
+ {{ ExpandedForm.text('name', null, {helpText: trans('firefly.link_type_help_name')}) }} + {{ ExpandedForm.text('inward', null, {helpText: trans('firefly.link_type_help_inward')}) }} + {{ ExpandedForm.text('outward', null, {helpText: trans('firefly.link_type_help_outward')}) }}
-
+
+
- -
-
-

{{ 'options'|_ }}

-
-
- {{ ExpandedForm.optionsList('update','link_type') }} -
- + +
+
+

{{ 'options'|_ }}

+
+
+ {{ ExpandedForm.optionsList('update','link_type') }} +
+ -
+ +
diff --git a/resources/views/admin/link/index.twig b/resources/views/admin/link/index.twig index 4ae665e1ad..f49df83759 100644 --- a/resources/views/admin/link/index.twig +++ b/resources/views/admin/link/index.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists }} + {{ Breadcrumbs.render }} {% endblock %} {% block content %}
@@ -27,8 +27,10 @@ {% if linkType.editable %}
- - + +
{% endif %} diff --git a/resources/views/admin/link/show.twig b/resources/views/admin/link/show.twig index 9515d56588..3d452df573 100644 --- a/resources/views/admin/link/show.twig +++ b/resources/views/admin/link/show.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, linkType) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, linkType) }} {% endblock %} {% block content %}
@@ -28,7 +28,8 @@
- +
diff --git a/resources/views/admin/update/index.twig b/resources/views/admin/update/index.twig new file mode 100644 index 0000000000..35d76b6745 --- /dev/null +++ b/resources/views/admin/update/index.twig @@ -0,0 +1,61 @@ +{% extends "./layout/default" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.render }} +{% endblock %} +{% block content %} +
+ +
+ + + + {# do update check. #} +
+
+
+

{{ 'admin_update_check_title'|_ }}

+
+
+

+ {{ 'admin_update_check_explain'|_ }} +

+ {{ ExpandedForm.select('check_for_updates',options, selected) }} +
+
+
+ + {# check now button #} +
+
+
+

{{ 'admin_update_check_now_title'|_ }}

+
+
+

+ {{ 'admin_update_check_now_explain'|_ }} +

+

+ {{ 'check_for_updates_button'|_ }} +

+
+
+
+
+
+
+ +
+
+ +
+ +{% endblock %} +{% block scripts %} + + +{% endblock %} \ No newline at end of file diff --git a/resources/views/admin/users/delete.twig b/resources/views/admin/users/delete.twig index 17efd643a8..64ad1ec1ae 100644 --- a/resources/views/admin/users/delete.twig +++ b/resources/views/admin/users/delete.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, user) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, user) }} {% endblock %} {% block content %} @@ -25,7 +25,8 @@

diff --git a/resources/views/admin/users/edit.twig b/resources/views/admin/users/edit.twig index 19a9cb0465..510bc5ffd1 100644 --- a/resources/views/admin/users/edit.twig +++ b/resources/views/admin/users/edit.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, user) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, user) }} {% endblock %} {% block content %} diff --git a/resources/views/admin/users/index.twig b/resources/views/admin/users/index.twig index 03b1a255e9..c9b21ebff4 100644 --- a/resources/views/admin/users/index.twig +++ b/resources/views/admin/users/index.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists }} + {{ Breadcrumbs.render }} {% endblock %} {% block content %}
diff --git a/resources/views/admin/users/show.twig b/resources/views/admin/users/show.twig index b627f4c2f0..a881d96da1 100644 --- a/resources/views/admin/users/show.twig +++ b/resources/views/admin/users/show.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, user) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, user) }} {% endblock %} {% block content %}
@@ -115,9 +115,7 @@ {{ trans('list.rule_and_groups_count') }} - {{ information.rules }} {{ 'rule_or_rules'|_ }} {{ 'in'|_ }} {{ information.rule_groups }} - - {{ 'rulegroup_or_groups'|_ }} + {{ trans('firefly.nr_of_rules_in_total_groups', {count_rules: information.rules, count_groups: information.rule_groups}) }} diff --git a/resources/views/attachments/delete.twig b/resources/views/attachments/delete.twig index 3e854f8bde..65412569b4 100644 --- a/resources/views/attachments/delete.twig +++ b/resources/views/attachments/delete.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute().getName(), attachment) }} + {{ Breadcrumbs.render(Route.getCurrentRoute().getName(), attachment) }} {% endblock %} {% block content %} diff --git a/resources/views/attachments/edit.twig b/resources/views/attachments/edit.twig index 199b39b64f..deed7522de 100644 --- a/resources/views/attachments/edit.twig +++ b/resources/views/attachments/edit.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute().getName(), attachment) }} + {{ Breadcrumbs.render(Route.getCurrentRoute().getName(), attachment) }} {% endblock %} {% block content %} diff --git a/resources/views/bills/create.twig b/resources/views/bills/create.twig index 3f2701cbcd..08bc14a318 100644 --- a/resources/views/bills/create.twig +++ b/resources/views/bills/create.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, piggyBank) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, piggyBank) }} {% endblock %} {% block content %} diff --git a/resources/views/bills/delete.twig b/resources/views/bills/delete.twig index 650242af27..b717d8bf37 100644 --- a/resources/views/bills/delete.twig +++ b/resources/views/bills/delete.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, bill) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, bill) }} {% endblock %} {% block content %} diff --git a/resources/views/bills/edit.twig b/resources/views/bills/edit.twig index e2983cd929..583a7a2733 100644 --- a/resources/views/bills/edit.twig +++ b/resources/views/bills/edit.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, bill) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, bill) }} {% endblock %} {% block content %} diff --git a/resources/views/bills/index.twig b/resources/views/bills/index.twig index 0870429463..5635099605 100644 --- a/resources/views/bills/index.twig +++ b/resources/views/bills/index.twig @@ -1,36 +1,36 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName) }} {% endblock %} {% block content %} {% if bills.count == 0 %} {% include 'partials.empty' with {what: 'default', type: 'bills',route: route('bills.create')} %} {% else %} -
-
-
-
-

{{ title }}

+
+
+
+
+

{{ title }}

-
- -
-
-
- {% include 'list/bills' %} +
+
+ {% include 'list/bills' %} +
- {% endif %} +
+
+{% endif %} {% endblock %} {% block styles %} diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig index 24846d11c4..afde0b88fe 100644 --- a/resources/views/bills/show.twig +++ b/resources/views/bills/show.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, bill) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, bill) }} {% endblock %} {% block content %} @@ -86,12 +86,12 @@
{% if bill.notes.count == 1 %} - +
-
{{ trans('list.notes') }} {{ bill.notes.first.text|markdown }}
+ {% endif %}
diff --git a/resources/views/budgets/create.twig b/resources/views/budgets/create.twig index 25e6f9cd10..4243a15087 100644 --- a/resources/views/budgets/create.twig +++ b/resources/views/budgets/create.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName) }} {% endblock %} {% block content %} diff --git a/resources/views/budgets/delete.twig b/resources/views/budgets/delete.twig index 74590ff0c5..523f8e8781 100644 --- a/resources/views/budgets/delete.twig +++ b/resources/views/budgets/delete.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, budget) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, budget) }} {% endblock %} {% block content %} diff --git a/resources/views/budgets/edit.twig b/resources/views/budgets/edit.twig index 977dfad47c..5054c47264 100644 --- a/resources/views/budgets/edit.twig +++ b/resources/views/budgets/edit.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, budget) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, budget) }} {% endblock %} {% block content %} diff --git a/resources/views/budgets/income.twig b/resources/views/budgets/income.twig index 50c80832f3..201e2f2a3c 100644 --- a/resources/views/budgets/income.twig +++ b/resources/views/budgets/income.twig @@ -5,7 +5,7 @@
diff --git a/resources/views/budgets/index.twig b/resources/views/budgets/index.twig index 4d5ee7f177..b340a9ef02 100644 --- a/resources/views/budgets/index.twig +++ b/resources/views/budgets/index.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName) }} {% endblock %} {% block content %} @@ -17,10 +17,10 @@ {{ 'budgeted'|_ }}: {{ budgeted|formatAmountPlain }}
- {{ trans('firefly.available_between',{start : periodStart, end: periodEnd }) }}: - {{ available|formatAmountPlain }} - - + {{ trans('firefly.available_between',{start : periodStart, end: periodEnd }) }}: + {{ available|formatAmountPlain }} + +
@@ -83,7 +83,7 @@ {% endif %}
- {% if budgets.count == 0 and inactive.count == 0 %} + {% if budgets.count == 0 and inactive.count == 0 and page == 1 %} {% include 'partials.empty' with {what: 'default', type: 'budgets',route: route('budgets.create')} %} {# make FF ignore demo for now. #} {% set shownDemo = true %} @@ -134,6 +134,9 @@

{{ 'budgets'|_ }}

+
+ {{ budgets.render|raw }} +
@@ -190,6 +193,9 @@ {% endfor %}
+
+ {{ budgets.render|raw }} +
diff --git a/resources/views/budgets/info.twig b/resources/views/budgets/info.twig index 25a8104b47..6bc6ff6582 100644 --- a/resources/views/budgets/info.twig +++ b/resources/views/budgets/info.twig @@ -5,50 +5,50 @@
- - + +
diff --git a/resources/views/budgets/no-budget.twig b/resources/views/budgets/no-budget.twig index cc0910f055..6b1c5fb6dc 100644 --- a/resources/views/budgets/no-budget.twig +++ b/resources/views/budgets/no-budget.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, moment, start, end) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, moment, start, end) }} {% endblock %} {% block content %} diff --git a/resources/views/budgets/show.twig b/resources/views/budgets/show.twig index 3b57ef33d1..4a697a3c6e 100644 --- a/resources/views/budgets/show.twig +++ b/resources/views/budgets/show.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, budget, budgetLimit) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, budget, budgetLimit) }} {% endblock %} {% block content %} @@ -122,27 +122,29 @@ {{ limit.spent|formatAmount }} {% if limit.spent > 0 %} - - - {% set overspent = limit.amount + limit.spent < 0 %} + + + {% set overspent = limit.amount + limit.spent < 0 %} - {% if overspent %} - {% set pct = (limit.spent != 0 ? (limit.amount / (limit.spent*-1))*100 : 0) %} -
-
-
-
- {% else %} - {% set pct = (limit.amount != 0 ? (((limit.spent*-1) / limit.amount)*100) : 0) %} -
-
-
- {% endif %} - - + {% if overspent %} + {% set pct = (limit.spent != 0 ? (limit.amount / (limit.spent*-1))*100 : 0) %} +
+
+
+
+ {% else %} + {% set pct = (limit.amount != 0 ? (((limit.spent*-1) / limit.amount)*100) : 0) %} +
+
+
+ {% endif %} + + {% endif %} diff --git a/resources/views/categories/create.twig b/resources/views/categories/create.twig index 364e40ca1f..b5c8f65aa3 100644 --- a/resources/views/categories/create.twig +++ b/resources/views/categories/create.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName) }} {% endblock %} {% block content %} diff --git a/resources/views/categories/delete.twig b/resources/views/categories/delete.twig index 9766ddb6f0..2873573ec5 100644 --- a/resources/views/categories/delete.twig +++ b/resources/views/categories/delete.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, category) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, category) }} {% endblock %} {% block content %} diff --git a/resources/views/categories/edit.twig b/resources/views/categories/edit.twig index 3a465adf1b..f31c402fe0 100644 --- a/resources/views/categories/edit.twig +++ b/resources/views/categories/edit.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, category) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, category) }} {% endblock %} {% block content %} diff --git a/resources/views/categories/index.twig b/resources/views/categories/index.twig index f23a7f3511..743d72eede 100644 --- a/resources/views/categories/index.twig +++ b/resources/views/categories/index.twig @@ -1,35 +1,35 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName) }} {% endblock %} {% block content %} {% if categories.count > 0 %} -
-
-
-
-

{{ 'categories'|_ }}

+
+
+
+
+

{{ 'categories'|_ }}

- - -
-
- {% include 'list/categories' %} + + +
+
+ {% include 'list/categories' %}
- {% else %} +
+
+{% else %} {% include 'partials.empty' with {what: 'default', type: 'categories',route: route('categories.create')} %} {% endif %} {% endblock %} diff --git a/resources/views/categories/no-category.twig b/resources/views/categories/no-category.twig index 6d71b3606e..5eee40e9f6 100644 --- a/resources/views/categories/no-category.twig +++ b/resources/views/categories/no-category.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, moment, start, end) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, moment, start, end) }} {% endblock %} {% block content %} diff --git a/resources/views/categories/show.twig b/resources/views/categories/show.twig index d333c40a8c..f2e8092a71 100644 --- a/resources/views/categories/show.twig +++ b/resources/views/categories/show.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, category, moment, start, end) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, category, moment, start, end) }} {% endblock %} {% block content %} diff --git a/resources/views/currencies/create.twig b/resources/views/currencies/create.twig index ac98994a17..be786ad691 100644 --- a/resources/views/currencies/create.twig +++ b/resources/views/currencies/create.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName) }} {% endblock %} {% block content %} diff --git a/resources/views/currencies/delete.twig b/resources/views/currencies/delete.twig index e14902a17f..e1e22b040d 100644 --- a/resources/views/currencies/delete.twig +++ b/resources/views/currencies/delete.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, currency) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, currency) }} {% endblock %} {% block content %} diff --git a/resources/views/currencies/edit.twig b/resources/views/currencies/edit.twig index 68462352da..a9c4c582e3 100644 --- a/resources/views/currencies/edit.twig +++ b/resources/views/currencies/edit.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, currency) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, currency) }} {% endblock %} {% block content %} diff --git a/resources/views/currencies/index.twig b/resources/views/currencies/index.twig index da68f20955..6d05352c45 100644 --- a/resources/views/currencies/index.twig +++ b/resources/views/currencies/index.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName) }} {% endblock %} {% block content %} @@ -16,11 +16,14 @@ {{ 'currencies_intro'|_ }}

{% if currencies|length > 0 %} +
+ {{ currencies.render|raw }} +
{% if isOwner %} - + {% endif %} @@ -31,12 +34,12 @@ {% for currency in currencies %} {% if isOwner %} - + {% endif %} @@ -52,6 +55,9 @@ {% endfor %}
  {{ 'currency'|_ }} {{ 'number_of_decimals'|_ }}
-
- - -
-
+
+ + +
+
{{ currency.name }} ({{ currency.code }}) ({{ currency.symbol|raw }}) {{ currency.decimal_places }}
+
+ {{ currencies.render|raw }} +
{% endif %}
{% if env('MAPBOX_API_KEY','') != '' %} -{% set latitudevar = name~'_latitude' %} -{% set longitudevar = name~'_longitude' %} -{% set zoomlevelvar = name~'_zoomlevel' %} -{% set hastagvar = name~'_has_tag' %} -{% set settagvar = name~'_set_tag' %} -{% set clearvar = name~'_clear_location' %} + {% set latitudevar = name~'_latitude' %} + {% set longitudevar = name~'_longitude' %} + {% set zoomlevelvar = name~'_zoomlevel' %} + {% set hastagvar = name~'_has_tag' %} + {% set settagvar = name~'_set_tag' %} + {% set clearvar = name~'_clear_location' %} - + if (typeof mapboxToken === 'undefined') { + var mapboxToken = 'invalid'; + } + // + document.getElementById('{{ clearvar }}').addEventListener('click', function () { + if (typeof marker !== 'undefined') { + marker.remove(); + $('input[name="{{ hastagvar }}"]').val('false'); + } + return false; + }); + + // set location thing: + function setTagLocation(e) { + $('input[name="{{ latitudevar }}"]').val(e.latlng.lat); + $('input[name="{{ longitudevar }}"]').val(e.latlng.lng); + $('input[name="{{ zoomlevelvar }}"]').val(mymap.getZoom()); + $('input[name="{{ hastagvar }}"]').val('true'); + + // remove existing marker: + if (typeof marker !== 'undefined') { + marker.remove(); + } + // new marker + marker = L.marker([e.latlng.lat, e.latlng.lng]).addTo(mymap); + } + + + console.log({{ longitudevar }}); + + document.addEventListener("DOMContentLoaded", function () { + "use strict"; + + // make map: + mymap = L.map('{{ name }}_map').setView([{{ latitudevar }}, {{ longitudevar }}], {{ zoomlevelvar }}); + + L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', { + attribution: 'Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © Mapbox', + maxZoom: 18, + id: 'mapbox.streets', + accessToken: mapboxToken + }).addTo(mymap); + + mymap.on('contextmenu', setTagLocation); + + // add marker + if (typeof {{ settagvar }} !== 'undefined' && {{ settagvar }} === true) { + marker = L.marker([{{ latitudevar }}, {{ longitudevar }}]).addTo(mymap); + } + + }); + {% endif %} diff --git a/resources/views/form/number.twig b/resources/views/form/number.twig index efffb5b8a0..6951b19328 100644 --- a/resources/views/form/number.twig +++ b/resources/views/form/number.twig @@ -2,7 +2,7 @@
- {{ Form.input('number', name, value, options) }} + {{ Form.input('number', name, value, options) }} {% include 'form/feedback' %}
diff --git a/resources/views/import/bank/form.twig b/resources/views/import/bank/form.twig index 212c481abd..a7c6507a01 100644 --- a/resources/views/import/bank/form.twig +++ b/resources/views/import/bank/form.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists }} + {{ Breadcrumbs.render }} {% endblock %} {% block content %}
@@ -34,13 +34,13 @@ {% for remoteAccount in remoteAccounts %} - + {{ remoteAccount.name }} -
{{ remoteAccount.number }} +
{{ remoteAccount.number }} {{ remoteAccount.currency }} diff --git a/resources/views/import/bunq/prerequisites.twig b/resources/views/import/bunq/prerequisites.twig index a70da151d1..063bad3942 100644 --- a/resources/views/import/bunq/prerequisites.twig +++ b/resources/views/import/bunq/prerequisites.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists }} + {{ Breadcrumbs.render }} {% endblock %} {% block content %}
diff --git a/resources/views/import/file/finished.twig b/resources/views/import/file/finished.twig deleted file mode 100644 index 9f981e3517..0000000000 --- a/resources/views/import/file/finished.twig +++ /dev/null @@ -1,38 +0,0 @@ -{% extends "./layout/default" %} - -{% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists }} -{% endblock %} -{% block content %} -
-
-
-
-

{{ 'import_finished'|_ }}

-
-
-

- {{ 'import_finished_intro'|_ }} -

- {% if tagId > 0 %} -

- {{ trans('firefly.import_finished_text_with_link', {tag: tagId})|raw }} -

- {% else %} -

- {{ 'import_finished_text_without_link'|_ }} -

- {% endif %} - -

- {{ 'import_share_configuration'|_ }} -

-
-
-
-
-{% endblock %} -{% block scripts %} -{% endblock %} -{% block styles %} -{% endblock %} diff --git a/resources/views/import/file/index.twig b/resources/views/import/file/index.twig deleted file mode 100644 index f579b59eeb..0000000000 --- a/resources/views/import/file/index.twig +++ /dev/null @@ -1,53 +0,0 @@ -{% extends "./layout/default" %} - -{% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists }} -{% endblock %} -{% block content %} -
-
-
-
-

{{ 'import_index_title'|_ }}

-
-
-
-
-

- {{ 'import_index_intro'|_ }} -

-
-
- -
-
- - - -
- - {{ ExpandedForm.file('import_file', {helpText: 'import_index_file'|_}) }} - {{ ExpandedForm.file('configuration_file', {helpText: 'import_index_config'|_|raw}) }} - {{ ExpandedForm.select('import_file_type', importFileTypes, defaultImportType, {'helpText' : 'import_index_type'|_}) }} - -
- -
- -
-
-
-
-
-
-
-
-
-{% endblock %} -{% block scripts %} -{% endblock %} -{% block styles %} -{% endblock %} diff --git a/resources/views/import/csv/initial.twig b/resources/views/import/file/initial.twig similarity index 75% rename from resources/views/import/csv/initial.twig rename to resources/views/import/file/initial.twig index dce077adea..cff85df421 100644 --- a/resources/views/import/csv/initial.twig +++ b/resources/views/import/file/initial.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, job) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, job) }} {% endblock %} {% block content %} @@ -10,11 +10,11 @@
-

{{ trans('csv.initial_title') }}

+

{{ trans('import.csv_initial_title') }}

- {{ trans('csv.initial_text') }} + {{ trans('import.csv_initial_text') }}

@@ -22,49 +22,49 @@
-
+
-

{{ trans('csv.initial_box_title') }}

+

{{ trans('import.csv_initial_box_title') }}

{{ 'mandatoryFields'|_ }}

- {{ ExpandedForm.checkbox('has_headers',1,job.configuration['has-headers'],{helpText: trans('csv.initial_header_help')}) }} - {{ ExpandedForm.text('date_format',job.configuration['date-format'],{helpText: trans('csv.initial_date_help', {dateExample: phpdate('Ymd')}) }) }} - {{ ExpandedForm.select('csv_delimiter', data.delimiters, job.configuration['delimiter'], {helpText: trans('csv.initial_delimiter_help') } ) }} - {{ ExpandedForm.select('csv_import_account', data.accounts, job.configuration['import-account'], {helpText: trans('csv.initial_import_account_help')} ) }} + {{ ExpandedForm.checkbox('has_headers',1,job.configuration['has-headers'],{helpText: trans('import.csv_initial_header_help')}) }} + {{ ExpandedForm.text('date_format',job.configuration['date-format'],{helpText: trans('import.csv_initial_date_help', {dateExample: phpdate('Ymd')}) }) }} + {{ ExpandedForm.select('csv_delimiter', data.delimiters, job.configuration['delimiter'], {helpText: trans('import.csv_initial_delimiter_help') } ) }} + {{ ExpandedForm.select('csv_import_account', data.accounts, job.configuration['import-account'], {helpText: trans('import.csv_initial_import_account_help')} ) }}

{{ 'optionalFields'|_ }}

@@ -79,7 +79,7 @@
@@ -97,7 +97,7 @@
diff --git a/resources/views/import/csv/map.twig b/resources/views/import/file/map.twig similarity index 72% rename from resources/views/import/csv/map.twig rename to resources/views/import/file/map.twig index 8f25f984f4..3a347f8905 100644 --- a/resources/views/import/csv/map.twig +++ b/resources/views/import/file/map.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, job) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, job) }} {% endblock %} {% block content %} @@ -11,18 +11,18 @@
-

{{ trans('csv.map_title') }}

+

{{ trans('import.file_map_title') }}

- {{ trans('csv.map_text') }} + {{ trans('import.file_map_text') }}

- + {% for field in data %} @@ -30,14 +30,14 @@
-

{{ trans('csv.column_'~field.name) }}

+

{{ trans('import.column_'~field.name) }}

- - + + @@ -48,8 +48,8 @@ {% endfor %} @@ -67,7 +67,7 @@
diff --git a/resources/views/import/csv/roles.twig b/resources/views/import/file/roles.twig similarity index 79% rename from resources/views/import/csv/roles.twig rename to resources/views/import/file/roles.twig index f87ae66ec9..8730ccaf0f 100644 --- a/resources/views/import/csv/roles.twig +++ b/resources/views/import/file/roles.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, job) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, job) }} {% endblock %} {% block content %} @@ -10,18 +10,18 @@
-

{{ trans('csv.roles_title') }}

+

{{ trans('import.csv_roles_title') }}

- {{ trans('csv.roles_text') }} + {{ trans('import.csv_roles_text') }}

- + @@ -29,17 +29,17 @@
-

{{ trans('csv.roles_table') }}

+

{{ trans('import.csv_roles_table') }}

{{ trans('csv.map_field_value') }}{{ trans('csv.map_field_mapped_to') }}{{ trans('import.file_map_field_value') }}{{ trans('import.file_map_field_mapped_to') }}
{{ Form.select('mapping['~field.index~']['~option~']', - field.options, - job.configuration['column-mapping-config'][field.index][option], {class: 'form-control'}) }} + field.options, + job.configuration['column-mapping-config'][field.index][option], {class: 'form-control'}) }}
- - - - + + + + {% for i in 0..(data.total -1) %} @@ -47,14 +47,14 @@ {# input buttons #} diff --git a/resources/views/reports/partials/exp-budgets.twig b/resources/views/reports/partials/exp-budgets.twig new file mode 100644 index 0000000000..d1cc577e1d --- /dev/null +++ b/resources/views/reports/partials/exp-budgets.twig @@ -0,0 +1,30 @@ +
{{ trans('csv.roles_column_name') }}{{ trans('csv.roles_column_example') }}{{ trans('csv.roles_column_role') }}{{ trans('csv.roles_do_map_value') }}{{ trans('import.csv_roles_column_name') }}{{ trans('import.csv_roles_column_example') }}{{ trans('import.csv_roles_column_role') }}{{ trans('import.csv_roles_do_map_value') }}
{% if data.headers[i] == '' %} - {{ trans('csv.roles_column') }} #{{ loop.index }} + {{ trans('import.csv_roles_column') }} #{{ loop.index }} {% else %} {{ data.headers[i] }} {% endif %} {% if data.examples[i]|length == 0 %} - {{ trans('csv.roles_no_example_data') }} + {{ trans('import.csv_roles_no_example_data') }} {% else %} {% for example in data.examples[i] %} {{ example }}
@@ -91,7 +91,7 @@
diff --git a/resources/views/import/file/upload.twig b/resources/views/import/file/upload.twig new file mode 100644 index 0000000000..8f07bfe1d1 --- /dev/null +++ b/resources/views/import/file/upload.twig @@ -0,0 +1,57 @@ +{% extends "./layout/default" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.render }} +{% endblock %} +{% block content %} +
+
+
+
+

{{ trans('import.file_upload_title') }}

+
+
+

+ {{ trans('import.file_upload_text') }} +

+
+
+ +
+
+ + + + + +
+
+
+
+

{{ trans('import.file_upload_fields') }}

+
+
+ {{ ExpandedForm.file('import_file', {helpText: trans('import.file_upload_help')}) }} + {{ ExpandedForm.file('configuration_file', {helpText: trans('import.file_upload_config_help')|raw}) }} + {{ ExpandedForm.select('import_file_type', data.file_types, data.default_type, {'helpText' : trans('import.file_upload_type_help')}) }} +
+
+
+
+
+
+
+
+ +
+
+
+
+ +{% endblock %} +{% block scripts %} +{% endblock %} +{% block styles %} +{% endblock %} diff --git a/resources/views/import/index.twig b/resources/views/import/index.twig index 8e2876dc52..c9b5682c9a 100644 --- a/resources/views/import/index.twig +++ b/resources/views/import/index.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists }} + {{ Breadcrumbs.render }} {% endblock %} {% block content %}
@@ -20,27 +20,51 @@
- + {% endif %} + + {# import from Spectre #} + {% if routines.spectre == true %} + + {% endif %} + + {# import from Plaid #} + {% if routines.plaid == true %} + + {% endif %}
+ {% endblock %} {% block scripts %} {% endblock %} diff --git a/resources/views/import/spectre/input-fields.twig b/resources/views/import/spectre/input-fields.twig new file mode 100644 index 0000000000..adc64440d2 --- /dev/null +++ b/resources/views/import/spectre/input-fields.twig @@ -0,0 +1,65 @@ +{% extends "./layout/default" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.render }} +{% endblock %} +{% block content %} +
+
+ +
+
+
+

{{ trans('import.spectre_input_fields_title') }}

+
+
+
+
+

+ {{ trans('import.spectre_input_fields_text',{provider: data.provider.data.name, country: data.country})|raw }} +

+

+ {{ trans('import.spectre_instructions_english') }} +

+

+ {{ data.provider.data.instruction|nl2br }} +

+
+
+ +
+
+ {% for field in data.fields %} + {# text, password, select, file #} + {% if field.nature == 'text' %} + {{ ExpandedForm.text(field.name,null, {label: field.english_name ~ ' ('~field.localized_name~')'}) }} + {% endif %} + {% if field.nature == 'password' %} + {{ ExpandedForm.password(field.name, {label: field.english_name ~ ' ('~field.localized_name~')'}) }} + {% endif %} + {% if field.nature == 'select' %} + DO NOT SUPPORT + {{ dump(field) }} + {% endif %} + {% if field.narture == 'file' %} + DO NOT SUPPORT + {{ dump(field) }} + {% endif %} + + {% endfor %} +
+
+ +
+
+ +
+{% endblock %} +{% block scripts %} +{% endblock %} +{% block styles %} +{% endblock %} diff --git a/resources/views/import/spectre/prerequisites.twig b/resources/views/import/spectre/prerequisites.twig new file mode 100644 index 0000000000..0bda9b1823 --- /dev/null +++ b/resources/views/import/spectre/prerequisites.twig @@ -0,0 +1,58 @@ +{% extends "./layout/default" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.render }} +{% endblock %} +{% block content %} +
+
+ +
+
+
+

{{ trans('import.spectre_prerequisites_title') }}

+
+
+
+
+

+ {{ trans('import.spectre_prerequisites_text')|raw }} +

+
+
+ +
+
+ {{ ExpandedForm.text('client_id') }} + {{ ExpandedForm.text('service_secret') }} + {{ ExpandedForm.text('app_secret') }} +
+
+
+
+

{{ trans('import.spectre_enter_pub_key')|raw }}

+
+ + +
+ +
+
+
+
+ +
+
+ +
+{% endblock %} +{% block scripts %} +{% endblock %} +{% block styles %} +{% endblock %} diff --git a/resources/views/import/spectre/redirect.twig b/resources/views/import/spectre/redirect.twig new file mode 100644 index 0000000000..e76c8b4bdb --- /dev/null +++ b/resources/views/import/spectre/redirect.twig @@ -0,0 +1,15 @@ + + + + + + + Page Redirection + + + +If you are not redirected automatically, follow this link to Spectre.. + +#} \ No newline at end of file diff --git a/resources/views/import/spectre/select-country.twig b/resources/views/import/spectre/select-country.twig new file mode 100644 index 0000000000..55a5905f86 --- /dev/null +++ b/resources/views/import/spectre/select-country.twig @@ -0,0 +1,42 @@ +{% extends "./layout/default" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.render }} +{% endblock %} +{% block content %} +
+
+ +
+
+
+

{{ trans('import.spectre_select_country_title') }}

+
+
+
+
+

+ {{ trans('import.spectre_select_country_text')|raw }} +

+
+
+ +
+
+ {{ ExpandedForm.select('country_code', data.countries, null)|raw }} +
+
+ +
+
+ +
+{% endblock %} +{% block scripts %} +{% endblock %} +{% block styles %} +{% endblock %} diff --git a/resources/views/import/spectre/select-provider.twig b/resources/views/import/spectre/select-provider.twig new file mode 100644 index 0000000000..c4f94fbdd2 --- /dev/null +++ b/resources/views/import/spectre/select-provider.twig @@ -0,0 +1,42 @@ +{% extends "./layout/default" %} + +{% block breadcrumbs %} + {{ Breadcrumbs.render }} +{% endblock %} +{% block content %} +
+
+ +
+
+
+

{{ trans('import.spectre_select_provider_title') }}

+
+
+
+
+

+ {{ trans('import.spectre_select_provider_text',{country: data.country})|raw }} +

+
+
+ +
+
+ {{ ExpandedForm.select('provider_code', data.providers, null)|raw }} +
+
+ +
+
+ +
+{% endblock %} +{% block scripts %} +{% endblock %} +{% block styles %} +{% endblock %} diff --git a/resources/views/import/file/status.twig b/resources/views/import/status.twig similarity index 63% rename from resources/views/import/file/status.twig rename to resources/views/import/status.twig index 51858bf20c..ac042e5dd6 100644 --- a/resources/views/import/file/status.twig +++ b/resources/views/import/status.twig @@ -1,21 +1,20 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists }} + {{ Breadcrumbs.render }} {% endblock %} {% block content %} {# Initial display. Will refresh (and disappear almost immediately. #} -
-

{{ 'import_status_wait_title'|_ }}

+

{{ trans('import.status_wait_title') }}

- {{ 'import_status_wait_text'|_ }} + {{ trans('import.status_wait_text') }}

@@ -27,17 +26,17 @@
-

{{ 'import_status_fatal_title'|_ }}

+

{{ trans('import.status_fatal_title') }}

- {{ 'import_status_fatal_text'|_ }} + {{ trans('import.status_fatal_text') }}

- {{ 'import_status_fatal_more'|_ }} + {{ trans('import.status_fatal_more') }}

@@ -49,30 +48,38 @@
-

{{ 'import_status_ready_title'|_ }}

+

{{ trans('import.status_ready_title') }}

- {{ 'import_status_ready_text'|_ }} + {% if job.configuration['has-config-file'] == false %} + {{ trans('import.status_ready_noconfig_text') }} + {% else %} + {{ trans('import.status_ready_text') }} + {% endif %}

php artisan firefly:start-import {{ job.key }}

+ {% if job.configuration['has-config-file'] != false %} + + {% endif %} -
- +
-

-   -

-

- {{ 'import_status_ready_share'|_ }} -

+ {% if job.configuration['has-config-file'] != false %} +

+   +

+

+ {{ trans('import.status_ready_share')|raw }} +

+ {% endif %}
@@ -83,7 +90,7 @@
-

{{ 'import_status_running_title'|_ }}

+

{{ trans('import.status_running_title') }}

@@ -93,7 +100,7 @@ aria-valuemax="100" style="width: 100%;min-width:40px;">
-

{{ 'import_status_running_placeholder'|_ }}

+

{{ trans('import.status_running_placeholder') }}

@@ -105,11 +112,11 @@
-

{{ 'import_status_finished_title'|_ }}

+

{{ trans('import.status_finished_title') }}

- {{ 'import_status_finished_text'|_ }} + {{ trans('import.status_finished_text') }}

@@ -122,7 +129,7 @@
-

{{ 'import_status_errors_title'|_ }}

+

{{ trans('import.status_errors_title') }}

@@ -138,13 +145,13 @@ {% endblock %} diff --git a/resources/views/index.twig b/resources/views/index.twig index dd0872325d..c763197739 100644 --- a/resources/views/index.twig +++ b/resources/views/index.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists }} + {{ Breadcrumbs.render }} {% endblock %} {% block content %} {% include 'partials.boxes' %} @@ -112,7 +112,8 @@ {# EXPENSE ACCOUNTS #}

@@ -123,7 +124,8 @@ {% if showDeps %}
@@ -146,9 +148,9 @@ {% if start.lte(today) and end.gte(today) %} - var today = {{ today.diffInDays(start) + 1 }}; + var today = {{ today.diffInDays(start) + 1 }}; {% else %} - var today = -1; + var today = -1; {% endif %} diff --git a/resources/views/javascript/variables.twig b/resources/views/javascript/variables.twig index 0da9d3eadf..1bd44157cc 100644 --- a/resources/views/javascript/variables.twig +++ b/resources/views/javascript/variables.twig @@ -1,4 +1,3 @@ - // date ranges var ranges = {} {% for title, range in dateRangeConfig.ranges %} @@ -7,22 +6,22 @@ var ranges = {} // date range meta configuration var dateRangeMeta = { - title: "{{ dateRangeTitle }}", - uri: "{{ route('daterange') }}", - labels: { - apply: "{{ 'apply'|_ }}", - cancel: "{{ 'cancel'|_ }}", - from: "{{ 'from'|_ }}", - to: "{{ 'to'|_ }}", - customRange: "{{ 'customRange'|_ }}" - } +title: "{{ dateRangeTitle }}", +uri: "{{ route('daterange') }}", +labels: { +apply: "{{ 'apply'|_ }}", +cancel: "{{ 'cancel'|_ }}", +from: "{{ 'from'|_ }}", +to: "{{ 'to'|_ }}", +customRange: "{{ 'customRange'|_ }}" +} }; // date range actual configuration: var dateRangeConfig = { - startDate: moment("{{ dateRangeConfig.start }}"), - endDate: moment("{{ dateRangeConfig.end }}"), - ranges: ranges +startDate: moment("{{ dateRangeConfig.start }}"), +endDate: moment("{{ dateRangeConfig.end }}"), +ranges: ranges }; diff --git a/resources/views/json/piggy-banks.twig b/resources/views/json/piggy-banks.twig index d8cc226c5e..478ba1d95b 100644 --- a/resources/views/json/piggy-banks.twig +++ b/resources/views/json/piggy-banks.twig @@ -5,9 +5,10 @@
{% for entry in info %} - {{ entry.name }}
+ {{ entry.name }}
-
+
{% if entry.percentage >=20 %}{{ entry.amount|formatAmountPlain }}{% endif %}
{% if entry.percentage < 20 %} {{ entry.amount|formatAmountPlain }}{% endif %} diff --git a/resources/views/layout/default.twig b/resources/views/layout/default.twig index 7c52a8acff..f39e95761a 100644 --- a/resources/views/layout/default.twig +++ b/resources/views/layout/default.twig @@ -185,7 +185,8 @@ - + {% if not shownDemo %} @@ -215,16 +216,6 @@ })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); ga('create', '{{ env('ANALYTICS_ID', 'XXX-XX-X') }}', {'siteSpeedSampleRate': 100}); ga('send', 'pageview'); - - // send an event if relevant: - {% if Session.has('gaEventCategory') and Session.has('gaEventAction') and not Session.has('gaEventLabel') %} - ga('send', 'event', '{{ Session.get('gaEventCategory') }}', '{{ Session.get('gaEventAction') }}'); - {% endif %} - - // send event if relevant: - {% if Session.has('gaEventCategory') and Session.has('gaEventAction') and Session.has('gaEventLabel') %} - ga('send', 'event', '{{ Session.get('gaEventCategory') }}', '{{ Session.get('gaEventAction') }}', '{{ Session.get('gaEventLabel') }}'); - {% endif %} {% endif %} diff --git a/resources/views/layout/empty.twig b/resources/views/layout/empty.twig index 02fc0c111e..f96c8615d1 100644 --- a/resources/views/layout/empty.twig +++ b/resources/views/layout/empty.twig @@ -47,16 +47,6 @@ })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); ga('create', '{{ env('ANALYTICS_ID', 'XXX-XX-X') }}', {'siteSpeedSampleRate': 100}); ga('send', 'pageview'); - - // send an event if relevant: - {% if Session.has('gaEventCategory') and Session.has('gaEventAction') and not Session.has('gaEventLabel') %} - ga('send', 'event', '{{ Session.get('gaEventCategory') }}', '{{ Session.get('gaEventAction') }}'); - {% endif %} - - // send event if relevant: - {% if Session.has('gaEventCategory') and Session.has('gaEventAction') and Session.has('gaEventLabel') %} - ga('send', 'event', '{{ Session.get('gaEventCategory') }}', '{{ Session.get('gaEventAction') }}', '{{ Session.get('gaEventLabel') }}'); - {% endif %} {% endif %} diff --git a/resources/views/layout/guest.twig b/resources/views/layout/guest.twig index 2b2b10e8fd..3742c6d910 100644 --- a/resources/views/layout/guest.twig +++ b/resources/views/layout/guest.twig @@ -58,16 +58,6 @@ })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); ga('create', '{{ env('ANALYTICS_ID', 'XXX-XX-X') }}', {'siteSpeedSampleRate': 100}); ga('send', 'pageview'); - - // send an event if relevant: - {% if Session.has('gaEventCategory') and Session.has('gaEventAction') and not Session.has('gaEventLabel') %} - ga('send', 'event', '{{ Session.get('gaEventCategory') }}', '{{ Session.get('gaEventAction') }}'); - {% endif %} - - // send event if relevant: - {% if Session.has('gaEventCategory') and Session.has('gaEventAction') and Session.has('gaEventLabel') %} - ga('send', 'event', '{{ Session.get('gaEventCategory') }}', '{{ Session.get('gaEventAction') }}', '{{ Session.get('gaEventLabel') }}'); - {% endif %} {% endif %} diff --git a/resources/views/list/accounts.twig b/resources/views/list/accounts.twig index 61b1295141..90c69be280 100644 --- a/resources/views/list/accounts.twig +++ b/resources/views/list/accounts.twig @@ -1,3 +1,6 @@ +
+ {{ accounts.render|raw }} +
@@ -11,14 +14,21 @@ + class="hidden-sm hidden-xs hidden-md">{{ trans('list.balanceDiff') }} {% for account in accounts %} {% if what == "asset" %} @@ -63,3 +73,6 @@ {% endfor %}
{{ account.name }}
+
+ {{ accounts.render|raw }} +
diff --git a/resources/views/list/bills.twig b/resources/views/list/bills.twig index e532665d60..e4e8f6afc8 100644 --- a/resources/views/list/bills.twig +++ b/resources/views/list/bills.twig @@ -1,3 +1,6 @@ +
+ {{ bills.render|raw }} +
@@ -16,7 +19,9 @@ {% for entry in bills %}
{{ entry.name }} @@ -126,3 +131,6 @@ {% endfor %}
+
+ {{ bills.render|raw }} +
\ No newline at end of file diff --git a/resources/views/list/categories.twig b/resources/views/list/categories.twig index 041a338acf..6094b73d5b 100644 --- a/resources/views/list/categories.twig +++ b/resources/views/list/categories.twig @@ -1,3 +1,6 @@ +
+ {{ categories.render|raw }} +
@@ -36,3 +39,6 @@ {% endfor %}
+
+ {{ categories.render|raw }} +
\ No newline at end of file diff --git a/resources/views/list/journals.twig b/resources/views/list/journals.twig index 0e3f4ff036..e0e25e9383 100644 --- a/resources/views/list/journals.twig +++ b/resources/views/list/journals.twig @@ -46,12 +46,14 @@
{{ 'select_transactions'|_ }} + > {{ 'stop_selection'|_ }} {% if showReconcile == true %} {% if moment == 'all' %} - {{ 'reconcile_this_account'|_ }} + {{ 'reconcile_this_account'|_ }} {% else %} - {{ 'reconcile_this_account'|_ }} + {{ 'reconcile_this_account'|_ }} {% endif %} {% endif %}
diff --git a/resources/views/list/piggy-bank-events.twig b/resources/views/list/piggy-bank-events.twig index 89b20f1710..43c815b54a 100644 --- a/resources/views/list/piggy-bank-events.twig +++ b/resources/views/list/piggy-bank-events.twig @@ -1,7 +1,7 @@ {% if showPiggyBank %} - + {% endif %} diff --git a/resources/views/list/piggy-banks.twig b/resources/views/list/piggy-banks.twig index bcd7d26ac7..241a532f1f 100644 --- a/resources/views/list/piggy-banks.twig +++ b/resources/views/list/piggy-banks.twig @@ -1,3 +1,6 @@ +
+ {{ piggyBanks.render|raw }} +
{{ trans('list.piggy_bank') }}{{ trans('list.piggy_bank') }}{{ trans('list.date') }} {{ trans('list.amount') }}
@@ -80,3 +83,6 @@ {% endfor %}
+
+ {{ piggyBanks.render|raw }} +
diff --git a/resources/views/new-user/index.twig b/resources/views/new-user/index.twig index 4401962300..e3f4b8a2e5 100644 --- a/resources/views/new-user/index.twig +++ b/resources/views/new-user/index.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName) }} {% endblock %} {% block content %} diff --git a/resources/views/partials/flashes.twig b/resources/views/partials/flashes.twig index 6e428ccdb0..77c03557fe 100644 --- a/resources/views/partials/flashes.twig +++ b/resources/views/partials/flashes.twig @@ -9,7 +9,7 @@ {% endif %} {# SUCCESS MESSAGE (ALWAYS SINGULAR) #} -{% if Session.has('success') %} +{% if session_has('success') %}
{{ line.getBill.name }} -
+
{{ trans('firefly.bill_expected_between', {start: line.getPayDate.formatLocalized(monthAndDayFormat), end: line.getEndOfPayDate.formatLocalized(monthAndDayFormat) }) }}
+ + + + + + + + {% for budgetId, entry in together %} + + + + + {% endfor %} + +
{{ 'category'|_ }}{{ 'spent'|_ }}
+ {% if entry.budget == null %} + {{ 'no_budget_squared'|_ }} + {% else %} + {{ entry.budget }} + {% endif %} + + {% if entry.spent.per_currency|length ==0 %} + {{ '0'|formatAmount }} + {% else %} + {% for expense in entry.spent.per_currency %} + {{ formatAmountBySymbol(expense.sum, expense.currency.symbol, expense.currency.dp) }}
+ {% endfor %} + {% endif %} +
diff --git a/resources/views/reports/partials/exp-categories.twig b/resources/views/reports/partials/exp-categories.twig new file mode 100644 index 0000000000..1ff99b927d --- /dev/null +++ b/resources/views/reports/partials/exp-categories.twig @@ -0,0 +1,41 @@ + + + + + + + + + + {% for categoryId, entry in together %} + + + + + + {% endfor %} + +
{{ 'category'|_ }}{{ 'spent'|_ }}{{ 'earned'|_ }}
+ {% if entry.category == null %} + {{ 'noCategory'|_ }} + {% else %} + {{ entry.category }} + + {% endif %} + + {% if entry.spent.per_currency|length ==0 %} + {{ '0'|formatAmount }} + {% else %} + {% for expense in entry.spent.per_currency %} + {{ formatAmountBySymbol(expense.sum, expense.currency.symbol, expense.currency.dp) }}
+ {% endfor %} + {% endif %} +
+ {% if entry.earned.per_currency|length ==0 %} + {{ '0'|formatAmount }} + {% else %} + {% for income in entry.earned.per_currency %} + {{ formatAmountBySymbol(income.sum, income.currency.symbol, income.currency.dp) }}
+ {% endfor %} + {% endif %} +
diff --git a/resources/views/reports/partials/exp-not-grouped.twig b/resources/views/reports/partials/exp-not-grouped.twig new file mode 100644 index 0000000000..ab4250937c --- /dev/null +++ b/resources/views/reports/partials/exp-not-grouped.twig @@ -0,0 +1,32 @@ + + + + + + + + + + {% for name, amounts in result %} + + + + + + {% endfor %} + +
{{ 'name'|_ }}
{{ name }} + {% if amounts.spent.per_currency|length == 0 %} + {{ '0'|formatAmount }} + {% endif %} + {% for expense in amounts.spent.per_currency %} + {{ formatAmountBySymbol(expense.sum, expense.currency.symbol, expense.currency.dp) }}
+ {% endfor %} +
+ {% if amounts.earned.per_currency|length == 0 %} + {{ '0'|formatAmount }} + {% endif %} + {% for income in amounts.earned.per_currency %} + {{ formatAmountBySymbol(income.sum, income.currency.symbol, income.currency.dp) }}
+ {% endfor %} +
diff --git a/resources/views/reports/partials/operations.twig b/resources/views/reports/partials/operations.twig index 60ee342bb9..ef501ba3a2 100644 --- a/resources/views/reports/partials/operations.twig +++ b/resources/views/reports/partials/operations.twig @@ -1,10 +1,10 @@ - + - + diff --git a/resources/views/reports/partials/top-transactions.twig b/resources/views/reports/partials/top-transactions.twig new file mode 100644 index 0000000000..67e9c080a2 --- /dev/null +++ b/resources/views/reports/partials/top-transactions.twig @@ -0,0 +1,25 @@ +
{{ 'in'|_ }}{{ 'money_flowing_in'|_ }} {{ incomeSum|formatAmount }}
{{ 'out'|_ }}{{ 'money_flowing_out'|_ }} {{ expensesSum|formatAmount }}
+ + + + + + + + + + {% for transaction in sorted %} + + + + + + + {% endfor %} + +
{{ 'account'|_ }}{{ 'description'|_ }}{{ 'date'|_ }}
+ {{ transaction.opposing_account_name }} + {{ transaction.description }} + {{ transaction.date.formatLocalized(monthAndDayFormat) }} + {{ transaction|transactionAmount }}
diff --git a/resources/views/reports/tag/month.twig b/resources/views/reports/tag/month.twig index 54153b91ba..32966ae224 100644 --- a/resources/views/reports/tag/month.twig +++ b/resources/views/reports/tag/month.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, accountIds, tagTags, start, end) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, accountIds, tagTags, start, end) }} {% endblock %} {% block content %} @@ -422,8 +422,7 @@ var mainUri = '{{ route('chart.tag.main', [accountIds, tagTags, start.format('Ymd'), end.format('Ymd')]) }}'; - - + {% endblock %} diff --git a/resources/views/rules/index.twig b/resources/views/rules/index.twig index ecafa6dfea..58a749477f 100644 --- a/resources/views/rules/index.twig +++ b/resources/views/rules/index.twig @@ -1,6 +1,6 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName) }} {% endblock %} {% block content %} @@ -107,7 +107,9 @@
{# show which transactions would match #} - + {# actually execute rule #} {% endblock %} {% block styles %} - + {% endblock %} diff --git a/resources/views/tags/delete.twig b/resources/views/tags/delete.twig index 9ee307a8b4..4b5bf92422 100644 --- a/resources/views/tags/delete.twig +++ b/resources/views/tags/delete.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, tag) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, tag) }} {% endblock %} {% block content %} diff --git a/resources/views/tags/edit.twig b/resources/views/tags/edit.twig index 93e25444f7..41d032f2d6 100644 --- a/resources/views/tags/edit.twig +++ b/resources/views/tags/edit.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, tag) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, tag) }} {% endblock %} {% block content %} @@ -95,7 +95,7 @@ {% endblock %} {% block styles %} - + {% endblock %} diff --git a/resources/views/tags/index.twig b/resources/views/tags/index.twig index 946ff46a46..e611b43801 100644 --- a/resources/views/tags/index.twig +++ b/resources/views/tags/index.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName) }} {% endblock %} {% block content %} @@ -10,25 +10,26 @@ {% else %} {% for period,entries in clouds %} {% if entries|length > 0 %} -
-
-
-
-

- {% if period == 'no-date' %}{{ 'without_date'|_ }}{% else %}{{ period }}{% endif %} -

-
-
-

- {% for tagInfo in entries %} - {{ tagInfo.tag.tag }} - {% endfor %} -

+
+
+
+
+

+ {% if period == 'no-date' %}{{ 'without_date'|_ }}{% else %}{{ period }}{% endif %} +

+
+
+

+ {% for tagInfo in entries %} + {{ tagInfo.tag.tag }} + {% endfor %} +

+
-
- {% endif %} + {% endif %} {% endfor %} {# diff --git a/resources/views/tags/show.twig b/resources/views/tags/show.twig index 777a4e46c5..c7820c6beb 100644 --- a/resources/views/tags/show.twig +++ b/resources/views/tags/show.twig @@ -1,7 +1,7 @@ {% extends "./layout/default" %} {% block breadcrumbs %} - {{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, tag, moment, start, end) }} + {{ Breadcrumbs.render(Route.getCurrentRoute.getName, tag, moment, start, end) }} {% endblock %} {% block content %} @@ -29,22 +29,22 @@
{% if tag.description %} - - - - + + + + {% endif %} {% if tag.date %} - - - - + + + + {% endif %} @@ -196,7 +196,7 @@ {% endblock %} {% block styles %} - + {% endblock %} {% block scripts %}
- {{ trans('list.description') }} - {{ tag.description }}
+ {{ trans('list.description') }} + {{ tag.description }}
- {{ trans('list.date') }} - - {{ tag.date.formatLocalized(monthAndDayFormat) }} -
+ {{ trans('list.date') }} + + {{ tag.date.formatLocalized(monthAndDayFormat) }} +
{{ trans('list.sum') }}