diff --git a/CHANGELOG.md b/CHANGELOG.md index e6bacbd88b..4db7ca588f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [4.2.1] - 2015-05-25 +### Added +- BIC support (see #430) +- New category report section and chart (see the general financial report) + + +### Changed +- Date range picker now also available on mobile devices (see #435) +- Extended range of amounts for issue #439 +- Rewrote all routes. Old bookmarks may break. + ## [4.2.0] - 2016-11-27 ### Added - Lots of (empty) tests diff --git a/app/Console/Commands/UpgradeDatabase.php b/app/Console/Commands/UpgradeDatabase.php index 4d3633289f..2b21ed83fc 100644 --- a/app/Console/Commands/UpgradeDatabase.php +++ b/app/Console/Commands/UpgradeDatabase.php @@ -72,8 +72,7 @@ class UpgradeDatabase extends Command } - $subQuery = TransactionJournal - ::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + $subQuery = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') ->whereNull('transaction_journals.deleted_at') ->whereNull('transactions.deleted_at') ->groupBy(['transaction_journals.id']) @@ -98,8 +97,7 @@ class UpgradeDatabase extends Command try { /** @var Transaction $opposing */ - $opposing = Transaction - ::where('transaction_journal_id', $journalId) + $opposing = Transaction::where('transaction_journal_id', $journalId) ->where('amount', $amount)->where('identifier', '=', 0) ->whereNotIn('id', $processed) ->first(); diff --git a/app/Console/Commands/VerifyDatabase.php b/app/Console/Commands/VerifyDatabase.php index d2ca7a3454..7159976171 100644 --- a/app/Console/Commands/VerifyDatabase.php +++ b/app/Console/Commands/VerifyDatabase.php @@ -102,8 +102,7 @@ class VerifyDatabase extends Command */ private function reportAccounts() { - $set = Account - ::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id') + $set = Account::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id') ->leftJoin('users', 'accounts.user_id', '=', 'users.id') ->groupBy(['accounts.id', 'accounts.encrypted', 'accounts.name', 'accounts.user_id', 'users.email']) ->whereNull('transactions.account_id') @@ -125,8 +124,7 @@ class VerifyDatabase extends Command */ private function reportBudgetLimits() { - $set = Budget - ::leftJoin('budget_limits', 'budget_limits.budget_id', '=', 'budgets.id') + $set = Budget::leftJoin('budget_limits', 'budget_limits.budget_id', '=', 'budgets.id') ->leftJoin('users', 'budgets.user_id', '=', 'users.id') ->groupBy(['budgets.id', 'budgets.name', 'budgets.user_id', 'users.email']) ->whereNull('budget_limits.id') @@ -148,8 +146,7 @@ class VerifyDatabase extends Command */ private function reportDeletedAccounts() { - $set = Account - ::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id') + $set = Account::leftJoin('transactions', 'transactions.account_id', '=', 'accounts.id') ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') ->whereNotNull('accounts.deleted_at') ->whereNotNull('transactions.id') @@ -187,8 +184,7 @@ class VerifyDatabase extends Command TransactionType::TRANSFER => [AccountType::EXPENSE, AccountType::REVENUE], ]; foreach ($configuration as $transactionType => $accountTypes) { - $set = TransactionJournal - ::leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') + $set = TransactionJournal::leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id') ->leftJoin('account_types', 'account_types.id', 'accounts.account_type_id') @@ -218,8 +214,7 @@ class VerifyDatabase extends Command */ private function reportJournals() { - $set = TransactionJournal - ::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + $set = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') ->whereNotNull('transaction_journals.deleted_at')// USE THIS ->whereNull('transactions.deleted_at') ->whereNotNull('transactions.id') @@ -245,8 +240,7 @@ class VerifyDatabase extends Command */ private function reportNoTransactions() { - $set = TransactionJournal - ::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + $set = TransactionJournal::leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') ->groupBy('transaction_journals.id') ->whereNull('transactions.transaction_journal_id') ->get(['transaction_journals.id']); @@ -335,8 +329,7 @@ class VerifyDatabase extends Command */ private function reportTransfersBudgets() { - $set = TransactionJournal - ::distinct() + $set = TransactionJournal::distinct() ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') ->leftJoin('budget_transaction_journal', 'transaction_journals.id', '=', 'budget_transaction_journal.transaction_journal_id') ->where('transaction_types.type', TransactionType::TRANSFER) diff --git a/app/Export/Collector/JournalExportCollector.php b/app/Export/Collector/JournalExportCollector.php index b9bd7fe0ed..a3e97c957f 100644 --- a/app/Export/Collector/JournalExportCollector.php +++ b/app/Export/Collector/JournalExportCollector.php @@ -292,8 +292,7 @@ class JournalExportCollector extends BasicCollector implements CollectorInterfac private function getWorkSet() { $accountIds = $this->accounts->pluck('id')->toArray(); - $this->workSet = Transaction - ::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + $this->workSet = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') ->leftJoin( 'transactions AS opposing', function (JoinClause $join) { $join->on('opposing.transaction_journal_id', '=', 'transactions.transaction_journal_id') diff --git a/app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php b/app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php index acddc5b6da..1abaa89746 100644 --- a/app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php +++ b/app/Generator/Chart/Budget/BudgetChartGeneratorInterface.php @@ -44,4 +44,11 @@ interface BudgetChartGeneratorInterface * @return array */ public function period(array $entries): array; + + /** + * @param array $entries + * + * @return array + */ + public function periodNoBudget(array $entries): array; } diff --git a/app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php b/app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php index 131fae600c..bec7872b28 100644 --- a/app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php +++ b/app/Generator/Chart/Budget/ChartJsBudgetChartGenerator.php @@ -104,7 +104,7 @@ class ChartJsBudgetChartGenerator implements BudgetChartGeneratorInterface * * @return array */ - public function period(array $entries) : array + public function period(array $entries): array { $data = [ @@ -133,4 +133,32 @@ class ChartJsBudgetChartGenerator implements BudgetChartGeneratorInterface return $data; } + + /** + * @param array $entries + * + * @return array + */ + public function periodNoBudget(array $entries): array + { + $data = [ + 'labels' => array_keys($entries), + 'datasets' => [ + 0 => [ + 'label' => trans('firefly.spent'), + 'data' => [], + ], + ], + 'count' => 1, + ]; + + foreach ($entries as $label => $entry) { + // data set 0 is budgeted + // data set 1 is spent: + $data['datasets'][0]['data'][] = round(($entry['spent'] * -1), 2); + + } + + return $data; + } } diff --git a/app/Generator/Chart/Category/CategoryChartGeneratorInterface.php b/app/Generator/Chart/Category/CategoryChartGeneratorInterface.php index ee8ff8eb96..c311d70298 100644 --- a/app/Generator/Chart/Category/CategoryChartGeneratorInterface.php +++ b/app/Generator/Chart/Category/CategoryChartGeneratorInterface.php @@ -22,7 +22,6 @@ use Illuminate\Support\Collection; */ interface CategoryChartGeneratorInterface { - /** * @param Collection $entries * @@ -58,4 +57,11 @@ interface CategoryChartGeneratorInterface */ public function pieChart(array $data): array; + /** + * @param array $entries + * + * @return array + */ + public function reportPeriod(array $entries): array; + } diff --git a/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php b/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php index 1787125c23..b667811753 100644 --- a/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php +++ b/app/Generator/Chart/Category/ChartJsCategoryChartGenerator.php @@ -142,6 +142,41 @@ class ChartJsCategoryChartGenerator implements CategoryChartGeneratorInterface } + /** + * @param array $entries + * + * @return array + */ + public function reportPeriod(array $entries): array + { + + $data = [ + 'labels' => array_keys($entries), + 'datasets' => [ + 0 => [ + 'label' => trans('firefly.earned'), + 'data' => [], + ], + 1 => [ + 'label' => trans('firefly.spent'), + 'data' => [], + ], + ], + 'count' => 2, + ]; + + foreach ($entries as $label => $entry) { + // data set 0 is budgeted + // data set 1 is spent: + $data['datasets'][0]['data'][] = round($entry['earned'], 2); + $data['datasets'][1]['data'][] = round(bcmul($entry['spent'], '-1'), 2); + + } + + return $data; + + } + /** * @param array $entries * diff --git a/app/Generator/Chart/Report/ChartJsReportChartGenerator.php b/app/Generator/Chart/Report/ChartJsReportChartGenerator.php index 1cdb1bdedd..207062464a 100644 --- a/app/Generator/Chart/Report/ChartJsReportChartGenerator.php +++ b/app/Generator/Chart/Report/ChartJsReportChartGenerator.php @@ -29,7 +29,7 @@ class ChartJsReportChartGenerator implements ReportChartGeneratorInterface * * @return array */ - public function multiYearInOut(Collection $entries): array + public function multiYearOperations(Collection $entries): array { $data = [ 'count' => 2, @@ -62,7 +62,7 @@ class ChartJsReportChartGenerator implements ReportChartGeneratorInterface * * @return array */ - public function multiYearInOutSummarized(string $income, string $expense, int $count): array + public function multiYearSum(string $income, string $expense, int $count): array { $data = [ 'count' => 2, @@ -117,7 +117,7 @@ class ChartJsReportChartGenerator implements ReportChartGeneratorInterface * * @return array */ - public function yearInOut(Collection $entries): array + public function yearOperations(Collection $entries): array { // language: $format = (string)trans('config.month'); @@ -153,7 +153,7 @@ class ChartJsReportChartGenerator implements ReportChartGeneratorInterface * * @return array */ - public function yearInOutSummarized(string $income, string $expense, int $count): array + public function yearSum(string $income, string $expense, int $count): array { $data = [ diff --git a/app/Generator/Chart/Report/ReportChartGeneratorInterface.php b/app/Generator/Chart/Report/ReportChartGeneratorInterface.php index 021fad844a..97bcc6f944 100644 --- a/app/Generator/Chart/Report/ReportChartGeneratorInterface.php +++ b/app/Generator/Chart/Report/ReportChartGeneratorInterface.php @@ -28,7 +28,7 @@ interface ReportChartGeneratorInterface * * @return array */ - public function multiYearInOut(Collection $entries): array; + public function multiYearOperations(Collection $entries): array; /** * @param string $income @@ -37,7 +37,7 @@ interface ReportChartGeneratorInterface * * @return array */ - public function multiYearInOutSummarized(string $income, string $expense, int $count): array; + public function multiYearSum(string $income, string $expense, int $count): array; /** * @param Collection $entries @@ -51,7 +51,7 @@ interface ReportChartGeneratorInterface * * @return array */ - public function yearInOut(Collection $entries): array; + public function yearOperations(Collection $entries): array; /** * @param string $income @@ -60,6 +60,6 @@ interface ReportChartGeneratorInterface * * @return array */ - public function yearInOutSummarized(string $income, string $expense, int $count): array; + public function yearSum(string $income, string $expense, int $count): array; } diff --git a/app/Generator/Report/Audit/MonthReportGenerator.php b/app/Generator/Report/Audit/MonthReportGenerator.php index b366042329..7caff56bb4 100644 --- a/app/Generator/Report/Audit/MonthReportGenerator.php +++ b/app/Generator/Report/Audit/MonthReportGenerator.php @@ -78,9 +78,9 @@ class MonthReportGenerator implements ReportGeneratorInterface $auditData[$id]['dayBeforeBalance'] = $dayBeforeBalance; } - $reportType = 'audit'; - $accountIds = join(',', $this->accounts->pluck('id')->toArray()); - + $defaultShow = ['icon', 'description', 'balance_before', 'amount', 'balance_after', 'date', 'to']; + $reportType = 'audit'; + $accountIds = join(',', $this->accounts->pluck('id')->toArray()); $hideable = ['buttons', 'icon', 'description', 'balance_before', 'amount', 'balance_after', 'date', 'interest_date', 'book_date', 'process_date', // three new optional fields. @@ -88,10 +88,9 @@ class MonthReportGenerator implements ReportGeneratorInterface 'from', 'to', 'budget', 'category', 'bill', // more new optional fields 'internal_reference', 'notes', - 'create_date', 'update_date', ]; - $defaultShow = ['icon', 'description', 'balance_before', 'amount', 'balance_after', 'date', 'to']; + return view('reports.audit.report', compact('reportType', 'accountIds', 'auditData', 'hideable', 'defaultShow')) ->with('start', $this->start)->with('end', $this->end)->with('accounts', $this->accounts) diff --git a/app/Generator/Report/Category/MonthReportGenerator.php b/app/Generator/Report/Category/MonthReportGenerator.php index 6a339b409c..a72eb65f68 100644 --- a/app/Generator/Report/Category/MonthReportGenerator.php +++ b/app/Generator/Report/Category/MonthReportGenerator.php @@ -148,8 +148,6 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface // is not set? if (!isset($result[$opposingId])) { $name = $transaction->opposing_account_name; - $encrypted = intval($transaction->opposing_account_encrypted); - $name = $encrypted === 1 ? Crypt::decrypt($name) : $name; $result[$opposingId] = [ 'name' => $name, 'count' => 1, @@ -267,14 +265,6 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface { $transactions = $this->getExpenses()->sortBy('transaction_amount'); - $transactions = $transactions->each( - function (Transaction $transaction) { - if (intval($transaction->opposing_account_encrypted) === 1) { - $transaction->opposing_account_name = Crypt::decrypt($transaction->opposing_account_name); - } - } - ); - return $transactions; } @@ -285,14 +275,6 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface { $transactions = $this->getIncome()->sortByDesc('transaction_amount'); - $transactions = $transactions->each( - function (Transaction $transaction) { - if (intval($transaction->opposing_account_encrypted) === 1) { - $transaction->opposing_account_name = Crypt::decrypt($transaction->opposing_account_name); - } - } - ); - return $transactions; } diff --git a/app/Handlers/Events/BudgetEventHandler.php b/app/Handlers/Events/BudgetEventHandler.php index b82aa6d749..441049526d 100644 --- a/app/Handlers/Events/BudgetEventHandler.php +++ b/app/Handlers/Events/BudgetEventHandler.php @@ -34,25 +34,25 @@ class BudgetEventHandler /** * This method creates a new budget limit repetition when a new budget limit has been created. * - * @param StoredBudgetLimit $event + * @param StoredBudgetLimit $budgetLimitEvent * * @return bool */ - public function storeRepetition(StoredBudgetLimit $event):bool + public function storeRepetition(StoredBudgetLimit $budgetLimitEvent):bool { - return $this->processRepetitionChange($event->budgetLimit, $event->end); + return $this->processRepetitionChange($budgetLimitEvent->budgetLimit, $budgetLimitEvent->end); } /** * Updates, if present the budget limit repetition part of a budget limit. * - * @param UpdatedBudgetLimit $event + * @param UpdatedBudgetLimit $budgetLimitEvent * * @return bool */ - public function updateRepetition(UpdatedBudgetLimit $event): bool + public function updateRepetition(UpdatedBudgetLimit $budgetLimitEvent): bool { - return $this->processRepetitionChange($event->budgetLimit, $event->end); + return $this->processRepetitionChange($budgetLimitEvent->budgetLimit, $budgetLimitEvent->end); } /** diff --git a/app/Handlers/Events/StoredJournalEventHandler.php b/app/Handlers/Events/StoredJournalEventHandler.php index 29f909b928..ade9536765 100644 --- a/app/Handlers/Events/StoredJournalEventHandler.php +++ b/app/Handlers/Events/StoredJournalEventHandler.php @@ -33,15 +33,15 @@ class StoredJournalEventHandler /** * This method connects a new transfer to a piggy bank. * - * @param StoredTransactionJournal $event + * @param StoredTransactionJournal $storedJournalEvent * * @return bool */ - public function connectToPiggyBank(StoredTransactionJournal $event): bool + public function connectToPiggyBank(StoredTransactionJournal $storedJournalEvent): bool { /** @var TransactionJournal $journal */ - $journal = $event->journal; - $piggyBankId = $event->piggyBankId; + $journal = $storedJournalEvent->journal; + $piggyBankId = $storedJournalEvent->piggyBankId; Log::debug(sprintf('Trying to connect journal %d to piggy bank %d.', $journal->id, $piggyBankId)); @@ -101,11 +101,11 @@ class StoredJournalEventHandler $repetition->currentamount = bcadd($repetition->currentamount, $amount); $repetition->save(); - /** @var PiggyBankEvent $event */ - $event = PiggyBankEvent::create( + /** @var PiggyBankEvent $storedJournalEvent */ + $storedJournalEvent = PiggyBankEvent::create( ['piggy_bank_id' => $piggyBank->id, 'transaction_journal_id' => $journal->id, 'date' => $journal->date, 'amount' => $amount] ); - Log::debug(sprintf('Created piggy bank event #%d', $event->id)); + Log::debug(sprintf('Created piggy bank event #%d', $storedJournalEvent->id)); return true; } @@ -113,14 +113,14 @@ class StoredJournalEventHandler /** * This method grabs all the users rules and processes them. * - * @param StoredTransactionJournal $event + * @param StoredTransactionJournal $storedJournalEvent * * @return bool */ - public function processRules(StoredTransactionJournal $event): bool + public function processRules(StoredTransactionJournal $storedJournalEvent): bool { // get all the user's rule groups, with the rules, order by 'order'. - $journal = $event->journal; + $journal = $storedJournalEvent->journal; $groups = $journal->user->ruleGroups()->where('rule_groups.active', 1)->orderBy('order', 'ASC')->get(); // /** @var RuleGroup $group */ @@ -150,13 +150,13 @@ class StoredJournalEventHandler /** * This method calls a special bill scanner that will check if the stored journal is part of a bill. * - * @param StoredTransactionJournal $event + * @param StoredTransactionJournal $storedJournalEvent * * @return bool */ - public function scanBills(StoredTransactionJournal $event): bool + public function scanBills(StoredTransactionJournal $storedJournalEvent): bool { - $journal = $event->journal; + $journal = $storedJournalEvent->journal; BillScanner::scan($journal); return true; diff --git a/app/Handlers/Events/UpdatedJournalEventHandler.php b/app/Handlers/Events/UpdatedJournalEventHandler.php index 60871ebf08..4528ccf910 100644 --- a/app/Handlers/Events/UpdatedJournalEventHandler.php +++ b/app/Handlers/Events/UpdatedJournalEventHandler.php @@ -31,14 +31,14 @@ class UpdatedJournalEventHandler /** * This method will check all the rules when a journal is updated. * - * @param UpdatedTransactionJournal $event + * @param UpdatedTransactionJournal $updatedJournalEvent * * @return bool */ - public function processRules(UpdatedTransactionJournal $event):bool + public function processRules(UpdatedTransactionJournal $updatedJournalEvent):bool { // get all the user's rule groups, with the rules, order by 'order'. - $journal = $event->journal; + $journal = $updatedJournalEvent->journal; $groups = $journal->user->ruleGroups()->where('rule_groups.active', 1)->orderBy('order', 'ASC')->get(); // /** @var RuleGroup $group */ @@ -67,13 +67,13 @@ class UpdatedJournalEventHandler /** * This method calls a special bill scanner that will check if the updated journal is part of a bill. * - * @param UpdatedTransactionJournal $event + * @param UpdatedTransactionJournal $updatedJournalEvent * * @return bool */ - public function scanBills(UpdatedTransactionJournal $event): bool + public function scanBills(UpdatedTransactionJournal $updatedJournalEvent): bool { - $journal = $event->journal; + $journal = $updatedJournalEvent->journal; BillScanner::scan($journal); return true; diff --git a/app/Helpers/Collection/Expense.php b/app/Helpers/Collection/Expense.php deleted file mode 100644 index 7a06e4f628..0000000000 --- a/app/Helpers/Collection/Expense.php +++ /dev/null @@ -1,85 +0,0 @@ -expenses = new Collection; - } - - /** - * @param stdClass $entry - */ - public function addOrCreateExpense(stdClass $entry) - { - $this->expenses->put($entry->id, $entry); - } - - /** - * @param string $add - */ - public function addToTotal(string $add) - { - $add = strval(round($add, 2)); - if (bccomp('0', $add) === -1) { - $add = bcmul($add, '-1'); - } - - // if amount is positive, the original transaction - // was a transfer. But since this is an expense report, - // that amount must be negative. - - $this->total = bcadd($this->total, $add); - } - - /** - * @return Collection - */ - public function getExpenses(): Collection - { - $set = $this->expenses->sortBy( - function (stdClass $object) { - return $object->amount; - } - ); - - return $set; - } - - /** - * @return string - */ - public function getTotal(): string - { - return strval(round($this->total, 2)); - } -} diff --git a/app/Helpers/Collection/Income.php b/app/Helpers/Collection/Income.php deleted file mode 100644 index 1bd6036150..0000000000 --- a/app/Helpers/Collection/Income.php +++ /dev/null @@ -1,81 +0,0 @@ -incomes = new Collection; - } - - /** - * @param stdClass $entry - */ - public function addOrCreateIncome(stdClass $entry) - { - $this->incomes->put($entry->id, $entry); - - } - - /** - * @param string $add - */ - public function addToTotal(string $add) - { - $add = strval(round($add, 2)); - $this->total = bcadd($this->total, $add); - } - - /** - * @return Collection - */ - public function getIncomes(): Collection - { - $set = $this->incomes->sortByDesc( - function (stdClass $object) { - return $object->amount; - } - ); - - return $set; - } - - /** - * @return string - */ - public function getTotal(): string - { - return strval(round($this->total, 2)); - } - - -} diff --git a/app/Helpers/Collector/JournalCollector.php b/app/Helpers/Collector/JournalCollector.php index 677a7b4f66..eafacdc363 100644 --- a/app/Helpers/Collector/JournalCollector.php +++ b/app/Helpers/Collector/JournalCollector.php @@ -1,4 +1,14 @@ filterInternalTransfers = false; + + return $this; + } + + /** + * @return JournalCollectorInterface + */ + public function enableInternalFilter(): JournalCollectorInterface + { + $this->filterInternalTransfers = true; + + return $this; + } + /** * @return Collection */ @@ -138,12 +171,25 @@ class JournalCollector implements JournalCollectorInterface $set = $this->filterTransfers($set); Log::debug(sprintf('Count of set after filterTransfers() is %d', $set->count())); + // possibly filter "internal" transfers: + $set = $this->filterInternalTransfers($set); + Log::debug(sprintf('Count of set after filterInternalTransfers() is %d', $set->count())); + + // loop for decryption. $set->each( function (Transaction $transaction) { $transaction->date = new Carbon($transaction->date); $transaction->description = intval($transaction->encrypted) === 1 ? Crypt::decrypt($transaction->description) : $transaction->description; $transaction->bill_name = !is_null($transaction->bill_name) ? Crypt::decrypt($transaction->bill_name) : ''; + + // optionally decrypted: + try { + $transaction->opposing_account_name = Crypt::decrypt($transaction->opposing_account_name); + } catch (DecryptException $e) { + // if this fails its already decrypted. + } + } ); @@ -501,6 +547,47 @@ class JournalCollector implements JournalCollectorInterface return $this; } + /** + * @param Collection $set + * + * @return Collection + */ + private function filterInternalTransfers(Collection $set): Collection + { + if ($this->filterInternalTransfers === false) { + Log::debug('Did NO filtering for internal transfers on given set.'); + + return $set; + } + if ($this->joinedOpposing === false) { + Log::error('Cannot filter internal transfers because no opposing information is present.'); + + return $set; + } + + $accountIds = $this->accountIds; + $set = $set->filter( + function (Transaction $transaction) use ($accountIds) { + // both id's in $accountids? + if (in_array($transaction->account_id, $accountIds) && in_array($transaction->opposing_account_id, $accountIds)) { + Log::debug( + sprintf( + 'Transaction #%d has #%d and #%d in set, so removed', + $transaction->id, $transaction->account_id, $transaction->opposing_account_id + ), $accountIds + ); + + return false; + } + + return $transaction; + + } + ); + + return $set; + } + /** * If the set of accounts used by the collector includes more than one asset * account, chances are the set include double entries: transfers get selected @@ -583,6 +670,7 @@ class JournalCollector implements JournalCollectorInterface private function joinOpposingTables() { if (!$this->joinedOpposing) { + Log::debug('joinedOpposing is false'); // join opposing transaction (hard): $this->query->leftJoin( 'transactions as opposing', function (JoinClause $join) { @@ -595,11 +683,12 @@ class JournalCollector implements JournalCollectorInterface $this->query->leftJoin('account_types as opposing_account_types', 'opposing_accounts.account_type_id', '=', 'opposing_account_types.id'); $this->query->whereNull('opposing.deleted_at'); - $this->fields[] = 'opposing.account_id as opposing_account_id'; - $this->fields[] = 'opposing_accounts.name as opposing_account_name'; - $this->fields[] = 'opposing_accounts.encrypted as opposing_account_encrypted'; - $this->fields[] = 'opposing_account_types.type as opposing_account_type'; - + $this->fields[] = 'opposing.account_id as opposing_account_id'; + $this->fields[] = 'opposing_accounts.name as opposing_account_name'; + $this->fields[] = 'opposing_accounts.encrypted as opposing_account_encrypted'; + $this->fields[] = 'opposing_account_types.type as opposing_account_type'; + $this->joinedOpposing = true; + Log::debug('joinedOpposing is now true!'); } } @@ -621,19 +710,18 @@ class JournalCollector implements JournalCollectorInterface private function startQuery(): EloquentBuilder { - $query = Transaction - ::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->leftJoin('transaction_currencies', 'transaction_currencies.id', 'transaction_journals.transaction_currency_id') - ->leftJoin('transaction_types', 'transaction_types.id', 'transaction_journals.transaction_type_id') - ->leftJoin('bills', 'bills.id', 'transaction_journals.bill_id') - ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id') - ->leftJoin('account_types', 'accounts.account_type_id', 'account_types.id') - ->whereNull('transactions.deleted_at') - ->whereNull('transaction_journals.deleted_at') - ->where('transaction_journals.user_id', $this->user->id) - ->orderBy('transaction_journals.date', 'DESC') - ->orderBy('transaction_journals.order', 'ASC') - ->orderBy('transaction_journals.id', 'DESC'); + $query = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->leftJoin('transaction_currencies', 'transaction_currencies.id', 'transaction_journals.transaction_currency_id') + ->leftJoin('transaction_types', 'transaction_types.id', 'transaction_journals.transaction_type_id') + ->leftJoin('bills', 'bills.id', 'transaction_journals.bill_id') + ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id') + ->leftJoin('account_types', 'accounts.account_type_id', 'account_types.id') + ->whereNull('transactions.deleted_at') + ->whereNull('transaction_journals.deleted_at') + ->where('transaction_journals.user_id', $this->user->id) + ->orderBy('transaction_journals.date', 'DESC') + ->orderBy('transaction_journals.order', 'ASC') + ->orderBy('transaction_journals.id', 'DESC'); return $query; diff --git a/app/Helpers/Collector/JournalCollectorInterface.php b/app/Helpers/Collector/JournalCollectorInterface.php index a9a70a8944..320fcab93b 100644 --- a/app/Helpers/Collector/JournalCollectorInterface.php +++ b/app/Helpers/Collector/JournalCollectorInterface.php @@ -38,6 +38,16 @@ interface JournalCollectorInterface */ public function disableFilter(): JournalCollectorInterface; + /** + * @return JournalCollectorInterface + */ + public function disableInternalFilter(): JournalCollectorInterface; + + /** + * @return JournalCollectorInterface + */ + public function enableInternalFilter(): JournalCollectorInterface; + /** * @return Collection */ @@ -46,7 +56,7 @@ interface JournalCollectorInterface /** * @return LengthAwarePaginator */ - public function getPaginatedJournals():LengthAwarePaginator; + public function getPaginatedJournals(): LengthAwarePaginator; /** * @param Collection $accounts diff --git a/app/Helpers/Help/Help.php b/app/Helpers/Help/Help.php index 79e3e7e721..2167b9ad43 100644 --- a/app/Helpers/Help/Help.php +++ b/app/Helpers/Help/Help.php @@ -120,7 +120,6 @@ class Help implements HelpInterface * @param string $language * @param string $content * - * @internal param $title */ public function putInCache(string $route, string $language, string $content) { diff --git a/app/Helpers/Report/BalanceReportHelper.php b/app/Helpers/Report/BalanceReportHelper.php index 4210cc66fe..acd623a2a9 100644 --- a/app/Helpers/Report/BalanceReportHelper.php +++ b/app/Helpers/Report/BalanceReportHelper.php @@ -51,13 +51,13 @@ class BalanceReportHelper implements BalanceReportHelperInterface /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * * @return Balance */ - public function getBalanceReport(Carbon $start, Carbon $end, Collection $accounts): Balance + public function getBalanceReport(Collection $accounts, Carbon $start, Carbon $end): Balance { $balance = new Balance; $header = new BalanceHeader; diff --git a/app/Helpers/Report/BalanceReportHelperInterface.php b/app/Helpers/Report/BalanceReportHelperInterface.php index 5aa14d09cb..6687eb6cf6 100644 --- a/app/Helpers/Report/BalanceReportHelperInterface.php +++ b/app/Helpers/Report/BalanceReportHelperInterface.php @@ -26,11 +26,11 @@ use Illuminate\Support\Collection; interface BalanceReportHelperInterface { /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * * @return Balance */ - public function getBalanceReport(Carbon $start, Carbon $end, Collection $accounts): Balance; + public function getBalanceReport(Collection $accounts, Carbon $start, Carbon $end): Balance; } diff --git a/app/Helpers/Report/BudgetReportHelper.php b/app/Helpers/Report/BudgetReportHelper.php index d4af9fc8a4..d79b9617b3 100644 --- a/app/Helpers/Report/BudgetReportHelper.php +++ b/app/Helpers/Report/BudgetReportHelper.php @@ -42,22 +42,6 @@ class BudgetReportHelper implements BudgetReportHelperInterface $this->repository = $repository; } - /** - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return array - */ - public function getBudgetPeriodReport(Carbon $start, Carbon $end, Collection $accounts): array - { - $budgets = $this->repository->getBudgets(); - $report = $this->repository->getBudgetPeriodReport($budgets, $accounts, $start, $end); - $data = $this->filterBudgetPeriodReport($report); - - return $data; - } - /** * @param Carbon $start * @param Carbon $end @@ -162,31 +146,4 @@ class BudgetReportHelper implements BudgetReportHelperInterface return $array; } - - /** - * Filters empty results from getBudgetPeriodReport - * - * @param array $data - * - * @return array - */ - private function filterBudgetPeriodReport(array $data): array - { - /** - * @var int $budgetId - * @var array $set - */ - foreach ($data as $budgetId => $set) { - $sum = '0'; - foreach ($set['entries'] as $amount) { - $sum = bcadd($amount, $sum); - } - $data[$budgetId]['sum'] = $sum; - if (bccomp('0', $sum) === 0) { - unset($data[$budgetId]); - } - } - - return $data; - } } diff --git a/app/Helpers/Report/BudgetReportHelperInterface.php b/app/Helpers/Report/BudgetReportHelperInterface.php index ad8540a22a..07234f9694 100644 --- a/app/Helpers/Report/BudgetReportHelperInterface.php +++ b/app/Helpers/Report/BudgetReportHelperInterface.php @@ -26,15 +26,6 @@ use Illuminate\Support\Collection; interface BudgetReportHelperInterface { - /** - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return array - */ - public function getBudgetPeriodReport(Carbon $start, Carbon $end, Collection $accounts): array; - /** * @param Carbon $start * @param Carbon $end diff --git a/app/Helpers/Report/ReportHelper.php b/app/Helpers/Report/ReportHelper.php index 53e1a28fb9..ae0e4fa800 100644 --- a/app/Helpers/Report/ReportHelper.php +++ b/app/Helpers/Report/ReportHelper.php @@ -17,19 +17,15 @@ use Carbon\Carbon; use FireflyIII\Helpers\Collection\Bill as BillCollection; use FireflyIII\Helpers\Collection\BillLine; use FireflyIII\Helpers\Collection\Category as CategoryCollection; -use FireflyIII\Helpers\Collection\Expense; -use FireflyIII\Helpers\Collection\Income; use FireflyIII\Helpers\Collector\JournalCollectorInterface; use FireflyIII\Helpers\FiscalHelperInterface; use FireflyIII\Models\Bill; use FireflyIII\Models\Category; use FireflyIII\Models\Transaction; -use FireflyIII\Repositories\Account\AccountTaskerInterface; use FireflyIII\Repositories\Bill\BillRepositoryInterface; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use Illuminate\Support\Collection; -use stdClass; /** * Class ReportHelper @@ -118,7 +114,7 @@ class ReportHelper implements ReportHelperInterface * * @return CategoryCollection */ - public function getCategoryReport(Carbon $start, Carbon $end, Collection $accounts): CategoryCollection + public function getCategoryReport(Collection $accounts, Carbon $start, Carbon $end): CategoryCollection { $object = new CategoryCollection; /** @var CategoryRepositoryInterface $repository */ @@ -136,57 +132,6 @@ class ReportHelper implements ReportHelperInterface return $object; } - /** - * Get a full report on the users expenses during the period for a list of accounts. - * - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return Expense - */ - public function getExpenseReport(Carbon $start, Carbon $end, Collection $accounts): Expense - { - $object = new Expense; - - /** @var AccountTaskerInterface $tasker */ - $tasker = app(AccountTaskerInterface::class); - $collection = $tasker->expenseReport($accounts, $accounts, $start, $end); - - /** @var stdClass $entry */ - foreach ($collection as $entry) { - $object->addToTotal($entry->amount); - $object->addOrCreateExpense($entry); - } - - return $object; - } - - /** - * Get a full report on the users incomes during the period for the given accounts. - * - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return Income - */ - public function getIncomeReport(Carbon $start, Carbon $end, Collection $accounts): Income - { - $object = new Income; - /** @var AccountTaskerInterface $tasker */ - $tasker = app(AccountTaskerInterface::class); - $collection = $tasker->incomeReport($accounts, $accounts, $start, $end); - - /** @var stdClass $entry */ - foreach ($collection as $entry) { - $object->addToTotal($entry->amount); - $object->addOrCreateIncome($entry); - } - - return $object; - } - /** * @param Carbon $date * diff --git a/app/Helpers/Report/ReportHelperInterface.php b/app/Helpers/Report/ReportHelperInterface.php index 47af08976b..6e7343629d 100644 --- a/app/Helpers/Report/ReportHelperInterface.php +++ b/app/Helpers/Report/ReportHelperInterface.php @@ -49,29 +49,7 @@ interface ReportHelperInterface * * @return CategoryCollection */ - public function getCategoryReport(Carbon $start, Carbon $end, Collection $accounts): CategoryCollection; - - /** - * Get a full report on the users expenses during the period for a list of accounts. - * - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return Expense - */ - public function getExpenseReport(Carbon $start, Carbon $end, Collection $accounts): Expense; - - /** - * Get a full report on the users incomes during the period for the given accounts. - * - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return Income - */ - public function getIncomeReport(Carbon $start, Carbon $end, Collection $accounts): Income; + public function getCategoryReport(Collection $accounts, Carbon $start, Carbon $end): CategoryCollection; /** * @param Carbon $date diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index e750801963..1d26e17f43 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -171,6 +171,7 @@ class AccountController extends Controller 'accountRole' => $account->getMeta('accountRole'), 'ccType' => $account->getMeta('ccType'), 'ccMonthlyPaymentDate' => $account->getMeta('ccMonthlyPaymentDate'), + 'BIC' => $account->getMeta('BIC'), 'openingBalanceDate' => $openingBalanceDate, 'openingBalance' => $openingBalanceAmount, 'virtualBalance' => $account->virtual_balance, @@ -281,7 +282,7 @@ class AccountController extends Controller * * @return View */ - public function showWithDate(Account $account, string $date) + public function showByDate(Account $account, string $date) { $carbon = new Carbon($date); $range = Preferences::get('viewRange', '1M')->data; @@ -297,7 +298,7 @@ class AccountController extends Controller $journals = $collector->getPaginatedJournals(); $journals->setPath('accounts/show/' . $account->id . '/' . $date); - return view('accounts.show_with_date', compact('category', 'date', 'account', 'journals', 'subTitle', 'carbon', 'start', 'end')); + return view('accounts.show-by-date', compact('category', 'date', 'account', 'journals', 'subTitle', 'carbon', 'start', 'end')); } /** diff --git a/app/Http/Controllers/Admin/ConfigurationController.php b/app/Http/Controllers/Admin/ConfigurationController.php index f64c807606..62e5c1298a 100644 --- a/app/Http/Controllers/Admin/ConfigurationController.php +++ b/app/Http/Controllers/Admin/ConfigurationController.php @@ -71,7 +71,7 @@ class ConfigurationController extends Controller * * @return \Illuminate\Http\RedirectResponse */ - public function store(ConfigurationRequest $request) + public function postIndex(ConfigurationRequest $request) { // get config values: $data = $request->getConfigurationData(); diff --git a/app/Http/Controllers/Auth/TwoFactorController.php b/app/Http/Controllers/Auth/TwoFactorController.php index d310cc3bd7..ae1af3c066 100644 --- a/app/Http/Controllers/Auth/TwoFactorController.php +++ b/app/Http/Controllers/Auth/TwoFactorController.php @@ -38,10 +38,16 @@ class TwoFactorController extends Controller $user = auth()->user(); // to make sure the validator in the next step gets the secret, we push it in session - $secret = Preferences::get('twoFactorAuthSecret', '')->data; + $secret = Preferences::get('twoFactorAuthSecret', null)->data; $title = strval(trans('firefly.two_factor_title')); - if (strlen($secret) === 0) { + // make sure the user has two factor configured: + $has2FA = Preferences::get('twoFactorAuthEnabled', null)->data; + if (is_null($has2FA) || $has2FA === false) { + return redirect(route('index')); + } + + if (strlen(strval($secret)) === 0) { throw new FireflyException('Your two factor authentication secret is empty, which it cannot be at this point. Please check the log files.'); } Session::flash('two-factor-secret', $secret); diff --git a/app/Http/Controllers/BudgetController.php b/app/Http/Controllers/BudgetController.php index f205bf1483..5ba51a5a6b 100644 --- a/app/Http/Controllers/BudgetController.php +++ b/app/Http/Controllers/BudgetController.php @@ -332,7 +332,7 @@ class BudgetController extends Controller * @return View * @throws FireflyException */ - public function showWithRepetition(Budget $budget, LimitRepetition $repetition) + public function showByRepetition(Budget $budget, LimitRepetition $repetition) { if ($repetition->budgetLimit->budget->id != $budget->id) { throw new FireflyException('This budget limit is not part of this budget.'); diff --git a/app/Http/Controllers/CategoryController.php b/app/Http/Controllers/CategoryController.php index e1834cd7c1..1ffb912259 100644 --- a/app/Http/Controllers/CategoryController.php +++ b/app/Http/Controllers/CategoryController.php @@ -245,7 +245,7 @@ class CategoryController extends Controller * * @return View */ - public function showWithDate(Category $category, string $date) + public function showByDate(Category $category, string $date) { $carbon = new Carbon($date); $range = Preferences::get('viewRange', '1M')->data; @@ -263,7 +263,7 @@ class CategoryController extends Controller $journals->setPath('categories/show/' . $category->id . '/' . $date); - return view('categories.show_with_date', compact('category', 'journals', 'hideCategory', 'subTitle', 'carbon')); + return view('categories.show-by-date', compact('category', 'journals', 'hideCategory', 'subTitle', 'carbon')); } /** diff --git a/app/Http/Controllers/Chart/AccountController.php b/app/Http/Controllers/Chart/AccountController.php index c0e8071327..fb586715de 100644 --- a/app/Http/Controllers/Chart/AccountController.php +++ b/app/Http/Controllers/Chart/AccountController.php @@ -112,7 +112,7 @@ class AccountController extends Controller * * @return \Illuminate\Http\JsonResponse */ - public function expenseByBudget(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end) + public function expenseBudget(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end) { $cache = new CacheProperties; $cache->addProperty($account->id); @@ -153,7 +153,7 @@ class AccountController extends Controller * * @return \Illuminate\Http\JsonResponse */ - public function expenseByCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end) + public function expenseCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end) { $cache = new CacheProperties; $cache->addProperty($account->id); @@ -199,7 +199,7 @@ class AccountController extends Controller $frontPage = Preferences::get('frontPageAccounts', $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray()); $accounts = $repository->getAccountsById($frontPage->data); - return Response::json($this->accountBalanceChart($start, $end, $accounts)); + return Response::json($this->accountBalanceChart($accounts, $start, $end)); } /** @@ -210,7 +210,7 @@ class AccountController extends Controller * * @return \Illuminate\Http\JsonResponse */ - public function incomeByCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end) + public function incomeCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end) { $cache = new CacheProperties; $cache->addProperty($account->id); @@ -251,9 +251,9 @@ class AccountController extends Controller * * @return \Illuminate\Http\JsonResponse */ - public function report(Carbon $start, Carbon $end, Collection $accounts) + public function report(Collection $accounts, Carbon $start, Carbon $end) { - return Response::json($this->accountBalanceChart($start, $end, $accounts)); + return Response::json($this->accountBalanceChart($accounts, $start, $end)); } /** @@ -406,13 +406,13 @@ class AccountController extends Controller } /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * * @return array */ - private function accountBalanceChart(Carbon $start, Carbon $end, Collection $accounts): array + private function accountBalanceChart(Collection $accounts, Carbon $start, Carbon $end): array { // chart properties for cache: $cache = new CacheProperties(); diff --git a/app/Http/Controllers/Chart/BudgetController.php b/app/Http/Controllers/Chart/BudgetController.php index b2da79b704..3764d04423 100644 --- a/app/Http/Controllers/Chart/BudgetController.php +++ b/app/Http/Controllers/Chart/BudgetController.php @@ -193,7 +193,7 @@ class BudgetController extends Controller * * @return \Illuminate\Http\JsonResponse */ - public function period(BudgetRepositoryInterface $repository, Budget $budget, Carbon $start, Carbon $end, Collection $accounts) + public function period(BudgetRepositoryInterface $repository, Budget $budget, Collection $accounts, Carbon $start, Carbon $end) { // chart properties for cache: $cache = new CacheProperties(); @@ -209,7 +209,7 @@ class BudgetController extends Controller // the expenses: $periods = Navigation::listOfPeriods($start, $end); - $entries = $repository->getBudgetPeriodReport(new Collection([$budget]), $accounts, $start, $end); + $entries = $repository->getBudgetPeriodReport(new Collection([$budget]), $accounts, $start, $end, false); $budgeted = []; $key = Navigation::preferredCarbonFormat($start, $end); $range = Navigation::preferredRangeFormat($start, $end); @@ -252,6 +252,47 @@ class BudgetController extends Controller return Response::json($data); } + /** + * @param BudgetRepositoryInterface $repository + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return \Illuminate\Http\JsonResponse + */ + public function periodNoBudget(BudgetRepositoryInterface $repository, Collection $accounts, Carbon $start, Carbon $end) + { + // chart properties for cache: + $cache = new CacheProperties(); + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty($accounts); + $cache->addProperty('no-budget'); + $cache->addProperty('period'); + if ($cache->has()) { + return Response::json($cache->get()); + } + + // the expenses: + $periods = Navigation::listOfPeriods($start, $end); + $entries = $repository->getNoBudgetPeriodReport($accounts, $start, $end); + + // join them: + $result = []; + foreach (array_keys($periods) as $period) { + $nice = $periods[$period]; + $result[$nice] = [ + 'spent' => isset($entries['entries'][$period]) ? $entries['entries'][$period] : '0', + ]; + } + + $data = $this->generator->periodNoBudget($result); + + $cache->store($data); + + return Response::json($data); + } + /** * @param Collection $repetitions * @param Budget $budget diff --git a/app/Http/Controllers/Chart/CategoryController.php b/app/Http/Controllers/Chart/CategoryController.php index 02645460dc..a2ff4338c7 100644 --- a/app/Http/Controllers/Chart/CategoryController.php +++ b/app/Http/Controllers/Chart/CategoryController.php @@ -152,6 +152,84 @@ class CategoryController extends Controller } + /** + * @param CRI $repository + * @param Category $category + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return \Illuminate\Http\JsonResponse|mixed + */ + public function reportPeriod(CRI $repository, Category $category, Collection $accounts, Carbon $start, Carbon $end) + { + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('category-period-chart'); + $cache->addProperty($accounts->pluck('id')->toArray()); + $cache->addProperty($category); + if ($cache->has()) { + + return $cache->get(); + } + $expenses = $repository->periodExpenses(new Collection([$category]), $accounts, $start, $end); + $income = $repository->periodIncome(new Collection([$category]), $accounts, $start, $end); + $periods = Navigation::listOfPeriods($start, $end); + + + // join them: + $result = []; + foreach (array_keys($periods) as $period) { + $nice = $periods[$period]; + $result[$nice] = [ + 'earned' => $income[$category->id]['entries'][$period] ?? '0', + 'spent' => $expenses[$category->id]['entries'][$period] ?? '0', + ]; + } + $data = $this->generator->reportPeriod($result); + + return Response::json($data); + } + + /** + * @param CRI $repository + * @param Category $category + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return \Illuminate\Http\JsonResponse|mixed + */ + public function reportPeriodNoCategory(CRI $repository, Collection $accounts, Carbon $start, Carbon $end) + { + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('no-category-period-chart'); + $cache->addProperty($accounts->pluck('id')->toArray()); + if ($cache->has()) { + + return $cache->get(); + } + $expenses = $repository->periodExpensesNoCategory($accounts, $start, $end); + $income = $repository->periodIncomeNoCategory($accounts, $start, $end); + $periods = Navigation::listOfPeriods($start, $end); + + // join them: + $result = []; + foreach (array_keys($periods) as $period) { + $nice = $periods[$period]; + $result[$nice] = [ + 'earned' => $income['entries'][$period] ?? '0', + 'spent' => $expenses['entries'][$period] ?? '0', + ]; + } + $data = $this->generator->reportPeriod($result); + + return Response::json($data); + } + /** * @param CRI $repository * @param Category $category diff --git a/app/Http/Controllers/Chart/ReportController.php b/app/Http/Controllers/Chart/ReportController.php index 50ed37c990..d490481db2 100644 --- a/app/Http/Controllers/Chart/ReportController.php +++ b/app/Http/Controllers/Chart/ReportController.php @@ -49,13 +49,12 @@ class ReportController extends Controller * This chart, by default, is shown on the multi-year and year report pages, * which means that giving it a 2 week "period" should be enough granularity. * - * @param Carbon $start - * @param Carbon $end * @param Collection $accounts - * + * @param Carbon $start + * @param Carbon $end * @return \Illuminate\Http\JsonResponse */ - public function netWorth(Carbon $start, Carbon $end, Collection $accounts) + public function netWorth(Collection $accounts, Carbon $start, Carbon $end) { // chart properties for cache: $cache = new CacheProperties; @@ -90,13 +89,16 @@ class ReportController extends Controller /** + * Shows income and expense, debet/credit: operations + * + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts + * * * @return \Illuminate\Http\JsonResponse */ - public function yearInOut(Carbon $start, Carbon $end, Collection $accounts) + public function operations(Collection $accounts, Carbon $start, Carbon $end) { // chart properties for cache: $cache = new CacheProperties; @@ -112,14 +114,14 @@ class ReportController extends Controller if ($start->diffInMonths($end) > 12) { // data = method X - $data = $this->multiYearInOut($chartSource['earned'], $chartSource['spent'], $start, $end); + $data = $this->multiYearOperations($chartSource['earned'], $chartSource['spent'], $start, $end); $cache->store($data); return Response::json($data); } // data = method Y - $data = $this->singleYearInOut($chartSource['earned'], $chartSource['spent'], $start, $end); + $data = $this->singleYearOperations($chartSource['earned'], $chartSource['spent'], $start, $end); $cache->store($data); return Response::json($data); @@ -128,14 +130,14 @@ class ReportController extends Controller } /** + * Shows sum income and expense, debet/credit: operations * @param Carbon $start * @param Carbon $end * @param Collection $accounts * * @return \Illuminate\Http\JsonResponse - * @internal param AccountRepositoryInterface $repository */ - public function yearInOutSummarized(Carbon $start, Carbon $end, Collection $accounts) + public function sum(Collection $accounts, Carbon $start, Carbon $end) { // chart properties for cache: @@ -151,13 +153,13 @@ class ReportController extends Controller if ($start->diffInMonths($end) > 12) { // per year - $data = $this->multiYearInOutSummarized($chartSource['earned'], $chartSource['spent'], $start, $end); + $data = $this->multiYearSum($chartSource['earned'], $chartSource['spent'], $start, $end); $cache->store($data); return Response::json($data); } // per month! - $data = $this->singleYearInOutSummarized($chartSource['earned'], $chartSource['spent'], $start, $end); + $data = $this->singleYearSum($chartSource['earned'], $chartSource['spent'], $start, $end); $cache->store($data); return Response::json($data); @@ -172,7 +174,7 @@ class ReportController extends Controller * * @return array */ - protected function multiYearInOut(array $earned, array $spent, Carbon $start, Carbon $end) + protected function multiYearOperations(array $earned, array $spent, Carbon $start, Carbon $end) { $entries = new Collection; while ($start < $end) { @@ -184,7 +186,7 @@ class ReportController extends Controller $start->addYear(); } - $data = $this->generator->multiYearInOut($entries); + $data = $this->generator->multiYearOperations($entries); return $data; } @@ -197,7 +199,7 @@ class ReportController extends Controller * * @return array */ - protected function multiYearInOutSummarized(array $earned, array $spent, Carbon $start, Carbon $end) + protected function multiYearSum(array $earned, array $spent, Carbon $start, Carbon $end) { $income = '0'; $expense = '0'; @@ -213,7 +215,7 @@ class ReportController extends Controller $start->addYear(); } - $data = $this->generator->multiYearInOutSummarized($income, $expense, $count); + $data = $this->generator->multiYearSum($income, $expense, $count); return $data; } @@ -245,7 +247,7 @@ class ReportController extends Controller * * @return array */ - protected function singleYearInOut(array $earned, array $spent, Carbon $start, Carbon $end) + protected function singleYearOperations(array $earned, array $spent, Carbon $start, Carbon $end) { // per month? simply use each month. @@ -260,7 +262,7 @@ class ReportController extends Controller $start->addMonth(); } - $data = $this->generator->yearInOut($entries); + $data = $this->generator->yearOperations($entries); return $data; } @@ -273,7 +275,7 @@ class ReportController extends Controller * * @return array */ - protected function singleYearInOutSummarized(array $earned, array $spent, Carbon $start, Carbon $end) + protected function singleYearSum(array $earned, array $spent, Carbon $start, Carbon $end) { $income = '0'; $expense = '0'; @@ -289,7 +291,7 @@ class ReportController extends Controller $start->addMonth(); } - $data = $this->generator->yearInOutSummarized($income, $expense, $count); + $data = $this->generator->yearSum($income, $expense, $count); return $data; } diff --git a/app/Http/Controllers/CurrencyController.php b/app/Http/Controllers/CurrencyController.php index 19ccf48434..f5948f4785 100644 --- a/app/Http/Controllers/CurrencyController.php +++ b/app/Http/Controllers/CurrencyController.php @@ -60,14 +60,14 @@ class CurrencyController extends Controller $subTitle = trans('firefly.create_currency'); // put previous url in session if not redirect from store (not "create another"). - if (session('currency.create.fromStore') !== true) { - Session::put('currency.create.url', URL::previous()); + if (session('currencies.create.fromStore') !== true) { + Session::put('currencies.create.url', URL::previous()); } - Session::forget('currency.create.fromStore'); + Session::forget('currencies.create.fromStore'); Session::flash('gaEventCategory', 'currency'); Session::flash('gaEventAction', 'create'); - return view('currency.create', compact('subTitleIcon', 'subTitle')); + return view('currencies.create', compact('subTitleIcon', 'subTitle')); } /** @@ -85,7 +85,7 @@ class CurrencyController extends Controller Cache::forget('FFCURRENCYSYMBOL'); Cache::forget('FFCURRENCYCODE'); - return redirect(route('currency.index')); + return redirect(route('currencies.index')); } @@ -99,18 +99,18 @@ class CurrencyController extends Controller if (!$this->canDeleteCurrency($currency)) { Session::flash('error', trans('firefly.cannot_delete_currency', ['name' => $currency->name])); - return redirect(route('currency.index')); + return redirect(route('currencies.index')); } // put previous url in session - Session::put('currency.delete.url', URL::previous()); + Session::put('currencies.delete.url', URL::previous()); Session::flash('gaEventCategory', 'currency'); Session::flash('gaEventAction', 'delete'); $subTitle = trans('form.delete_currency', ['name' => $currency->name]); - return view('currency.delete', compact('currency', 'subTitle')); + return view('currencies.delete', compact('currency', 'subTitle')); } /** @@ -124,7 +124,7 @@ class CurrencyController extends Controller if (!$this->canDeleteCurrency($currency)) { Session::flash('error', trans('firefly.cannot_delete_currency', ['name' => $currency->name])); - return redirect(route('currency.index')); + return redirect(route('currencies.index')); } Session::flash('success', trans('firefly.deleted_currency', ['name' => $currency->name])); @@ -132,7 +132,7 @@ class CurrencyController extends Controller $currency->forceDelete(); } - return redirect(session('currency.delete.url')); + return redirect(session('currencies.delete.url')); } /** @@ -147,14 +147,14 @@ class CurrencyController extends Controller $currency->symbol = htmlentities($currency->symbol); // put previous url in session if not redirect from store (not "return_to_edit"). - if (session('currency.edit.fromUpdate') !== true) { - Session::put('currency.edit.url', URL::previous()); + if (session('currencies.edit.fromUpdate') !== true) { + Session::put('currencies.edit.url', URL::previous()); } - Session::forget('currency.edit.fromUpdate'); + Session::forget('currencies.edit.fromUpdate'); Session::flash('gaEventCategory', 'currency'); Session::flash('gaEventAction', 'edit'); - return view('currency.edit', compact('currency', 'subTitle', 'subTitleIcon')); + return view('currencies.edit', compact('currency', 'subTitle', 'subTitleIcon')); } @@ -174,7 +174,7 @@ class CurrencyController extends Controller } - return view('currency.index', compact('currencies', 'defaultCurrency')); + return view('currencies.index', compact('currencies', 'defaultCurrency')); } /** @@ -189,7 +189,7 @@ class CurrencyController extends Controller if (!auth()->user()->hasRole('owner')) { Log::error('User ' . auth()->user()->id . ' is not admin, but tried to store a currency.'); - return redirect(session('currency.create.url')); + return redirect(session('currencies.create.url')); } $data = $request->getCurrencyData(); @@ -197,13 +197,13 @@ class CurrencyController extends Controller Session::flash('success', trans('firefly.created_currency', ['name' => $currency->name])); if (intval(Input::get('create_another')) === 1) { - Session::put('currency.create.fromStore', true); + Session::put('currencies.create.fromStore', true); - return redirect(route('currency.create'))->withInput(); + return redirect(route('currencies.create'))->withInput(); } // redirect to previous URL. - return redirect(session('currency.create.url')); + return redirect(session('currencies.create.url')); } @@ -226,13 +226,13 @@ class CurrencyController extends Controller if (intval(Input::get('return_to_edit')) === 1) { - Session::put('currency.edit.fromUpdate', true); + Session::put('currencies.edit.fromUpdate', true); - return redirect(route('currency.edit', [$currency->id])); + return redirect(route('currencies.edit', [$currency->id])); } // redirect to previous URL. - return redirect(session('currency.edit.url')); + return redirect(session('currencies.edit.url')); } diff --git a/app/Http/Controllers/JsonController.php b/app/Http/Controllers/JsonController.php index 33beceec79..0cf47797f0 100644 --- a/app/Http/Controllers/JsonController.php +++ b/app/Http/Controllers/JsonController.php @@ -102,7 +102,6 @@ class JsonController extends Controller * * @return \Illuminate\Http\JsonResponse * - * @internal param ARI $accountRepository */ public function boxIn(AccountTaskerInterface $accountTasker, AccountRepositoryInterface $repository) { diff --git a/app/Http/Controllers/Popup/ReportController.php b/app/Http/Controllers/Popup/ReportController.php index c9fd9afe8c..e10a016495 100644 --- a/app/Http/Controllers/Popup/ReportController.php +++ b/app/Http/Controllers/Popup/ReportController.php @@ -46,7 +46,7 @@ class ReportController extends Controller * @return \Illuminate\Http\JsonResponse * @throws FireflyException */ - public function info(Request $request) + public function general(Request $request) { $attributes = $request->get('attributes') ?? []; $attributes = $this->parseAttributes($attributes); diff --git a/app/Http/Controllers/PreferencesController.php b/app/Http/Controllers/PreferencesController.php index a0ec6288b3..fd9622228d 100644 --- a/app/Http/Controllers/PreferencesController.php +++ b/app/Http/Controllers/PreferencesController.php @@ -74,7 +74,7 @@ class PreferencesController extends Controller Session::flash('success', strval(trans('firefly.pref_two_factor_auth_disabled'))); Session::flash('info', strval(trans('firefly.pref_two_factor_auth_remove_it'))); - return redirect(route('preferences')); + return redirect(route('preferences.index')); } /** @@ -122,7 +122,7 @@ class PreferencesController extends Controller Session::flash('success', strval(trans('firefly.saved_preferences'))); Preferences::mark(); - return redirect(route('preferences')); + return redirect(route('preferences.index')); } /** @@ -206,7 +206,7 @@ class PreferencesController extends Controller return redirect(route('preferences.code')); } - return redirect(route('preferences')); + return redirect(route('preferences.index')); } /** diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index c10c1701ac..e14fabe16b 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -108,7 +108,7 @@ class ProfileController extends Controller Session::flash('success', strval(trans('firefly.password_changed'))); - return redirect(route('profile')); + return redirect(route('profile.index')); } /** diff --git a/app/Http/Controllers/Report/AccountController.php b/app/Http/Controllers/Report/AccountController.php index 85da130558..c36c6c7aea 100644 --- a/app/Http/Controllers/Report/AccountController.php +++ b/app/Http/Controllers/Report/AccountController.php @@ -29,13 +29,13 @@ class AccountController extends Controller { /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * - * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View + * @return mixed|string */ - public function accountReport(Carbon $start, Carbon $end, Collection $accounts) + public function general(Collection $accounts, Carbon $start, Carbon $end) { // chart properties for cache: $cache = new CacheProperties; @@ -47,9 +47,9 @@ class AccountController extends Controller return $cache->get(); } - + /** @var AccountTaskerInterface $accountTasker */ $accountTasker = app(AccountTaskerInterface::class); - $accountReport = $accountTasker->getAccountReport($start, $end, $accounts); + $accountReport = $accountTasker->getAccountReport($accounts, $start, $end); $result = view('reports.partials.accounts', compact('accountReport'))->render(); $cache->store($result); diff --git a/app/Http/Controllers/Report/BalanceController.php b/app/Http/Controllers/Report/BalanceController.php index 74c1d393fb..905aa429c4 100644 --- a/app/Http/Controllers/Report/BalanceController.php +++ b/app/Http/Controllers/Report/BalanceController.php @@ -30,13 +30,13 @@ class BalanceController extends Controller /** * @param BalanceReportHelperInterface $helper + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * - * @return string + * @return mixed|string */ - public function balanceReport(BalanceReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) + public function general(BalanceReportHelperInterface $helper,Collection $accounts, Carbon $start, Carbon $end) { @@ -50,7 +50,7 @@ class BalanceController extends Controller return $cache->get(); } - $balance = $helper->getBalanceReport($start, $end, $accounts); + $balance = $helper->getBalanceReport($accounts, $start, $end); $result = view('reports.partials.balance', compact('balance'))->render(); $cache->store($result); diff --git a/app/Http/Controllers/Report/BudgetController.php b/app/Http/Controllers/Report/BudgetController.php index 8e76f2c5d5..a541a7a8bb 100644 --- a/app/Http/Controllers/Report/BudgetController.php +++ b/app/Http/Controllers/Report/BudgetController.php @@ -17,6 +17,7 @@ namespace FireflyIII\Http\Controllers\Report; use Carbon\Carbon; use FireflyIII\Helpers\Report\BudgetReportHelperInterface; use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; use Navigation; @@ -29,43 +30,16 @@ use Navigation; class BudgetController extends Controller { - /** - * - * @param BudgetReportHelperInterface $helper - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return string - */ - public function budgetPeriodReport(BudgetReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) - { - $cache = new CacheProperties; - $cache->addProperty($start); - $cache->addProperty($end); - $cache->addProperty('budget-period-report'); - $cache->addProperty($accounts->pluck('id')->toArray()); - if ($cache->has()) { - return $cache->get(); - } - - $periods = Navigation::listOfPeriods($start, $end); - $budgets = $helper->getBudgetPeriodReport($start, $end, $accounts); - $result = view('reports.partials.budget-period', compact('budgets', 'periods'))->render(); - $cache->store($result); - - return $result; - } /** * @param BudgetReportHelperInterface $helper + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * - * @return string + * @return mixed|string */ - public function budgetReport(BudgetReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) + public function general(BudgetReportHelperInterface $helper, Collection $accounts, Carbon $start, Carbon $end) { // chart properties for cache: @@ -86,4 +60,64 @@ class BudgetController extends Controller return $result; } + + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return mixed|string + */ + public function period(Collection $accounts, Carbon $start, Carbon $end) + { + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('budget-period-report'); + $cache->addProperty($accounts->pluck('id')->toArray()); + if ($cache->has()) { + return $cache->get(); + } + + // generate budget report right here. + /** @var BudgetRepositoryInterface $repository */ + $repository = app(BudgetRepositoryInterface::class); + $budgets = $repository->getBudgets(); + $data = $repository->getBudgetPeriodReport($budgets, $accounts, $start, $end); + $data[0] = $repository->getNoBudgetPeriodReport($accounts, $start, $end); // append report data for "no budget" + $report = $this->filterBudgetPeriodReport($data); + $periods = Navigation::listOfPeriods($start, $end); + + $result = view('reports.partials.budget-period', compact('report', 'periods'))->render(); + $cache->store($result); + + return $result; + } + + /** + * Filters empty results from getBudgetPeriodReport + * + * @param array $data + * + * @return array + */ + private function filterBudgetPeriodReport(array $data): array + { + /** + * @var int $budgetId + * @var array $set + */ + foreach ($data as $budgetId => $set) { + $sum = '0'; + foreach ($set['entries'] as $amount) { + $sum = bcadd($amount, $sum); + } + $data[$budgetId]['sum'] = $sum; + if (bccomp('0', $sum) === 0) { + unset($data[$budgetId]); + } + } + + return $data; + } } \ No newline at end of file diff --git a/app/Http/Controllers/Report/CategoryController.php b/app/Http/Controllers/Report/CategoryController.php index 48ee5d77b7..475e0ce67f 100644 --- a/app/Http/Controllers/Report/CategoryController.php +++ b/app/Http/Controllers/Report/CategoryController.php @@ -17,8 +17,12 @@ namespace FireflyIII\Http\Controllers\Report; use Carbon\Carbon; use FireflyIII\Helpers\Report\ReportHelperInterface; use FireflyIII\Http\Controllers\Controller; +use FireflyIII\Models\Category; +use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Support\CacheProperties; use Illuminate\Support\Collection; +use Log; +use Navigation; /** * Class CategoryController @@ -27,16 +31,82 @@ use Illuminate\Support\Collection; */ class CategoryController extends Controller { + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return mixed|string + */ + public function expenses(Collection $accounts, Carbon $start, Carbon $end) + { + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('category-period-expenses-report'); + $cache->addProperty($accounts->pluck('id')->toArray()); + if ($cache->has()) { + Log::debug('Return report from cache'); + + return $cache->get(); + } + /** @var CategoryRepositoryInterface $repository */ + $repository = app(CategoryRepositoryInterface::class); + $categories = $repository->getCategories(); + $data = $repository->periodExpenses($categories, $accounts, $start, $end); + $data[0] = $repository->periodExpensesNoCategory($accounts, $start, $end); + $report = $this->filterReport($data); + $periods = Navigation::listOfPeriods($start, $end); + $result = view('reports.partials.category-period', compact('report', 'periods'))->render(); + + $cache->store($result); + + return $result; + } + + /** + * + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts + * + * @return string + */ + public function income(Collection $accounts, Carbon $start, Carbon $end) + { + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('category-period-income-report'); + $cache->addProperty($accounts->pluck('id')->toArray()); + if ($cache->has()) { + Log::debug('Return report from cache'); + + return $cache->get(); + } + /** @var CategoryRepositoryInterface $repository */ + $repository = app(CategoryRepositoryInterface::class); + $categories = $repository->getCategories(); + $data = $repository->periodIncome($categories, $accounts, $start, $end); + $data[0] = $repository->periodIncomeNoCategory($accounts, $start, $end); + $report = $this->filterReport($data); + $periods = Navigation::listOfPeriods($start, $end); + $result = view('reports.partials.category-period', compact('report', 'periods'))->render(); + + $cache->store($result); + + return $result; + } /** * @param ReportHelperInterface $helper + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * - * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View + * @return mixed|string */ - public function categoryReport(ReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) + public function operations(Collection $accounts, Carbon $start, Carbon $end) { // chart properties for cache: $cache = new CacheProperties; @@ -48,12 +118,56 @@ class CategoryController extends Controller return $cache->get(); } - $categories = $helper->getCategoryReport($start, $end, $accounts); + /** @var CategoryRepositoryInterface $repository */ + $repository = app(CategoryRepositoryInterface::class); + $categories = $repository->getCategories(); + $report = []; + /** @var Category $category */ + foreach ($categories as $category) { + $spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $end); + if (bccomp($spent, '0') !== 0) { + $report[$category->id] = ['name' => $category->name, 'spent' => $spent]; + } + } - $result = view('reports.partials.categories', compact('categories'))->render(); + // sort the result + // Obtain a list of columns + $sum = []; + foreach ($report as $categoryId => $row) { + $sum[$categoryId] = floatval($row['spent']); + } + + array_multisort($sum, SORT_ASC, $report); + + $result = view('reports.partials.categories', compact('report'))->render(); $cache->store($result); return $result; } + /** + * Filters empty results from category period report + * + * @param array $data + * + * @return array + */ + private function filterReport(array $data): array + { + foreach ($data as $categoryId => $set) { + $sum = '0'; + foreach ($set['entries'] as $amount) { + $sum = bcadd($amount, $sum); + } + $data[$categoryId]['sum'] = $sum; + if (bccomp('0', $sum) === 0) { + unset($data[$categoryId]); + } + } + + + return $data; + } + + } \ No newline at end of file diff --git a/app/Http/Controllers/Report/InOutController.php b/app/Http/Controllers/Report/InOutController.php deleted file mode 100644 index 83ce241de1..0000000000 --- a/app/Http/Controllers/Report/InOutController.php +++ /dev/null @@ -1,119 +0,0 @@ -addProperty($start); - $cache->addProperty($end); - $cache->addProperty('expense-report'); - $cache->addProperty($accounts->pluck('id')->toArray()); - if ($cache->has()) { - return $cache->get(); - } - - $expenses = $helper->getExpenseReport($start, $end, $accounts); - - $result = view('reports.partials.expenses', compact('expenses'))->render(); - $cache->store($result); - - return $result; - - } - - /** - * @param ReportHelperInterface $helper - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return \Illuminate\Http\JsonResponse - */ - public function incExpReport(ReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) - { - // chart properties for cache: - $cache = new CacheProperties; - $cache->addProperty($start); - $cache->addProperty($end); - $cache->addProperty('inc-exp-report'); - $cache->addProperty($accounts->pluck('id')->toArray()); - if ($cache->has()) { - return $cache->get(); - } - - $incomes = $helper->getIncomeReport($start, $end, $accounts); - $expenses = $helper->getExpenseReport($start, $end, $accounts); - - $result = view('reports.partials.income-vs-expenses', compact('expenses', 'incomes'))->render(); - $cache->store($result); - - return $result; - - } - - /** - * @param ReportHelperInterface $helper - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * - * @return \Illuminate\Http\JsonResponse - */ - public function incomeReport(ReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts) - { - // chart properties for cache: - $cache = new CacheProperties; - $cache->addProperty($start); - $cache->addProperty($end); - $cache->addProperty('income-report'); - $cache->addProperty($accounts->pluck('id')->toArray()); - if ($cache->has()) { - return $cache->get(); - } - - $incomes = $helper->getIncomeReport($start, $end, $accounts); - - $result = view('reports.partials.income', compact('incomes'))->render(); - $cache->store($result); - - return $result; - - } - -} \ No newline at end of file diff --git a/app/Http/Controllers/Report/OperationsController.php b/app/Http/Controllers/Report/OperationsController.php new file mode 100644 index 0000000000..7fb7084906 --- /dev/null +++ b/app/Http/Controllers/Report/OperationsController.php @@ -0,0 +1,245 @@ +addProperty($start); + $cache->addProperty($end); + $cache->addProperty('expense-report'); + $cache->addProperty($accounts->pluck('id')->toArray()); + if ($cache->has()) { + return $cache->get(); + } + $expenses = $this->getExpenseReport($start, $end, $accounts); + $result = view('reports.partials.expenses', compact('expenses'))->render(); + $cache->store($result); + + return $result; + + } + + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return mixed|string + */ + public function operations(Collection $accounts, Carbon $start, Carbon $end) + { + // chart properties for cache: + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('inc-exp-report'); + $cache->addProperty($accounts->pluck('id')->toArray()); + if ($cache->has()) { + return $cache->get(); + } + + $incomes = $this->getIncomeReport($start, $end, $accounts); + $expenses = $this->getExpenseReport($start, $end, $accounts); + $incomeSum = array_sum( + array_map( + function ($item) { + return $item['sum']; + }, $incomes + ) + ); + + $expensesSum = array_sum( + array_map( + function ($item) { + return $item['sum']; + }, $expenses + ) + ); + + $result = view('reports.partials.operations', compact('incomeSum', 'expensesSum'))->render(); + $cache->store($result); + + return $result; + + } + + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return string + */ + public function income(Collection $accounts, Carbon $start, Carbon $end) + { + // chart properties for cache: + $cache = new CacheProperties; + $cache->addProperty($start); + $cache->addProperty($end); + $cache->addProperty('income-report'); + $cache->addProperty($accounts->pluck('id')->toArray()); + if ($cache->has()) { + //return $cache->get(); + } + $income = $this->getIncomeReport($start, $end, $accounts); + + $result = view('reports.partials.income', compact('income'))->render(); + $cache->store($result); + + return $result; + + } + + /** + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts + * + * @return array + */ + private function getExpenseReport(Carbon $start, Carbon $end, Collection $accounts): array + { + // get all expenses for the given accounts in the given period! + // also transfers! + // get all transactions: + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end); + $collector->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER]) + ->withOpposingAccount() + ->enableInternalFilter(); + $transactions = $collector->getJournals(); + $transactions = $transactions->filter( + function (Transaction $transaction) { + // return negative amounts only. + if (bccomp($transaction->transaction_amount, '0') === -1) { + return $transaction; + } + + return false; + } + ); + $expenses = $this->groupByOpposing($transactions); + + // sort the result + // Obtain a list of columns + $sum = []; + foreach ($expenses as $accountId => $row) { + $sum[$accountId] = floatval($row['sum']); + } + + array_multisort($sum, SORT_ASC, $expenses); + + return $expenses; + } + + /** + * @param Carbon $start + * @param Carbon $end + * @param Collection $accounts + * + * @return array + */ + private function getIncomeReport(Carbon $start, Carbon $end, Collection $accounts): array + { + // get all expenses for the given accounts in the given period! + // also transfers! + // get all transactions: + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end); + $collector->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER]) + ->withOpposingAccount() + ->enableInternalFilter(); + $transactions = $collector->getJournals(); + $transactions = $transactions->filter( + function (Transaction $transaction) { + // return positive amounts only. + if (bccomp($transaction->transaction_amount, '0') === 1) { + return $transaction; + } + + return false; + } + ); + $income = $this->groupByOpposing($transactions); + + // sort the result + // Obtain a list of columns + $sum = []; + foreach ($income as $accountId => $row) { + $sum[$accountId] = floatval($row['sum']); + } + + array_multisort($sum, SORT_DESC, $income); + + return $income; + } + + /** + * @param Collection $transactions + * + * @return array + */ + private function groupByOpposing(Collection $transactions): array + { + $expenses = []; + // join the result together: + foreach ($transactions as $transaction) { + $opposingId = $transaction->opposing_account_id; + $name = $transaction->opposing_account_name; + if (!isset($expenses[$opposingId])) { + $expenses[$opposingId] = [ + 'id' => $opposingId, + 'name' => $name, + 'sum' => '0', + 'count' => 0, + ]; + } + $expenses[$opposingId]['sum'] = bcadd($expenses[$opposingId]['sum'], $transaction->transaction_amount); + $expenses[$opposingId]['count']++; + } + + + return $expenses; + } + +} \ No newline at end of file diff --git a/app/Http/Controllers/ReportController.php b/app/Http/Controllers/ReportController.php index 4326b8c2af..655c3b2a22 100644 --- a/app/Http/Controllers/ReportController.php +++ b/app/Http/Controllers/ReportController.php @@ -61,14 +61,13 @@ class ReportController extends Controller } /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * * @return string - * @throws FireflyException */ - public function auditReport(Carbon $start, Carbon $end, Collection $accounts) + public function auditReport(Collection $accounts, Carbon $start, Carbon $end) { if ($end < $start) { return view('error')->with('message', trans('firefly.end_after_start_date')); @@ -97,15 +96,14 @@ class ReportController extends Controller } /** + * @param Collection $accounts + * @param Collection $categories * @param Carbon $start * @param Carbon $end - * @param Collection $accounts - * - * @param Collection $categories * * @return string */ - public function categoryReport(Carbon $start, Carbon $end, Collection $accounts, Collection $categories) + public function categoryReport(Collection $accounts, Collection $categories, Carbon $start, Carbon $end) { if ($end < $start) { return view('error')->with('message', trans('firefly.end_after_start_date')); @@ -134,14 +132,13 @@ class ReportController extends Controller } /** + * @param Collection $accounts * @param Carbon $start * @param Carbon $end - * @param Collection $accounts * * @return string - * @throws FireflyException */ - public function defaultReport(Carbon $start, Carbon $end, Collection $accounts) + public function defaultReport(Collection $accounts, Carbon $start, Carbon $end) { if ($end < $start) { return view('error')->with('message', trans('firefly.end_after_start_date')); @@ -227,6 +224,12 @@ class ReportController extends Controller return redirect(route('reports.index')); } + if ($request->getCategoryList()->count() === 0 && $reportType === 'category') { + Session::flash('error', trans('firefly.select_more_than_one_category')); + + return redirect(route('reports.index')); + } + if ($end < $start) { return view('error')->with('message', trans('firefly.end_after_start_date')); } @@ -240,13 +243,13 @@ class ReportController extends Controller default: throw new FireflyException(sprintf('Firefly does not support the "%s"-report yet.', $reportType)); case 'category': - $uri = route('reports.report.category', [$start, $end, $accounts, $categories]); + $uri = route('reports.report.category', [$accounts, $categories, $start, $end]); break; case 'default': - $uri = route('reports.report.default', [$start, $end, $accounts]); + $uri = route('reports.report.default', [$accounts, $start, $end]); break; case 'audit': - $uri = route('reports.report.audit', [$start, $end, $accounts]); + $uri = route('reports.report.audit', [$accounts, $start, $end]); break; } diff --git a/app/Http/Controllers/RuleController.php b/app/Http/Controllers/RuleController.php index 98443574d2..6a1d606af1 100644 --- a/app/Http/Controllers/RuleController.php +++ b/app/Http/Controllers/RuleController.php @@ -104,7 +104,6 @@ class RuleController extends Controller * @param Rule $rule * * @return View - * @internal param RuleRepositoryInterface $repository */ public function delete(Rule $rule) { diff --git a/app/Http/Controllers/TagController.php b/app/Http/Controllers/TagController.php index 7a790c284a..9ad571c091 100644 --- a/app/Http/Controllers/TagController.php +++ b/app/Http/Controllers/TagController.php @@ -15,14 +15,12 @@ namespace FireflyIII\Http\Controllers; use FireflyIII\Helpers\Collector\JournalCollector; use FireflyIII\Http\Requests\TagFormRequest; -use FireflyIII\Models\Preference; use FireflyIII\Models\Tag; use FireflyIII\Models\Transaction; use FireflyIII\Repositories\Tag\TagRepositoryInterface; use Illuminate\Support\Collection; use Input; use Preferences; -use Response; use Session; use URL; use View; @@ -170,33 +168,14 @@ class TagController extends Controller return view('tags.edit', compact('tag', 'subTitle', 'subTitleIcon', 'tagOptions')); } - /** - * @param $state - * - * @return \Symfony\Component\HttpFoundation\Response - */ - public function hideTagHelp(string $state) - { - - $newState = $state == 'true' ? true : false; - Preferences::set('hideTagHelp', $newState); - - return Response::json([true]); - } - /** * */ public function index() { - /** @var Preference $helpHiddenPref */ - $helpHiddenPref = Preferences::get('hideTagHelp', false); - $title = 'Tags'; - $mainTitleIcon = 'fa-tags'; - $helpHidden = $helpHiddenPref->data; - - // group years. - $types = ['nothing', 'balancingAct', 'advancePayment']; + $title = 'Tags'; + $mainTitleIcon = 'fa-tags'; + $types = ['nothing', 'balancingAct', 'advancePayment']; // loop each types and get the tags, group them by year. $collection = []; @@ -223,7 +202,7 @@ class TagController extends Controller } } - return view('tags.index', compact('title', 'mainTitleIcon', 'types', 'helpHidden', 'collection')); + return view('tags.index', compact('title', 'mainTitleIcon', 'types', 'collection')); } /** diff --git a/app/Http/Controllers/Transaction/ConvertController.php b/app/Http/Controllers/Transaction/ConvertController.php index 434300face..c06fa91ff4 100644 --- a/app/Http/Controllers/Transaction/ConvertController.php +++ b/app/Http/Controllers/Transaction/ConvertController.php @@ -62,7 +62,7 @@ class ConvertController extends Controller * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|View */ - public function convert(TransactionType $destinationType, TransactionJournal $journal) + public function index(TransactionType $destinationType, TransactionJournal $journal) { if ($this->isOpeningBalance($journal)) { return $this->redirectToAccount($journal); @@ -115,7 +115,7 @@ class ConvertController extends Controller * * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ - public function submit(Request $request, JournalRepositoryInterface $repository, TransactionType $destinationType, TransactionJournal $journal) + public function postIndex(Request $request, JournalRepositoryInterface $repository, TransactionType $destinationType, TransactionJournal $journal) { if ($this->isOpeningBalance($journal)) { return $this->redirectToAccount($journal); diff --git a/app/Http/Controllers/Transaction/SingleController.php b/app/Http/Controllers/Transaction/SingleController.php index ae3481bfcd..ddf9115e9a 100644 --- a/app/Http/Controllers/Transaction/SingleController.php +++ b/app/Http/Controllers/Transaction/SingleController.php @@ -179,7 +179,7 @@ class SingleController extends Controller $count = $journal->transactions()->count(); if ($count > 2) { - return redirect(route('transactions.edit-split', [$journal->id])); + return redirect(route('transactions.split.edit', [$journal->id])); } $what = strtolower(TransactionJournal::transactionTypeStr($journal)); @@ -286,7 +286,7 @@ class SingleController extends Controller if ($doSplit === true) { // redirect to edit screen: - return redirect(route('transactions.edit-split', [$journal->id])); + return redirect(route('transactions.split.edit', [$journal->id])); } diff --git a/app/Http/Controllers/Transaction/SplitController.php b/app/Http/Controllers/Transaction/SplitController.php index f14cde1885..595fb2ddbe 100644 --- a/app/Http/Controllers/Transaction/SplitController.php +++ b/app/Http/Controllers/Transaction/SplitController.php @@ -157,7 +157,7 @@ class SplitController extends Controller // set value so edit routine will not overwrite URL: Session::put('transactions.edit-split.fromUpdate', true); - return redirect(route('transactions.edit-split', [$journal->id]))->withInput(['return_to_edit' => 1]); + return redirect(route('transactions.split.edit', [$journal->id]))->withInput(['return_to_edit' => 1]); } // redirect to previous URL. @@ -249,8 +249,8 @@ class SplitController extends Controller $transactions = $this->tasker->getTransactionsOverview($journal); $return = []; /** @var array $transaction */ - foreach ($transactions as $transaction) { - $return[] = [ + foreach ($transactions as $index => $transaction) { + $set = [ 'description' => $transaction['description'], 'source_account_id' => $transaction['source_account_id'], 'source_account_name' => $transaction['source_account_name'], @@ -260,6 +260,15 @@ class SplitController extends Controller 'budget_id' => isset($transaction['budget_id']) ? intval($transaction['budget_id']) : 0, 'category' => $transaction['category'], ]; + + // set initial category and/or budget: + if (count($transactions) === 1 && $index === 0) { + $set['budget_id'] = TransactionJournal::budgetId($journal); + $set['category'] = TransactionJournal::categoryAsString($journal); + } + + $return[] = $set; + } return $return; diff --git a/app/Http/Controllers/TransactionController.php b/app/Http/Controllers/TransactionController.php index 36214cf76c..3a1c4415e7 100644 --- a/app/Http/Controllers/TransactionController.php +++ b/app/Http/Controllers/TransactionController.php @@ -146,7 +146,7 @@ class TransactionController extends Controller * * @return View */ - public function indexDate(Request $request, string $what, string $date) + public function indexByDate(Request $request, string $what, string $date) { $carbon = new Carbon($date); $range = Preferences::get('viewRange', '1M')->data; diff --git a/app/Http/Middleware/AuthenticateTwoFactor.php b/app/Http/Middleware/AuthenticateTwoFactor.php index 7dbaa77505..4f9f1f5542 100644 --- a/app/Http/Middleware/AuthenticateTwoFactor.php +++ b/app/Http/Middleware/AuthenticateTwoFactor.php @@ -57,7 +57,7 @@ class AuthenticateTwoFactor $has2faSecret = !is_null(Preferences::get('twoFactorAuthSecret')); $is2faAuthed = Session::get('twofactor-authenticated'); if ($is2faEnabled && $has2faSecret && !$is2faAuthed) { - return redirect(route('two-factor')); + return redirect(route('two-factor.index')); } return $next($request); diff --git a/app/Http/Middleware/IsConfirmed.php b/app/Http/Middleware/IsConfirmed.php index ef8e398a9e..1f53e2f41a 100644 --- a/app/Http/Middleware/IsConfirmed.php +++ b/app/Http/Middleware/IsConfirmed.php @@ -46,7 +46,12 @@ class IsConfirmed return redirect()->guest('login'); } // must the user be confirmed in the first place? - $mustConfirmAccount = FireflyConfig::get('must_confirm_account', config('firefly.configuration.must_confirm_account'))->data; + $confirmPreference = FireflyConfig::get('must_confirm_account', config('firefly.configuration.must_confirm_account')); + $mustConfirmAccount = false; + if (!is_null($confirmPreference)) { + $mustConfirmAccount = $confirmPreference->data; + } + // user must be logged in, then continue: $isConfirmed = Preferences::get('user_confirmed', false)->data; diff --git a/app/Http/Middleware/Range.php b/app/Http/Middleware/Range.php index a01e0578ce..ee9ca3ec22 100644 --- a/app/Http/Middleware/Range.php +++ b/app/Http/Middleware/Range.php @@ -61,7 +61,6 @@ class Range * @param string|null $guard * * @return mixed - * @internal param Closure $next */ public function handle(Request $request, Closure $next, $guard = null) { diff --git a/app/Http/Requests/AccountFormRequest.php b/app/Http/Requests/AccountFormRequest.php index 95cf746044..faac1971d8 100644 --- a/app/Http/Requests/AccountFormRequest.php +++ b/app/Http/Requests/AccountFormRequest.php @@ -42,10 +42,11 @@ class AccountFormRequest extends Request 'name' => trim($this->input('name')), 'active' => intval($this->input('active')) === 1, 'accountType' => $this->input('what'), - 'currency_id' => intval($this->input('currency_id')), + 'currency_id' => intval($this->input('currency_id')), 'virtualBalance' => round($this->input('virtualBalance'), 2), 'virtualBalanceCurrency' => intval($this->input('amount_currency_id_virtualBalance')), 'iban' => trim($this->input('iban')), + 'BIC' => trim($this->input('BIC')), 'accountNumber' => trim($this->input('accountNumber')), 'accountRole' => $this->input('accountRole'), 'openingBalance' => round($this->input('openingBalance'), 2), @@ -79,6 +80,7 @@ class AccountFormRequest extends Request 'name' => $nameRule, 'openingBalance' => 'numeric', 'iban' => 'iban', + 'BIC' => 'bic', 'virtualBalance' => 'numeric', 'openingBalanceDate' => 'date', 'currency_id' => 'exists:transaction_currencies,id', diff --git a/app/Http/breadcrumbs.php b/app/Http/breadcrumbs.php index 925c0cac99..abf249d27a 100644 --- a/app/Http/breadcrumbs.php +++ b/app/Http/breadcrumbs.php @@ -327,29 +327,29 @@ Breadcrumbs::register( * CURRENCIES */ Breadcrumbs::register( - 'currency.index', function (BreadCrumbGenerator $breadcrumbs) { + 'currencies.index', function (BreadCrumbGenerator $breadcrumbs) { $breadcrumbs->parent('home'); - $breadcrumbs->push(trans('firefly.currencies'), route('currency.index')); + $breadcrumbs->push(trans('firefly.currencies'), route('currencies.index')); } ); Breadcrumbs::register( - 'currency.create', function (BreadCrumbGenerator $breadcrumbs) { - $breadcrumbs->parent('currency.index'); - $breadcrumbs->push(trans('firefly.create_currency'), route('currency.create')); + 'currencies.create', function (BreadCrumbGenerator $breadcrumbs) { + $breadcrumbs->parent('currencies.index'); + $breadcrumbs->push(trans('firefly.create_currency'), route('currencies.create')); } ); Breadcrumbs::register( - 'currency.edit', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) { - $breadcrumbs->parent('currency.index'); - $breadcrumbs->push(trans('breadcrumbs.edit_currency', ['name' => e($currency->name)]), route('currency.edit', [$currency->id])); + 'currencies.edit', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) { + $breadcrumbs->parent('currencies.index'); + $breadcrumbs->push(trans('breadcrumbs.edit_currency', ['name' => e($currency->name)]), route('currencies.edit', [$currency->id])); } ); Breadcrumbs::register( - 'currency.delete', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) { - $breadcrumbs->parent('currency.index'); - $breadcrumbs->push(trans('breadcrumbs.delete_currency', ['name' => e($currency->name)]), route('currency.delete', [$currency->id])); + 'currencies.delete', function (BreadCrumbGenerator $breadcrumbs, TransactionCurrency $currency) { + $breadcrumbs->parent('currencies.index'); + $breadcrumbs->push(trans('breadcrumbs.delete_currency', ['name' => e($currency->name)]), route('currencies.delete', [$currency->id])); } ); @@ -404,9 +404,9 @@ Breadcrumbs::register( * PREFERENCES */ Breadcrumbs::register( - 'preferences', function (BreadCrumbGenerator $breadcrumbs) { + 'preferences.index', function (BreadCrumbGenerator $breadcrumbs) { $breadcrumbs->parent('home'); - $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences')); + $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences.index')); } ); @@ -414,7 +414,7 @@ Breadcrumbs::register( Breadcrumbs::register( 'preferences.code', function (BreadCrumbGenerator $breadcrumbs) { $breadcrumbs->parent('home'); - $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences')); + $breadcrumbs->push(trans('breadcrumbs.preferences'), route('preferences.index')); } ); @@ -423,22 +423,22 @@ Breadcrumbs::register( * PROFILE */ Breadcrumbs::register( - 'profile', function (BreadCrumbGenerator $breadcrumbs) { + 'profile.index', function (BreadCrumbGenerator $breadcrumbs) { $breadcrumbs->parent('home'); - $breadcrumbs->push(trans('breadcrumbs.profile'), route('profile')); + $breadcrumbs->push(trans('breadcrumbs.profile'), route('profile.index')); } ); Breadcrumbs::register( 'profile.change-password', function (BreadCrumbGenerator $breadcrumbs) { - $breadcrumbs->parent('profile'); + $breadcrumbs->parent('profile.index'); $breadcrumbs->push(trans('breadcrumbs.changePassword'), route('profile.change-password')); } ); Breadcrumbs::register( 'profile.delete-account', function (BreadCrumbGenerator $breadcrumbs) { - $breadcrumbs->parent('profile'); + $breadcrumbs->parent('profile.index'); $breadcrumbs->push(trans('firefly.delete_account'), route('profile.delete-account')); } @@ -529,9 +529,9 @@ Breadcrumbs::register( * SEARCH */ Breadcrumbs::register( - 'search', function (BreadCrumbGenerator $breadcrumbs, $query) { + 'search.index', function (BreadCrumbGenerator $breadcrumbs, $query) { $breadcrumbs->parent('home'); - $breadcrumbs->push(trans('breadcrumbs.searchResult', ['query' => e($query)]), route('search')); + $breadcrumbs->push(trans('breadcrumbs.searchResult', ['query' => e($query)]), route('search.index')); } ); diff --git a/app/Models/Account.php b/app/Models/Account.php index 43547de497..580ace8509 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -199,8 +199,7 @@ class Account extends Model */ public function getOpeningBalanceAmount(): string { - $journal = TransactionJournal - ::sortCorrectly() + $journal = TransactionJournal::sortCorrectly() ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') ->where('transactions.account_id', $this->id) ->transactionTypes([TransactionType::OPENING_BALANCE]) @@ -230,8 +229,7 @@ class Account extends Model public function getOpeningBalanceDate(): Carbon { $date = new Carbon('1900-01-01'); - $journal = TransactionJournal - ::sortCorrectly() + $journal = TransactionJournal::sortCorrectly() ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') ->where('transactions.account_id', $this->id) ->transactionTypes([TransactionType::OPENING_BALANCE]) diff --git a/app/Models/TransactionJournal.php b/app/Models/TransactionJournal.php index f76f8bcdcf..f9a8c206e9 100644 --- a/app/Models/TransactionJournal.php +++ b/app/Models/TransactionJournal.php @@ -64,8 +64,7 @@ class TransactionJournal extends TransactionJournalSupport public static function routeBinder($value) { if (auth()->check()) { - $object = TransactionJournal - ::where('transaction_journals.id', $value) + $object = TransactionJournal::where('transaction_journals.id', $value) ->with('transactionType') ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') ->where('user_id', auth()->user()->id)->first(['transaction_journals.*']); diff --git a/app/Repositories/Account/AccountRepository.php b/app/Repositories/Account/AccountRepository.php index aeb1535a31..140b865fd3 100644 --- a/app/Repositories/Account/AccountRepository.php +++ b/app/Repositories/Account/AccountRepository.php @@ -41,7 +41,7 @@ class AccountRepository implements AccountRepositoryInterface /** @var User */ private $user; /** @var array */ - private $validFields = ['accountRole', 'ccMonthlyPaymentDate', 'ccType', 'accountNumber','currency_id']; + private $validFields = ['accountRole', 'ccMonthlyPaymentDate', 'ccType', 'accountNumber', 'currency_id', 'BIC']; /** * AttachmentRepository constructor. @@ -60,7 +60,7 @@ class AccountRepository implements AccountRepositoryInterface * * @return int */ - public function count(array $types):int + public function count(array $types): int { $count = $this->user->accounts()->accountTypeIn($types)->count(); @@ -367,12 +367,11 @@ class AccountRepository implements AccountRepositoryInterface */ protected function openingBalanceTransaction(Account $account): TransactionJournal { - $journal = TransactionJournal - ::sortCorrectly() - ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') - ->where('transactions.account_id', $account->id) - ->transactionTypes([TransactionType::OPENING_BALANCE]) - ->first(['transaction_journals.*']); + $journal = TransactionJournal::sortCorrectly() + ->leftJoin('transactions', 'transactions.transaction_journal_id', '=', 'transaction_journals.id') + ->where('transactions.account_id', $account->id) + ->transactionTypes([TransactionType::OPENING_BALANCE]) + ->first(['transaction_journals.*']); if (is_null($journal)) { Log::debug('Could not find a opening balance journal, return empty one.'); @@ -482,7 +481,7 @@ class AccountRepository implements AccountRepositoryInterface * * @return Account */ - protected function storeOpposingAccount(float $amount, string $name):Account + protected function storeOpposingAccount(float $amount, string $name): Account { $type = $amount < 0 ? 'expense' : 'revenue'; $opposingData = [ diff --git a/app/Repositories/Account/AccountRepositoryInterface.php b/app/Repositories/Account/AccountRepositoryInterface.php index d306e433de..6aca02047e 100644 --- a/app/Repositories/Account/AccountRepositoryInterface.php +++ b/app/Repositories/Account/AccountRepositoryInterface.php @@ -119,6 +119,6 @@ interface AccountRepositoryInterface * * @return Account */ - public function store(array $data) : Account; + public function store(array $data): Account; } diff --git a/app/Repositories/Account/AccountTasker.php b/app/Repositories/Account/AccountTasker.php index f26b61a0d2..0a892dd5b2 100644 --- a/app/Repositories/Account/AccountTasker.php +++ b/app/Repositories/Account/AccountTasker.php @@ -107,41 +107,12 @@ class AccountTasker implements AccountTaskerInterface /** * @param Collection $accounts - * @param Collection $excluded * @param Carbon $start * @param Carbon $end * - * @return Collection - * @see self::financialReport - * - */ - public function expenseReport(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): Collection - { - $idList = [ - 'accounts' => $accounts->pluck('id')->toArray(), - 'exclude' => $excluded->pluck('id')->toArray(), - ]; - - Log::debug( - 'Now calling expenseReport.', - ['accounts' => $idList['accounts'], 'excluded' => $idList['exclude'], - 'start' => $start->format('Y-m-d'), - 'end' => $end->format('Y-m-d'), - ] - ); - - return $this->financialReport($idList, $start, $end, false); - - } - - /** - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * * @return AccountCollection */ - public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection + public function getAccountReport(Collection $accounts, Carbon $start, Carbon $end): AccountCollection { $startAmount = '0'; $endAmount = '0'; @@ -190,35 +161,6 @@ class AccountTasker implements AccountTaskerInterface return $object; } - /** - * @param Collection $accounts - * @param Collection $excluded - * @param Carbon $start - * @param Carbon $end - * - * @see AccountTasker::financialReport() - * - * @return Collection - * - */ - public function incomeReport(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): Collection - { - $idList = [ - 'accounts' => $accounts->pluck('id')->toArray(), - 'exclude' => $excluded->pluck('id')->toArray(), - ]; - - Log::debug( - 'Now calling expenseReport.', - ['accounts' => $idList['accounts'], 'excluded' => $idList['exclude'], - 'start' => $start->format('Y-m-d'), - 'end' => $end->format('Y-m-d'), - ] - ); - - return $this->financialReport($idList, $start, $end, true); - } - /** * Will return how much money has been going out (ie. spent) by the given account(s). * Alternatively, will return how much money has been coming in (ie. earned) by the given accounts. @@ -249,21 +191,20 @@ class AccountTasker implements AccountTaskerInterface $joinModifier = $incoming ? '<' : '>'; $selection = $incoming ? '>' : '<'; - $query = Transaction - ::distinct() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->leftJoin( - 'transactions as other_side', function (JoinClause $join) use ($joinModifier) { - $join->on('transaction_journals.id', '=', 'other_side.transaction_journal_id')->where('other_side.amount', $joinModifier, 0); - } - ) - ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) - ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) - ->where('transaction_journals.user_id', $this->user->id) - ->whereNull('transactions.deleted_at') - ->whereNull('transaction_journals.deleted_at') - ->whereIn('transactions.account_id', $accounts['accounts']) - ->where('transactions.amount', $selection, 0); + $query = Transaction::distinct() + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->leftJoin( + 'transactions as other_side', function (JoinClause $join) use ($joinModifier) { + $join->on('transaction_journals.id', '=', 'other_side.transaction_journal_id')->where('other_side.amount', $joinModifier, 0); + } + ) + ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) + ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) + ->where('transaction_journals.user_id', $this->user->id) + ->whereNull('transactions.deleted_at') + ->whereNull('transaction_journals.deleted_at') + ->whereIn('transactions.account_id', $accounts['accounts']) + ->where('transactions.amount', $selection, 0); if (count($accounts['exclude']) > 0) { $query->whereNotIn('other_side.account_id', $accounts['exclude']); } @@ -279,91 +220,4 @@ class AccountTasker implements AccountTaskerInterface return $sum; } - /** - * - * This method will determin how much has flown (in the given period) from OR to $accounts to/from anywhere else, - * except $excluded. This could be a list of incomes, or a list of expenses. This method shows - * the name, the amount and the number of transactions. It is a summary, and only used in some reports. - * - * $incoming=true a list of incoming money (earnings) - * $incoming=false a list of outgoing money (expenses). - * - * @param array $accounts - * @param Carbon $start - * @param Carbon $end - * @param bool $incoming - * - * Opening balances are ignored. - * - * @return Collection - */ - protected function financialReport(array $accounts, Carbon $start, Carbon $end, bool $incoming): Collection - { - $collection = new Collection; - $joinModifier = $incoming ? '<' : '>'; - $selection = $incoming ? '>' : '<'; - $query = Transaction - ::distinct() - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->leftJoin('transaction_types', 'transaction_journals.transaction_type_id', '=', 'transaction_types.id') - ->leftJoin( - 'transactions as other_side', function (JoinClause $join) use ($joinModifier) { - $join->on('transaction_journals.id', '=', 'other_side.transaction_journal_id')->where('other_side.amount', $joinModifier, 0); - } - ) - ->leftJoin('accounts as other_account', 'other_account.id', '=', 'other_side.account_id') - ->where('transaction_types.type', '!=', TransactionType::OPENING_BALANCE) - ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) - ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) - ->where('transaction_journals.user_id', $this->user->id) - ->whereNull('transactions.deleted_at') - ->whereNull('other_side.deleted_at') - ->whereNull('transaction_journals.deleted_at') - ->whereIn('transactions.account_id', $accounts['accounts']) - ->where('other_side.amount', '=', DB::raw('transactions.amount * -1')) - ->where('transactions.amount', $selection, 0) - ->orderBy('transactions.amount'); - - if (count($accounts['exclude']) > 0) { - $query->whereNotIn('other_side.account_id', $accounts['exclude']); - } - $set = $query->get( - [ - 'transaction_journals.id', - 'other_side.account_id', - 'other_account.name', - 'other_account.encrypted', - 'transactions.amount', - ] - ); - // summarize ourselves: - $temp = []; - foreach ($set as $entry) { - // save into $temp: - $id = intval($entry->account_id); - if (isset($temp[$id])) { - $temp[$id]['count']++; - $temp[$id]['amount'] = bcadd($temp[$id]['amount'], $entry->amount); - } - if (!isset($temp[$id])) { - $temp[$id] = [ - 'name' => intval($entry->encrypted) === 1 ? Crypt::decrypt($entry->name) : $entry->name, - 'amount' => $entry->amount, - 'count' => 1, - ]; - } - } - - // loop $temp and create collection: - foreach ($temp as $key => $entry) { - $object = new stdClass(); - $object->id = $key; - $object->name = $entry['name']; - $object->count = $entry['count']; - $object->amount = $entry['amount']; - $collection->push($object); - } - - return $collection; - } } diff --git a/app/Repositories/Account/AccountTaskerInterface.php b/app/Repositories/Account/AccountTaskerInterface.php index dbf1892667..67ab246ed9 100644 --- a/app/Repositories/Account/AccountTaskerInterface.php +++ b/app/Repositories/Account/AccountTaskerInterface.php @@ -51,37 +51,11 @@ interface AccountTaskerInterface /** * @param Collection $accounts - * @param Collection $excluded * @param Carbon $start * @param Carbon $end * - * @see AccountTasker::financialReport() - * - * @return Collection - * - */ - public function expenseReport(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): Collection; - - /** - * @param Carbon $start - * @param Carbon $end - * @param Collection $accounts - * * @return AccountCollection */ - public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection; - - /** - * @param Collection $accounts - * @param Collection $excluded - * @param Carbon $start - * @param Carbon $end - * - * @see AccountTasker::financialReport() - * - * @return Collection - * - */ - public function incomeReport(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): Collection; + public function getAccountReport(Collection $accounts, Carbon $start, Carbon $end): AccountCollection; } diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index e41196b81d..179e0aa12b 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -66,7 +66,7 @@ class BillRepository implements BillRepositoryInterface * * @return Bill */ - public function find(int $billId) : Bill + public function find(int $billId): Bill { $bill = $this->user->bills()->find($billId); if (is_null($bill)) { @@ -83,7 +83,7 @@ class BillRepository implements BillRepositoryInterface * * @return Bill */ - public function findByName(string $name) : Bill + public function findByName(string $name): Bill { $bills = $this->user->bills()->get(['bills.*']); diff --git a/app/Repositories/Bill/BillRepositoryInterface.php b/app/Repositories/Bill/BillRepositoryInterface.php index cf71d133bc..c2c6cd223d 100644 --- a/app/Repositories/Bill/BillRepositoryInterface.php +++ b/app/Repositories/Bill/BillRepositoryInterface.php @@ -40,7 +40,7 @@ interface BillRepositoryInterface * * @return Bill */ - public function find(int $billId) : Bill; + public function find(int $billId): Bill; /** * Find a bill by name. @@ -49,7 +49,7 @@ interface BillRepositoryInterface * * @return Bill */ - public function findByName(string $name) : Bill; + public function findByName(string $name): Bill; /** * @return Collection diff --git a/app/Repositories/Budget/BudgetRepository.php b/app/Repositories/Budget/BudgetRepository.php index 354c730011..ff5e4467b5 100644 --- a/app/Repositories/Budget/BudgetRepository.php +++ b/app/Repositories/Budget/BudgetRepository.php @@ -212,10 +212,8 @@ class BudgetRepository implements BudgetRepositoryInterface } /** - * This method is being used to generate the budget overview in the year/multi-year report. More specifically, this - * method runs the query and returns the result that is used for this report. - * - * The query is used in both the year/multi-year budget overview AND in the accompanying chart. + * This method is being used to generate the budget overview in the year/multi-year report. Its used + * in both the year/multi-year budget overview AND in the accompanying chart. * * @param Collection $budgets * @param Collection $accounts @@ -226,54 +224,31 @@ class BudgetRepository implements BudgetRepositoryInterface */ public function getBudgetPeriodReport(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end): array { + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + $data = []; + // prep data array: + /** @var Budget $budget */ + foreach ($budgets as $budget) { + $data[$budget->id] = [ + 'name' => $budget->name, + 'sum' => '0', + 'entries' => [], + ]; + } + + // get all transactions: /** @var JournalCollectorInterface $collector */ $collector = app(JournalCollectorInterface::class); - $collector->setAllAssetAccounts()->setRange($start, $end); + $collector->setAccounts($accounts)->setRange($start, $end); $collector->setBudgets($budgets); $transactions = $collector->getJournals(); - // this is the date format we need: - // define period to group on: - $carbonFormat = Navigation::preferredCarbonFormat($start, $end); - - // this is the set of transactions for this period - // in these budgets. Now they must be grouped (manually) - // id, period => amount - $data = []; + // loop transactions: + /** @var Transaction $transaction */ foreach ($transactions as $transaction) { - $budgetId = max(intval($transaction->transaction_journal_budget_id), intval($transaction->transaction_budget_id)); - $date = $transaction->date->format($carbonFormat); - - if (!isset($data[$budgetId])) { - $data[$budgetId]['name'] = $this->getBudgetName($budgetId, $budgets); - $data[$budgetId]['sum'] = '0'; - $data[$budgetId]['entries'] = []; - } - - if (!isset($data[$budgetId]['entries'][$date])) { - $data[$budgetId]['entries'][$date] = '0'; - } - $data[$budgetId]['entries'][$date] = bcadd($data[$budgetId]['entries'][$date], $transaction->transaction_amount); - } - // and now the same for stuff without a budget: - /** @var JournalCollectorInterface $collector */ - $collector = app(JournalCollectorInterface::class); - $collector->setAllAssetAccounts()->setRange($start, $end); - $collector->setTypes([TransactionType::WITHDRAWAL]); - $collector->withoutBudget(); - $transactions = $collector->getJournals(); - - $data[0]['entries'] = []; - $data[0]['name'] = strval(trans('firefly.no_budget')); - $data[0]['sum'] = '0'; - - foreach ($transactions as $transaction) { - $date = $transaction->date->format($carbonFormat); - - if (!isset($data[0]['entries'][$date])) { - $data[0]['entries'][$date] = '0'; - } - $data[0]['entries'][$date] = bcadd($data[0]['entries'][$date], $transaction->transaction_amount); + $budgetId = max(intval($transaction->transaction_journal_budget_id), intval($transaction->transaction_budget_id)); + $date = $transaction->date->format($carbonFormat); + $data[$budgetId]['entries'][$date] = bcadd($data[$budgetId]['entries'][$date] ?? '0', $transaction->transaction_amount); } return $data; @@ -314,6 +289,40 @@ class BudgetRepository implements BudgetRepositoryInterface return $set; } + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function getNoBudgetPeriodReport(Collection $accounts, Carbon $start, Carbon $end): array + { + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end); + $collector->setTypes([TransactionType::WITHDRAWAL]); + $collector->withoutBudget(); + $transactions = $collector->getJournals(); + $result = [ + 'entries' => [], + 'name' => strval(trans('firefly.no_budget')), + 'sum' => '0', + ]; + + foreach ($transactions as $transaction) { + $date = $transaction->date->format($carbonFormat); + + if (!isset($result['entries'][$date])) { + $result['entries'][$date] = '0'; + } + $result['entries'][$date] = bcadd($result['entries'][$date], $transaction->transaction_amount); + } + + return $result; + } + /** * @param Collection $budgets * @param Collection $accounts @@ -332,20 +341,23 @@ class BudgetRepository implements BudgetRepositoryInterface Log::debug('spentInPeriod: and these accounts: ', $accountIds); Log::debug(sprintf('spentInPeriod: Start date is "%s", end date is "%s"', $start->format('Y-m-d'), $end->format('Y-m-d'))); - $fromJournalsQuery = TransactionJournal - ::leftJoin('budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id') - ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') - ->leftJoin( - 'transactions', function (JoinClause $join) { - $join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')->where('transactions.amount', '<', 0); - } - ) - ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) - ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) - ->whereNull('transaction_journals.deleted_at') - ->whereNull('transactions.deleted_at') - ->where('transaction_journals.user_id', $this->user->id) - ->where('transaction_types.type', 'Withdrawal'); + $fromJournalsQuery = TransactionJournal::leftJoin( + 'budget_transaction_journal', 'budget_transaction_journal.transaction_journal_id', '=', 'transaction_journals.id' + ) + ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') + ->leftJoin( + 'transactions', function (JoinClause $join) { + $join->on('transactions.transaction_journal_id', '=', 'transaction_journals.id')->where( + 'transactions.amount', '<', 0 + ); + } + ) + ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) + ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) + ->whereNull('transaction_journals.deleted_at') + ->whereNull('transactions.deleted_at') + ->where('transaction_journals.user_id', $this->user->id) + ->where('transaction_types.type', 'Withdrawal'); // add budgets: if ($budgets->count() > 0) { @@ -368,17 +380,16 @@ class BudgetRepository implements BudgetRepositoryInterface * and budget_transaction.budget_id in (1,61) * and transactions.account_id in (2) */ - $fromTransactionsQuery = Transaction - ::leftJoin('budget_transaction', 'budget_transaction.transaction_id', '=', 'transactions.id') - ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') - ->whereNull('transactions.deleted_at') - ->whereNull('transaction_journals.deleted_at') - ->where('transactions.amount', '<', 0) - ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) - ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) - ->where('transaction_journals.user_id', $this->user->id) - ->where('transaction_types.type', 'Withdrawal'); + $fromTransactionsQuery = Transaction::leftJoin('budget_transaction', 'budget_transaction.transaction_id', '=', 'transactions.id') + ->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->leftJoin('transaction_types', 'transaction_types.id', '=', 'transaction_journals.transaction_type_id') + ->whereNull('transactions.deleted_at') + ->whereNull('transaction_journals.deleted_at') + ->where('transactions.amount', '<', 0) + ->where('transaction_journals.date', '>=', $start->format('Y-m-d')) + ->where('transaction_journals.date', '<=', $end->format('Y-m-d')) + ->where('transaction_journals.user_id', $this->user->id) + ->where('transaction_types.type', 'Withdrawal'); // add budgets: if ($budgets->count() > 0) { @@ -550,25 +561,4 @@ class BudgetRepository implements BudgetRepositoryInterface return $limit; } - - /** - * @param int $budgetId - * @param Collection $budgets - * - * @return string - */ - private function getBudgetName(int $budgetId, Collection $budgets): string - { - - $first = $budgets->filter( - function (Budget $budget) use ($budgetId) { - return $budgetId === $budget->id; - } - ); - if (!is_null($first->first())) { - return $first->first()->name; - } - - return '(unknown)'; - } } diff --git a/app/Repositories/Budget/BudgetRepositoryInterface.php b/app/Repositories/Budget/BudgetRepositoryInterface.php index f81788a435..6161545760 100644 --- a/app/Repositories/Budget/BudgetRepositoryInterface.php +++ b/app/Repositories/Budget/BudgetRepositoryInterface.php @@ -111,6 +111,14 @@ interface BudgetRepositoryInterface */ public function getInactiveBudgets(): Collection; + /** + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function getNoBudgetPeriodReport(Collection $accounts, Carbon $start, Carbon $end): array; + /** * @param Collection $budgets * @param Collection $accounts @@ -119,7 +127,7 @@ interface BudgetRepositoryInterface * * @return string */ - public function spentInPeriod(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end) : string; + public function spentInPeriod(Collection $budgets, Collection $accounts, Carbon $start, Carbon $end): string; /** * @param Collection $accounts @@ -143,7 +151,7 @@ interface BudgetRepositoryInterface * * @return Budget */ - public function update(Budget $budget, array $data) : Budget; + public function update(Budget $budget, array $data): Budget; /** * @param Budget $budget @@ -154,6 +162,6 @@ interface BudgetRepositoryInterface * * @return BudgetLimit */ - public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, string $range, int $amount) : BudgetLimit; + public function updateLimitAmount(Budget $budget, Carbon $start, Carbon $end, string $range, int $amount): BudgetLimit; } diff --git a/app/Repositories/Category/CategoryRepository.php b/app/Repositories/Category/CategoryRepository.php index 98d613e9ba..65b46ad44c 100644 --- a/app/Repositories/Category/CategoryRepository.php +++ b/app/Repositories/Category/CategoryRepository.php @@ -15,12 +15,16 @@ namespace FireflyIII\Repositories\Category; use Carbon\Carbon; use DB; +use FireflyIII\Helpers\Collector\JournalCollectorInterface; use FireflyIII\Models\Category; +use FireflyIII\Models\Transaction; use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionType; use FireflyIII\User; use Illuminate\Database\Query\JoinClause; use Illuminate\Support\Collection; +use Log; +use Navigation; /** * Class CategoryRepository @@ -221,6 +225,178 @@ class CategoryRepository implements CategoryRepositoryInterface return $last; } + /** + * @param Collection $categories + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodExpenses(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): array + { + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + $data = []; + // prep data array: + /** @var Category $category */ + foreach ($categories as $category) { + $data[$category->id] = [ + 'name' => $category->name, + 'sum' => '0', + 'entries' => [], + ]; + } + + // get all transactions: + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end); + $collector->setCategories($categories)->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER]) + ->withOpposingAccount() + ->enableInternalFilter(); + $transactions = $collector->getJournals(); + + // loop transactions: + /** @var Transaction $transaction */ + foreach ($transactions as $transaction) { + // if positive, skip: + if (bccomp($transaction->transaction_amount, '0') === 1) { + continue; + } + $categoryId = max(intval($transaction->transaction_journal_category_id), intval($transaction->transaction_category_id)); + $date = $transaction->date->format($carbonFormat); + $data[$categoryId]['entries'][$date] = bcadd($data[$categoryId]['entries'][$date] ?? '0', $transaction->transaction_amount); + } + + return $data; + } + + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodExpensesNoCategory(Collection $accounts, Carbon $start, Carbon $end): array + { + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end)->withOpposingAccount(); + $collector->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER])->enableInternalFilter(); + $collector->withoutCategory(); + $transactions = $collector->getJournals(); + $result = [ + 'entries' => [], + 'name' => strval(trans('firefly.no_category')), + 'sum' => '0', + ]; + + foreach ($transactions as $transaction) { + // if positive, skip: + if (bccomp($transaction->transaction_amount, '0') === 1) { + continue; + } + $date = $transaction->date->format($carbonFormat); + + if (!isset($result['entries'][$date])) { + $result['entries'][$date] = '0'; + } + $result['entries'][$date] = bcadd($result['entries'][$date], $transaction->transaction_amount); + } + + return $result; + } + + /** + * @param Collection $categories + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodIncome(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): array + { + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + $data = []; + // prep data array: + /** @var Category $category */ + foreach ($categories as $category) { + $data[$category->id] = [ + 'name' => $category->name, + 'sum' => '0', + 'entries' => [], + ]; + } + + // get all transactions: + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end); + $collector->setCategories($categories)->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER]) + ->withOpposingAccount() + ->enableInternalFilter(); + $transactions = $collector->getJournals(); + + // loop transactions: + /** @var Transaction $transaction */ + foreach ($transactions as $transaction) { + // if negative, skip: + if (bccomp($transaction->transaction_amount, '0') === -1) { + continue; + } + $categoryId = max(intval($transaction->transaction_journal_category_id), intval($transaction->transaction_category_id)); + $date = $transaction->date->format($carbonFormat); + $data[$categoryId]['entries'][$date] = bcadd($data[$categoryId]['entries'][$date] ?? '0', $transaction->transaction_amount); + } + + return $data; + } + + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodIncomeNoCategory(Collection $accounts, Carbon $start, Carbon $end): array + { + Log::debug('Now in periodIncomeNoCategory()'); + $carbonFormat = Navigation::preferredCarbonFormat($start, $end); + /** @var JournalCollectorInterface $collector */ + $collector = app(JournalCollectorInterface::class); + $collector->setAccounts($accounts)->setRange($start, $end)->withOpposingAccount(); + $collector->setTypes([TransactionType::DEPOSIT, TransactionType::TRANSFER])->enableInternalFilter(); + $collector->withoutCategory(); + $transactions = $collector->getJournals(); + $result = [ + 'entries' => [], + 'name' => strval(trans('firefly.no_category')), + 'sum' => '0', + ]; + Log::debug('Looping transactions..'); + foreach ($transactions as $transaction) { + + // if negative, skip: + if (bccomp($transaction->transaction_amount, '0') === -1) { + continue; + } + $date = $transaction->date->format($carbonFormat); + + if (!isset($result['entries'][$date])) { + $result['entries'][$date] = '0'; + } + $result['entries'][$date] = bcadd($result['entries'][$date], $transaction->transaction_amount); + } + Log::debug('Done looping transactions..'); + Log::debug('Finished periodIncomeNoCategory()'); + + return $result; + } + /** * @param Collection $categories * @param Collection $accounts @@ -233,6 +409,7 @@ class CategoryRepository implements CategoryRepositoryInterface { $sum = $this->sumInPeriod($categories, $accounts, TransactionType::WITHDRAWAL, $start, $end); $sum = bcmul($sum, '-1'); + return $sum; } @@ -404,5 +581,4 @@ class CategoryRepository implements CategoryRepositoryInterface return $sum; } - } diff --git a/app/Repositories/Category/CategoryRepositoryInterface.php b/app/Repositories/Category/CategoryRepositoryInterface.php index d088eebe5d..bbcd272d1e 100644 --- a/app/Repositories/Category/CategoryRepositoryInterface.php +++ b/app/Repositories/Category/CategoryRepositoryInterface.php @@ -24,7 +24,6 @@ use Illuminate\Support\Collection; */ interface CategoryRepositoryInterface { - /** * @param Category $category * @@ -49,7 +48,7 @@ interface CategoryRepositoryInterface * * @return string */ - public function earnedInPeriodWithoutCategory(Collection $accounts, Carbon $start, Carbon $end) :string; + public function earnedInPeriodWithoutCategory(Collection $accounts, Carbon $start, Carbon $end): string; /** * Find a category @@ -58,7 +57,7 @@ interface CategoryRepositoryInterface * * @return Category */ - public function find(int $categoryId) : Category; + public function find(int $categoryId): Category; /** * Find a category @@ -67,7 +66,7 @@ interface CategoryRepositoryInterface * * @return Category */ - public function findByName(string $name) : Category; + public function findByName(string $name): Category; /** * @param Category $category @@ -93,6 +92,44 @@ interface CategoryRepositoryInterface */ public function lastUseDate(Category $category, Collection $accounts): Carbon; + /** + * @param Collection $categories + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodExpenses(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): array; + + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodExpensesNoCategory(Collection $accounts, Carbon $start, Carbon $end): array; + + /** + * @param Collection $categories + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodIncome(Collection $categories, Collection $accounts, Carbon $start, Carbon $end): array; + + /** + * @param Collection $accounts + * @param Carbon $start + * @param Carbon $end + * + * @return array + */ + public function periodIncomeNoCategory(Collection $accounts, Carbon $start, Carbon $end): array; + /** * @param Collection $categories * @param Collection $accounts @@ -110,7 +147,7 @@ interface CategoryRepositoryInterface * * @return string */ - public function spentInPeriodWithoutCategory(Collection $accounts, Carbon $start, Carbon $end) : string; + public function spentInPeriodWithoutCategory(Collection $accounts, Carbon $start, Carbon $end): string; /** * @param array $data diff --git a/app/Repositories/Currency/CurrencyRepository.php b/app/Repositories/Currency/CurrencyRepository.php index 3b88e9ede4..1bf6e8728f 100644 --- a/app/Repositories/Currency/CurrencyRepository.php +++ b/app/Repositories/Currency/CurrencyRepository.php @@ -43,7 +43,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function find(int $currencyId) : TransactionCurrency + public function find(int $currencyId): TransactionCurrency { $currency = TransactionCurrency::find($currencyId); if (is_null($currency)) { @@ -61,7 +61,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function findByCode(string $currencyCode) : TransactionCurrency + public function findByCode(string $currencyCode): TransactionCurrency { $currency = TransactionCurrency::whereCode($currencyCode)->first(); if (is_null($currency)) { @@ -78,7 +78,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function findByName(string $currencyName) : TransactionCurrency + public function findByName(string $currencyName): TransactionCurrency { $preferred = TransactionCurrency::whereName($currencyName)->first(); if (is_null($preferred)) { @@ -95,7 +95,7 @@ class CurrencyRepository implements CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function findBySymbol(string $currencySymbol) : TransactionCurrency + public function findBySymbol(string $currencySymbol): TransactionCurrency { $currency = TransactionCurrency::whereSymbol($currencySymbol)->first(); if (is_null($currency)) { diff --git a/app/Repositories/Currency/CurrencyRepositoryInterface.php b/app/Repositories/Currency/CurrencyRepositoryInterface.php index 4bd01fa256..94ae094cbe 100644 --- a/app/Repositories/Currency/CurrencyRepositoryInterface.php +++ b/app/Repositories/Currency/CurrencyRepositoryInterface.php @@ -39,7 +39,7 @@ interface CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function find(int $currencyId) : TransactionCurrency; + public function find(int $currencyId): TransactionCurrency; /** * Find by currency code @@ -48,7 +48,7 @@ interface CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function findByCode(string $currencyCode) : TransactionCurrency; + public function findByCode(string $currencyCode): TransactionCurrency; /** * Find by currency name @@ -57,7 +57,7 @@ interface CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function findByName(string $currencyName) : TransactionCurrency; + public function findByName(string $currencyName): TransactionCurrency; /** * Find by currency symbol @@ -66,7 +66,7 @@ interface CurrencyRepositoryInterface * * @return TransactionCurrency */ - public function findBySymbol(string $currencySymbol) : TransactionCurrency; + public function findBySymbol(string $currencySymbol): TransactionCurrency; /** * @return Collection diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index 1643007904..c655b20f41 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -105,7 +105,7 @@ class JournalRepository implements JournalRepositoryInterface * * @return TransactionJournal */ - public function find(int $journalId) : TransactionJournal + public function find(int $journalId): TransactionJournal { $journal = $this->user->transactionJournals()->where('id', $journalId)->first(); if (is_null($journal)) { diff --git a/app/Repositories/Journal/JournalRepositoryInterface.php b/app/Repositories/Journal/JournalRepositoryInterface.php index 8a25f542b9..fb9779eec3 100644 --- a/app/Repositories/Journal/JournalRepositoryInterface.php +++ b/app/Repositories/Journal/JournalRepositoryInterface.php @@ -52,7 +52,7 @@ interface JournalRepositoryInterface * * @return TransactionJournal */ - public function find(int $journalId) : TransactionJournal; + public function find(int $journalId): TransactionJournal; /** * Get users very first transaction journal diff --git a/app/Repositories/Journal/JournalTasker.php b/app/Repositories/Journal/JournalTasker.php index d717fdbda5..16cc5a5f3a 100644 --- a/app/Repositories/Journal/JournalTasker.php +++ b/app/Repositories/Journal/JournalTasker.php @@ -171,39 +171,37 @@ class JournalTasker implements JournalTaskerInterface $identifier = intval($transaction->identifier); // go! - $sum - = Transaction - ::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') - ->where('account_id', $transaction->account_id) - ->whereNull('transactions.deleted_at') - ->whereNull('transaction_journals.deleted_at') - ->where('transactions.id', '!=', $transactionId) - ->where( - function (Builder $q1) use ($date, $order, $journalId, $identifier) { - $q1->where('transaction_journals.date', '<', $date); // date - $q1->orWhere( - function (Builder $q2) use ($date, $order) { // function 1 - $q2->where('transaction_journals.date', $date); - $q2->where('transaction_journals.order', '>', $order); - } - ); - $q1->orWhere( - function (Builder $q3) use ($date, $order, $journalId) { // function 2 - $q3->where('transaction_journals.date', $date); - $q3->where('transaction_journals.order', $order); - $q3->where('transaction_journals.id', '<', $journalId); - } - ); - $q1->orWhere( - function (Builder $q4) use ($date, $order, $journalId, $identifier) { // function 3 - $q4->where('transaction_journals.date', $date); - $q4->where('transaction_journals.order', $order); - $q4->where('transaction_journals.id', $journalId); - $q4->where('transactions.identifier', '>', $identifier); - } - ); - } - )->sum('transactions.amount'); + $sum = Transaction::leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id') + ->where('account_id', $transaction->account_id) + ->whereNull('transactions.deleted_at') + ->whereNull('transaction_journals.deleted_at') + ->where('transactions.id', '!=', $transactionId) + ->where( + function (Builder $q1) use ($date, $order, $journalId, $identifier) { + $q1->where('transaction_journals.date', '<', $date); // date + $q1->orWhere( + function (Builder $q2) use ($date, $order) { // function 1 + $q2->where('transaction_journals.date', $date); + $q2->where('transaction_journals.order', '>', $order); + } + ); + $q1->orWhere( + function (Builder $q3) use ($date, $order, $journalId) { // function 2 + $q3->where('transaction_journals.date', $date); + $q3->where('transaction_journals.order', $order); + $q3->where('transaction_journals.id', '<', $journalId); + } + ); + $q1->orWhere( + function (Builder $q4) use ($date, $order, $journalId, $identifier) { // function 3 + $q4->where('transaction_journals.date', $date); + $q4->where('transaction_journals.order', $order); + $q4->where('transaction_journals.id', $journalId); + $q4->where('transactions.identifier', '>', $identifier); + } + ); + } + )->sum('transactions.amount'); return strval($sum); } diff --git a/app/Repositories/PiggyBank/PiggyBankRepository.php b/app/Repositories/PiggyBank/PiggyBankRepository.php index 6eef1e358e..ede86894c7 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepository.php +++ b/app/Repositories/PiggyBank/PiggyBankRepository.php @@ -117,7 +117,7 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface * * @return Collection */ - public function getPiggyBanksWithAmount() : Collection + public function getPiggyBanksWithAmount(): Collection { $set = $this->getPiggyBanks(); foreach ($set as $piggy) { diff --git a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php index 22eb0a4e9a..aae01702d7 100644 --- a/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php +++ b/app/Repositories/PiggyBank/PiggyBankRepositoryInterface.php @@ -58,7 +58,7 @@ interface PiggyBankRepositoryInterface * * @return Collection */ - public function getEvents(PiggyBank $piggyBank) : Collection; + public function getEvents(PiggyBank $piggyBank): Collection; /** * Highest order of all piggy banks. @@ -72,14 +72,14 @@ interface PiggyBankRepositoryInterface * * @return Collection */ - public function getPiggyBanks() : Collection; + public function getPiggyBanks(): Collection; /** * Also add amount in name. * * @return Collection */ - public function getPiggyBanksWithAmount() : Collection; + public function getPiggyBanksWithAmount(): Collection; /** * Set all piggy banks to order 0. diff --git a/app/Repositories/Tag/TagRepository.php b/app/Repositories/Tag/TagRepository.php index ecdc5bfe94..3740584f41 100644 --- a/app/Repositories/Tag/TagRepository.php +++ b/app/Repositories/Tag/TagRepository.php @@ -93,7 +93,7 @@ class TagRepository implements TagRepositoryInterface * * @return Tag */ - public function find(int $tagId) : Tag + public function find(int $tagId): Tag { $tag = $this->user->tags()->find($tagId); if (is_null($tag)) { @@ -108,7 +108,7 @@ class TagRepository implements TagRepositoryInterface * * @return Tag */ - public function findByTag(string $tag) : Tag + public function findByTag(string $tag): Tag { $tags = $this->user->tags()->get(); /** @var Tag $tag */ diff --git a/app/Repositories/Tag/TagRepositoryInterface.php b/app/Repositories/Tag/TagRepositoryInterface.php index dd1966bd51..3da24ab718 100644 --- a/app/Repositories/Tag/TagRepositoryInterface.php +++ b/app/Repositories/Tag/TagRepositoryInterface.php @@ -49,14 +49,14 @@ interface TagRepositoryInterface * * @return Tag */ - public function find(int $tagId) : Tag; + public function find(int $tagId): Tag; /** * @param string $tag * * @return Tag */ - public function findByTag(string $tag) : Tag; + public function findByTag(string $tag): Tag; /** * This method returns all the user's tags. diff --git a/app/Repositories/User/UserRepository.php b/app/Repositories/User/UserRepository.php index f7b76eb1d9..87ac639290 100644 --- a/app/Repositories/User/UserRepository.php +++ b/app/Repositories/User/UserRepository.php @@ -113,12 +113,11 @@ class UserRepository implements UserRepositoryInterface $return['bills'] = $user->bills()->count(); $return['categories'] = $user->categories()->count(); $return['budgets'] = $user->budgets()->count(); - $return['budgets_with_limits'] = BudgetLimit - ::distinct() - ->leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id') - ->where('amount', '>', 0) - ->whereNull('budgets.deleted_at') - ->where('budgets.user_id', $user->id)->get(['budget_limits.budget_id'])->count(); + $return['budgets_with_limits'] = BudgetLimit::distinct() + ->leftJoin('budgets', 'budgets.id', '=', 'budget_limits.budget_id') + ->where('amount', '>', 0) + ->whereNull('budgets.deleted_at') + ->where('budgets.user_id', $user->id)->get(['budget_limits.budget_id'])->count(); $return['export_jobs'] = $user->exportJobs()->count(); $return['export_jobs_success'] = $user->exportJobs()->where('status', 'export_downloaded')->count(); $return['import_jobs'] = $user->exportJobs()->count(); diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php index df6257ca06..c0aa1dbc67 100644 --- a/app/Support/ExpandedForm.php +++ b/app/Support/ExpandedForm.php @@ -40,20 +40,7 @@ class ExpandedForm */ public function amount(string $name, $value = null, array $options = []): string { - $label = $this->label($name, $options); - $options = $this->expandOptionArray($name, $label, $options); - $classes = $this->getHolderClasses($name); - $value = $this->fillFieldValue($name, $value); - $options['step'] = 'any'; - $options['min'] = '0.01'; - $defaultCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency(); - $currencies = Amt::getAllCurrencies(); - unset($options['currency']); - unset($options['placeholder']); - $html = view('form.amount', compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render(); - - return $html; - + return $this->currencyField($name, 'amount', $value, $options); } /** @@ -65,20 +52,7 @@ class ExpandedForm */ public function amountSmall(string $name, $value = null, array $options = []): string { - $label = $this->label($name, $options); - $options = $this->expandOptionArray($name, $label, $options); - $classes = $this->getHolderClasses($name); - $value = $this->fillFieldValue($name, $value); - $options['step'] = 'any'; - $options['min'] = '0.01'; - $defaultCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency(); - $currencies = Amt::getAllCurrencies(); - unset($options['currency']); - unset($options['placeholder']); - $html = view('form.amount-small', compact('defaultCurrency', 'currencies', 'classes', 'name', 'value', 'options'))->render(); - - return $html; - + return $this->currencyField($name, 'amount-small', $value, $options); } /** @@ -90,18 +64,7 @@ class ExpandedForm */ public function balance(string $name, $value = null, array $options = []): string { - $label = $this->label($name, $options); - $options = $this->expandOptionArray($name, $label, $options); - $classes = $this->getHolderClasses($name); - $value = round($this->fillFieldValue($name, $value), 2); - $options['step'] = 'any'; - $defaultCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency(); - $currencies = Amt::getAllCurrencies(); - unset($options['currency']); - unset($options['placeholder']); - $html = view('form.balance', compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render(); - - return $html; + return $this->currencyField($name, 'balance', $value, $options); } /** @@ -320,7 +283,6 @@ class ExpandedForm return $html; } - /** * @param $name * @param array $list @@ -500,4 +462,29 @@ class ExpandedForm return strval(trans('form.' . $name)); } + + /** + * @param string $name + * @param string $view + * @param null $value + * @param array $options + * + * @return string + */ + private function currencyField(string $name, string $view, $value = null, array $options = []): string + { + $label = $this->label($name, $options); + $options = $this->expandOptionArray($name, $label, $options); + $classes = $this->getHolderClasses($name); + $value = $this->fillFieldValue($name, $value); + $options['step'] = 'any'; + $options['min'] = '0.01'; + $defaultCurrency = isset($options['currency']) ? $options['currency'] : Amt::getDefaultCurrency(); + $currencies = Amt::getAllCurrencies(); + unset($options['currency']); + unset($options['placeholder']); + $html = view('form.' . $view, compact('defaultCurrency', 'currencies', 'classes', 'name', 'label', 'value', 'options'))->render(); + + return $html; + } } diff --git a/app/Support/Navigation.php b/app/Support/Navigation.php index f8ec640963..48ff2724fb 100644 --- a/app/Support/Navigation.php +++ b/app/Support/Navigation.php @@ -246,8 +246,8 @@ class Navigation * If the date difference between start and end is less than a month, method returns "Y-m-d". If the difference is less than a year, * method returns "Y-m". If the date difference is larger, method returns "Y". * - * @param Carbon $start - * @param Carbon $end + * @param \Carbon\Carbon $start + * @param \Carbon\Carbon $end * * @return string */ @@ -270,8 +270,8 @@ class Navigation * If the date difference between start and end is less than a month, method returns "1D". If the difference is less than a year, * method returns "1M". If the date difference is larger, method returns "1Y". * - * @param Carbon $start - * @param Carbon $end + * @param \Carbon\Carbon $start + * @param \Carbon\Carbon $end * * @return string */ diff --git a/app/Support/Twig/Transaction.php b/app/Support/Twig/Transaction.php index 37a964e959..8e1d1284f8 100644 --- a/app/Support/Twig/Transaction.php +++ b/app/Support/Twig/Transaction.php @@ -109,8 +109,7 @@ class Transaction extends Twig_Extension 'optionalJournalAmount', function (int $journalId, string $transactionAmount, string $code, string $type): string { $amount = strval( - TransactionModel - ::where('transaction_journal_id', $journalId) + TransactionModel::where('transaction_journal_id', $journalId) ->whereNull('deleted_at') ->where('amount', '<', 0) ->sum('amount') @@ -193,8 +192,7 @@ class Transaction extends Twig_Extension // name is present in object, use that one: if (bccomp($transaction->transaction_amount, '0') === -1 && !is_null($transaction->opposing_account_id)) { - $name = intval($transaction->opposing_account_encrypted) === 1 ? Crypt::decrypt($transaction->opposing_account_name) - : $transaction->opposing_account_name; + $name = $transaction->opposing_account_name; $id = intval($transaction->opposing_account_id); $type = intval($transaction->opposing_account_type); } @@ -204,8 +202,7 @@ class Transaction extends Twig_Extension // if the amount is negative, find the opposing account and use that one: $journalId = $transaction->journal_id; /** @var TransactionModel $other */ - $other = TransactionModel - ::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id) + $other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id) ->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where('identifier', $transaction->identifier) ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id') ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id') @@ -278,8 +275,7 @@ class Transaction extends Twig_Extension if (bccomp($transaction->transaction_amount, '0') === 1 && is_null($transaction->opposing_account_id)) { $journalId = $transaction->journal_id; /** @var TransactionModel $other */ - $other = TransactionModel - ::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id) + $other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id) ->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where('identifier', $transaction->identifier) ->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id') ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id') diff --git a/app/Validation/FireflyValidator.php b/app/Validation/FireflyValidator.php index 8a272dd397..35b973c265 100644 --- a/app/Validation/FireflyValidator.php +++ b/app/Validation/FireflyValidator.php @@ -57,8 +57,6 @@ class FireflyValidator extends Validator * @param $value * * @return bool - * @internal param $parameters - * * */ public function validate2faCode($attribute, $value): bool @@ -95,6 +93,27 @@ class FireflyValidator extends Validator } + /** + * @param $attribute + * @param $value + * + * @return bool + * + */ + public function validateBic($attribute, $value): bool + { + $regex = '/^[a-z]{6}[0-9a-z]{2}([0-9a-z]{3})?\z/i'; + $result = preg_match($regex, $value); + if ($result === false) { + return false; + } + if ($result === 0) { + return false; + } + + return true; + } + /** * @param $attribute * @param $value @@ -455,7 +474,6 @@ class FireflyValidator extends Validator * @param $value * * @return bool - * @internal param $parameters * */ private function validateByAccountId($value): bool diff --git a/composer.lock b/composer.lock index a21d00f998..aeb5bf11c3 100644 --- a/composer.lock +++ b/composer.lock @@ -105,20 +105,20 @@ }, { "name": "classpreloader/classpreloader", - "version": "3.0.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/ClassPreloader/ClassPreloader.git", - "reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a" + "reference": "bc7206aa892b5a33f4680421b69b191efd32b096" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/9b10b913c2bdf90c3d2e0d726b454fb7f77c552a", - "reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a", + "url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/bc7206aa892b5a33f4680421b69b191efd32b096", + "reference": "bc7206aa892b5a33f4680421b69b191efd32b096", "shasum": "" }, "require": { - "nikic/php-parser": "^1.0|^2.0", + "nikic/php-parser": "^1.0|^2.0|^3.0", "php": ">=5.5.9" }, "require-dev": { @@ -127,7 +127,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -155,7 +155,7 @@ "class", "preload" ], - "time": "2015-11-09 22:51:51" + "time": "2016-09-16 12:50:15" }, { "name": "davejamesmiller/laravel-breadcrumbs", @@ -445,16 +445,16 @@ }, { "name": "doctrine/common", - "version": "v2.6.1", + "version": "v2.6.2", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "a579557bc689580c19fee4e27487a67fe60defc0" + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/a579557bc689580c19fee4e27487a67fe60defc0", - "reference": "a579557bc689580c19fee4e27487a67fe60defc0", + "url": "https://api.github.com/repos/doctrine/common/zipball/7bce00698899aa2c06fe7365c76e4d78ddb15fa3", + "reference": "7bce00698899aa2c06fe7365c76e4d78ddb15fa3", "shasum": "" }, "require": { @@ -514,7 +514,7 @@ "persistence", "spl" ], - "time": "2015-12-25 13:18:31" + "time": "2016-11-30 16:50:46" }, { "name": "doctrine/dbal", @@ -797,20 +797,20 @@ }, { "name": "jeremeamia/SuperClosure", - "version": "2.2.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/jeremeamia/super_closure.git", - "reference": "29a88be2a4846d27c1613aed0c9071dfad7b5938" + "reference": "443c3df3207f176a1b41576ee2a66968a507b3db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/29a88be2a4846d27c1613aed0c9071dfad7b5938", - "reference": "29a88be2a4846d27c1613aed0c9071dfad7b5938", + "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/443c3df3207f176a1b41576ee2a66968a507b3db", + "reference": "443c3df3207f176a1b41576ee2a66968a507b3db", "shasum": "" }, "require": { - "nikic/php-parser": "^1.2|^2.0", + "nikic/php-parser": "^1.2|^2.0|^3.0", "php": ">=5.4", "symfony/polyfill-php56": "^1.0" }, @@ -820,7 +820,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.3-dev" } }, "autoload": { @@ -851,7 +851,7 @@ "serialize", "tokenizer" ], - "time": "2015-12-05 17:17:57" + "time": "2016-12-07 09:37:55" }, { "name": "laravel/framework", @@ -2060,16 +2060,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v3.1.7", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "28b0832b2553ffb80cabef6a7a812ff1e670c0bc" + "reference": "e8f47a327c2f0fd5aa04fa60af2b693006ed7283" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/28b0832b2553ffb80cabef6a7a812ff1e670c0bc", - "reference": "28b0832b2553ffb80cabef6a7a812ff1e670c0bc", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/e8f47a327c2f0fd5aa04fa60af2b693006ed7283", + "reference": "e8f47a327c2f0fd5aa04fa60af2b693006ed7283", "shasum": "" }, "require": { @@ -2089,7 +2089,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -2116,7 +2116,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2016-10-13 06:28:43" + "time": "2016-10-13 06:29:04" }, { "name": "symfony/finder", @@ -3578,16 +3578,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "4.0.2", + "version": "4.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6cba06ff75a1a63a71033e1a01b89056f3af1e8d" + "reference": "903fd6318d0a90b4770a009ff73e4a4e9c437929" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6cba06ff75a1a63a71033e1a01b89056f3af1e8d", - "reference": "6cba06ff75a1a63a71033e1a01b89056f3af1e8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/903fd6318d0a90b4770a009ff73e4a4e9c437929", + "reference": "903fd6318d0a90b4770a009ff73e4a4e9c437929", "shasum": "" }, "require": { @@ -3637,7 +3637,7 @@ "testing", "xunit" ], - "time": "2016-11-01 05:06:24" + "time": "2016-11-28 16:00:31" }, { "name": "phpunit/php-file-iterator", @@ -3822,16 +3822,16 @@ }, { "name": "phpunit/phpunit", - "version": "5.6.5", + "version": "5.7.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "875145fabfa261fa9c1aea663dd29ddce92dca8f" + "reference": "336aff0ac52e306c98e7455bc3e8d7b0bf777a5e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/875145fabfa261fa9c1aea663dd29ddce92dca8f", - "reference": "875145fabfa261fa9c1aea663dd29ddce92dca8f", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/336aff0ac52e306c98e7455bc3e8d7b0bf777a5e", + "reference": "336aff0ac52e306c98e7455bc3e8d7b0bf777a5e", "shasum": "" }, "require": { @@ -3843,14 +3843,14 @@ "myclabs/deep-copy": "~1.3", "php": "^5.6 || ^7.0", "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "^4.0.1", + "phpunit/php-code-coverage": "^4.0.3", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "^3.2", "sebastian/comparator": "~1.2.2", "sebastian/diff": "~1.2", - "sebastian/environment": "^1.3 || ^2.0", + "sebastian/environment": "^1.3.4 || ^2.0", "sebastian/exporter": "~2.0", "sebastian/global-state": "~1.0", "sebastian/object-enumerator": "~2.0", @@ -3874,7 +3874,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.6.x-dev" + "dev-master": "5.7.x-dev" } }, "autoload": { @@ -3900,7 +3900,7 @@ "testing", "xunit" ], - "time": "2016-11-21 15:23:34" + "time": "2016-12-03 08:33:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -4476,16 +4476,16 @@ }, { "name": "symfony/class-loader", - "version": "v3.1.7", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/class-loader.git", - "reference": "61de6c27f9d4efe988ea8274f19c2d4e331dd4e4" + "reference": "87cd4e69435d98de01d0162c5f9c0ac017075c63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/class-loader/zipball/61de6c27f9d4efe988ea8274f19c2d4e331dd4e4", - "reference": "61de6c27f9d4efe988ea8274f19c2d4e331dd4e4", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/87cd4e69435d98de01d0162c5f9c0ac017075c63", + "reference": "87cd4e69435d98de01d0162c5f9c0ac017075c63", "shasum": "" }, "require": { @@ -4501,7 +4501,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -4528,7 +4528,7 @@ ], "description": "Symfony ClassLoader Component", "homepage": "https://symfony.com", - "time": "2016-11-15 12:07:16" + "time": "2016-11-29 08:26:13" }, { "name": "symfony/css-selector", @@ -4641,25 +4641,31 @@ }, { "name": "symfony/yaml", - "version": "v3.1.7", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "9da375317228e54f4ea1b013b30fa47417e84943" + "reference": "f2300ba8fbb002c028710b92e1906e7457410693" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/9da375317228e54f4ea1b013b30fa47417e84943", - "reference": "9da375317228e54f4ea1b013b30fa47417e84943", + "url": "https://api.github.com/repos/symfony/yaml/zipball/f2300ba8fbb002c028710b92e1906e7457410693", + "reference": "f2300ba8fbb002c028710b92e1906e7457410693", "shasum": "" }, "require": { "php": ">=5.5.9" }, + "require-dev": { + "symfony/console": "~2.8|~3.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -4686,7 +4692,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-11-18 21:05:29" + "time": "2016-11-18 21:17:59" }, { "name": "webmozart/assert", diff --git a/config/firefly.php b/config/firefly.php index 6e35a43851..f9e2710a74 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -24,7 +24,7 @@ return [ 'must_confirm_account' => false, ], 'chart' => 'chartjs', - 'version' => '4.2.0', + 'version' => '4.2.1', 'csv_import_enabled' => true, 'maxUploadSize' => 5242880, 'allowedMimes' => ['image/png', 'image/jpeg', 'application/pdf'], diff --git a/database/migrations/2016_06_16_000002_create_main_tables.php b/database/migrations/2016_06_16_000002_create_main_tables.php index 1d214c7d2e..989fa06e10 100644 --- a/database/migrations/2016_06_16_000002_create_main_tables.php +++ b/database/migrations/2016_06_16_000002_create_main_tables.php @@ -87,7 +87,7 @@ class CreateMainTables extends Migration $table->integer('user_id', false, true); $table->integer('account_type_id', false, true); $table->string('name', 1024); - $table->decimal('virtual_balance', 10, 4)->nullable(); + $table->decimal('virtual_balance', 14, 4)->nullable(); $table->string('iban', 255)->nullable(); $table->boolean('active')->default(1); @@ -165,8 +165,8 @@ class CreateMainTables extends Migration $table->integer('user_id', false, true); $table->string('name', 1024); $table->string('match', 1024); - $table->decimal('amount_min', 10, 4); - $table->decimal('amount_max', 10, 4); + $table->decimal('amount_min', 14, 4); + $table->decimal('amount_max', 14, 4); $table->date('date'); $table->string('repeat_freq', 30); $table->smallInteger('skip', false, true)->default(0); @@ -215,7 +215,7 @@ class CreateMainTables extends Migration $table->timestamps(); $table->integer('budget_id', false, true); $table->date('startdate'); - $table->decimal('amount', 10, 4); + $table->decimal('amount', 14, 4); $table->string('repeat_freq', 30); $table->boolean('repeats')->default(0); @@ -233,7 +233,7 @@ class CreateMainTables extends Migration $table->integer('budget_limit_id', false, true); $table->date('startdate'); $table->date('enddate'); - $table->decimal('amount', 10, 4); + $table->decimal('amount', 14, 4); // link budget limit id to budget_limitss table $table->foreign('budget_limit_id')->references('id')->on('budget_limits')->onDelete('cascade'); @@ -313,7 +313,7 @@ class CreateMainTables extends Migration $table->softDeletes(); $table->integer('account_id', false, true); $table->string('name', 1024); - $table->decimal('targetamount', 10, 4); + $table->decimal('targetamount', 14, 4); $table->date('startdate')->nullable(); $table->date('targetdate')->nullable(); $table->integer('order', false, true)->default(0); @@ -334,7 +334,7 @@ class CreateMainTables extends Migration $table->integer('piggy_bank_id', false, true); $table->date('startdate')->nullable(); $table->date('targetdate')->nullable(); - $table->decimal('currentamount', 10, 4); + $table->decimal('currentamount', 14, 4); $table->foreign('piggy_bank_id')->references('id')->on('piggy_banks')->onDelete('cascade'); @@ -606,7 +606,7 @@ class CreateMainTables extends Migration $table->integer('piggy_bank_id', false, true); $table->integer('transaction_journal_id', false, true)->nullable(); $table->date('date'); - $table->decimal('amount', 10, 4); + $table->decimal('amount', 14, 4); $table->foreign('piggy_bank_id')->references('id')->on('piggy_banks')->onDelete('cascade'); $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('set null'); @@ -623,7 +623,7 @@ class CreateMainTables extends Migration $table->integer('account_id', false, true); $table->integer('transaction_journal_id', false, true); $table->string('description', 1024)->nullable(); - $table->decimal('amount', 10, 4); + $table->decimal('amount', 14, 4); $table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); $table->foreign('transaction_journal_id')->references('id')->on('transaction_journals')->onDelete('cascade'); diff --git a/database/migrations/2016_10_09_150037_expand_transactions_table.php b/database/migrations/2016_10_09_150037_expand_transactions_table.php index ca363bc451..933bca5545 100644 --- a/database/migrations/2016_10_09_150037_expand_transactions_table.php +++ b/database/migrations/2016_10_09_150037_expand_transactions_table.php @@ -1,4 +1,13 @@ 'HUF', 'name' => 'Hungarian forint', 'symbol' => 'Ft']); TransactionCurrency::create(['code' => 'BRL', 'name' => 'Real', 'symbol' => 'R$']); TransactionCurrency::create(['code' => 'GBP', 'name' => 'British Pound', 'symbol' => '£']); + TransactionCurrency::create(['code' => 'IDR', 'name' => 'Indonesian rupiah', 'symbol' => 'Rp']); } } diff --git a/public/js/ff/accounts/show_with_date.js b/public/js/ff/accounts/show-by-date.js similarity index 88% rename from public/js/ff/accounts/show_with_date.js rename to public/js/ff/accounts/show-by-date.js index c34d4ce952..4e1768daf4 100644 --- a/public/js/ff/accounts/show_with_date.js +++ b/public/js/ff/accounts/show-by-date.js @@ -6,9 +6,6 @@ * of the MIT license. See the LICENSE file for details. */ -/* global $, lineChart, dateString, accountID, token, incomeByCategoryUri, expenseByCategoryUri, expenseByBudgetUri */ - - // Return a helper with preserved width of cells var fixHelper = function (e, tr) { "use strict"; @@ -24,11 +21,11 @@ var fixHelper = function (e, tr) { $(function () { "use strict"; - lineChart('chart/account/' + accountID + '/' + dateString, 'period-specific-account'); + lineChart(periodUri, 'period-specific-account'); - pieChart(incomeByCategoryUri, 'account-cat-in'); - pieChart(expenseByCategoryUri, 'account-cat-out'); - pieChart(expenseByBudgetUri, 'account-budget-out'); + pieChart(incomeCategoryUri, 'account-cat-in'); + pieChart(expenseCategoryUri, 'account-cat-out'); + pieChart(expenseBudgetUri, 'account-budget-out'); // sortable! diff --git a/public/js/ff/accounts/show.js b/public/js/ff/accounts/show.js index 0bfb8e9a69..5875c0da90 100644 --- a/public/js/ff/accounts/show.js +++ b/public/js/ff/accounts/show.js @@ -15,10 +15,10 @@ var fixHelper = function (e, tr) { $(function () { "use strict"; - lineChart('chart/account/' + accountID, 'overview-chart'); - pieChart(incomeByCategoryUri, 'account-cat-in'); - pieChart(expenseByCategoryUri, 'account-cat-out'); - pieChart(expenseByBudgetUri, 'account-budget-out'); + lineChart(singleUri, 'overview-chart'); + pieChart(incomeCategoryUri, 'account-cat-in'); + pieChart(expenseCategoryUri, 'account-cat-out'); + pieChart(expenseBudgetUri, 'account-budget-out'); // sortable! diff --git a/public/js/ff/bills/show.js b/public/js/ff/bills/show.js index d383023ead..ba12284cd3 100644 --- a/public/js/ff/bills/show.js +++ b/public/js/ff/bills/show.js @@ -2,8 +2,6 @@ $(function () { "use strict"; - if (typeof(columnChart) === 'function' && typeof(billID) !== 'undefined') { - columnChart('chart/bill/' + billID, 'bill-overview'); - } + columnChart(billUri, 'bill-overview'); } ); \ No newline at end of file diff --git a/public/js/ff/budgets/show.js b/public/js/ff/budgets/show.js index c8ca145734..8a538bfbcd 100644 --- a/public/js/ff/budgets/show.js +++ b/public/js/ff/budgets/show.js @@ -1,117 +1,6 @@ -/* globals $, budgeted:true, currencySymbol, budgetIncomeTotal, columnChart, budgetedMuch, budgetedPercentage, token, budgetID, repetitionID, spent, lineChart */ - -function drawSpentBar() { - "use strict"; - if ($('.spentBar').length > 0) { - var overspent = spent > budgeted; - var pct; - - if (overspent) { - // draw overspent bar - pct = (budgeted / spent) * 100; - $('.spentBar .progress-bar-warning').css('width', pct + '%'); - $('.spentBar .progress-bar-danger').css('width', (100 - pct) + '%'); - } else { - // draw normal bar: - pct = (spent / budgeted) * 100; - $('.spentBar .progress-bar-info').css('width', pct + '%'); - } - } -} - -function drawBudgetedBar() { - "use strict"; - - if ($('.budgetedBar').length > 0) { - var budgetedMuch = budgeted > budgetIncomeTotal; - - // recalculate percentage: - - var pct; - if (budgetedMuch) { - // budgeted too much. - pct = (budgetIncomeTotal / budgeted) * 100; - $('.budgetedBar .progress-bar-warning').css('width', pct + '%'); - $('.budgetedBar .progress-bar-danger').css('width', (100 - pct) + '%'); - $('.budgetedBar .progress-bar-info').css('width', 0); - } else { - pct = (budgeted / budgetIncomeTotal) * 100; - $('.budgetedBar .progress-bar-warning').css('width', 0); - $('.budgetedBar .progress-bar-danger').css('width', 0); - $('.budgetedBar .progress-bar-info').css('width', pct + '%'); - } - - $('#budgetedAmount').html(currencySymbol + ' ' + budgeted.toFixed(2)); - } -} - -function updateBudgetedAmounts(e) { - "use strict"; - var target = $(e.target); - var id = target.data('id'); - var value = target.val(); - var original = target.data('original'); - var difference = value - original; - if (difference !== 0) { - // add difference to 'budgeted' var - budgeted = budgeted + difference; - - // update original: - target.data('original', value); - // run drawBudgetedBar() again: - drawBudgetedBar(); - - // send a post to Firefly to update the amount: - $.post('budgets/amount/' + id, {amount: value, _token: token}).done(function (data) { - // update the link if relevant: - if (data.repetition > 0) { - $('.budget-link[data-id="' + id + '"]').attr('href', 'budgets/show/' + id + '/' + data.repetition); - } else { - $('.budget-link[data-id="' + id + '"]').attr('href', 'budgets/show/' + id); - } - }); - } - - - console.log('Budget id is ' + id); - console.log('Difference = ' + (value - original )); - -} - $(function () { "use strict"; - $('.updateIncome').on('click', updateIncome); - - /* - On start, fill the "spent"-bar using the content from the page. - */ - drawSpentBar(); - drawBudgetedBar(); - - /* - When the input changes, update the percentages for the budgeted bar: - */ - $('input[type="number"]').on('input', updateBudgetedAmounts); - - - /* - Draw the charts, if necessary: - */ - if (typeof budgetID !== 'undefined' && typeof repetitionID === 'undefined') { - columnChart('chart/budget/' + budgetID, 'budgetOverview'); - } - if (typeof budgetID !== 'undefined' && typeof repetitionID !== 'undefined') { - lineChart('chart/budget/' + budgetID + '/' + repetitionID, 'budgetOverview'); - } + columnChart(budgetChartUri, 'budgetOverview'); }); - -function updateIncome() { - "use strict"; - $('#defaultModal').empty().load('budgets/income', function () { - $('#defaultModal').modal('show'); - }); - - return false; -} diff --git a/public/js/ff/categories/index.js b/public/js/ff/categories/index.js index fd6f59934c..6bfe805c1f 100644 --- a/public/js/ff/categories/index.js +++ b/public/js/ff/categories/index.js @@ -1,19 +1,4 @@ /* globals $, categoryID, columnChart, categoryDate */ $(function () { "use strict"; - if (typeof categoryID !== 'undefined') { - // more splits: - if ($('#all').length > 0) { - columnChart('chart/category/' + categoryID + '/all', 'all'); - } - if ($('#period').length > 0) { - columnChart('chart/category/' + categoryID + '/period', 'period'); - } - - } - if (typeof categoryID !== 'undefined' && typeof categoryDate !== 'undefined') { - columnChart('chart/category/' + categoryID + '/period/' + categoryDate, 'period-specific-period'); - } - - }); \ No newline at end of file diff --git a/public/js/ff/categories/show-by-date.js b/public/js/ff/categories/show-by-date.js new file mode 100644 index 0000000000..931316b0d7 --- /dev/null +++ b/public/js/ff/categories/show-by-date.js @@ -0,0 +1,4 @@ +$(function () { + "use strict"; + columnChart(specific, 'period-specific-period'); +}); \ No newline at end of file diff --git a/public/js/ff/categories/show.js b/public/js/ff/categories/show.js index fd6f59934c..4d668bad25 100644 --- a/public/js/ff/categories/show.js +++ b/public/js/ff/categories/show.js @@ -1,19 +1,5 @@ -/* globals $, categoryID, columnChart, categoryDate */ $(function () { "use strict"; - if (typeof categoryID !== 'undefined') { - // more splits: - if ($('#all').length > 0) { - columnChart('chart/category/' + categoryID + '/all', 'all'); - } - if ($('#period').length > 0) { - columnChart('chart/category/' + categoryID + '/period', 'period'); - } - - } - if (typeof categoryID !== 'undefined' && typeof categoryDate !== 'undefined') { - columnChart('chart/category/' + categoryID + '/period/' + categoryDate, 'period-specific-period'); - } - - + columnChart(all, 'all'); + columnChart(current, 'period'); }); \ No newline at end of file diff --git a/public/js/ff/categories/show_with_date.js b/public/js/ff/categories/show_with_date.js deleted file mode 100644 index 8bf673924b..0000000000 --- a/public/js/ff/categories/show_with_date.js +++ /dev/null @@ -1,19 +0,0 @@ -/* globals $, categoryID, columnChart, categoryDate */ -$(function () { - "use strict"; - if (typeof categoryID !== 'undefined') { - // more splits: - if ($('#all').length > 0) { - columnChart('chart/category/' + categoryID + '/all', 'all'); - } - if ($('#period').length > 0) { - columnChart('chart/category/' + categoryID + '/period', 'period'); - } - - } - if (typeof categoryID !== 'undefined' && typeof categoryDate !== undefined) { - columnChart('chart/category/' + categoryID + '/period/' + categoryDate, 'period-specific-period'); - } - - -}); \ No newline at end of file diff --git a/public/js/ff/index.js b/public/js/ff/index.js index f797dcf142..b0cc90b70f 100644 --- a/public/js/ff/index.js +++ b/public/js/ff/index.js @@ -32,14 +32,14 @@ function endTheTour() { function drawChart() { "use strict"; - lineChart('chart/account/frontpage', 'accounts-chart'); + lineChart(accountFrontpageUri, 'accounts-chart'); if (billCount > 0) { pieChart('chart/bill/frontpage', 'bills-chart'); } stackedColumnChart('chart/budget/frontpage', 'budgets-chart'); columnChart('chart/category/frontpage', 'categories-chart'); - columnChart('chart/account/expense', 'expense-accounts-chart'); - columnChart('chart/account/revenue', 'revenue-accounts-chart'); + columnChart(accountExpenseUri, 'expense-accounts-chart'); + columnChart(accountRevenueUri, 'revenue-accounts-chart'); getBoxAmounts(); diff --git a/public/js/ff/reports/category/month.js b/public/js/ff/reports/category/month.js index b9786d68fc..cdbe5420b2 100644 --- a/public/js/ff/reports/category/month.js +++ b/public/js/ff/reports/category/month.js @@ -8,31 +8,25 @@ * See the LICENSE file for details. */ -// it's hard coded, but what you're gonna do? -var catInUri = 'chart/category/' + accountIds + '/' + categoryIds + '/' + startDate + '/' + endDate + '/OTHERS/income'; -var catOutUri = 'chart/category/' + accountIds + '/' + categoryIds + '/' + startDate + '/' + endDate + '/OTHERS/expense'; -var accInUri = 'chart/account/' + accountIds + '/' + categoryIds + '/' + startDate + '/' + endDate + '/OTHERS/income'; -var accOutUri = 'chart/account/' + accountIds + '/' + categoryIds + '/' + startDate + '/' + endDate + '/OTHERS/expense'; - $(function () { "use strict"; drawChart(); $('#categories-in-pie-chart-checked').on('change', function () { - redrawPieChart('categories-in-pie-chart', catInUri); + redrawPieChart('categories-in-pie-chart', categoryIncomeUri); }); $('#categories-out-pie-chart-checked').on('change', function () { - redrawPieChart('categories-out-pie-chart', catOutUri); + redrawPieChart('categories-out-pie-chart', categoryExpenseUri); }); $('#accounts-in-pie-chart-checked').on('change', function () { - redrawPieChart('accounts-in-pie-chart', accInUri); + redrawPieChart('accounts-in-pie-chart', accountIncomeUri); }); $('#accounts-out-pie-chart-checked').on('change', function () { - redrawPieChart('accounts-out-pie-chart', accOutUri); + redrawPieChart('accounts-out-pie-chart', accountExpenseUri); }); }); @@ -42,13 +36,13 @@ function drawChart() { "use strict"; // month view: - stackedColumnChart('chart/category-report-in-out/' + accountIds + '/' + categoryIds + '/' + startDate + '/' + endDate, 'in-out-chart'); + stackedColumnChart(mainUri, 'in-out-chart'); // draw pie chart of income, depending on "show other transactions too": - redrawPieChart('categories-in-pie-chart', catInUri); - redrawPieChart('categories-out-pie-chart', catOutUri); - redrawPieChart('accounts-in-pie-chart', accInUri); - redrawPieChart('accounts-out-pie-chart', accOutUri); + redrawPieChart('categories-in-pie-chart', categoryIncomeUri); + redrawPieChart('categories-out-pie-chart', categoryExpenseUri); + redrawPieChart('accounts-in-pie-chart', accountIncomeUri); + redrawPieChart('accounts-out-pie-chart', accountExpenseUri); } diff --git a/public/js/ff/reports/default/all.js b/public/js/ff/reports/default/all.js index ec3fb8c1e6..b19187497b 100644 --- a/public/js/ff/reports/default/all.js +++ b/public/js/ff/reports/default/all.js @@ -1,4 +1,4 @@ -/* globals startDate, showOnlyTop, showFullList, endDate, reportType, expenseReportUri, accountIds, incExpReportUri,accountReportUri, incomeReportUri */ +/* globals startDate, showOnlyTop, showFullList, endDate, expenseReportUri, accountIds, incExpReportUri,accountReportUri, incomeReportUri */ /* * all.js * Copyright (C) 2016 thegrumpydictator@gmail.com @@ -39,10 +39,9 @@ function clickInfoButton(e) { // add some more elements: attributes.startDate = startDate; attributes.endDate = endDate; - attributes.reportType = reportType; attributes.accounts = accountIds; - $.getJSON('popup/report', {attributes: attributes}).done(respondInfoButton).fail(errorInfoButton); + $.getJSON('popup/general', {attributes: attributes}).done(respondInfoButton).fail(errorInfoButton); } function errorInfoButton(data) { @@ -89,23 +88,37 @@ function displayAjaxPartial(data, holder) { // trigger list thing listLengthInitial(); - // budget thing + // budget thing in year and multi year report: $('.budget-chart-activate').unbind('click').on('click', clickBudgetChart); + + // category thing in year and multi year report: + $('.category-chart-activate').unbind('click').on('click', clickCategoryChart); } function failAjaxPartial(uri, holder) { "use strict"; - console.log('Failed to load' + uri); + console.log('Failed to load: ' + uri); $('#' + holder).removeClass('loading').addClass('general-chart-error'); } +function clickCategoryChart(e) { + "use strict"; + var link = $(e.target); + var categoryId = link.data('category'); + + 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'); - var URL = 'chart/budget/period/' + budgetId + '/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds; + var URL = 'chart/budget/period/' + budgetId + '/' + accountIds + '/' + startDate + '/' + endDate; var container = 'budget_chart'; columnChart(URL, container); return false; diff --git a/public/js/ff/reports/default/month.js b/public/js/ff/reports/default/month.js index 4e34d95032..a150da25cc 100644 --- a/public/js/ff/reports/default/month.js +++ b/public/js/ff/reports/default/month.js @@ -15,5 +15,5 @@ function drawChart() { // month view: // draw account chart - lineChart('chart/account/report/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds, 'account-balances-chart'); + lineChart(accountChartUri, 'account-balances-chart'); } \ No newline at end of file diff --git a/public/js/ff/reports/default/multi-year.js b/public/js/ff/reports/default/multi-year.js index 1bc23389ae..b1f755a8f1 100644 --- a/public/js/ff/reports/default/multi-year.js +++ b/public/js/ff/reports/default/multi-year.js @@ -1,18 +1,17 @@ -/* globals budgetMultiUri, accountIds */ - - $(function () { "use strict"; drawChart(); loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUri); + loadAjaxPartial('categoryExpense', categoryExpenseUri); + loadAjaxPartial('categoryIncome', categoryIncomeUri); }); function drawChart() { "use strict"; // income and expense over multi year: - lineChart('chart/report/net-worth/' + startDate + '/' + endDate + '/' + accountIds, 'net-worth'); - columnChart('chart/report/in-out/' + startDate + '/' + endDate + '/' + accountIds, 'income-expenses-chart'); - columnChart('chart/report/in-out-sum/' + startDate + '/' + endDate + '/' + accountIds, 'income-expenses-sum-chart'); + lineChart(netWorthUri, 'net-worth'); + columnChart(opChartUri, 'income-expenses-chart'); + columnChart(sumChartUri, 'income-expenses-sum-chart'); } diff --git a/public/js/ff/reports/default/year.js b/public/js/ff/reports/default/year.js index a7c5121abe..259b9fa18a 100644 --- a/public/js/ff/reports/default/year.js +++ b/public/js/ff/reports/default/year.js @@ -1,18 +1,20 @@ -/* globals google, accountIds, budgetPeriodReportUri */ +/* globals google, accountIds, budgetPeriodReportUri, categoryPeriodReportUri */ $(function () { "use strict"; drawChart(); loadAjaxPartial('budgetPeriodReport', budgetPeriodReportUri); + loadAjaxPartial('categoryExpense', categoryExpenseUri); + loadAjaxPartial('categoryIncome', categoryIncomeUri); }); function drawChart() { "use strict"; - lineChart('chart/report/net-worth/' + startDate + '/' + endDate + '/' + accountIds, 'net-worth'); - columnChart('chart/report/in-out/' + startDate + '/' + endDate + '/' + accountIds, 'income-expenses-chart'); - columnChart('chart/report/in-out-sum/' + startDate + '/' + endDate + '/' + accountIds, 'income-expenses-sum-chart'); + lineChart(netWorthUri, 'net-worth'); + columnChart(opChartUri, 'income-expenses-chart'); + columnChart(sumChartUri, 'income-expenses-sum-chart'); } diff --git a/resources/lang/de_DE/firefly.php b/resources/lang/de_DE/firefly.php index 92cdaa539c..996258c4fe 100644 --- a/resources/lang/de_DE/firefly.php +++ b/resources/lang/de_DE/firefly.php @@ -51,7 +51,7 @@ return [ 'flash_info_multiple' => 'Es gibt eine Nachricht | Es gibt :count Nachrichten', 'flash_error_multiple' => 'Es gibt einen Fehler | Es gibt :count Fehler', 'net_worth' => 'Vermögen', - 'route_has_no_help' => 'There is no help for this route.', + 'route_has_no_help' => 'Es gibt keinen Hilfetext für diese Seite.', 'help_may_not_be_your_language' => 'Dieser Hilfstext ist in Englisch. Er ist noch nicht in Deutsch verfügbar', 'two_factor_welcome' => 'Hallo :user!', 'two_factor_enter_code' => 'Um fortzufahren geben Sie bitte ihren Zwei-Faktor-Authentifizierungscode ein. Ihre Anwendung kann diesen für Sie generieren.', @@ -59,7 +59,7 @@ return [ 'two_factor_title' => 'Zwei-Faktor-Authentifizierung', 'authenticate' => 'Authentifizieren', 'two_factor_forgot_title' => 'Zwei-Faktor-Authentifizierung verloren', - 'two_factor_forgot' => 'I forgot my two-factor thing.', + 'two_factor_forgot' => 'Ich kann keine 2FA-Codes generieren.', 'two_factor_lost_header' => 'Haben Sie ihre Zwei-Faktor-Authentifizierung verloren?', 'two_factor_lost_intro' => 'Leider ist dieses etwas, dass sie nicht über die Weboberfläche zurücksetzen können. Sie haben zwei Möglichkeiten.', 'two_factor_lost_fix_self' => 'Wenn Sie Ihre eigene Instanz von Firefly III betreiben, überprüfen Sie die Logdatei unter storage/logs für weitere Anweisungen.', @@ -72,24 +72,24 @@ return [ 'search_found_budgets' => 'Found :count budget(s) for your query.', 'search_found_tags' => 'Found :count tag(s) for your query.', 'search_found_transactions' => 'Found :count transaction(s) for your query.', - 'results_limited' => 'The results are limited to :count entries.', + 'results_limited' => 'Es werden maximal :count Ergebnisse angezeigt.', 'tagbalancingAct' => 'Balancing act', - 'tagadvancePayment' => 'Advance payment', + 'tagadvancePayment' => 'Vorauszahlung', 'tagnothing' => '', - 'Default asset account' => 'Default asset account', + 'Default asset account' => 'Standard-Anlagekonto', 'no_budget_pointer' => 'Sie scheinen keine Budgets festgelegt zu haben. Sie sollten welche auf der Budget-Seite erstellen. Budgets können Ihnen helfen ihre Ausgaben zu verfolgen.', - 'Savings account' => 'Savings account', + 'Savings account' => 'Sparkonto', 'Credit card' => 'Kreditkarte', 'source_accounts' => 'Herkunftskonto', 'destination_accounts' => 'Zielkonto', 'user_id_is' => 'Ihre Benutzerkennung ist :user', 'field_supports_markdown' => 'This field supports Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', - 'expenses_by_category' => 'Expenses by category', - 'expenses_by_budget' => 'Expenses by budget', - 'income_by_category' => 'Income by category', + 'expenses_by_category' => 'Ausgaben nach Kategorie', + 'expenses_by_budget' => 'Ausgaben nach Budget', + 'income_by_category' => 'Einkommen nach Kategorie', 'cannot_redirect_to_account' => 'Firefly III cannot redirect you to the correct page. Apologies.', // repeat frequencies: 'repeat_freq_yearly' => 'Jährlich', @@ -117,7 +117,7 @@ return [ 'export_data_intro' => 'Zum Backup, zum Migrieren auf ein anderes System oder zum Migrieren in eine andere Firefly III Installation.', 'export_format' => 'Export-Format', 'export_format_csv' => 'Durch Komma getrennte Werte (CSV-Datei)', - 'export_format_mt940' => 'MT940 compatible format', + 'export_format_mt940' => 'MT940 kompatibeles Format', 'export_included_accounts' => 'Exportiere die Überweisungen von diesem Konto', 'include_old_uploads_help' => 'Firefly III löscht nicht die originalen CSV-Dateien, welche zuvor importiert wurden. Sie können dem Export hinzugefügt werden.', 'do_export' => 'Export', @@ -189,7 +189,7 @@ return [ 'edit_rule' => 'Bearbeite Regel ":title"', 'delete_rule' => 'Lösche Regel ":title"', 'update_rule' => 'Regel bearbeiten', - 'test_rule_triggers' => 'See matching transactions', + 'test_rule_triggers' => 'Zeige übereinstimmende Überweisungen', 'warning_transaction_subset' => 'Aus Kapazitätgründen ist diese Liste auf :max_num_transactions Überweisungen limitiert und zeigt möglicherweise nur einen Teil dieser an', 'warning_no_matching_transactions' => 'Keine übereinstimmenden Überweisungen gefunden. Aus Kapazitätgründen werden nur die letzten :num_transactions Überweisungen überprüft.', 'warning_no_valid_triggers' => 'Keine gültigen Trigger gefunden.', @@ -238,12 +238,12 @@ return [ 'rule_trigger_store_journal' => 'When a journal is created', 'rule_trigger_update_journal' => 'When a journal is updated', 'rule_action_set_category' => 'Set category to ":action_value"', - 'rule_action_clear_category' => 'Clear category', + 'rule_action_clear_category' => 'Bereinige Kategorie', 'rule_action_set_budget' => 'Set budget to ":action_value"', - 'rule_action_clear_budget' => 'Clear budget', + 'rule_action_clear_budget' => 'Lösche Budget', 'rule_action_add_tag' => 'Add tag ":action_value"', 'rule_action_remove_tag' => 'Remove tag ":action_value"', - 'rule_action_remove_all_tags' => 'Remove all tags', + 'rule_action_remove_all_tags' => 'Alle Tags entfernen', 'rule_action_set_description' => 'Set description to ":action_value"', 'rule_action_append_description' => 'Append description with ":action_value"', 'rule_action_prepend_description' => 'Prepend description with ":action_value"', @@ -304,7 +304,7 @@ return [ 'preferences_layout' => 'Layout', 'pref_home_show_deposits' => 'Show deposits on the home screen', 'pref_home_show_deposits_info' => 'The home screen already shows your expense accounts. Should it also show your revenue accounts?', - 'pref_home_do_show_deposits' => 'Yes, show them', + 'pref_home_do_show_deposits' => 'Ja, zeige sie an', 'successful_count' => 'of which :count successful', 'transaction_page_size_title' => 'Seitengröße', 'transaction_page_size_help' => 'Any list of transactions shows at most this many transactions', @@ -513,10 +513,10 @@ return [ 'make_new_revenue_account' => 'Create a new revenue account', 'asset_accounts' => 'Girokonten', 'expense_accounts' => 'Debitoren (Ausgaben)', - 'revenue_accounts' => 'Revenue accounts', - 'cash_accounts' => 'Cash accounts', - 'Cash account' => 'Cash account', - 'account_type' => 'Account type', + 'revenue_accounts' => 'Schuldner', + 'cash_accounts' => 'Bargeldkonten', + 'Cash account' => 'Bargeldkonto', + 'account_type' => 'Kontotyp', 'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:', 'stored_new_account' => 'New account ":name" stored!', 'updated_account' => 'Updated account ":name"', @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'Neue Kategorie', @@ -640,7 +641,7 @@ return [ 'report_this_fiscal_year_quick' => 'Aktuelles Geschäftsjahr, alle Konten', 'report_all_time_quick' => 'Gesamte Zeit, alle Konten', 'reports_can_bookmark' => 'Berichte können als Lesezeichen gespeichert werden.', - 'incomeVsExpenses' => 'Income vs. expenses', + 'incomeVsExpenses' => 'Einkommen vs Ausgaben', 'accountBalances' => 'Account balances', 'balanceStartOfYear' => 'Bilanz zum Jahresbeginn', 'balanceEndOfYear' => 'Bilanz zum Jahresende', @@ -657,16 +658,16 @@ return [ 'expectedBalance' => 'Expected balance', 'outsideOfBudgets' => 'Outside of budgets', 'leftInBudget' => 'Left in budget', - 'sumOfSums' => 'Sum of sums', + 'sumOfSums' => 'Summe der Summen', 'noCategory' => '(keine Kategorie)', 'notCharged' => 'Not charged (yet)', - 'inactive' => 'Inactive', + 'inactive' => 'Inaktiv', 'active' => 'Aktiv', 'difference' => 'Unterschied', 'in' => 'Rein', 'out' => 'Raus', 'topX' => 'top :number', - 'show_full_list' => 'Show entire list', + 'show_full_list' => 'Zeige die gesamte Liste', 'show_only_top' => 'Show only top :number', 'sum_of_year' => 'Summe des Jahres', 'sum_of_years' => 'Summe der Jahre', @@ -694,7 +695,7 @@ return [ 'audit_end_balance' => 'Account balance of :account_name at the end of :end was: :balance', 'reports_extra_options' => 'Extra options', 'report_has_no_extra_options' => 'This report has no extra options', - 'reports_submit' => 'View report', + 'reports_submit' => 'Zeige Bericht', 'end_after_start_date' => 'End date of report must be after start date.', 'select_category' => 'Select one or more categories.', 'income_per_category' => 'Income per category', @@ -702,26 +703,26 @@ return [ 'income_per_account' => 'Income per account', 'expense_per_account' => 'Expense per account', 'include_not_in_category' => 'Include transactions not selected for this report', - 'everything_else' => 'Everything else', - 'income_and_expenses' => 'Income and expenses', - 'spent_average' => 'Spent (average)', - 'income_average' => 'Income (average)', - 'transaction_count' => 'Transaction count', - 'average_spending_per_account' => 'Average spending per account', - 'average_income_per_account' => 'Average income per account', - 'total' => 'Total', - 'description' => 'Description', + 'everything_else' => 'Der Rest', + 'income_and_expenses' => 'Einkommen und Ausgaben', + 'spent_average' => 'Ausgaben (Durchschnitt)', + 'income_average' => 'Einkommen (Durchschnitt)', + 'transaction_count' => 'Überweisungen', + 'average_spending_per_account' => 'Durchschnittsausgaben pro Konto', + 'average_income_per_account' => 'Durchschnittseinkommen pro Konto', + 'total' => 'Gesamt', + 'description' => 'Beschreibung', // charts: - 'chart' => 'Chart', - 'dayOfMonth' => 'Day of the month', + 'chart' => 'Diagram', + 'dayOfMonth' => 'Tag des Monats', 'month' => 'Monat', 'budget' => 'Budget', 'spent' => 'Ausgegeben', 'earned' => 'Verdient', - 'overspent' => 'Overspent', - 'left' => 'Left', + 'overspent' => 'Zuviel ausgegeben', + 'left' => 'Übrig', 'no_budget' => '(kein Budget)', 'maxAmount' => 'Höchstbetrag', 'minAmount' => 'Mindestbetrag', @@ -766,7 +767,7 @@ return [ 'start_date' => 'Startdatum', 'target_date' => 'Zieldatum', 'no_target_date' => 'Kein Zieldatum', - 'todo' => 'to do', + 'todo' => 'Zu erledigen', 'table' => 'Tabelle', 'piggy_bank_not_exists' => 'Dieses Sparschwein existiert nicht mehr.', 'add_any_amount_to_piggy' => 'Fügen sie Geld ihrem Sparschein hinzu, um ihr Ziel von :amount zu erreichen.', @@ -804,11 +805,11 @@ return [ // administration 'administration' => 'Administration', 'user_administration' => 'Nutzerinformation', - 'list_all_users' => 'All users', - 'all_users' => 'All users', - 'all_blocked_domains' => 'All blocked domains', - 'blocked_domains' => 'Blocked domains', - 'no_domains_banned' => 'No domains blocked', + 'list_all_users' => 'Alle Benutzer', + 'all_users' => 'Alle Benutzer', + 'all_blocked_domains' => 'Alle blockierten Domains', + 'blocked_domains' => 'Blockierte Domains', + 'no_domains_banned' => 'Keine blockierten Domains', 'all_user_domains' => 'All user email address domains', 'all_domains_is_filtered' => 'This list does not include already blocked domains.', 'domain_now_blocked' => 'Domain :domain is now blocked', @@ -897,7 +898,7 @@ return [ 'import_status_header' => 'Import status and progress', 'import_status_errors' => 'Import errors', 'import_status_report' => 'Import report', - 'import_finished' => 'Import has finished', + 'import_finished' => 'Der Importierungsvorgang ist beendet', 'import_error_single' => 'An error has occured during the import.', 'import_error_multi' => 'Some errors occured during the import.', 'import_error_fatal' => 'There was an error during the import routine. Please check the log files. The error seems to be:', diff --git a/resources/lang/de_DE/form.php b/resources/lang/de_DE/form.php index de51dbcb88..1c7253ad19 100644 --- a/resources/lang/de_DE/form.php +++ b/resources/lang/de_DE/form.php @@ -25,12 +25,13 @@ return [ 'match' => 'Reagiert auf', 'repeat_freq' => 'Wiederholungen', 'journal_currency_id' => 'Währung', - 'currency_id' => 'Currency', - 'attachments' => 'Attachments', + 'currency_id' => 'Währung', + 'attachments' => 'Anhänge', 'journal_amount' => 'Betrag', 'journal_asset_source_account' => 'Girokonto (Quelle)', 'journal_source_account_name' => 'Kreditor (Quelle)', 'journal_source_account_id' => 'Girokonto (Quelle)', + 'BIC' => 'BIC', 'account_from_id' => 'Vom Konto', 'account_to_id' => 'Auf Konto', 'source_account' => 'Quellkonto', diff --git a/resources/lang/de_DE/validation.php b/resources/lang/de_DE/validation.php index f67ac3cbd7..3edaa1a19e 100644 --- a/resources/lang/de_DE/validation.php +++ b/resources/lang/de_DE/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'Die Datei ":name" ist zu groß.', 'belongs_to_user' => 'Der Wert von :attribute ist nicht bekannt', 'accepted' => ':attribute muss akzeptiert werden.', + 'bic' => 'Dies ist kein gültiger BIC.', 'active_url' => ':attribute ist keine gültige URL.', 'after' => ':attribute muss ein Datum nach :date sein.', 'alpha' => ':attribute darf nur Buchstaben enthalten.', @@ -84,4 +85,5 @@ return [ 'file' => 'Das :attribute muss eine Datei sein.', 'in_array' => ':attribute existiert nicht in :other.', 'present' => 'Das :attribute Feld muss vorhanden sein.', + 'amount_zero' => 'Der Gesamtbetrag darf nicht Null sein', ]; \ No newline at end of file diff --git a/resources/lang/en_US/firefly.php b/resources/lang/en_US/firefly.php index f40af9d8d3..11d55a5cac 100644 --- a/resources/lang/en_US/firefly.php +++ b/resources/lang/en_US/firefly.php @@ -84,7 +84,7 @@ return [ 'destination_accounts' => 'Destination account(s)', 'user_id_is' => 'Your user id is :user', 'field_supports_markdown' => 'This field supports Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', 'expenses_by_category' => 'Expenses by category', @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'New category', diff --git a/resources/lang/en_US/form.php b/resources/lang/en_US/form.php index 5418b22d8b..a417f504a9 100644 --- a/resources/lang/en_US/form.php +++ b/resources/lang/en_US/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => 'Asset account (source)', 'journal_source_account_name' => 'Revenue account (source)', 'journal_source_account_id' => 'Asset account (source)', + 'BIC' => 'BIC', 'account_from_id' => 'From account', 'account_to_id' => 'To account', 'source_account' => 'Source account', diff --git a/resources/lang/en_US/validation.php b/resources/lang/en_US/validation.php index 030e6a72c5..33f05b180e 100644 --- a/resources/lang/en_US/validation.php +++ b/resources/lang/en_US/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'File ":name" is too large.', 'belongs_to_user' => 'The value of :attribute is unknown', 'accepted' => 'The :attribute must be accepted.', + 'bic' => 'This is not a valid BIC.', 'active_url' => 'The :attribute is not a valid URL.', 'after' => 'The :attribute must be a date after :date.', 'alpha' => 'The :attribute may only contain letters.', @@ -84,4 +85,5 @@ return [ 'file' => 'The :attribute must be a file.', 'in_array' => 'The :attribute field does not exist in :other.', 'present' => 'The :attribute field must be present.', + 'amount_zero' => 'The total amount cannot be zero', ]; diff --git a/resources/lang/fr_FR/firefly.php b/resources/lang/fr_FR/firefly.php index 84455320f0..cc80087ff2 100644 --- a/resources/lang/fr_FR/firefly.php +++ b/resources/lang/fr_FR/firefly.php @@ -84,7 +84,7 @@ return [ 'destination_accounts' => 'Compte(s) de destination', 'user_id_is' => 'Your user id is :user', 'field_supports_markdown' => 'This field supports Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', 'expenses_by_category' => 'Expenses by category', @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'Nouvelle catégorie', diff --git a/resources/lang/fr_FR/form.php b/resources/lang/fr_FR/form.php index 979a26a180..b0d37f901b 100644 --- a/resources/lang/fr_FR/form.php +++ b/resources/lang/fr_FR/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => 'Compte d’actif (source)', 'journal_source_account_name' => 'Compte de recettes (source)', 'journal_source_account_id' => 'Compte d’actif (source)', + 'BIC' => 'BIC', 'account_from_id' => 'Compte d\'origine', 'account_to_id' => 'Compte de destination', 'source_account' => 'Source account', diff --git a/resources/lang/fr_FR/validation.php b/resources/lang/fr_FR/validation.php index e7b21f8947..11f910cddc 100644 --- a/resources/lang/fr_FR/validation.php +++ b/resources/lang/fr_FR/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'Le fichier ":name" est trop grand.', 'belongs_to_user' => 'La valeur de :attribute est inconnue', 'accepted' => 'Le champ :attribute doit être accepté.', + 'bic' => 'This is not a valid BIC.', 'active_url' => 'Le champ :attribute n\'est pas une URL valide.', 'after' => 'Le champ :attribute doit être une date postérieure à :date.', 'alpha' => 'Le champ :attribute doit seulement contenir des lettres.', @@ -84,4 +85,5 @@ return [ 'file' => 'The :attribute must be a file.', 'in_array' => 'The :attribute field does not exist in :other.', 'present' => 'The :attribute field must be present.', + 'amount_zero' => 'The total amount cannot be zero', ]; \ No newline at end of file diff --git a/resources/lang/hr_HR/firefly.php b/resources/lang/hr_HR/firefly.php index 4dad596d1f..377f4c2ca3 100644 --- a/resources/lang/hr_HR/firefly.php +++ b/resources/lang/hr_HR/firefly.php @@ -84,7 +84,7 @@ return [ 'destination_accounts' => 'Destination account(s)', 'user_id_is' => 'Your user id is :user', 'field_supports_markdown' => 'This field supports Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', 'expenses_by_category' => 'Expenses by category', @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'New category', diff --git a/resources/lang/hr_HR/form.php b/resources/lang/hr_HR/form.php index 914cc98944..9e644c52f6 100644 --- a/resources/lang/hr_HR/form.php +++ b/resources/lang/hr_HR/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => 'Asset account (source)', 'journal_source_account_name' => 'Revenue account (source)', 'journal_source_account_id' => 'Asset account (source)', + 'BIC' => 'BIC', 'account_from_id' => 'From account', 'account_to_id' => 'To account', 'source_account' => 'Source account', diff --git a/resources/lang/hr_HR/validation.php b/resources/lang/hr_HR/validation.php index b7dfc41906..b391855829 100644 --- a/resources/lang/hr_HR/validation.php +++ b/resources/lang/hr_HR/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'File ":name" is too large.', 'belongs_to_user' => 'The value of :attribute is unknown', 'accepted' => 'The :attribute must be accepted.', + 'bic' => 'This is not a valid BIC.', 'active_url' => 'The :attribute is not a valid URL.', 'after' => 'The :attribute must be a date after :date.', 'alpha' => 'The :attribute may only contain letters.', @@ -84,4 +85,5 @@ return [ 'file' => 'The :attribute must be a file.', 'in_array' => 'The :attribute field does not exist in :other.', 'present' => 'The :attribute field must be present.', + 'amount_zero' => 'The total amount cannot be zero', ]; \ No newline at end of file diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.php index 377b866e0d..133343784a 100644 --- a/resources/lang/nl_NL/firefly.php +++ b/resources/lang/nl_NL/firefly.php @@ -521,9 +521,10 @@ return [ 'stored_new_account' => 'Nieuwe rekening ":name" opgeslagen!', 'updated_account' => 'Rekening ":name" geüpdatet', 'credit_card_options' => 'Opties voor credit cards', - 'no_transactions_account' => 'Betaalrekening ":name" heeft geen geen transacties (in deze periode).', + 'no_transactions_account' => 'Betaalrekening ":name" heeft geen transacties (in deze periode).', 'no_data_for_chart' => 'Er is (nog) niet genoeg informatie om deze grafiek te tekenen.', 'select_more_than_one_account' => 'Selecteer meer dan één rekening', + 'select_more_than_one_category' => 'Selecteer meer dan één categorie', // categories: 'new_category' => 'Nieuwe categorie', diff --git a/resources/lang/nl_NL/form.php b/resources/lang/nl_NL/form.php index 6898005c12..f2ec1de019 100644 --- a/resources/lang/nl_NL/form.php +++ b/resources/lang/nl_NL/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => 'Betaalrekening (bron)', 'journal_source_account_name' => 'Debiteur (bron)', 'journal_source_account_id' => 'Betaalrekening (bron)', + 'BIC' => 'BIC', 'account_from_id' => 'Van account', 'account_to_id' => 'Naar account', 'source_account' => 'Bronrekening', diff --git a/resources/lang/nl_NL/validation.php b/resources/lang/nl_NL/validation.php index 813d2c6ca4..a32fb3024c 100644 --- a/resources/lang/nl_NL/validation.php +++ b/resources/lang/nl_NL/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'Bestand ":name" is te groot.', 'belongs_to_user' => 'De waarde van :attribute is onbekend', 'accepted' => ':attribute moet geaccepteerd zijn.', + 'bic' => 'Dit is geen geldige BIC.', 'active_url' => ':attribute is geen geldige URL.', 'after' => ':attribute moet een datum na :date zijn.', 'alpha' => ':attribute mag alleen letters bevatten.', @@ -84,4 +85,5 @@ return [ 'file' => ':attribute moet een bestand zijn.', 'in_array' => 'Het :attribute veld bestaat niet in :other.', 'present' => 'Het :attribute veld moet aanwezig zijn.', + 'amount_zero' => 'Het totaalbedrag kan niet nul zijn', ]; \ No newline at end of file diff --git a/resources/lang/pt_BR/auth.php b/resources/lang/pt_BR/auth.php index 5d833b3d68..7cfe62b56c 100644 --- a/resources/lang/pt_BR/auth.php +++ b/resources/lang/pt_BR/auth.php @@ -22,7 +22,7 @@ return [ | */ - 'failed' => 'These credentials do not match our records.', - 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', + 'failed' => 'Essas credenciais não correspondem com nossos registros.', + 'throttle' => 'Muitas tentativas de login. Por favor, tente novamente em :seconds segundos.', ]; \ No newline at end of file diff --git a/resources/lang/pt_BR/breadcrumbs.php b/resources/lang/pt_BR/breadcrumbs.php index 8347541110..31a47f95e6 100644 --- a/resources/lang/pt_BR/breadcrumbs.php +++ b/resources/lang/pt_BR/breadcrumbs.php @@ -12,8 +12,8 @@ return [ 'home' => 'Início', - 'edit_currency' => 'Edit currency ":name"', - 'delete_currency' => 'Delete currency ":name"', + 'edit_currency' => 'Editar moeda ":name"', + 'delete_currency' => 'Excluir moeda ":moeda"', 'newPiggyBank' => 'Criar um novo cofrinho', 'edit_piggyBank' => 'Editar cofrinho ":name"', 'preferences' => 'Preferências', diff --git a/resources/lang/pt_BR/csv.php b/resources/lang/pt_BR/csv.php index fbc8866ea4..18bc2a2c68 100644 --- a/resources/lang/pt_BR/csv.php +++ b/resources/lang/pt_BR/csv.php @@ -15,7 +15,7 @@ return [ 'import_configure_title' => 'Configure sua importação', 'import_configure_intro' => 'There are some options for your CSV import. Please indicate if your CSV file contains headers on the first column, and what the date format of your date-fields is. That might require some experimentation. The field delimiter is usually a ",", but could also be a ";". Check this carefully.', - 'import_configure_form' => 'Basic CSV import options', + 'import_configure_form' => 'Opções básicas de importação CSV', 'header_help' => 'Verifique se a primeira linha do seu arquivo CSV está com os títulos de coluna', 'date_help' => 'Date time format in your CSV. Follow the format like this page indicates. The default value will parse dates that look like this: :dateExample.', 'delimiter_help' => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.php index 1237122e05..5368d3515d 100644 --- a/resources/lang/pt_BR/firefly.php +++ b/resources/lang/pt_BR/firefly.php @@ -11,7 +11,7 @@ return [ // general stuff: - 'language_incomplete' => 'incomplete translation', + 'language_incomplete' => 'tradução incompleta', 'close' => 'Fechar', 'actions' => 'Ações', 'edit' => 'Editar', @@ -51,8 +51,8 @@ return [ 'flash_info_multiple' => 'Há uma mensagem|Existem :count mensagens', 'flash_error_multiple' => 'Houve um erro|Houve :count erros', 'net_worth' => 'Valor Líquido', - 'route_has_no_help' => 'There is no help for this route.', - 'help_may_not_be_your_language' => 'This help text is in English. It is not yet available in your language', + 'route_has_no_help' => 'Não existe ajuda para esta rota.', + 'help_may_not_be_your_language' => 'Este texto de ajuda é em inglês. Ainda não está disponível em seu idioma', 'two_factor_welcome' => 'Olá, :user!', 'two_factor_enter_code' => 'Para continuar, por favor, digite seu código de autenticação em duas etapas. Seu aplicativo pode gerá-lo para você.', 'two_factor_code_here' => 'Insira o código aqui', @@ -73,26 +73,26 @@ return [ 'search_found_tags' => 'Found :count tag(s) for your query.', 'search_found_transactions' => 'Found :count transaction(s) for your query.', 'results_limited' => 'The results are limited to :count entries.', - 'tagbalancingAct' => 'Balancing act', - 'tagadvancePayment' => 'Advance payment', + 'tagbalancingAct' => 'Saldo', + 'tagadvancePayment' => 'Pagamento antecipado', 'tagnothing' => '', - 'Default asset account' => 'Default asset account', + 'Default asset account' => 'Conta padrão', 'no_budget_pointer' => 'Parece que não há orçamentos ainda. Você deve criar alguns na página orçamentos. Orçamentos podem ajudá-lo a manter o controle de despesas.', - 'Savings account' => 'Savings account', - 'Credit card' => 'Credit card', + 'Savings account' => 'Conta poupança', + 'Credit card' => 'Cartão de crédito', 'source_accounts' => 'Conta(s) de origem', 'destination_accounts' => 'Conta(s) de destino', - 'user_id_is' => 'Your user id is :user', + 'user_id_is' => 'Seu id de usuário é :user', 'field_supports_markdown' => 'This field supports Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', - 'expenses_by_category' => 'Expenses by category', - 'expenses_by_budget' => 'Expenses by budget', - 'income_by_category' => 'Income by category', - 'cannot_redirect_to_account' => 'Firefly III cannot redirect you to the correct page. Apologies.', + 'expenses_by_category' => 'Despesa por categoria', + 'expenses_by_budget' => 'Despesas pelo orçamento', + 'income_by_category' => 'Receitas por categoria', + 'cannot_redirect_to_account' => 'Firefly III não pode redirecioná-lo para a página correta. Minhas desculpas.', // repeat frequencies: - 'repeat_freq_yearly' => 'yearly', + 'repeat_freq_yearly' => 'anual', 'repeat_freq_monthly' => 'mensal', 'weekly' => 'semanal', 'quarterly' => 'trimestral', @@ -257,10 +257,10 @@ return [ 'rule_action_set_description_choice' => 'Definir descrição para..', 'rule_action_append_description_choice' => 'Acrescentar a descrição com..', 'rule_action_prepend_description_choice' => 'Preceder a descrição com..', - 'rule_action_set_source_account_choice' => 'Set source account to...', - 'rule_action_set_source_account' => 'Set source account to :action_value', - 'rule_action_set_destination_account_choice' => 'Set destination account to...', - 'rule_action_set_destination_account' => 'Set destination account to :action_value', + 'rule_action_set_source_account_choice' => 'Definir a conta de origem...', + 'rule_action_set_source_account' => 'Definir a conta de origem para :action_value', + 'rule_action_set_destination_account_choice' => 'Definir a conta de destino...', + 'rule_action_set_destination_account' => 'Definir a conta de destino :action_value', // tags 'store_new_tag' => 'Armazenar nova tag', @@ -298,36 +298,36 @@ return [ 'pref_two_factor_auth_remove_will_disable' => '(isso também irá desativar a autenticação de duas etapas)', 'pref_save_settings' => 'Salvar definições', 'saved_preferences' => 'Preferências salvas!', - 'preferences_general' => 'General', - 'preferences_frontpage' => 'Home screen', - 'preferences_security' => 'Security', + 'preferences_general' => 'Geral', + 'preferences_frontpage' => 'Tela inicial', + 'preferences_security' => 'Segurança', 'preferences_layout' => 'Layout', - 'pref_home_show_deposits' => 'Show deposits on the home screen', + 'pref_home_show_deposits' => 'Depósitos de mostrar na tela inicial', 'pref_home_show_deposits_info' => 'The home screen already shows your expense accounts. Should it also show your revenue accounts?', - 'pref_home_do_show_deposits' => 'Yes, show them', - 'successful_count' => 'of which :count successful', + 'pref_home_do_show_deposits' => 'Sim, mostrar-lhes', + 'successful_count' => 'dos quais :count bem sucedida', 'transaction_page_size_title' => 'Tamanho da página', 'transaction_page_size_help' => 'Qualquer lista de transações mostra, no máximo, muitas transações', 'transaction_page_size_label' => 'Tamanho da página', 'between_dates' => '(:start e :end)', - 'pref_optional_fields_transaction' => 'Optional fields for transactions', + 'pref_optional_fields_transaction' => 'Campos opcionais para transações', 'pref_optional_fields_transaction_help' => 'By default not all fields are enabled when creating a new transaction (because of the clutter). Below, you can enable these fields if you think they could be useful for you. Of course, any field that is disabled, but already filled in, will be visible regardless of the setting.', - 'optional_tj_date_fields' => 'Date fields', - 'optional_tj_business_fields' => 'Business fields', - 'optional_tj_attachment_fields' => 'Attachment fields', - 'pref_optional_tj_interest_date' => 'Interest date', - 'pref_optional_tj_book_date' => 'Book date', - 'pref_optional_tj_process_date' => 'Processing date', - 'pref_optional_tj_due_date' => 'Due date', - 'pref_optional_tj_payment_date' => 'Payment date', - 'pref_optional_tj_invoice_date' => 'Invoice date', - 'pref_optional_tj_internal_reference' => 'Internal reference', - 'pref_optional_tj_notes' => 'Notes', - 'pref_optional_tj_attachments' => 'Attachments', - 'optional_field_meta_dates' => 'Dates', - 'optional_field_meta_business' => 'Business', - 'optional_field_attachments' => 'Attachments', - 'optional_field_meta_data' => 'Optional meta data', + 'optional_tj_date_fields' => 'Campos de data', + 'optional_tj_business_fields' => 'Campos de negócios', + 'optional_tj_attachment_fields' => 'Campos de anexo', + 'pref_optional_tj_interest_date' => 'Data de interesse', + 'pref_optional_tj_book_date' => 'Data reserva', + 'pref_optional_tj_process_date' => 'Data de processamento', + 'pref_optional_tj_due_date' => 'Data de vencimento', + 'pref_optional_tj_payment_date' => 'Data de pagamento', + 'pref_optional_tj_invoice_date' => 'Data da Fatura', + 'pref_optional_tj_internal_reference' => 'Referência interna', + 'pref_optional_tj_notes' => 'Notas', + 'pref_optional_tj_attachments' => 'Anexos', + 'optional_field_meta_dates' => 'Datas', + 'optional_field_meta_business' => 'Negócios', + 'optional_field_attachments' => 'Anexos', + 'optional_field_meta_data' => 'Meta dados opcionais', // profile: @@ -373,29 +373,29 @@ return [ 'title_transfers' => 'Transferências', // convert stuff: - 'convert_is_already_type_Withdrawal' => 'This transaction is already a withdrawal', - 'convert_is_already_type_Deposit' => 'This transaction is already a deposit', - 'convert_is_already_type_Transfer' => 'This transaction is already a transfer', - 'convert_to_Withdrawal' => 'Convert ":description" to a withdrawal', - 'convert_to_Deposit' => 'Convert ":description" to a deposit', - 'convert_to_Transfer' => 'Convert ":description" to a transfer', - 'convert_options_WithdrawalDeposit' => 'Convert a withdrawal into a deposit', - 'convert_options_WithdrawalTransfer' => 'Convert a withdrawal into a transfer', - 'convert_options_DepositTransfer' => 'Convert a deposit into a transfer', - 'convert_options_DepositWithdrawal' => 'Convert a deposit into a withdrawal', - 'convert_options_TransferWithdrawal' => 'Convert a transfer into a withdrawal', - 'convert_options_TransferDeposit' => 'Convert a transfer into a deposit', - 'transaction_journal_convert_options' => 'Convert this transaction', - 'convert_Withdrawal_to_deposit' => 'Convert this withdrawal to a deposit', - 'convert_Withdrawal_to_transfer' => 'Convert this withdrawal to a transfer', - 'convert_Deposit_to_withdrawal' => 'Convert this deposit to a withdrawal', - 'convert_Deposit_to_transfer' => 'Convert this deposit to a transfer', - 'convert_Transfer_to_deposit' => 'Convert this transfer to a deposit', - 'convert_Transfer_to_withdrawal' => 'Convert this transfer to a withdrawal', - 'convert_please_set_revenue_source' => 'Please pick the revenue account where the money will come from.', - 'convert_please_set_asset_destination' => 'Please pick the asset account where the money will go to.', - 'convert_please_set_expense_destination' => 'Please pick the expense account where the money will go to.', - 'convert_please_set_asset_source' => 'Please pick the asset account where the money will come from.', + 'convert_is_already_type_Withdrawal' => 'Esta transação é já uma retirada', + 'convert_is_already_type_Deposit' => 'Esta operação já é um depósito', + 'convert_is_already_type_Transfer' => 'Esta transação é já uma transferência', + 'convert_to_Withdrawal' => 'Converter ":description" a uma retirada', + 'convert_to_Deposit' => 'Converter ":description" de um depósito', + 'convert_to_Transfer' => 'Converter ":description" para uma transferência', + 'convert_options_WithdrawalDeposit' => 'Converter uma retirada em um depósito', + 'convert_options_WithdrawalTransfer' => 'Converter uma retirada em uma transferência', + 'convert_options_DepositTransfer' => 'Converter um depósito em uma transferência', + 'convert_options_DepositWithdrawal' => 'Converter um depósito em uma retirada', + 'convert_options_TransferWithdrawal' => 'Converter uma transferência em uma retirada', + 'convert_options_TransferDeposit' => 'Converter uma transferência em um depósito', + 'transaction_journal_convert_options' => 'Converter esta transação', + 'convert_Withdrawal_to_deposit' => 'Converter esta retirada de um depósito', + 'convert_Withdrawal_to_transfer' => 'Converter esta retirada para uma transferência', + 'convert_Deposit_to_withdrawal' => 'Converter este depósito para uma retirada', + 'convert_Deposit_to_transfer' => 'Converter este depósito para uma transferência', + 'convert_Transfer_to_deposit' => 'Converter esta transferência para um depósito', + 'convert_Transfer_to_withdrawal' => 'Converter esta transferência a uma retirada', + 'convert_please_set_revenue_source' => 'Por favor, escolha a conta de receitas de onde virá o dinheiro.', + 'convert_please_set_asset_destination' => 'Por favor, escolha a conta de ativo para onde vai o dinheiro.', + 'convert_please_set_expense_destination' => 'Por favor, escolha a conta de despesas para onde o dinheiro vai.', + 'convert_please_set_asset_source' => 'Por favor, escolha a conta de ativo, de onde virá o dinheiro.', 'convert_explanation_withdrawal_deposit' => 'If you convert this withdrawal into a deposit, :amount will be deposited into :sourceName instead of taken from it.', 'convert_explanation_withdrawal_transfer' => 'If you convert this withdrawal into a transfer, :amount will be transferred from :sourceName to a new asset account, instead of being paid to :destinationName.', 'convert_explanation_deposit_withdrawal' => 'If you convert this deposit into a withdrawal, :amount will be removed from :destinationName instead of added to it.', @@ -486,8 +486,8 @@ return [ 'rescanned_bill' => 'Tudo examinado novamente.', 'average_bill_amount_year' => 'Média de fatura (:ano)', 'average_bill_amount_overall' => 'Média de fatura (geral)', - 'not_or_not_yet' => 'Not (yet)', - 'not_expected_period' => 'Not expected this period', + 'not_or_not_yet' => 'Não (ainda)', + 'not_expected_period' => 'Não esperado neste período', // accounts: 'details_for_asset' => 'Detalhes para a conta de ativo ":name"', 'details_for_expense' => 'Detalhes para a conta de despesas ":name"', @@ -523,7 +523,8 @@ return [ 'credit_card_options' => 'Opções de cartão de crédito', 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', - 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_account' => 'Por favor, selecione mais de uma conta', + 'select_more_than_one_category' => 'Por favor, selecione mais de uma categoria', // categories: 'new_category' => 'Nova categoria', @@ -666,7 +667,7 @@ return [ 'in' => 'Entrada', 'out' => 'Saída', 'topX' => 'topo :number', - 'show_full_list' => 'Show entire list', + 'show_full_list' => 'Mostrar a lista inteira', 'show_only_top' => 'Show only top :number', 'sum_of_year' => 'Soma do ano', 'sum_of_years' => 'Soma dos anos', @@ -677,7 +678,7 @@ return [ 'report_type' => 'Tipo de relatório', 'report_type_default' => 'Relatório financeiro padrão', 'report_type_audit' => 'Visão geral do histórico de transação (auditoria)', - 'report_type_category' => 'Category report', + 'report_type_category' => 'Relatório por Categorias', 'report_type_meta-history' => 'Visão geral de categorias, orçamentos e faturas', 'more_info_help' => 'Mais informações sobre esses tipos de relatórios podem ser encontradas nas páginas de ajuda. Pressione o ícone (?) no canto superior direito.', 'report_included_accounts' => 'Contas incluídas', @@ -692,25 +693,25 @@ return [ 'balance_amount' => 'Despesas no orçamento ":budget" pagas por conta":account" entre :start e :end', 'no_audit_activity' => 'Nenhuma atividade foi registrada na conta :account_name entre :start e :end.', 'audit_end_balance' => 'Saldo da conta : account_name no final de :end foi :balance', - 'reports_extra_options' => 'Extra options', - 'report_has_no_extra_options' => 'This report has no extra options', - 'reports_submit' => 'View report', - 'end_after_start_date' => 'End date of report must be after start date.', - 'select_category' => 'Select one or more categories.', - 'income_per_category' => 'Income per category', - 'expense_per_category' => 'Expense per category', - 'income_per_account' => 'Income per account', - 'expense_per_account' => 'Expense per account', - 'include_not_in_category' => 'Include transactions not selected for this report', - 'everything_else' => 'Everything else', - 'income_and_expenses' => 'Income and expenses', - 'spent_average' => 'Spent (average)', - 'income_average' => 'Income (average)', - 'transaction_count' => 'Transaction count', - 'average_spending_per_account' => 'Average spending per account', - 'average_income_per_account' => 'Average income per account', + 'reports_extra_options' => 'Opções adicionais', + 'report_has_no_extra_options' => 'Este relatório não tem mais opções', + 'reports_submit' => 'Visualizar relatório', + 'end_after_start_date' => 'Data de término do relatório deve ser depois da data de início.', + 'select_category' => 'Selecione uma ou mais categorias.', + 'income_per_category' => 'Receitas por categoria', + 'expense_per_category' => 'Despesa por categoria', + 'income_per_account' => 'Rendimento por conta', + 'expense_per_account' => 'Por conta de despesas', + 'include_not_in_category' => 'Incluir transações não selecionadas para este relatório', + 'everything_else' => 'Todo o resto', + 'income_and_expenses' => 'Receitas e despesas', + 'spent_average' => 'Gastos (média)', + 'income_average' => 'Renda (média)', + 'transaction_count' => 'Contagem de transações', + 'average_spending_per_account' => 'Média de gastos por conta', + 'average_income_per_account' => 'Rendimento médio por conta', 'total' => 'Total', - 'description' => 'Description', + 'description' => 'Descrição', // charts: @@ -797,9 +798,9 @@ return [ 'tags_group' => 'Tags agrupam transações, que torna possível armazenar os reembolsos (no caso você empreste dinheiro para os outros) e outros "balancetes" onde as despesas são somadas (os pagamentos na sua TV nova) ou onde as despesas e depósitos estão anulando uns aos outros (compra algo com dinheiro guardado). Isso é tudo para você. Usando tags à moda antiga claro é sempre possível.', 'tags_start' => 'Crie uma tag para começar ou insira tags ao criar novas transações.', - 'transaction_journal_information' => 'Transaction information', - 'transaction_journal_meta' => 'Meta information', - 'total_amount' => 'Total amount', + 'transaction_journal_information' => 'Informação da transação', + 'transaction_journal_meta' => 'Meta-informação', + 'total_amount' => 'Valor total', // administration 'administration' => 'Administração', @@ -818,24 +819,24 @@ return [ 'no_domain_filled_in' => 'Nenhum domínio preenchido', 'domain_already_blocked' => 'Domínio :domain já está bloqueado', 'domain_is_now_blocked' => 'Domínio :domain está bloqueado', - 'instance_configuration' => 'Configuration', - 'firefly_instance_configuration' => 'Configuration options for Firefly III', - 'setting_single_user_mode' => 'Single user mode', + 'instance_configuration' => 'Configuração', + 'firefly_instance_configuration' => 'Opções de configuração para Firefly III', + 'setting_single_user_mode' => 'Modo de usuário único', 'setting_single_user_mode_explain' => 'By default, Firefly III only accepts one (1) registration: you. This is a security measure, preventing others from using your instance unless you allow them to. Future registrations are blocked. When you uncheck this box, others can use your instance as wel, assuming they can reach it (when it is connected to the internet).', - 'store_configuration' => 'Store configuration', + 'store_configuration' => 'Configuração da Loja', 'single_user_administration' => 'User administration for :email', 'hidden_fields_preferences' => 'Not all fields are visible right now. You must enable them in your settings.', - 'user_data_information' => 'User data', - 'user_information' => 'User information', - 'total_size' => 'total size', - 'budget_or_budgets' => 'budget(s)', - 'budgets_with_limits' => 'budget(s) with configured amount', - 'rule_or_rules' => 'rule(s)', - 'rulegroup_or_groups' => 'rule group(s)', - 'setting_must_confirm_account' => 'Account confirmation', + 'user_data_information' => 'Dados de usuário', + 'user_information' => 'Informações do usuário', + 'total_size' => 'tamanho total', + 'budget_or_budgets' => 'orçamento(s)', + 'budgets_with_limits' => 'budget(s) com quantidade configurada', + 'rule_or_rules' => 'regra(s)', + 'rulegroup_or_groups' => 'grupo(s) de regra', + 'setting_must_confirm_account' => 'Confirmação de conta', 'setting_must_confirm_account_explain' => 'When this setting is enabled, users must activate their account before it can be used.', - 'configuration_updated' => 'The configuration has been updated', - 'setting_is_demo_site' => 'Demo site', + 'configuration_updated' => 'A configuração foi atualizada', + 'setting_is_demo_site' => 'Site demo', 'setting_is_demo_site_explain' => 'If you check this box, this installation will behave as if it is the demo site, which can have weird side effects.', // split a transaction: @@ -874,15 +875,15 @@ return [ // import 'configuration_file_help' => 'If you have previously imported data into Firefly III, you may have a configuration file, which will pre-set configuration values for you. For some banks, other users have kindly provided their configuration file.', - 'import_data_index' => 'Index', + 'import_data_index' => 'Índice', 'import_file_type_csv' => 'CSV (valores separados por vírgula)', 'import_file_type_help' => 'Selecione o tipo de arquivo que você fará o upload', 'import_start' => 'Iniciar a importação', 'configure_import' => 'Além disso, configure sua importação', 'import_finish_configuration' => 'Terminar configuração', 'settings_for_import' => 'Preferências', - 'import_status' => 'Import status', - 'import_status_text' => 'The import is currently running, or will start momentarily.', + 'import_status' => 'Status de importação', + 'import_status_text' => 'A importação está atualmente em execução, ou vai começar dentro de momentos.', 'import_complete' => 'Configuração de importação completa!', 'import_complete_text' => 'The import is ready to start. All the configuration you needed to do has been done. Please download the configuration file. It will help you with the import should it not go as planned. To actually run the import, you can either execute the following command in your console, or run the web-based import. Depending on your configuration, the console import will give you more feedback.', 'import_download_config' => 'Download da configuração', @@ -891,23 +892,23 @@ return [ 'import_data_full' => 'Importar dados para o Firefly III', 'import' => 'Importar', 'import_file_help' => 'Selecione seu arquivo', - 'import_status_settings_complete' => 'The import is ready to start.', - 'import_status_import_complete' => 'The import has completed.', - 'import_status_import_running' => 'The import is currently running. Please be patient.', - 'import_status_header' => 'Import status and progress', - 'import_status_errors' => 'Import errors', - 'import_status_report' => 'Import report', - 'import_finished' => 'Import has finished', - 'import_error_single' => 'An error has occured during the import.', - 'import_error_multi' => 'Some errors occured during the import.', + 'import_status_settings_complete' => 'A importação está pronta para começar.', + 'import_status_import_complete' => 'A importação foi concluída.', + 'import_status_import_running' => 'A importação está atualmente em execução. Por favor, seja paciente.', + 'import_status_header' => 'Importação status e progresso', + 'import_status_errors' => 'Erro de importação', + 'import_status_report' => 'Relatório de importação', + 'import_finished' => 'Importação concluida', + 'import_error_single' => 'Ocorreu um erro durante a importação.', + 'import_error_multi' => 'Ocorreram erros durante a importação do arquivo.', 'import_error_fatal' => 'There was an error during the import routine. Please check the log files. The error seems to be:', 'import_error_timeout' => 'The import seems to have timed out. If this error persists, please import your data using the console command.', 'import_double' => 'Row #:row: This row has been imported before, and is stored in :description.', - 'import_finished_all' => 'The import has finished. Please check out the results below.', - 'import_with_key' => 'Import with key \':key\'', + 'import_finished_all' => 'A importação terminou. Por favor, verifique os resultados abaixo.', + 'import_with_key' => 'Importação com chave \':key\'', 'import_share_configuration' => 'Please consider downloading your configuration and sharing it at the import configuration center. This will allow other users of Firefly III to import their files more easily.', 'import_finished_report' => 'The import has finished. Please note any errors in the block above this line. All transactions imported during this particular session have been tagged, and you can check them out below. ', 'import_finished_link' => 'The transactions imported can be found in tag :tag.', - 'need_at_least_one_account' => 'You need at least one asset account to be able to create piggy banks', - 'see_help_top_right' => 'For more information, please check out the help pages using the icon in the top right corner of the page.', + 'need_at_least_one_account' => 'Você precisa de pelo menos uma conta de ativo para ser capaz de criar cofrinhos', + 'see_help_top_right' => 'Para obter mais informações, por favor, confira as páginas de ajuda usando o ícone no canto superior direito da página.', ]; \ No newline at end of file diff --git a/resources/lang/pt_BR/form.php b/resources/lang/pt_BR/form.php index 591903e4ba..1b24d4419f 100644 --- a/resources/lang/pt_BR/form.php +++ b/resources/lang/pt_BR/form.php @@ -25,21 +25,22 @@ return [ 'match' => 'Corresponde em', 'repeat_freq' => 'Repetições', 'journal_currency_id' => 'Moeda', - 'currency_id' => 'Currency', - 'attachments' => 'Attachments', + 'currency_id' => 'Moeda', + 'attachments' => 'Anexos', 'journal_amount' => 'Quantia', 'journal_asset_source_account' => 'Conta de ativo (fonte)', 'journal_source_account_name' => 'Conta de receita (fonte)', 'journal_source_account_id' => 'Conta de ativo (fonte)', + 'BIC' => 'BIC', 'account_from_id' => 'da conta', 'account_to_id' => 'para conta', - 'source_account' => 'Source account', - 'destination_account' => 'Destination account', + 'source_account' => 'Conta de origem', + 'destination_account' => 'Conta de destino', 'journal_destination_account_id' => 'Conta de ativo (destino)', 'asset_destination_account' => 'Conta de ativo (destino)', 'asset_source_account' => 'Conta de ativo (fonte)', 'journal_description' => 'Descrição', - 'note' => 'Notes', + 'note' => 'Notas', 'split_journal' => 'Dividir essa transação', 'split_journal_explanation' => 'Dividir essa transação em várias partes', 'currency' => 'Moeda', @@ -63,15 +64,15 @@ return [ 'expense_account' => 'Conta de Despesa', 'revenue_account' => 'Conta de Receita', - 'revenue_account_source' => 'Revenue account (source)', - 'source_account_asset' => 'Source account (asset account)', - 'destination_account_expense' => 'Destination account (expense account)', - 'destination_account_asset' => 'Destination account (asset account)', - 'source_account_revenue' => 'Source account (revenue account)', - 'type' => 'Type', - 'convert_Withdrawal' => 'Convert withdrawal', - 'convert_Deposit' => 'Convert deposit', - 'convert_Transfer' => 'Convert transfer', + 'revenue_account_source' => 'Conta de receita (fonte)', + 'source_account_asset' => 'Conta de origem (conta de ativo)', + 'destination_account_expense' => 'Conta de destino (conta de despesa)', + 'destination_account_asset' => 'Conta de destino (conta de ativo)', + 'source_account_revenue' => 'Conta de origem (conta de receita)', + 'type' => 'Tipo', + 'convert_Withdrawal' => 'Converter a retirada', + 'convert_Deposit' => 'Converter o depósito', + 'convert_Transfer' => 'Converter a transferência', 'amount' => 'Valor', @@ -151,9 +152,9 @@ return [ // admin 'domain' => 'Domínio', - 'single_user_mode' => 'Single user mode', - 'must_confirm_account' => 'New users must activate account', - 'is_demo_site' => 'Is demo site', + 'single_user_mode' => 'Modo de usuário único', + 'must_confirm_account' => 'Novos usuários devem ativar a conta', + 'is_demo_site' => 'É o site de demonstração', // import 'import_file' => 'Importar arquivo', @@ -167,8 +168,8 @@ return [ 'csv_config' => 'Importar CSV de configuração', - 'due_date' => 'Due date', - 'payment_date' => 'Payment date', - 'invoice_date' => 'Invoice date', - 'internal_reference' => 'Internal reference', + 'due_date' => 'Data de vencimento', + 'payment_date' => 'Data de pagamento', + 'invoice_date' => 'Data da Fatura', + 'internal_reference' => 'Referência interna', ]; \ No newline at end of file diff --git a/resources/lang/pt_BR/list.php b/resources/lang/pt_BR/list.php index fb332e16d3..5b31acdaaa 100644 --- a/resources/lang/pt_BR/list.php +++ b/resources/lang/pt_BR/list.php @@ -25,7 +25,7 @@ return [ 'matchedOn' => 'Coincide', 'matchesOn' => 'Correspondido em', 'account_type' => 'Tipo de conta', - 'created_at' => 'Created at', + 'created_at' => 'Criado em', 'new_balance' => 'Novo saldo', 'account' => 'Conta', 'matchingAmount' => 'Total', @@ -33,21 +33,21 @@ return [ 'split_number' => 'Dividir #', 'destination' => 'Destino', 'source' => 'Fonte', - 'next_expected_match' => 'Next expected match', + 'next_expected_match' => 'Próximo correspondente esperado', 'automatch' => 'Auto match?', 'repeat_freq' => 'Repetições', 'description' => 'Descrição', 'amount' => 'Total', - 'internal_reference' => 'Internal reference', + 'internal_reference' => 'Referência interna', 'date' => 'Data', 'interest_date' => 'Data de interesse', 'book_date' => 'Data reserva', 'process_date' => 'Data de processamento', - 'due_date' => 'Due date', - 'payment_date' => 'Payment date', - 'invoice_date' => 'Invoice date', - 'interal_reference' => 'Internal reference', - 'notes' => 'Notes', + 'due_date' => 'Prazo', + 'payment_date' => 'Data de pagamento', + 'invoice_date' => 'Data da Fatura', + 'interal_reference' => 'Referência interna', + 'notes' => 'Notas', 'from' => 'De', 'piggy_bank' => 'Cofrinho', 'to' => 'Até', @@ -72,17 +72,17 @@ return [ 'blocked_code' => 'Bloco de código', 'domain' => 'Domínio', 'registration_attempts' => 'Tentativas de registo', - 'source_account' => 'Source account', - 'destination_account' => 'Destination account', + 'source_account' => 'Conta de origem', + 'destination_account' => 'Conta de destino', - 'accounts_count' => 'Number of accounts', - 'journals_count' => 'Number of journals', - 'attachments_count' => 'Number of attachments', - 'bills_count' => 'Number of bills', - 'categories_count' => 'Number of categories', - 'export_jobs_count' => 'Number of export jobs', - 'import_jobs_count' => 'Number of import jobs', - 'budget_count' => 'Number of budgets', - 'rule_and_groups_count' => 'Number of rules and rule groups', - 'tags_count' => 'Number of tags', + 'accounts_count' => 'Número de Contas', + 'journals_count' => 'Número de período', + 'attachments_count' => 'Número de anexos', + 'bills_count' => 'Número de contas', + 'categories_count' => 'Número de categorias', + 'export_jobs_count' => 'Número de jobs de exportação', + 'import_jobs_count' => 'Número de jobs de importação', + 'budget_count' => 'Número de orçamentos', + 'rule_and_groups_count' => 'Número de regras e grupos de regras', + 'tags_count' => 'Número de tags', ]; \ No newline at end of file diff --git a/resources/lang/pt_BR/validation.php b/resources/lang/pt_BR/validation.php index 97aebcc28b..fa6003e890 100644 --- a/resources/lang/pt_BR/validation.php +++ b/resources/lang/pt_BR/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'Arquivo ":name" é muito grande.', 'belongs_to_user' => 'O valor de :attribute é desconhecido', 'accepted' => 'O campo :attribute deve ser aceito.', + 'bic' => 'Este não é um BIC válido.', 'active_url' => 'O campo :attribute não contém um URL válido.', 'after' => 'O campo :attribute deverá conter uma data posterior a :date.', 'alpha' => 'O campo :attribute deverá conter apenas letras.', @@ -79,9 +80,10 @@ return [ 'url' => 'O formato do URL indicado para o campo :attribute é inválido.', 'timezone' => 'O campo :attribute deverá ter um fuso horário válido.', '2fa_code' => 'O campo :attribute é inválido.', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'file' => 'The :attribute must be a file.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'present' => 'The :attribute field must be present.', + 'dimensions' => 'O campo :attribute tem dimensões de imagem inválido.', + 'distinct' => 'O campo :attribute tem um valor duplicado.', + 'file' => 'O :attribute deve ser um arquivo.', + 'in_array' => 'O campo :attribute não existe em :other.', + 'present' => 'O campo :attribute deve estar presente.', + 'amount_zero' => 'The total amount cannot be zero', ]; \ No newline at end of file diff --git a/resources/lang/zh-HK/auth.php b/resources/lang/zh-HK/auth.php deleted file mode 100644 index 7319a9d7b8..0000000000 --- a/resources/lang/zh-HK/auth.php +++ /dev/null @@ -1,28 +0,0 @@ - 'These credentials do not match our records.', - 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', - -]; diff --git a/resources/lang/zh-HK/breadcrumbs.php b/resources/lang/zh-HK/breadcrumbs.php deleted file mode 100644 index 54cb260179..0000000000 --- a/resources/lang/zh-HK/breadcrumbs.php +++ /dev/null @@ -1,41 +0,0 @@ - 'Home', - 'edit_currency' => 'Edit currency ":name"', - 'delete_currency' => 'Delete currency ":name"', - 'newPiggyBank' => 'Create a new piggy bank', - 'edit_piggyBank' => 'Edit piggy bank ":name"', - 'preferences' => 'Preferences', - 'profile' => 'Profile', - 'changePassword' => 'Change your password', - 'bills' => 'Bills', - 'newBill' => 'New bill', - 'edit_bill' => 'Edit bill ":name"', - 'delete_bill' => 'Delete bill ":name"', - 'reports' => 'Reports', - 'searchResult' => 'Search for ":query"', - 'withdrawal_list' => 'Expenses', - 'deposit_list' => 'Revenue, income and deposits', - 'transfer_list' => 'Transfers', - 'transfers_list' => 'Transfers', - 'create_withdrawal' => 'Create new withdrawal', - 'create_deposit' => 'Create new deposit', - 'create_transfer' => 'Create new transfer', - 'edit_journal' => 'Edit transaction ":description"', - 'delete_journal' => 'Delete transaction ":description"', - 'tags' => 'Tags', - 'createTag' => 'Create new tag', - 'edit_tag' => 'Edit tag ":tag"', - 'delete_tag' => 'Delete tag ":tag"', -]; diff --git a/resources/lang/zh-HK/config.php b/resources/lang/zh-HK/config.php deleted file mode 100644 index 0c23d3f6cd..0000000000 --- a/resources/lang/zh-HK/config.php +++ /dev/null @@ -1,23 +0,0 @@ - 'en, English, en_US, en_US.utf8', - 'month' => '%B %Y', - 'month_and_day' => '%B %e, %Y', - 'date_time' => '%B %e, %Y, @ %T', - 'specific_day' => '%e %B %Y', - 'week_in_year' => 'Week %W, %Y', - 'quarter_of_year' => '%B %Y', - 'year' => '%Y', - 'half_year' => '%B %Y', - -]; diff --git a/resources/lang/zh-HK/csv.php b/resources/lang/zh-HK/csv.php deleted file mode 100644 index fe83034aa2..0000000000 --- a/resources/lang/zh-HK/csv.php +++ /dev/null @@ -1,81 +0,0 @@ - 'Configure your import', - 'import_configure_intro' => 'There are some options for your CSV import. Please indicate if your CSV file contains headers on the first column, and what the date format of your date-fields is. That might require some experimentation. The field delimiter is usually a ",", but could also be a ";". Check this carefully.', - 'import_configure_form' => 'Form', - 'header_help' => 'Check this if the first row of your CSV file are the column titles', - 'date_help' => 'Date time format in your CSV. Follow the format like this page indicates. The default value will parse dates that look like this: :dateExample.', - 'delimiter_help' => 'Choose the field delimiter that is used in your input file. If not sure, comma is the safest option.', - 'import_account_help' => 'If your CSV file does NOT contain information about your asset account(s), use this dropdown to select to which account the transactions in the CSV belong to.', - 'upload_not_writeable' => 'The grey box contains a file path. It should be writeable. Please make sure it is.', - - // roles - 'column_roles_title' => 'Define column roles', - 'column_roles_text' => '

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

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

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

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

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

', - 'column_roles_table' => '表格', - 'column_name' => '欄位名稱', - 'column_example' => '欄的示例資料', - 'column_role' => '欄內資料的含義', - 'do_map_value' => '配對這些資料', - 'column' => '欄', - 'no_example_data' => '沒有可用的示例資料', - 'store_column_roles' => '繼續匯入', - 'do_not_map' => '(不要配對)', - 'map_title' => '配對匯入了的資料到 Firefly III 的資料', - 'map_text' => '在下表中,左邊的是在你的CSV 檔中的資料。而你現在要把這些資料配對到資料庫中的資料(如有的話)。如果沒有資料能夠進行配對,或者你不想進行配對,請選擇不進行配對。', - - 'field_value' => '欄位值', - 'field_mapped_to' => '配對到', - 'store_column_mapping' => '存儲配對', - - // map things. - - - 'column__ignore' => '(忽略此欄)', - 'column_account-iban' => '資產帳戶 (IBAN)', - 'column_account-id' => '資產帳戶 ID (與 Firefly 匹配)', - 'column_account-name' => '資產帳戶 (名稱)', - 'column_amount' => '金額', - 'column_amount-comma-separated' => '金額 (逗號作為小數分隔符號)', - 'column_bill-id' => '帳單 ID (與 Firefly 匹配)', - 'column_bill-name' => '帳單名稱', - 'column_budget-id' => '預算 ID (與 Firefly 匹配)', - 'column_budget-name' => '預算名稱', - 'column_category-id' => '類別 ID (與 Firefly 匹配)', - 'column_category-name' => '類別名稱', - 'column_currency-code' => '貨幣代碼 (ISO 4217)', - 'column_currency-id' => '貨幣 ID (與 Firefly 匹配)', - 'column_currency-name' => '貨幣名稱(與 Firefly 匹配)', - 'column_currency-symbol' => '貨幣符號 (與 Firefly 匹配)', - 'column_date-interest' => '利息計算日', - 'column_date-book' => 'Transaction booking date', - 'column_date-process' => '交易處理日期', - 'column_date-transaction' => '日期', - 'column_description' => '描述', - 'column_opposing-iban' => '抵銷的帳戶 (IBAN)', - 'column_opposing-id' => '抵銷的帳戶 ID (與 Firefly 匹配)', - 'column_external-id' => '外部 ID', - 'column_opposing-name' => '抵銷的帳戶 (名稱)', - 'column_rabo-debet-credit' => '荷蘭合作銀行獨有的借記/貸記指標', - 'column_ing-debet-credit' => 'ING 集團獨有的借記/貸記指標', - 'column_sepa-ct-id' => 'SEPA Credit Transfer end-to-end ID', - 'column_sepa-ct-op' => 'SEPA 貸記劃撥抵銷的帳戶', - 'column_sepa-db' => 'SEPA 直接付款', - 'column_tags-comma' => '標籤 (逗號分隔)', - 'column_tags-space' => '標籤 (空格分隔)', - 'column_account-number' => '資產帳戶 (帳號號碼)', - 'column_opposing-number' => '抵銷的帳戶 (帳號號碼)', -]; diff --git a/resources/lang/zh-TW/firefly.php b/resources/lang/zh-TW/firefly.php deleted file mode 100644 index 66788da50c..0000000000 --- a/resources/lang/zh-TW/firefly.php +++ /dev/null @@ -1,833 +0,0 @@ - '翻譯不完整', - 'close' => '關閉', - 'actions' => '操作', - 'edit' => '編輯', - 'delete' => '刪除', - 'welcomeBack' => '情況如何?', - 'everything' => '顯示所有', - 'customRange' => '自訂範圍', - 'apply' => '套用', - 'cancel' => '取消', - 'from' => '從', - 'to' => '到', - 'showEverything' => '全部顯示', - 'never' => '從來沒有', - 'search_results_for' => '":query" 的搜尋結果', - 'bounced_error' => '無法傳送電郵至 :email ,因此無法訪問。', - 'deleted_error' => '帳號或密碼錯誤。', - 'general_blocked_error' => '您的帳戶已被禁用,所以您不能登錄。', - 'expired_error' => '你的帳戶已過期,不能使用。', - 'removed_amount' => '移除了 :amount', - 'added_amount' => '添加了 :amount', - 'asset_account_role_help' => '你可以稍後再設置其他選項。', - 'Opening balance' => '開戶金額', - 'create_new_stuff' => '創建新的東西', - 'new_withdrawal' => '新提款', - 'new_deposit' => '新存款', - 'new_transfer' => '新的轉帳', - 'new_asset_account' => '新增資產帳戶', - 'new_expense_account' => '新的支出帳戶', - 'new_revenue_account' => '新的收入帳戶', - 'new_budget' => '新增預算', - 'new_bill' => '新增賬單', - 'block_account_logout' => '你已被登出。被封禁的帳戶不能使用本網站。你沒有以有效的電子郵件地址註冊嗎?', - 'flash_success' => '成功!', - 'flash_info' => '訊息', - 'flash_warning' => '警告!', - 'flash_error' => '錯誤!', - 'flash_info_multiple' => '有一個訊息|有 :count 個訊息', - 'flash_error_multiple' => '出現了一個錯誤|出現了 :count 個錯誤', - 'net_worth' => '淨值', - 'route_has_no_help' => '目前沒有說明,或沒有中文的說明可用。', - 'two_factor_welcome' => '哈囉, :user !', - 'two_factor_enter_code' => '若要繼續,請輸入你的雙重身份驗證 (2FA) 應用程序內顯示的驗證代碼。', - 'two_factor_code_here' => '在此輸入代碼', - 'two_factor_title' => '雙重身份驗證', - 'authenticate' => '認證', - 'two_factor_forgot_title' => '丟失雙重身份驗證', - 'two_factor_forgot' => '我忘記了我的雙重身份驗證 (2FA) 。', - 'two_factor_lost_header' => '丟失了雙重身份驗證 (2FA) 嗎?', - 'two_factor_lost_intro' => '很不幸,這不可以從 web 介面中重置。你有兩個選擇。', - 'two_factor_lost_fix_self' => '如果你在自己的伺服器上運行 Firefly III,請檢查 storage/logs 中的日誌。', - 'two_factor_lost_fix_owner' => '否則,請電郵網站擁有者,:site_owner 並要求他們重置你的雙重身份驗證。', - 'warning_much_data' => ':days 天的資料需要一點時間載入。', - 'registered' => '您已成功註冊 !', - 'search' => '搜尋', - 'no_budget_pointer' => '你還沒有預算。你可以在預算頁來建立預算。預算可以幫助你跟蹤支出情況。', - 'source_accounts' => '來源帳戶', - 'destination_accounts' => '目標帳戶', - 'user_id_is' => 'Your user id is :user', - 'field_supports_markdown' => 'This field supports Markdown.', - - // repeat frequencies: - 'repeat_freq_monthly' => '每月', - 'weekly' => '每週', - 'quarterly' => '每季', - 'half-year' => '每半年', - 'yearly' => '每年', - // account confirmation: - 'confirm_account_header' => '請確認你的帳戶', - 'confirm_account_intro' => 'An email has been sent to the address you used during your registration. Please check it out for further instructions. If you did not get this message, you can have Firefly send it again.', - 'confirm_account_resend_email' => 'Send me the confirmation message I need to activate my account.', - 'account_is_confirmed' => '你的帳戶已通過驗證。', - 'invalid_activation_code' => 'It seems the code you are using is not valid, or has expired.', - 'confirm_account_is_resent_header' => '已重新發送確認郵件', - 'confirm_account_is_resent_text' => 'The confirmation message has been resent. If you still did not receive the confirmation message, please contact the site owner at :owner or check the log files to see what went wrong.', - 'confirm_account_is_resent_go_home' => '轉到 Firefly 的首頁', - 'confirm_account_not_resent_header' => '有些事不對勁 :(', - 'confirm_account_not_resent_intro' => 'The confirmation message has been not resent. If you still did not receive the confirmation message, please contact the site owner at :owner instead. Possibly, you have tried to resend the activation message too often. You can have Firefly III try to resend the confirmation message every hour.', - 'confirm_account_not_resent_go_home' => '轉到 Firefly 的首頁', - - // export data: - 'import_and_export' => '匯入與匯出', - 'export_data' => 'Export data', - 'export_data_intro' => 'For backup purposes, when migrating to another system or when migrating to another Firefly III installation.', - 'export_format' => 'Export format', - 'export_format_csv' => 'Comma separated values (CSV file)', - 'export_format_mt940' => 'MT940 相容格式', - 'export_included_accounts' => '從這些帳戶匯出交易記錄', - 'include_config_help' => '為方便重新導入到 Firefly III', - 'include_old_uploads_help' => 'Firefly III 不會扔掉過去已導入的原始 CSV 檔。你可以將它們包含在匯出的檔案中。', - 'do_export' => '匯出', - 'export_status_never_started' => '匯出尚未開始', - 'export_status_make_exporter' => 'Creating exporter thing...', - 'export_status_collecting_journals' => '正在收集你的交易資料...', - 'export_status_collected_journals' => '你的交易資料已經收集成功!', - 'export_status_converting_to_export_format' => '正在轉換您的交易資料...', - 'export_status_converted_to_export_format' => 'Converted your transactions!', - 'export_status_creating_journal_file' => 'Creating the export file...', - 'export_status_created_journal_file' => 'Created the export file!', - 'export_status_collecting_attachments' => 'Collecting all your attachments...', - 'export_status_collected_attachments' => 'Collected all your attachments!', - 'export_status_collecting_old_uploads' => 'Collecting all your previous uploads...', - 'export_status_collected_old_uploads' => 'Collected all your previous uploads!', - 'export_status_creating_config_file' => 'Creating a configuration file...', - 'export_status_created_config_file' => 'Created a configuration file!', - 'export_status_creating_zip_file' => 'Creating a zip file...', - 'export_status_created_zip_file' => 'Created a zip file!', - 'export_status_finished' => 'Export has succesfully finished! Yay!', - 'export_data_please_wait' => 'Please wait...', - 'attachment_explanation' => '檔案 \':attachment_name\' (#:attachment_id) 本來於 :date 上傳到 :type \':description\' (#:journal_id) ,而其金額為 :amount 。', - - // rules - 'rules' => 'Rules', - 'rules_explanation' => 'Here you can manage rules. Rules are triggered when a transaction is created or updated. Then, if the transaction has certain properties (called "triggers") Firefly will execute the "actions". Combined, you can make Firefly respond in a certain way to new transactions.', - 'rule_name' => 'Name of rule', - 'rule_triggers' => 'Rule triggers when', - 'rule_actions' => 'Rule will', - 'new_rule' => 'New rule', - 'new_rule_group' => 'New rule group', - 'rule_priority_up' => 'Give rule more priority', - 'rule_priority_down' => 'Give rule less priority', - 'make_new_rule_group' => 'Make new rule group', - 'store_new_rule_group' => 'Store new rule group', - 'created_new_rule_group' => 'New rule group ":title" stored!', - 'updated_rule_group' => 'Successfully updated rule group ":title".', - 'edit_rule_group' => 'Edit rule group ":title"', - 'delete_rule_group' => 'Delete rule group ":title"', - 'deleted_rule_group' => 'Deleted rule group ":title"', - 'update_rule_group' => 'Update rule group', - 'no_rules_in_group' => 'There are no rules in this group', - 'move_rule_group_up' => 'Move rule group up', - 'move_rule_group_down' => 'Move rule group down', - 'save_rules_by_moving' => 'Save these rule(s) by moving them to another rule group:', - 'make_new_rule' => 'Make new rule in rule group ":title"', - 'rule_help_stop_processing' => 'When you check this box, later rules in this group will not be executed.', - 'rule_help_active' => 'Inactive rules will never fire.', - 'stored_new_rule' => 'Stored new rule with title ":title"', - 'deleted_rule' => 'Deleted rule with title ":title"', - 'store_new_rule' => 'Store new rule', - 'updated_rule' => 'Updated rule with title ":title"', - 'default_rule_group_name' => 'Default rules', - 'default_rule_group_description' => '所有不屬於任何組別的規則', - 'default_rule_name' => 'Your first default rule', - 'default_rule_description' => '這是一個例子。你可以把這個規則刪除。', - 'default_rule_trigger_description' => '賣世界的小男孩', - 'default_rule_trigger_from_account' => 'David Bowie', - 'default_rule_action_prepend' => '買下了整個世界。錢給了', - 'default_rule_action_set_category' => 'Large expenses', - 'trigger' => 'Trigger', - 'trigger_value' => 'Trigger on value', - 'stop_processing_other_triggers' => 'Stop processing other triggers', - 'add_rule_trigger' => 'Add new trigger', - 'action' => 'Action', - 'action_value' => 'Action value', - 'stop_executing_other_actions' => 'Stop executing other actions', - 'add_rule_action' => 'Add new action', - 'edit_rule' => 'Edit rule ":title"', - 'delete_rule' => 'Delete rule ":title"', - 'update_rule' => 'Update rule', - 'test_rule_triggers' => 'See matching transactions', - 'warning_transaction_subset' => 'For performance reasons this list is limited to :max_num_transactions and may only show a subset of matching transactions', - 'warning_no_matching_transactions' => 'No matching transactions found. Please note that for performance reasons, only the last :num_transactions transactions have been checked.', - 'warning_no_valid_triggers' => 'No valid triggers provided.', - 'execute_on_existing_transactions' => 'Execute for existing transactions', - 'execute_on_existing_transactions_intro' => 'When a rule or group has been changed or added, you can execute it for existing transactions', - 'execute_on_existing_transactions_short' => 'Existing transactions', - 'executed_group_on_existing_transactions' => 'Executed group ":title" for existing transactions', - 'execute_group_on_existing_transactions' => 'Execute group ":title" for existing transactions', - 'include_transactions_from_accounts' => 'Include transactions from these accounts', - 'execute' => 'Execute', - - // actions and triggers - 'rule_trigger_user_action' => 'User action is ":trigger_value"', - 'rule_trigger_from_account_starts' => '以 ":trigger_value" 開頭的來源帳戶', - 'rule_trigger_from_account_ends' => '以 ":trigger_value" 為結尾的來源帳戶', - 'rule_trigger_from_account_is' => '來源帳戶是 ":trigger_value"', - 'rule_trigger_from_account_contains' => '含 ":trigger_value" 的來源帳戶', - 'rule_trigger_to_account_starts' => 'Destination account starts with ":trigger_value"', - 'rule_trigger_to_account_ends' => 'Destination account ends with ":trigger_value"', - 'rule_trigger_to_account_is' => 'Destination account is ":trigger_value"', - 'rule_trigger_to_account_contains' => 'Destination account contains ":trigger_value"', - 'rule_trigger_transaction_type' => 'Transaction is of type ":trigger_value"', - 'rule_trigger_amount_less' => 'Amount is less than :trigger_value', - 'rule_trigger_amount_exactly' => 'Amount is :trigger_value', - 'rule_trigger_amount_more' => 'Amount is more than :trigger_value', - 'rule_trigger_description_starts' => '以 ":trigger_value" 開頭的描述', - 'rule_trigger_description_ends' => '以 ":trigger_value" 為結尾的描述', - 'rule_trigger_description_contains' => '含 ":trigger_value" 的描述', - 'rule_trigger_description_is' => '描述是 ":trigger_value"', - 'rule_trigger_from_account_starts_choice' => '來源帳戶以…開頭', - 'rule_trigger_from_account_ends_choice' => '來源帳戶以…結尾', - 'rule_trigger_from_account_is_choice' => '來源帳戶是…', - 'rule_trigger_from_account_contains_choice' => '來源帳戶含有…', - 'rule_trigger_to_account_starts_choice' => 'Destination account starts with..', - 'rule_trigger_to_account_ends_choice' => 'Destination account ends with..', - 'rule_trigger_to_account_is_choice' => 'Destination account is..', - 'rule_trigger_to_account_contains_choice' => 'Destination account contains..', - 'rule_trigger_transaction_type_choice' => 'Transaction is of type..', - 'rule_trigger_amount_less_choice' => 'Amount is less than..', - 'rule_trigger_amount_exactly_choice' => 'Amount is..', - 'rule_trigger_amount_more_choice' => 'Amount is more than..', - 'rule_trigger_description_starts_choice' => '描述以…開頭', - 'rule_trigger_description_ends_choice' => '描述以…結尾', - 'rule_trigger_description_contains_choice' => '描述包含…', - 'rule_trigger_description_is_choice' => '描述是…', - 'rule_trigger_store_journal' => 'When a journal is created', - 'rule_trigger_update_journal' => 'When a journal is updated', - 'rule_action_set_category' => 'Set category to ":action_value"', - 'rule_action_clear_category' => 'Clear category', - 'rule_action_set_budget' => 'Set budget to ":action_value"', - 'rule_action_clear_budget' => 'Clear budget', - 'rule_action_add_tag' => '新增標籤 ":action_value"', - 'rule_action_remove_tag' => '刪除標籤 ":action_value"', - 'rule_action_remove_all_tags' => '移除所有標籤', - 'rule_action_set_description' => '設置描述為 ":action_value"', - 'rule_action_append_description' => '描述後加上 ":action_value"', - 'rule_action_prepend_description' => '描述前加上 ":action_value"', - 'rule_action_set_category_choice' => 'Set category to..', - 'rule_action_clear_category_choice' => 'Clear any category', - 'rule_action_set_budget_choice' => 'Set budget to..', - 'rule_action_clear_budget_choice' => 'Clear any budget', - 'rule_action_add_tag_choice' => '新增標籤…', - 'rule_action_remove_tag_choice' => '移除標籤…', - 'rule_action_remove_all_tags_choice' => '移除所有標籤', - 'rule_action_set_description_choice' => '把描述設置為…', - 'rule_action_append_description_choice' => '描述後加上…', - 'rule_action_prepend_description_choice' => '描述前加上…', - - // tags - 'store_new_tag' => '儲存新的標籤', - 'update_tag' => '更新標籤', - 'no_location_set' => 'No location set.', - 'meta_data' => 'Meta data', - 'location' => 'Location', - - // preferences - 'pref_home_screen_accounts' => 'Home screen accounts', - 'pref_home_screen_accounts_help' => 'Which accounts should be displayed on the home page?', - 'pref_view_range' => 'View range', - 'pref_view_range_help' => 'Some charts are automatically grouped in periods. What period would you prefer?', - 'pref_1D' => 'One day', - 'pref_1W' => 'One week', - 'pref_1M' => 'One month', - 'pref_3M' => 'Three months (quarter)', - 'pref_6M' => 'Six months', - 'pref_1Y' => 'One year', - 'pref_languages' => 'Languages', - 'pref_languages_help' => 'Firefly III supports several languages. Which one do you prefer?', - 'pref_custom_fiscal_year' => 'Fiscal year settings', - 'pref_custom_fiscal_year_label' => 'Enabled', - 'pref_custom_fiscal_year_help' => 'In countries that use a financial year other than January 1 to December 31, you can switch this on and specify start / end days of the fiscal year', - 'pref_fiscal_year_start_label' => 'Fiscal year start date', - 'pref_two_factor_auth' => '雙重身份驗證', - 'pref_two_factor_auth_help' => '當您啟用二步驗證 (也稱為雙重身份驗證) 時,你的帳戶安全性將會更上一層樓。你需要以您知道的東西(密碼)和你擁有的東西(驗證碼)來進行登錄。驗證碼是由您的手機上的應用程式生成的,如 Authy 或 Google Authenticator 。', - 'pref_enable_two_factor_auth' => '啟用雙重身份驗證', - 'pref_two_factor_auth_disabled' => '成功刪除和禁用雙重身份驗證', - 'pref_two_factor_auth_remove_it' => '別忘了從你的身份驗證程式(例如 Authy 或 Google Authenticator)中刪除帳戶 !', - 'pref_two_factor_auth_code' => '驗證代碼', - 'pref_two_factor_auth_code_help' => '請以你的手機上的身份驗證應用程式(例如 Authy 或 Google Authenticator)掃描 QR 代碼,然後輸入其所生成的代碼。', - 'pref_two_factor_auth_reset_code' => '重置驗證代碼', - 'pref_two_factor_auth_remove_code' => '刪除驗證代碼', - 'pref_two_factor_auth_remove_will_disable' => '(這也會禁用雙重身份驗證)', - 'pref_save_settings' => 'Save settings', - 'saved_preferences' => 'Preferences saved!', - 'preferences_general' => 'General', - 'preferences_frontpage' => 'Home screen', - 'preferences_security' => 'Security', - 'preferences_layout' => 'Layout', - 'pref_home_show_deposits' => 'Show deposits on the home screen', - 'pref_home_show_deposits_info' => 'The home screen already shows your expense accounts. Should it also show your revenue accounts?', - 'pref_home_do_show_deposits' => 'Yes, show them', - 'successful_count' => 'of which :count successful', - 'transaction_page_size_title' => 'Page size', - 'transaction_page_size_help' => 'Any list of transactions shows at most this many transactions', - 'transaction_page_size_label' => 'Page size', - 'between_dates' => '(:start and :end)', - 'pref_optional_fields_transaction' => 'Optional fields for transactions', - 'pref_optional_fields_transaction_help' => 'By default not all fields are enabled when creating a new transaction (because of the clutter). Below, you can enable these fields if you think they could be useful for you. Of course, any field that is disabled, but already filled in, will be visible regardless of the setting.', - 'optional_tj_date_fields' => 'Date fields', - 'optional_tj_business_fields' => 'Business fields', - 'optional_tj_attachment_fields' => 'Attachment fields', - 'pref_optional_tj_interest_date' => 'Interest date', - 'pref_optional_tj_book_date' => 'Book date', - 'pref_optional_tj_process_date' => 'Processing date', - 'pref_optional_tj_due_date' => '到期日', - 'pref_optional_tj_payment_date' => 'Payment date', - 'pref_optional_tj_invoice_date' => 'Invoice date', - 'pref_optional_tj_internal_reference' => 'Internal reference', - 'pref_optional_tj_notes' => 'Notes', - 'pref_optional_tj_attachments' => 'Attachments', - 'optional_field_meta_dates' => 'Dates', - 'optional_field_meta_business' => 'Business', - 'optional_field_attachments' => 'Attachments', - 'optional_field_meta_data' => 'Optional meta data', - - - // profile: - 'change_your_password' => 'Change your password', - 'delete_account' => 'Delete account', - 'current_password' => 'Current password', - 'new_password' => 'New password', - 'new_password_again' => 'New password (again)', - 'delete_your_account' => 'Delete your account', - 'delete_your_account_help' => 'Deleting your account will also delete any accounts, transactions, anything you might have saved into Firefly III. It\'ll be GONE.', - 'delete_your_account_password' => 'Enter your password to continue.', - 'password' => 'Password', - 'are_you_sure' => 'Are you sure? You cannot undo this.', - 'delete_account_button' => 'DELETE your account', - 'invalid_current_password' => 'Invalid current password!', - 'password_changed' => 'Password changed!', - 'should_change' => 'The idea is to change your password.', - 'invalid_password' => 'Invalid password!', - - - // attachments - 'nr_of_attachments' => 'One attachment|:count attachments', - 'attachments' => 'Attachments', - 'edit_attachment' => 'Edit attachment ":name"', - 'update_attachment' => 'Update attachment', - 'delete_attachment' => 'Delete attachment ":name"', - 'attachment_deleted' => 'Deleted attachment ":name"', - 'attachment_updated' => 'Updated attachment ":name"', - 'upload_max_file_size' => 'Maximum file size: :size', - - // tour: - 'prev' => 'Prev', - 'next' => 'Next', - 'end-tour' => 'End tour', - 'pause' => 'Pause', - - // transaction index - 'title_expenses' => 'Expenses', - 'title_withdrawal' => 'Expenses', - 'title_revenue' => 'Revenue / income', - 'title_deposit' => 'Revenue / income', - 'title_transfer' => 'Transfers', - 'title_transfers' => 'Transfers', - - // create new stuff: - 'create_new_withdrawal' => 'Create new withdrawal', - 'create_new_deposit' => 'Create new deposit', - 'create_new_transfer' => 'Create new transfer', - 'create_new_asset' => '建立新的資產帳戶', - 'create_new_expense' => 'Create new expense account', - 'create_new_revenue' => 'Create new revenue account', - 'create_new_piggy_bank' => 'Create new piggy bank', - 'create_new_bill' => '建立新賬單', - - // currencies: - 'create_currency' => 'Create a new currency', - 'store_currency' => 'Store new currency', - 'update_currency' => 'Update currency', - 'new_default_currency' => ':name is now the default currency.', - 'cannot_delete_currency' => 'Cannot delete :name because it is still in use.', - 'deleted_currency' => 'Currency :name deleted', - 'created_currency' => 'Currency :name created', - 'updated_currency' => 'Currency :name updated', - 'ask_site_owner' => 'Please ask :owner to add, remove or edit currencies.', - 'currencies_intro' => 'Firefly III supports various currencies which you can set and enable here.', - 'make_default_currency' => 'make default', - 'default_currency' => 'default', - - // new user: - 'submit' => 'Submit', - 'getting_started' => 'Getting started', - 'to_get_started' => '請輸入你的銀行名稱和帳戶餘額,以開始使用 Firefly︰', - 'savings_balance_text' => '如果你有儲蓄帳戶的話,請輸入你的儲蓄帳戶當前的餘額︰', - 'cc_balance_text' => '如果你有信用卡,請輸入你的信用卡限額。', - 'stored_new_account_new_user' => 'Yay! Your new account has been stored.', - 'stored_new_accounts_new_user' => 'Yay! Your new accounts have been stored.', - - // forms: - 'mandatoryFields' => 'Mandatory fields', - 'optionalFields' => 'Optional fields', - 'options' => 'Options', - - // budgets: - 'create_new_budget' => 'Create a new budget', - 'store_new_budget' => 'Store new budget', - 'stored_new_budget' => 'Stored new budget ":name"', - 'available_between' => 'Available between :start and :end', - 'transactionsWithoutBudget' => 'Expenses without budget', - 'transactions_no_budget' => 'Expenses without budget between :start and :end', - 'spent_between' => 'Spent between :start and :end', - 'createBudget' => 'New budget', - 'inactiveBudgets' => 'Inactive budgets', - 'without_budget_between' => 'Transactions without a budget between :start and :end', - 'budget_in_month' => ':name in :month', - 'delete_budget' => 'Delete budget ":name"', - 'deleted_budget' => 'Deleted budget ":name"', - 'edit_budget' => 'Edit budget ":name"', - 'updated_budget' => 'Updated budget ":name"', - 'update_amount' => 'Update amount', - 'update_budget' => 'Update budget', - 'update_budget_amount_range' => 'Update (expected) available amount between :start and :end', - - // bills: - 'matching_on' => 'Matching on', - 'between_amounts' => 'between :low and :high.', - 'repeats' => 'Repeats', - 'connected_journals' => 'Connected transactions', - 'auto_match_on' => 'Automatically matched by Firefly', - 'auto_match_off' => 'Not automatically matched by Firefly', - 'next_expected_match' => 'Next expected match', - 'delete_bill' => '刪除賬單 ":name"', - 'deleted_bill' => '成功刪除賬單 ":name"', - 'edit_bill' => '編輯賬單 ":name"', - 'more' => 'More', - 'rescan_old' => 'Rescan old transactions', - 'update_bill' => '更新賬單', - 'updated_bill' => '更新了帳單 ":name"', - 'store_new_bill' => '儲存新的賬單', - 'stored_new_bill' => '儲存了新的賬單 ":name"', - 'cannot_scan_inactive_bill' => 'Inactive bills cannot be scanned.', - 'rescanned_bill' => 'Rescanned everything.', - 'bill_date_little_relevance' => 'Firefly 只會使用這個日期的日子部分。如果你的賬單的發出日子每月並不固定,輸入當月第一日就可以了。', - 'average_bill_amount_year' => '平均賬單金額 (:year)', - 'average_bill_amount_overall' => '平均賬單金額 (總計)', - - // accounts: - 'details_for_asset' => '資產帳戶的詳細資訊 ":name"', - 'details_for_expense' => 'Details for expense account ":name"', - 'details_for_revenue' => 'Details for revenue account ":name"', - 'details_for_cash' => 'Details for cash account ":name"', - 'store_new_asset_account' => '儲存新的資產帳戶', - 'store_new_expense_account' => 'Store new expense account', - 'store_new_revenue_account' => 'Store new revenue account', - 'edit_asset_account' => '編輯資產帳戶 ":name"', - 'edit_expense_account' => 'Edit expense account ":name"', - 'edit_revenue_account' => 'Edit revenue account ":name"', - 'delete_asset_account' => '刪除資產帳戶 ":name"', - 'delete_expense_account' => 'Delete expense account ":name"', - 'delete_revenue_account' => 'Delete revenue account ":name"', - 'asset_deleted' => '成功刪除資產帳戶 ":name"', - 'expense_deleted' => 'Successfully deleted expense account ":name"', - 'revenue_deleted' => 'Successfully deleted revenue account ":name"', - 'update_asset_account' => '更新資產帳戶資訊', - 'update_expense_account' => 'Update expense account', - 'update_revenue_account' => 'Update revenue account', - 'make_new_asset_account' => '建立新的資產帳戶', - 'make_new_expense_account' => 'Create a new expense account', - 'make_new_revenue_account' => 'Create a new revenue account', - 'asset_accounts' => '資產帳戶', - 'expense_accounts' => 'Expense accounts', - 'revenue_accounts' => 'Revenue accounts', - 'cash_accounts' => 'Cash accounts', - 'Cash account' => 'Cash account', - 'account_type' => 'Account type', - 'save_transactions_by_moving' => 'Save these transaction(s) by moving them to another account:', - 'stored_new_account' => 'New account ":name" stored!', - 'updated_account' => 'Updated account ":name"', - 'credit_card_options' => 'Credit card options', - - // categories: - 'new_category' => 'New category', - 'create_new_category' => 'Create a new category', - 'without_category' => 'Without a category', - 'update_category' => 'Update category', - 'updated_category' => 'Updated category ":name"', - 'categories' => 'Categories', - 'edit_category' => 'Edit category ":name"', - 'no_category' => '(no category)', - 'category' => 'Category', - 'delete_category' => 'Delete category ":name"', - 'deleted_category' => 'Deleted category ":name"', - 'store_category' => 'Store new category', - 'stored_category' => 'Stored new category ":name"', - 'without_category_between' => 'Without category between :start and :end', - - // transactions: - 'update_withdrawal' => 'Update withdrawal', - 'update_deposit' => 'Update deposit', - 'update_transfer' => 'Update transfer', - 'updated_withdrawal' => '成功更新提款 ":description"', - 'updated_deposit' => '成功更新存款 ":description"', - 'updated_transfer' => '成功更新轉帳 ":description"', - 'delete_withdrawal' => '刪除提款 ":description"', - 'delete_deposit' => '刪除存款 ":description"', - 'delete_transfer' => '刪除轉帳 ":description"', - 'deleted_withdrawal' => '成功刪除提款 ":description"', - 'deleted_deposit' => '成功刪除存款 ":description"', - 'deleted_transfer' => '成功刪除轉帳 ":description"', - 'stored_journal' => '成功建立交易 ":description"', - 'select_transactions' => 'Select transactions', - 'stop_selection' => 'Stop selecting transactions', - 'edit_selected' => 'Edit selected', - 'delete_selected' => 'Delete selected', - 'mass_delete_journals' => 'Delete a number of transactions', - 'mass_edit_journals' => 'Edit a number of transactions', - 'cannot_edit_other_fields' => 'You cannot mass-edit other fields than the ones here, because there is no room to show them. Please follow the link and edit them by one-by-one, if you need to edit these fields.', - 'perm-delete-many' => 'Deleting many items in one go can be very disruptive. Please be cautious.', - 'mass_deleted_transactions_success' => 'Deleted :amount transaction(s).', - 'mass_edited_transactions_success' => 'Updated :amount transaction(s)', - - - // new user: - 'welcome' => 'Welcome to Firefly!', - - // home page: - 'yourAccounts' => 'Your accounts', - 'budgetsAndSpending' => 'Budgets and spending', - 'savings' => 'Savings', - 'markAsSavingsToContinue' => '將你的資產帳戶標記為 「儲蓄帳戶」 即可顯示在這裡', - 'createPiggyToContinue' => 'Create piggy banks to fill this panel.', - 'newWithdrawal' => 'New expense', - 'newDeposit' => 'New deposit', - 'newTransfer' => 'New transfer', - 'moneyIn' => 'Money in', - 'moneyOut' => 'Money out', - 'billsToPay' => '待付賬單', - 'billsPaid' => '已付賬單', - 'divided' => 'divided', - 'toDivide' => 'left to divide', - - // menu and titles, should be recycled as often as possible: - 'currency' => 'Currency', - 'preferences' => 'Preferences', - 'logout' => 'Logout', - 'searchPlaceholder' => 'Search...', - 'dashboard' => 'Dashboard', - 'currencies' => 'Currencies', - 'accounts' => 'Accounts', - 'Asset account' => '資產帳戶', - 'Default account' => '資產帳戶', - 'Expense account' => 'Expense account', - 'Revenue account' => 'Revenue account', - 'Initial balance account' => '初始帳戶', - 'budgets' => 'Budgets', - 'tags' => '標籤', - 'reports' => 'Reports', - 'transactions' => 'Transactions', - 'expenses' => 'Expenses', - 'income' => 'Revenue / income', - 'transfers' => 'Transfers', - 'moneyManagement' => 'Money management', - 'piggyBanks' => 'Piggy banks', - 'bills' => '賬單', - 'withdrawal' => 'Withdrawal', - 'deposit' => 'Deposit', - 'account' => 'Account', - 'transfer' => 'Transfer', - 'Withdrawal' => 'Withdrawal', - 'Deposit' => 'Deposit', - 'Transfer' => 'Transfer', - 'bill' => '賬單', - 'yes' => 'Yes', - 'no' => 'No', - 'amount' => 'Amount', - 'overview' => 'Overview', - 'saveOnAccount' => 'Save on account', - 'unknown' => 'Unknown', - 'daily' => 'Daily', - 'monthly' => 'Monthly', - 'profile' => 'Profile', - 'errors' => 'Errors', - - // reports: - 'report_default' => 'Default financial report for :start until :end', - 'report_audit' => 'Transaction history overview for :start until :end', - 'quick_link_reports' => 'Quick links', - 'quick_link_default_report' => 'Default financial report', - 'quick_link_audit_report' => 'Transaction history overview', - 'report_this_month_quick' => 'Current month, all accounts', - 'report_this_year_quick' => 'Current year, all accounts', - 'report_this_fiscal_year_quick' => 'Current fiscal year, all accounts', - 'report_all_time_quick' => 'All-time, all accounts', - 'reports_can_bookmark' => 'Remember that reports can be bookmarked.', - 'incomeVsExpenses' => 'Income vs. expenses', - 'accountBalances' => '帳戶餘額', - 'balanceStartOfYear' => '年初結餘', - 'balanceEndOfYear' => '年末結餘', - 'balanceStartOfMonth' => '月初結餘', - 'balanceEndOfMonth' => '月未結餘', - 'balanceStart' => '期間之初的結餘', - 'balanceEnd' => '期間之未的結餘', - 'reportsOwnAccounts' => 'Reports for your own accounts', - 'reportsOwnAccountsAndShared' => 'Reports for your own accounts and shared accounts', - 'splitByAccount' => '以帳號來分割', - 'balancedByTransfersAndTags' => 'Balanced by transfers and tags', - 'coveredWithTags' => 'Covered with tags', - 'leftUnbalanced' => 'Left unbalanced', - 'expectedBalance' => '預期餘額', - 'outsideOfBudgets' => 'Outside of budgets', - 'leftInBudget' => 'Left in budget', - 'sumOfSums' => 'Sum of sums', - 'noCategory' => '(no category)', - 'notCharged' => 'Not charged (yet)', - 'inactive' => 'Inactive', - 'active' => 'Active', - 'difference' => 'Difference', - 'in' => 'In', - 'out' => 'Out', - 'topX' => 'top :number', - 'showTheRest' => 'Show everything', - 'hideTheRest' => 'Show only the top :number', - 'sum_of_year' => 'Sum of year', - 'sum_of_years' => 'Sum of years', - 'average_of_year' => 'Average of year', - 'average_of_years' => 'Average of years', - 'categories_earned_in_year' => 'Categories (by earnings)', - 'categories_spent_in_year' => 'Categories (by spendings)', - 'report_type' => 'Report type', - 'report_type_default' => 'Default financial report', - 'report_type_audit' => 'Transaction history overview (audit)', - 'report_type_meta-history' => '類別、 預算與賬單的概覽', - 'more_info_help' => 'More information about these types of reports can be found in the help pages. Press the (?) icon in the top right corner.', - 'report_included_accounts' => 'Included accounts', - 'report_date_range' => 'Date range', - 'report_include_help' => 'In all cases, transfers to shared accounts count as expenses, and transfers from shared accounts count as income.', - 'report_preset_ranges' => 'Pre-set ranges', - 'shared' => 'Shared', - 'fiscal_year' => 'Fiscal year', - 'income_entry' => 'Income from account ":name" between :start and :end', - 'expense_entry' => 'Expenses to account ":name" between :start and :end', - 'category_entry' => 'Expenses in category ":name" between :start and :end', - 'budget_spent_amount' => 'Expenses in budget ":budget" between :start and :end', - 'balance_amount' => '與 :start 和 :end 之間由帳號 ":account" 支付的預算 ":budget" 的支出', - 'no_audit_activity' => 'No activity was recorded on account :account_name between :start and :end.', - 'audit_end_balance' => ':account_name 在 :end 後的餘額是: :balance', - - // charts: - 'chart' => 'Chart', - 'dayOfMonth' => 'Day of the month', - 'month' => 'Month', - 'budget' => 'Budget', - 'spent' => 'Spent', - 'earned' => 'Earned', - 'overspent' => 'Overspent', - 'left' => 'Left', - 'no_budget' => '(no budget)', - 'maxAmount' => 'Maximum amount', - 'minAmount' => 'Minumum amount', - 'billEntry' => 'Current bill entry', - 'name' => 'Name', - 'date' => 'Date', - 'paid' => 'Paid', - 'unpaid' => 'Unpaid', - 'day' => 'Day', - 'budgeted' => 'Budgeted', - 'period' => 'Period', - 'balance' => '餘額', - 'summary' => 'Summary', - 'sum' => 'Sum', - 'average' => 'Average', - 'balanceFor' => ':name 的餘額', - - // piggy banks: - 'add_money_to_piggy' => 'Add money to piggy bank ":name"', - 'piggy_bank' => 'Piggy bank', - 'new_piggy_bank' => 'Create new piggy bank', - 'store_piggy_bank' => 'Store new piggy bank', - 'stored_piggy_bank' => 'Store new piggy bank ":name"', - 'account_status' => 'Account status', - 'left_for_piggy_banks' => 'Left for piggy banks', - 'sum_of_piggy_banks' => 'Sum of piggy banks', - 'saved_so_far' => 'Saved so far', - 'left_to_save' => 'Left to save', - 'add_money_to_piggy_title' => 'Add money to piggy bank ":name"', - 'remove_money_from_piggy_title' => 'Remove money from piggy bank ":name"', - 'add' => 'Add', - - 'remove' => 'Remove', - 'max_amount_add' => 'The maximum amount you can add is', - 'max_amount_remove' => 'The maximum amount you can remove is', - 'update_piggy_button' => 'Update piggy bank', - 'update_piggy_title' => 'Update piggy bank ":name"', - 'updated_piggy_bank' => 'Updated piggy bank ":name"', - 'details' => 'Details', - 'events' => 'Events', - 'target_amount' => 'Target amount', - 'start_date' => 'Start date', - 'target_date' => '儲蓄目標日期', - 'no_target_date' => '沒有儲蓄目標日期', - 'todo' => 'to do', - 'table' => 'Table', - 'piggy_bank_not_exists' => 'Piggy bank no longer exists.', - 'add_any_amount_to_piggy' => 'Add money to this piggy bank to reach your target of :amount.', - 'add_set_amount_to_piggy' => 'Add :amount to fill this piggy bank on :date', - 'delete_piggy_bank' => 'Delete piggy bank ":name"', - 'cannot_add_amount_piggy' => 'Could not add :amount to ":name".', - 'deleted_piggy_bank' => 'Deleted piggy bank ":name"', - 'added_amount_to_piggy' => 'Added :amount to ":name"', - 'removed_amount_from_piggy' => 'Removed :amount from ":name"', - 'cannot_remove_amount_piggy' => 'Could not remove :amount from ":name".', - - // tags - 'regular_tag' => '只是一個普通的標籤。', - 'balancing_act' => '這標籤最多會有兩項交易:一個支出和一個轉帳,而他們會互相抵消。', - 'advance_payment' => '這種標籤容許一個支出和多個存款以抵銷原本的支出。', - 'delete_tag' => '刪除標籤 ":tag"', - 'deleted_tag' => '刪除了標籤 ":tag"', - 'new_tag' => '建立新標籤', - 'edit_tag' => '編輯標籤 ":tag"', - 'updated_tag' => '更新了標籤 ":tag"', - 'created_tag' => '成功創建標籤 ":tag" !', - 'no_year' => 'No year set', - 'no_month' => 'No month set', - 'tag_title_nothing' => '預設標籤', - 'tag_title_balancingAct' => '抵銷行為標籤', - 'tag_title_advancePayment' => '預付款標籤', - 'tags_introduction' => '標籤通常是一些方便分類的短語,例如 很貴賬單 或者 派對用品。 在 Firefly III 裡,標籤可以有不同的屬性,例如日期、描述、或位置。這能方便你更有意義地把交易分類。例如,你可以建立一個 與朋友一起吃聖誕大餐的標籤,並加上餐廳的資訊。這類的標籤標籤是 「即棄」 的,你只會在一次事件中使用它,而標籤可能有多個交易。', - 'tags_group' => '標籤可以把交易進行分組,容許你記錄報銷(你為其他人墊支),或者其他「抵銷行為」——例如分期付款(買電視機的時候),或者支出和收入會互相抵銷(以儲蓄買東西)的交易。當然,你也可以建立普通的標籤,隨你喜歡。', - 'tags_start' => '要開始使用,請新增標籤或在建立新交易紀錄時輸入標籤。', - - 'transaction_journal_information' => 'Transaction information', - 'transaction_journal_meta' => 'Meta information', - 'total_amount' => 'Total amount', - - // administration - 'administration' => 'Administration', - 'user_administration' => 'User administration', - 'list_all_users' => 'All users', - 'all_users' => 'All users', - 'all_blocked_domains' => 'All blocked domains', - 'blocked_domains' => 'Blocked domains', - 'no_domains_banned' => 'No domains blocked', - 'all_user_domains' => 'All user email address domains', - 'all_domains_is_filtered' => 'This list does not include already blocked domains.', - 'domain_now_blocked' => 'Domain :domain is now blocked', - 'domain_now_unblocked' => 'Domain :domain is now unblocked', - 'manual_block_domain' => 'Block a domain by hand', - 'block_domain' => 'Block domain', - 'no_domain_filled_in' => 'No domain filled in', - 'domain_already_blocked' => 'Domain :domain is already blocked', - 'domain_is_now_blocked' => 'Domain :domain is now blocked', - 'instance_configuration' => 'Configuration', - 'firefly_instance_configuration' => 'Configuration options for Firefly III', - 'setting_single_user_mode' => 'Single user mode', - 'setting_single_user_mode_explain' => 'By default, Firefly III only accepts one (1) registration: you. This is a security measure, preventing others from using your instance unless you allow them to. Future registrations are blocked. When you uncheck this box, others can use your instance as wel, assuming they can reach it (when it is connected to the internet).', - 'store_configuration' => 'Store configuration', - 'single_user_administration' => 'User administration for :email', - 'hidden_fields_preferences' => 'Not all fields are visible right now. You must enable them in your settings.', - 'user_data_information' => 'User data', - 'user_information' => 'User information', - 'total_size' => 'total size', - 'budget_or_budgets' => 'budget(s)', - 'budgets_with_limits' => 'budget(s) with configured amount', - 'rule_or_rules' => 'rule(s)', - 'rulegroup_or_groups' => 'rule group(s)', - - // split a transaction: - 'transaction_meta_data' => 'Transaction meta-data', - 'transaction_dates' => 'Transaction dates', - 'splits' => '分割', - 'split_title_withdrawal' => '分割你的新提款', - 'split_intro_one_withdrawal' => 'Firefly 容許 "分割" 一個提款。', - 'split_intro_two_withdrawal' => 'It means that the amount of money you\'ve spent is divided between several destination expense accounts, budgets or categories.', - 'split_intro_three_withdrawal' => '例如:你可以分割你一共 :total 的日用品,所以你可以由你的「日用品」預算支付 :split_one 和由你的「香煙」預算中支付 :split_two 。', - 'split_table_intro_withdrawal' => 'Split your withdrawal in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', - 'store_splitted_withdrawal' => 'Store splitted withdrawal', - 'update_splitted_withdrawal' => 'Update splitted withdrawal', - 'split_title_deposit' => 'Split your new deposit', - 'split_intro_one_deposit' => 'Firefly supports the "splitting" of a deposit.', - 'split_intro_two_deposit' => 'It means that the amount of money you\'ve earned is divided between several source revenue accounts or categories.', - 'split_intro_three_deposit' => 'For example: you could split your :total salary so you get :split_one as your base salary and :split_two as a reimbursment for expenses made.', - 'split_table_intro_deposit' => 'Split your deposit in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', - 'store_splitted_deposit' => 'Store splitted deposit', - 'split_title_transfer' => 'Split your new transfer', - 'split_intro_one_transfer' => 'Firefly supports the "splitting" of a transfer.', - 'split_intro_two_transfer' => 'It means that the amount of money you\'re moving is divided between several categories or piggy banks.', - 'split_intro_three_transfer' => 'For example: you could split your :total move so you get :split_one in one piggy bank and :split_two in another.', - 'split_table_intro_transfer' => 'Split your transfer in as many things as you want. By default the transaction will not split, there is just one entry. Add as many splits as you want to, below. Remember that you should not deviate from your total amount. If you do, Firefly will warn you but not correct you.', - 'store_splitted_transfer' => 'Store splitted transfer', - 'add_another_split' => 'Add another split', - 'split-transactions' => 'Split transactions', - 'split-new-transaction' => 'Split a new transaction', - 'do_split' => 'Do a split', - 'split_this_withdrawal' => 'Split this withdrawal', - 'split_this_deposit' => 'Split this deposit', - 'split_this_transfer' => 'Split this transfer', - 'cannot_edit_multiple_source' => '你不能修改描述為 ":description" 的分割交易 #:id 因為他有多個來源帳號。', - 'cannot_edit_multiple_dest' => '你不能修改描述為 ":description" 的分割交易 #:id 因為他有多個目標帳號。', - 'no_edit_multiple_left' => 'You have selected no valid transactions to edit.', - - // import - 'configuration_file_help' => 'If you have previously imported data into Firefly III, you may have a configuration file, which will pre-set configuration values for you. For some banks, other users have kindly provided their configuration file.', - 'import_data_index' => 'Index', - 'import_file_type_csv' => 'CSV (comma separated values)', - 'import_file_type_help' => 'Select the type of file you will upload', - 'import_start' => '開始匯入', - 'configure_import' => '進一步調整匯入設定', - 'import_finish_configuration' => 'Finish configuration', - 'settings_for_import' => 'Settings', - 'import_status' => '匯入狀態', - 'import_status_text' => '匯入正在進行中,或即將進行匯入。', - 'import_complete' => '匯入設定完成!', - 'import_complete_text' => '匯入程序已準備妥當。你已完成所有設定。請下載設定檔,當你的匯入出現問題時它將幫上忙。若要執行匯入程序,你可以在您的伺服器上執行以下命令,或運行網頁導入程序。根據您的配置,在伺服器上執行命令或會給你更多的資訊。', - 'import_download_config' => 'Download configuration', - 'import_start_import' => '開始匯入', - 'import_intro_beta' => 'Firefly III 的匯入功能依然在測試階段。很多 Firefly III 的用戶已經成功使用這個功能匯入不同的檔案。儘管這個匯入功能的每個部分都能夠正常運作(我說真的),但是整個功能或者會有點問題。如果你的檔案不能匯入到 Firefly 內,請閱讀這個維基頁面,以方便我修復你所遇到的問題。', - 'import_data' => '匯入資料', - 'import_data_full' => '匯入資料到 Firefly III', - 'import' => '匯入', - 'import_intro_what_it_does' => 'This page allows you to import data into Firefly III. To do so, export data from your bank, or from another financial management system. Upload that file here. Firefly III will convert the data. You need to give it some directions. Please select a file and follow the instructions.', - 'import_intro_import_conf_title' => 'Import "configuration"', - 'import_intro_beta_warning' => 'Warning', - 'import_intro_import_conf_text' => 'As you will discover over the next few pages, this import routine has a lot of settings. These settings are mainly dependent on the bank (or financial management software) your file comes from. There is a good chance somebody else already imported such a file and has shared their configuration file. Please visit the import configuration center to see if there already is a configuration available for your bank or system. If there is, you should download this configuration file and upload it here as well. It will save you a lot of time!', - 'import_file_help' => 'Select your file', - 'import_status_settings_complete' => '匯入已準備妥當,可以開始。', - 'import_status_import_complete' => '匯入已完成。', - 'import_status_import_running' => '匯入正在進行中。請稍候。', - 'import_status_header' => '匯入狀態與進度', - 'import_status_errors' => '匯入錯誤', - 'import_status_report' => '匯入報告', - 'import_finished' => '匯入已完成', - 'import_error_single' => '匯入時發生了一個錯誤。', - 'import_error_multi' => '匯入時發生了一些錯誤。', - 'import_error_fatal' => '匯入時發生了一個錯誤。 請檢查紀錄檔。 錯誤好像是:', - 'import_error_timeout' => '匯入程序似乎已經越時。如果這個錯誤持續,請使用伺服器命令啟動匯入程序。', - 'import_double' => '行 #:row: 這行曾被匯入過,並已儲存在:description。', - 'import_finished_all' => '匯入已完成。請檢查下列的結果。', - 'import_with_key' => '以鍵 \':key\' 作匯入', - - 'import_share_configuration' => 'Please consider downloading your configuration and sharing it at the import configuration center. This will allow other users of Firefly III to import their files more easily.', - - 'import_finished_report' => '匯入已完成。請留意在這行上面的錯誤記錄。這次所匯入的所有交易都已經進行標記,你可以在下面查看。 ', - 'import_finished_link' => '匯入成功的所有交易都可以在標籤 :tag 內找到。', - - -]; diff --git a/resources/lang/zh-TW/form.php b/resources/lang/zh-TW/form.php deleted file mode 100644 index d545b42c72..0000000000 --- a/resources/lang/zh-TW/form.php +++ /dev/null @@ -1,157 +0,0 @@ - '銀行名稱', - 'bank_balance' => '餘額', - 'savings_balance' => '儲蓄帳戶的餘額', - 'credit_card_limit' => '信用卡額度', - 'automatch' => '自動匹配', - 'skip' => '略過', - 'name' => '名稱', - 'active' => '啟用', - 'amount_min' => '最小金額', - 'amount_max' => '最大值', - 'match' => '匹配於', - 'repeat_freq' => '循環週期', - 'journal_currency_id' => '貨幣', - 'journal_amount' => '金額', - 'journal_asset_source_account' => '資產帳戶 (源頭)', - 'journal_source_account_name' => '收入帳戶 (源頭)', - 'journal_source_account_id' => '資產帳戶 (源頭)', - 'account_from_id' => '從帳戶', - 'account_to_id' => '到帳戶', - 'journal_destination_account_id' => '資產帳戶 (目標)', - 'asset_destination_account' => '資產帳戶 (目標)', - 'asset_source_account' => '資產帳戶 (來源)', - 'journal_description' => '描述', - 'note' => 'Notes', - 'split_journal' => '分割此交易', - 'split_journal_explanation' => '分割這個交易為幾個部分', - 'currency' => '貨幣', - 'account_id' => '資產帳戶', - 'budget_id' => '預算', - 'openingBalance' => '開戶金額', - 'tagMode' => '標記模式', - 'tagPosition' => '標籤位置', - 'virtualBalance' => '虛擬金額', - 'longitude_latitude' => '位置', - 'targetamount' => '目標金額', - 'accountRole' => '帳戶角色', - 'openingBalanceDate' => '開戶日期', - 'ccType' => '信用卡付款計畫', - 'ccMonthlyPaymentDate' => '信用卡每月付款日期', - 'piggy_bank_id' => '存錢筒', - 'returnHere' => '回到這裡', - 'returnHereExplanation' => '儲存後,回到這裡創建另一個記錄。', - 'returnHereUpdateExplanation' => '更新後,回到這裡。', - 'description' => '描述', - 'expense_account' => '支出帳戶', - 'revenue_account' => '收入帳戶', - 'amount' => '金額', - 'date' => '日期', - 'interest_date' => '付息日', - 'book_date' => 'Book date', - 'process_date' => '處理日期', - 'category' => '類別', - 'tags' => '標籤', - 'deletePermanently' => '永久刪除', - 'cancel' => '取消', - 'targetdate' => '儲蓄目標日期', - 'tag' => '標籤', - 'under' => '低於', - 'symbol' => 'Symbol', - 'code' => 'Code', - 'iban' => 'IBAN', - 'accountNumber' => '帳戶號碼', - 'has_headers' => '標頭', - 'date_format' => '日期格式', - 'specifix' => 'Bank- or file specific fixes', - 'attachments[]' => '附檔', - 'store_new_withdrawal' => '存儲新提款', - 'store_new_deposit' => '存儲新存款', - 'store_new_transfer' => '存儲新轉帳', - 'add_new_withdrawal' => '新增提款', - 'add_new_deposit' => '新增新存款', - 'add_new_transfer' => 'Add a new transfer', - 'noPiggybank' => '(no piggy bank)', - 'title' => '標題', - 'notes' => '備註', - 'filename' => '檔案名稱', - 'mime' => 'Mime type', - 'size' => 'Size', - 'trigger' => 'Trigger', - 'stop_processing' => 'Stop processing', - 'start_date' => 'Start of range', - 'end_date' => 'End of range', - 'export_start_range' => 'Start of export range', - 'export_end_range' => 'End of export range', - 'export_format' => '檔案格式', - 'include_attachments' => '包括上傳的附件', - 'include_config' => '包括設定檔', - 'include_old_uploads' => '包含導入的資料', - 'accounts' => '從這些帳戶匯出交易記錄', - 'delete_account' => '刪除帳號 ":name"', - 'delete_bill' => '刪除帳單 ":name"', - 'delete_budget' => '刪除預算 ":name"', - 'delete_category' => '刪除類別 ":name"', - 'delete_currency' => '刪除貨幣 ":name"', - 'delete_journal' => '刪除包含描述 ":description" 的交易', - 'delete_attachment' => 'Delete attachment ":name"', - 'delete_rule' => 'Delete rule ":title"', - 'delete_rule_group' => 'Delete rule group ":title"', - 'attachment_areYouSure' => 'Are you sure you want to delete the attachment named ":name"?', - 'account_areYouSure' => 'Are you sure you want to delete the account named ":name"?', - 'bill_areYouSure' => '你確定要刪除賬單 ":name" 嗎?', - 'rule_areYouSure' => 'Are you sure you want to delete the rule titled ":title"?', - 'ruleGroup_areYouSure' => 'Are you sure you want to delete the rule group titled ":title"?', - 'budget_areYouSure' => 'Are you sure you want to delete the budget named ":name"?', - 'category_areYouSure' => 'Are you sure you want to delete the category named ":name"?', - 'currency_areYouSure' => 'Are you sure you want to delete the currency named ":name"?', - 'piggyBank_areYouSure' => 'Are you sure you want to delete the piggy bank named ":name"?', - 'journal_areYouSure' => '你真的要刪除這個描述為 ":description" 的交易嗎?', - 'mass_journal_are_you_sure' => 'Are you sure you want to delete these transactions?', - 'tag_areYouSure' => '你真的要要刪除標籤 ":tag" 嗎?', - 'permDeleteWarning' => 'Deleting stuff from Firely is permanent and cannot be undone.', - 'mass_make_selection' => 'You can still prevent items from being deleted by removing the checkbox.', - 'delete_all_permanently' => 'Delete selected permanently', - 'update_all_journals' => 'Update these transactions', - 'also_delete_transactions' => 'The only transaction connected to this account will be deleted as well.|All :count transactions connected to this account will be deleted as well.', - 'also_delete_rules' => 'The only rule connected to this rule group will be deleted as well.|All :count rules connected to this rule group will be deleted as well.', - 'also_delete_piggyBanks' => 'The only piggy bank connected to this account will be deleted as well.|All :count piggy bank connected to this account will be deleted as well.', - 'bill_keep_transactions' => 'The only transaction connected to this bill will not be deleted.|All :count transactions connected to this bill will spared deletion.', - 'budget_keep_transactions' => 'The only transaction connected to this budget will not be deleted.|All :count transactions connected to this budget will spared deletion.', - 'category_keep_transactions' => 'The only transaction connected to this category will not be deleted.|All :count transactions connected to this category will spared deletion.', - 'tag_keep_transactions' => 'The only transaction connected to this tag will not be deleted.|All :count transactions connected to this tag will spared deletion.', - - // admin - 'domain' => 'Domain', - 'single_user_mode' => 'Single user mode', - - // import - 'import_file' => '匯入檔案', - 'configuration_file' => 'Configuration file', - 'import_file_type' => '匯入檔案類型', - 'csv_comma' => 'A comma (,)', - 'csv_semicolon' => 'A semicolon (;)', - 'csv_tab' => 'A tab (invisible)', - 'csv_delimiter' => 'CSV field delimiter', - 'csv_import_account' => 'Default import account', - 'csv_config' => 'CSV import configuration', - - - 'due_date' => '到期日', - 'payment_date' => 'Payment date', - 'invoice_date' => 'Invoice date', - 'internal_reference' => 'Internal reference', -]; diff --git a/resources/lang/zh-TW/help.php b/resources/lang/zh-TW/help.php deleted file mode 100644 index 8175c162da..0000000000 --- a/resources/lang/zh-TW/help.php +++ /dev/null @@ -1,33 +0,0 @@ - '歡迎來到 Firefly III', - 'main-content-text' => '來看看這個簡單的教學來學習使用 Firefly III 吧!', - 'sidebar-toggle-title' => '按側欄來建立新的東西', - 'sidebar-toggle-text' => '按一下加號圖案來創建新物件。帳號、交易、任何東西都可以!', - 'account-menu-title' => '所有帳戶', - 'account-menu-text' => '你能在這裡找到你所有的帳戶。', - 'budget-menu-title' => '預算', - 'budget-menu-text' => '本頁可以幫助你管理財產及降低支出。', - 'report-menu-title' => '報表', - 'report-menu-text' => '如果你需要一個財務狀況的簡報,來看看這個吧。', - 'transaction-menu-title' => '交易', - 'transaction-menu-text' => '你可以在這裡找到所有交易記錄。', - 'option-menu-title' => '設定', - 'option-menu-text' => '相當不言而喻吧。', - 'main-content-end-title' => '完', - 'main-content-end-text' => '每一頁在右上方有一個小問號。按一下它可以取得與頁面相關説明。', - 'index' => '首頁', - 'home' => '首頁', -]; diff --git a/resources/lang/zh-TW/list.php b/resources/lang/zh-TW/list.php deleted file mode 100644 index cf1a3365bf..0000000000 --- a/resources/lang/zh-TW/list.php +++ /dev/null @@ -1,88 +0,0 @@ - '按鈕', - 'icon' => '圖標', - 'create_date' => '建立於', - 'update_date' => '更新於', - 'balance_before' => '交易前餘額', - 'balance_after' => '交易後餘額', - 'name' => '名稱', - 'role' => '角色', - 'currentBalance' => '目前餘額', - 'active' => '是否有效?', - 'lastActivity' => '最後的活動', - 'balanceDiff' => ':start 和 :end 之間的餘額差', - 'matchedOn' => '匹配於', - 'matchesOn' => '匹配於', - 'account_type' => '帳戶類型', - 'created_at' => 'Created at', - 'new_balance' => '新餘額', - 'account' => '帳戶', - 'matchingAmount' => '金額', - 'lastMatch' => '最後出現', - 'split_number' => '分割編號 #', - 'destination' => '到', - 'source' => '來源', - 'expectedMatch' => 'Expected match', - 'automatch' => '自動匹配?', - 'repeat_freq' => '重複', - 'description' => '描述', - 'amount' => '金額', - 'internal_reference' => 'Internal reference', - 'date' => '日期', - 'interest_date' => '付息日', - 'book_date' => 'Book date', - 'process_date' => '處理日期', - 'due_date' => '到期日', - 'payment_date' => '付款日期', - 'invoice_date' => '發票日期', - 'interal_reference' => '內部參考', - 'notes' => '備註', - 'from' => '從', - 'piggy_bank' => '存錢筒', - 'to' => '至', - 'budget' => '預算', - 'category' => '類別', - 'bill' => '賬單', - 'withdrawal' => '取款', - 'deposit' => '存款', - 'transfer' => '轉帳', - 'type' => '類型', - 'completed' => '已完成', - 'iban' => 'IBAN', - 'paid_current_period' => '在這期間已付', - 'email' => '電子郵件', - 'registered_at' => '註冊於', - 'is_activated' => '已經啟動', - 'is_blocked' => '被阻止', - 'is_admin' => '是管理員', - 'has_two_factor' => '有雙重身份驗證 (2FA)', - 'confirmed_from' => 'Confirmed from', - 'registered_from' => 'Registered from', - 'blocked_code' => 'Block code', - 'domain' => 'Domain', - 'registration_attempts' => 'Registration attempts', - 'source_account' => 'Source account', - 'destination_account' => 'Destination account', - - 'accounts_count' => 'Number of accounts', - 'journals_count' => 'Number of journals', - 'attachments_count' => 'Number of attachments', - 'bills_count' => 'Number of bills', - 'categories_count' => 'Number of categories', - 'export_jobs_count' => 'Number of export jobs', - 'import_jobs_count' => 'Number of import jobs', - 'budget_count' => 'Number of budgets', - 'rule_and_groups_count' => 'Number of rules and rule groups', - 'tags_count' => 'Number of tags', -]; diff --git a/resources/lang/zh-TW/pagination.php b/resources/lang/zh-TW/pagination.php deleted file mode 100644 index d87b6631ad..0000000000 --- a/resources/lang/zh-TW/pagination.php +++ /dev/null @@ -1,17 +0,0 @@ - '« 上一頁', - 'next' => '下一頁 »', - -]; diff --git a/resources/lang/zh-TW/passwords.php b/resources/lang/zh-TW/passwords.php deleted file mode 100644 index 4f28fe3fb0..0000000000 --- a/resources/lang/zh-TW/passwords.php +++ /dev/null @@ -1,19 +0,0 @@ - '密碼至少需要六個字元,並與確認欄中的密碼相同。', - 'user' => '我們找不到使用該電郵地址的用戶。', - 'token' => '該密碼重置碼已經失效。', - 'sent' => '我們已經將密碼重置連結發送至您的電郵!', - 'reset' => '你的密碼已經被重置!', - 'blocked' => '好一個嘗試。', -]; diff --git a/resources/lang/zh-TW/validation.php b/resources/lang/zh-TW/validation.php deleted file mode 100644 index e0fbc90855..0000000000 --- a/resources/lang/zh-TW/validation.php +++ /dev/null @@ -1,87 +0,0 @@ - '這不是有效的 IBAN。', - 'unique_account_number_for_user' => '此帳號號碼已經存在。', - 'rule_trigger_value' => '此值不能用於所選擇的事件。', - 'rule_action_value' => '此值不能用於所選擇的動作。', - 'invalid_domain' => '基於安全理由,你無法使用此域名註冊。', - 'file_already_attached' => '檔案 ":name" 已附加到該物件上。', - 'file_attached' => '已成功上傳檔案 ":name"。', - 'file_invalid_mime' => '檔案 ":name" 的類型為 ":mime",並不容許上載此類型的檔案。', - 'file_too_large' => '檔案 ":name" 過大。', - 'belongs_to_user' => ':attribute 的值是未知的。', - 'accepted' => ':attribute 必須被接受。', - 'active_url' => ':attribute 不是有效的URL。', - 'after' => ':attribute 必須是一個在 :date 之後的日期。', - 'alpha' => ':attribute 只允許包含字母。', - 'alpha_dash' => ':attribute 只允許數字,字母,和下劃線。', - 'alpha_num' => ':attribute 只允許包含數字和字母。', - 'array' => ':attribute 必須是一個陣列。', - 'unique_for_user' => ':attribute 已存在。', - 'before' => ':attribute 必須是一個在 :date 之前的日期。', - 'unique_object_for_user' => '這個名稱已被使用。', - 'unique_account_for_user' => '這個帳號名稱已被使用。', - 'between.numeric' => ':attribute 必須在 :min 和 :max 之間。', - 'between.file' => ':attribute 必須在 :min kB到 :max kB之間。', - 'between.string' => ':attribute 包含的字符數量必須在 :min 到 :max 之間。', - 'between.array' => ':attribute 的數目必須在 :min 到 :max 之間。', - 'boolean' => ':attribute 必須為 true 或 false。', - 'confirmed' => ':attribute 的屬性不相符', - 'date' => ':attribute 不是有效的日期。', - 'date_format' => ':attribute 不符合格式 :format 。', - 'different' => ':attribute 和 :other 不能相同。', - 'digits' => ':attribute 必須是 :digits 位數字。', - 'digits_between' => ':attribute 必須在 :min 位和 :max 位數字之間。', - 'email' => ':attribute 必須是一個有效的電子郵件地址。', - 'filled' => ':attribute 欄位是必填的。', - 'exists' => '所選的 :attribute 無效。', - 'image' => ':attribute 必須是圖片。', - 'in' => '所選的 :attribute 無效。', - 'integer' => ':attribute 必須是整數。', - 'ip' => ':attribute 必須是一個有效的 IP 地址。', - 'json' => ':attribute 必須是一個有效的 JSON 字符串。', - 'max.numeric' => ':attribute 不能大於 :max。', - 'max.file' => ':attribute 不能大於 :max kB。', - 'max.string' => ':attribute 不能大於 :max 字元。', - 'max.array' => ':attribute 的數量不能超過 :max 個。', - 'mimes' => ':attribute 的文件類型必須是 :values 。', - 'min.numeric' => ':attribute 至少需要 :min。', - 'min.file' => ':attribute 大小至少為 :min KB。', - 'min.string' => ':attribute 最少需要有 :min 個字符。', - 'min.array' => ':attribute 至少需要有 :min 項。', - 'not_in' => '所選的 :attribute 無效。', - 'numeric' => ':attribute 必須是數字。', - 'regex' => ':attribute 格式無效。', - 'required' => ':attribute 欄位是必填的。', - 'required_if' => ':attribute 欄位在 :other 是 :value 時是必填的。', - 'required_unless' => '除非 :other 是 :value ,否則 :attribute 是必填的。', - 'required_with' => '當 :values​​ 存在時, :attribute 是必填的。', - 'required_with_all' => '當 :values​​ 存在時, :attribute 是必填的。', - 'required_without' => '當 :values​​ 不存在時, :attribute 是必填的。', - 'required_without_all' => '當沒有任何 :values​​ 存在時, :attribute 為必填項。', - 'same' => ':attribute 和 :other 必須匹配。', - 'size.numeric' => ':attribute 必須是 :size 位。', - 'size.file' => ':attribute 必須為 :size KB。', - 'size.string' => ':attribute 必須包含 :size 個字符。', - 'size.array' => ':attribute 必須包含 :size 個項目。', - 'unique' => ':attribute 已經存在。', - 'string' => ':attribute 必須是一個字符串。', - 'url' => ':attribute 格式無效。', - 'timezone' => ':attribute 必須是有效的區域。', - '2fa_code' => ':attribute 格式無效。', - 'dimensions' => 'The :attribute has invalid image dimensions.', - 'distinct' => 'The :attribute field has a duplicate value.', - 'file' => 'The :attribute must be a file.', - 'in_array' => 'The :attribute field does not exist in :other.', - 'present' => 'The :attribute field must be present.', -]; diff --git a/resources/lang/zh_HK/firefly.php b/resources/lang/zh_HK/firefly.php index 4dad596d1f..377f4c2ca3 100644 --- a/resources/lang/zh_HK/firefly.php +++ b/resources/lang/zh_HK/firefly.php @@ -84,7 +84,7 @@ return [ 'destination_accounts' => 'Destination account(s)', 'user_id_is' => 'Your user id is :user', 'field_supports_markdown' => 'This field supports Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', 'expenses_by_category' => 'Expenses by category', @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'New category', diff --git a/resources/lang/zh_HK/form.php b/resources/lang/zh_HK/form.php index 914cc98944..9e644c52f6 100644 --- a/resources/lang/zh_HK/form.php +++ b/resources/lang/zh_HK/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => 'Asset account (source)', 'journal_source_account_name' => 'Revenue account (source)', 'journal_source_account_id' => 'Asset account (source)', + 'BIC' => 'BIC', 'account_from_id' => 'From account', 'account_to_id' => 'To account', 'source_account' => 'Source account', diff --git a/resources/lang/zh_HK/validation.php b/resources/lang/zh_HK/validation.php index b7dfc41906..b391855829 100644 --- a/resources/lang/zh_HK/validation.php +++ b/resources/lang/zh_HK/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => 'File ":name" is too large.', 'belongs_to_user' => 'The value of :attribute is unknown', 'accepted' => 'The :attribute must be accepted.', + 'bic' => 'This is not a valid BIC.', 'active_url' => 'The :attribute is not a valid URL.', 'after' => 'The :attribute must be a date after :date.', 'alpha' => 'The :attribute may only contain letters.', @@ -84,4 +85,5 @@ return [ 'file' => 'The :attribute must be a file.', 'in_array' => 'The :attribute field does not exist in :other.', 'present' => 'The :attribute field must be present.', + 'amount_zero' => 'The total amount cannot be zero', ]; \ No newline at end of file diff --git a/resources/lang/zh_TW/config.php b/resources/lang/zh_TW/config.php index 58220429bf..8e724f5689 100644 --- a/resources/lang/zh_TW/config.php +++ b/resources/lang/zh_TW/config.php @@ -10,7 +10,7 @@ */ return [ - 'locale' => 'en, English, en_US, en_US.utf8', + 'locale' => 'en, English, en_US, en_US.utf8 test', 'month' => '%B %Y', 'month_and_day' => '%B %e, %Y', 'date_time' => '%B %e, %Y, @ %T', diff --git a/resources/lang/zh_TW/firefly.php b/resources/lang/zh_TW/firefly.php index 0084a811db..9ed680fc3c 100644 --- a/resources/lang/zh_TW/firefly.php +++ b/resources/lang/zh_TW/firefly.php @@ -84,7 +84,7 @@ return [ 'destination_accounts' => '目標帳戶', 'user_id_is' => 'Your user id is :user', 'field_supports_markdown' => 'This field supports Markdown.', - 'need_more_help' => 'If you need more help using Firefly III, please open a ticker on Github.', + 'need_more_help' => 'If you need more help using Firefly III, please open a ticket on Github.', 'nothing_to_display' => 'There are no transactions to show you', 'show_all_no_filter' => 'Show all transactions without grouping them by date.', 'expenses_by_category' => 'Expenses by category', @@ -524,6 +524,7 @@ return [ 'no_transactions_account' => 'There are no transactions (in this period) for asset account ":name".', 'no_data_for_chart' => 'There is not enough information (yet) to generate this chart.', 'select_more_than_one_account' => 'Please select more than one account', + 'select_more_than_one_category' => 'Please select more than one category', // categories: 'new_category' => 'New category', diff --git a/resources/lang/zh_TW/form.php b/resources/lang/zh_TW/form.php index bea7ff864f..7c3b46d8db 100644 --- a/resources/lang/zh_TW/form.php +++ b/resources/lang/zh_TW/form.php @@ -31,6 +31,7 @@ return [ 'journal_asset_source_account' => '資產帳戶 (源頭)', 'journal_source_account_name' => '收入帳戶 (源頭)', 'journal_source_account_id' => '資產帳戶 (源頭)', + 'BIC' => 'BIC', 'account_from_id' => '從帳戶', 'account_to_id' => '到帳戶', 'source_account' => '來源帳戶', diff --git a/resources/lang/zh_TW/validation.php b/resources/lang/zh_TW/validation.php index 29b136f7a7..9334e9cfa3 100644 --- a/resources/lang/zh_TW/validation.php +++ b/resources/lang/zh_TW/validation.php @@ -21,6 +21,7 @@ return [ 'file_too_large' => '檔案 ":name" 過大。', 'belongs_to_user' => ':attribute 的值是未知的。', 'accepted' => ':attribute 必須被接受。', + 'bic' => 'This is not a valid BIC.', 'active_url' => ':attribute 不是有效的URL。', 'after' => ':attribute 必須是一個在 :date 之後的日期。', 'alpha' => ':attribute 只允許包含字母。', @@ -84,4 +85,5 @@ return [ 'file' => 'The :attribute must be a file.', 'in_array' => 'The :attribute field does not exist in :other.', 'present' => 'The :attribute field must be present.', + 'amount_zero' => 'The total amount cannot be zero', ]; \ No newline at end of file diff --git a/resources/views/accounts/create.twig b/resources/views/accounts/create.twig index f4f560fd5b..e1ccc79fd7 100644 --- a/resources/views/accounts/create.twig +++ b/resources/views/accounts/create.twig @@ -34,6 +34,7 @@
{{ ExpandedForm.text('iban') }} + {{ ExpandedForm.text('BIC', null, {maxlength: 11}) }} {{ ExpandedForm.text('accountNumber') }} {% if what == 'asset' %} diff --git a/resources/views/accounts/edit.twig b/resources/views/accounts/edit.twig index 4ebee7dc6e..d849fa50d4 100644 --- a/resources/views/accounts/edit.twig +++ b/resources/views/accounts/edit.twig @@ -32,6 +32,7 @@
{{ ExpandedForm.text('iban') }} + {{ ExpandedForm.text('BIC', null, {maxlength: 11}) }} {{ ExpandedForm.text('accountNumber') }} {% if account.accounttype.type == 'Default account' or account.accounttype.type == 'Asset account' %} diff --git a/resources/views/accounts/show_with_date.twig b/resources/views/accounts/show-by-date.twig similarity index 88% rename from resources/views/accounts/show_with_date.twig rename to resources/views/accounts/show-by-date.twig index e872140108..fbe746b110 100644 --- a/resources/views/accounts/show_with_date.twig +++ b/resources/views/accounts/show-by-date.twig @@ -94,9 +94,10 @@ var dateString = "{{ date|escape }}"; // uri's for charts: - var incomeByCategoryUri = '{{ route('chart.account.incomeByCategory', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; - var expenseByCategoryUri = '{{ route('chart.account.expenseByCategory', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; - var expenseByBudgetUri = '{{ route('chart.account.expenseByBudget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; + var periodUri = '{{ route('chart.account.single', [account.id, date]) }}'; + var incomeCategoryUri = '{{ route('chart.account.income-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; + var expenseCategoryUri = '{{ route('chart.account.expense-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; + var expenseBudgetUri = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}'; @@ -104,6 +105,6 @@ - + {% endblock %} diff --git a/resources/views/accounts/show.twig b/resources/views/accounts/show.twig index 28f1b770b0..9826d1f358 100644 --- a/resources/views/accounts/show.twig +++ b/resources/views/accounts/show.twig @@ -123,9 +123,10 @@ diff --git a/resources/views/admin/configuration/index.twig b/resources/views/admin/configuration/index.twig index 0864dfe379..e4d193315f 100644 --- a/resources/views/admin/configuration/index.twig +++ b/resources/views/admin/configuration/index.twig @@ -4,7 +4,7 @@ {{ Breadcrumbs.renderIfExists }} {% endblock %} {% block content %} -
+
diff --git a/resources/views/auth/two-factor.twig b/resources/views/auth/two-factor.twig index 65a29bed85..ea4275aae2 100644 --- a/resources/views/auth/two-factor.twig +++ b/resources/views/auth/two-factor.twig @@ -18,7 +18,7 @@ - +
@@ -33,7 +33,7 @@
- {{ 'two_factor_forgot'|_ }} + {{ 'two_factor_forgot'|_ }}
{% endblock %} diff --git a/resources/views/bills/show.twig b/resources/views/bills/show.twig index f2db32ebf2..9227d99d46 100644 --- a/resources/views/bills/show.twig +++ b/resources/views/bills/show.twig @@ -116,7 +116,7 @@ {% block scripts %} diff --git a/resources/views/budgets/income.twig b/resources/views/budgets/income.twig index aef412667c..f78cb2c255 100644 --- a/resources/views/budgets/income.twig +++ b/resources/views/budgets/income.twig @@ -8,7 +8,7 @@
-
+

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

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

{% if budget.currentRep.id %} - {{ budget.name }} {% else %} {{ budget.name }} @@ -156,7 +156,7 @@ {% for other in budget.otherRepetitions %} {% if other.id != budget.currentRep.id %}
  • Budgeted - {{ other.amount|formatAmountPlain }} + {{ other.amount|formatAmountPlain }} between {{ other.startdate.formatLocalized(monthAndDayFormat) }} and {{ other.enddate.formatLocalized(monthAndDayFormat) }}. diff --git a/resources/views/budgets/show.twig b/resources/views/budgets/show.twig index a85ae2061b..e7a552c29f 100644 --- a/resources/views/budgets/show.twig +++ b/resources/views/budgets/show.twig @@ -49,7 +49,7 @@

    {{ limit.startdate.formatLocalized(monthFormat) }} + href="{{ route('budgets.show.repetition',[budget.id,limit.id]) }}">{{ limit.startdate.formatLocalized(monthFormat) }}

    @@ -98,10 +98,12 @@ diff --git a/resources/views/categories/show_with_date.twig b/resources/views/categories/show-by-date.twig similarity index 89% rename from resources/views/categories/show_with_date.twig rename to resources/views/categories/show-by-date.twig index 2514b08214..c2ffe6c1b0 100644 --- a/resources/views/categories/show_with_date.twig +++ b/resources/views/categories/show-by-date.twig @@ -40,12 +40,11 @@ {% endblock %} {% block scripts %} - + {% endblock %} diff --git a/resources/views/categories/show.twig b/resources/views/categories/show.twig index f6b18c08b4..9ff1006823 100644 --- a/resources/views/categories/show.twig +++ b/resources/views/categories/show.twig @@ -73,7 +73,8 @@ {% endblock %} {% block scripts %} diff --git a/resources/views/currency/create.twig b/resources/views/currencies/create.twig similarity index 92% rename from resources/views/currency/create.twig rename to resources/views/currencies/create.twig index 26dec5a0b1..8192a47171 100644 --- a/resources/views/currency/create.twig +++ b/resources/views/currencies/create.twig @@ -5,7 +5,7 @@ {% endblock %} {% block content %} - +
    diff --git a/resources/views/currency/delete.twig b/resources/views/currencies/delete.twig similarity index 90% rename from resources/views/currency/delete.twig rename to resources/views/currencies/delete.twig index 5874f126f2..e14902a17f 100644 --- a/resources/views/currency/delete.twig +++ b/resources/views/currencies/delete.twig @@ -6,7 +6,7 @@ {% block content %} - +
    diff --git a/resources/views/currency/edit.twig b/resources/views/currencies/edit.twig similarity index 96% rename from resources/views/currency/edit.twig rename to resources/views/currencies/edit.twig index e54d5f5ca1..2c4819545e 100644 --- a/resources/views/currency/edit.twig +++ b/resources/views/currencies/edit.twig @@ -5,7 +5,7 @@ {% endblock %} {% block content %} - {{ Form.model(currency, {'class' : 'form-horizontal','id' : 'update','url' : route('currency.update',currency.id)}) }} + {{ Form.model(currency, {'class' : 'form-horizontal','id' : 'update','url' : route('currencies.update',currency.id)}) }}
    diff --git a/resources/views/currency/index.twig b/resources/views/currencies/index.twig similarity index 88% rename from resources/views/currency/index.twig rename to resources/views/currencies/index.twig index 7720779d98..5955d6edc6 100644 --- a/resources/views/currency/index.twig +++ b/resources/views/currencies/index.twig @@ -28,8 +28,8 @@
    - - + +
    {{ currency.name }} ({{ currency.code }}) ({{ currency.symbol|raw }}) @@ -38,7 +38,7 @@ {{ 'default_currency'|_ }} {% else %} {{ 'make_default_currency'|_ }} + href="{{ route('currencies.default',currency.id) }}">{{ 'make_default_currency'|_ }} {% endif %} @@ -48,7 +48,7 @@ {% endif %}
    diff --git a/resources/views/import/csv/configure.twig b/resources/views/import/csv/configure.twig index d650adbbb8..9a9e53a0b0 100644 --- a/resources/views/import/csv/configure.twig +++ b/resources/views/import/csv/configure.twig @@ -22,7 +22,7 @@
    - +
    diff --git a/resources/views/import/csv/map.twig b/resources/views/import/csv/map.twig index 159f73edd6..ebc0cf669d 100644 --- a/resources/views/import/csv/map.twig +++ b/resources/views/import/csv/map.twig @@ -22,7 +22,7 @@
    - + diff --git a/resources/views/import/csv/roles.twig b/resources/views/import/csv/roles.twig index aad820fbbd..74cf95b948 100644 --- a/resources/views/import/csv/roles.twig +++ b/resources/views/import/csv/roles.twig @@ -21,7 +21,7 @@
  • - + diff --git a/resources/views/index.twig b/resources/views/index.twig index a1443b6e18..07450afebb 100644 --- a/resources/views/index.twig +++ b/resources/views/index.twig @@ -143,6 +143,11 @@ showTour = false; {% endif %} var billCount = {{ billCount }}; + + // uri's of charts: + var accountFrontpageUri = '{{ route('chart.account.frontpage') }}'; + var accountRevenueUri = '{{ route('chart.account.revenue') }}'; + var accountExpenseUri = '{{ route('chart.account.expense') }}'; diff --git a/resources/views/layout/default.twig b/resources/views/layout/default.twig index 6aed4659ed..54dd27bce6 100644 --- a/resources/views/layout/default.twig +++ b/resources/views/layout/default.twig @@ -67,7 +67,7 @@
  • - +
  • @@ -91,7 +91,7 @@