mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Code clean up.
This commit is contained in:
parent
ef837f20dd
commit
57dcdfa0c4
@ -89,7 +89,7 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface
|
||||
return view(
|
||||
'reports.tag.month',
|
||||
compact(
|
||||
'accountIds',
|
||||
'accountIds',
|
||||
'tagTags',
|
||||
'reportType',
|
||||
'accountSummary',
|
||||
@ -97,8 +97,8 @@ class MonthReportGenerator extends Support implements ReportGeneratorInterface
|
||||
'averageExpenses',
|
||||
'averageIncome',
|
||||
'topIncome',
|
||||
'topExpenses'
|
||||
)
|
||||
'topExpenses'
|
||||
)
|
||||
)->with('start', $this->start)->with('end', $this->end)->with('tags', $this->tags)->with('accounts', $this->accounts)->render();
|
||||
}
|
||||
|
||||
|
@ -785,8 +785,8 @@ class JournalCollector implements JournalCollectorInterface
|
||||
'transactions as opposing',
|
||||
function (JoinClause $join) {
|
||||
$join->on('opposing.transaction_journal_id', '=', 'transactions.transaction_journal_id')
|
||||
->where('opposing.identifier', '=', DB::raw('transactions.identifier'))
|
||||
->where('opposing.amount', '=', DB::raw('transactions.amount * -1'));
|
||||
->where('opposing.identifier', '=', DB::raw('transactions.identifier'))
|
||||
->where('opposing.amount', '=', DB::raw('transactions.amount * -1'));
|
||||
}
|
||||
);
|
||||
$this->query->leftJoin('accounts as opposing_accounts', 'opposing.account_id', '=', 'opposing_accounts.id');
|
||||
|
@ -132,7 +132,7 @@ class ReconcileController extends Controller
|
||||
return view(
|
||||
'accounts.reconcile.index',
|
||||
compact(
|
||||
'account',
|
||||
'account',
|
||||
'currency',
|
||||
'subTitleIcon',
|
||||
'start',
|
||||
@ -141,11 +141,11 @@ class ReconcileController extends Controller
|
||||
'startBalance',
|
||||
'endBalance',
|
||||
'transactionsUri',
|
||||
'selectionStart',
|
||||
'selectionStart',
|
||||
'selectionEnd',
|
||||
'overviewUri',
|
||||
'indexUri'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -209,7 +209,7 @@ class AccountController extends Controller
|
||||
return view(
|
||||
'accounts.edit',
|
||||
compact(
|
||||
'allCurrencies',
|
||||
'allCurrencies',
|
||||
'currencySelectList',
|
||||
'account',
|
||||
'currency',
|
||||
@ -218,7 +218,7 @@ class AccountController extends Controller
|
||||
'what',
|
||||
'roles',
|
||||
'preFilled'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -85,14 +85,18 @@ class LoginController extends Controller
|
||||
$hasTable = Schema::hasTable('users');
|
||||
|
||||
if (!$hasTable) {
|
||||
$message = 'Firefly III could not find the "users" table. This is a strong indication your database credentials are wrong or the database has not been initialized. Did you follow the installation instructions correctly?';
|
||||
$message
|
||||
= 'Firefly III could not find the "users" table. This is a strong indication your database credentials are wrong or the database has not been initialized. Did you follow the installation instructions correctly?';
|
||||
|
||||
return view('error', compact('message'));
|
||||
}
|
||||
|
||||
// check for presence of currency:
|
||||
$currency = TransactionCurrency::where('code', 'EUR')->first();
|
||||
if (is_null($currency)) {
|
||||
$message = 'Firefly III could not find the EURO currency. This is a strong indication the database has not been initialized correctly. Did you follow the installation instructions?';
|
||||
$message
|
||||
= 'Firefly III could not find the EURO currency. This is a strong indication the database has not been initialized correctly. Did you follow the installation instructions?';
|
||||
|
||||
return view('error', compact('message'));
|
||||
}
|
||||
|
||||
|
@ -160,9 +160,9 @@ class RegisterController extends Controller
|
||||
return Validator::make(
|
||||
$data,
|
||||
[
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
'password' => 'required|string|secure_password|confirmed',
|
||||
]
|
||||
'email' => 'required|string|email|max:255|unique:users',
|
||||
'password' => 'required|string|secure_password|confirmed',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -455,10 +455,10 @@ class BudgetController extends Controller
|
||||
$subTitle = trans(
|
||||
'firefly.budget_in_period',
|
||||
[
|
||||
'name' => $budget->name,
|
||||
'start' => $budgetLimit->start_date->formatLocalized($this->monthAndDayFormat),
|
||||
'end' => $budgetLimit->end_date->formatLocalized($this->monthAndDayFormat),
|
||||
]
|
||||
'name' => $budget->name,
|
||||
'start' => $budgetLimit->start_date->formatLocalized($this->monthAndDayFormat),
|
||||
'end' => $budgetLimit->end_date->formatLocalized($this->monthAndDayFormat),
|
||||
]
|
||||
);
|
||||
|
||||
// collector:
|
||||
|
@ -123,7 +123,7 @@ class HomeController extends Controller
|
||||
return view(
|
||||
'debug',
|
||||
compact(
|
||||
'phpVersion',
|
||||
'phpVersion',
|
||||
'extensions',
|
||||
'carbon',
|
||||
'now',
|
||||
@ -136,7 +136,7 @@ class HomeController extends Controller
|
||||
'isDocker',
|
||||
'isSandstorm',
|
||||
'trustedProxies'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -291,11 +291,11 @@ class PiggyBankController extends Controller
|
||||
Session::flash(
|
||||
'success',
|
||||
strval(
|
||||
trans(
|
||||
'firefly.added_amount_to_piggy',
|
||||
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
|
||||
)
|
||||
)
|
||||
trans(
|
||||
'firefly.added_amount_to_piggy',
|
||||
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
|
||||
)
|
||||
)
|
||||
);
|
||||
Preferences::mark();
|
||||
|
||||
@ -306,11 +306,11 @@ class PiggyBankController extends Controller
|
||||
Session::flash(
|
||||
'error',
|
||||
strval(
|
||||
trans(
|
||||
'firefly.cannot_add_amount_piggy',
|
||||
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
|
||||
)
|
||||
)
|
||||
trans(
|
||||
'firefly.cannot_add_amount_piggy',
|
||||
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
return redirect(route('piggy-banks.index'));
|
||||
@ -348,11 +348,11 @@ class PiggyBankController extends Controller
|
||||
Session::flash(
|
||||
'error',
|
||||
strval(
|
||||
trans(
|
||||
'firefly.cannot_remove_from_piggy',
|
||||
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
|
||||
)
|
||||
)
|
||||
trans(
|
||||
'firefly.cannot_remove_from_piggy',
|
||||
['amount' => app('amount')->formatAnything($currency, $amount, false), 'name' => $piggyBank->name]
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
return redirect(route('piggy-banks.index'));
|
||||
|
@ -90,12 +90,12 @@ class ReportController extends Controller
|
||||
View::share(
|
||||
'subTitle',
|
||||
trans(
|
||||
'firefly.report_audit',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
'firefly.report_audit',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -126,12 +126,12 @@ class ReportController extends Controller
|
||||
View::share(
|
||||
'subTitle',
|
||||
trans(
|
||||
'firefly.report_budget',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
'firefly.report_budget',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$generator = ReportGeneratorFactory::reportGenerator('Budget', $start, $end);
|
||||
@ -162,12 +162,12 @@ class ReportController extends Controller
|
||||
View::share(
|
||||
'subTitle',
|
||||
trans(
|
||||
'firefly.report_category',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
'firefly.report_category',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$generator = ReportGeneratorFactory::reportGenerator('Category', $start, $end);
|
||||
@ -198,12 +198,12 @@ class ReportController extends Controller
|
||||
View::share(
|
||||
'subTitle',
|
||||
trans(
|
||||
'firefly.report_default',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
'firefly.report_default',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$generator = ReportGeneratorFactory::reportGenerator('Standard', $start, $end);
|
||||
@ -344,12 +344,12 @@ class ReportController extends Controller
|
||||
View::share(
|
||||
'subTitle',
|
||||
trans(
|
||||
'firefly.report_tag',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
'firefly.report_tag',
|
||||
[
|
||||
'start' => $start->formatLocalized($this->monthFormat),
|
||||
'end' => $end->formatLocalized($this->monthFormat),
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
$generator = ReportGeneratorFactory::reportGenerator('Tag', $start, $end);
|
||||
|
@ -213,15 +213,15 @@ class RuleController extends Controller
|
||||
return view(
|
||||
'rules.rule.edit',
|
||||
compact(
|
||||
'rule',
|
||||
'rule',
|
||||
'subTitle',
|
||||
'primaryTrigger',
|
||||
'primaryTrigger',
|
||||
'oldTriggers',
|
||||
'oldActions',
|
||||
'triggerCount',
|
||||
'actionCount',
|
||||
'ruleGroups'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -94,10 +94,10 @@ Breadcrumbs::register(
|
||||
// when is specific period or when empty:
|
||||
if ($moment !== 'all' && $moment !== '(nothing)') {
|
||||
$title = trans(
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
|
||||
);
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
|
||||
);
|
||||
$breadcrumbs->push($title, route('accounts.show', [$account->id, $moment, $start, $end]));
|
||||
}
|
||||
}
|
||||
@ -344,10 +344,10 @@ Breadcrumbs::register(
|
||||
// when is specific period or when empty:
|
||||
if ($moment !== 'all' && $moment !== '(nothing)') {
|
||||
$title = trans(
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
|
||||
);
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
|
||||
);
|
||||
$breadcrumbs->push($title, route('budgets.no-budget', [$moment]));
|
||||
}
|
||||
}
|
||||
@ -369,15 +369,15 @@ Breadcrumbs::register(
|
||||
$breadcrumbs->push(e($budget->name), route('budgets.show', [$budget->id]));
|
||||
|
||||
$title = trans(
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $budgetLimit->start_date->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $budgetLimit->end_date->formatLocalized(strval(trans('config.month_and_day'))),]
|
||||
);
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $budgetLimit->start_date->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $budgetLimit->end_date->formatLocalized(strval(trans('config.month_and_day'))),]
|
||||
);
|
||||
|
||||
$breadcrumbs->push(
|
||||
$title,
|
||||
route('budgets.show.limit', [$budget->id, $budgetLimit->id])
|
||||
);
|
||||
$title,
|
||||
route('budgets.show.limit', [$budget->id, $budgetLimit->id])
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@ -427,10 +427,10 @@ Breadcrumbs::register(
|
||||
// when is specific period or when empty:
|
||||
if ($moment !== 'all' && $moment !== '(nothing)') {
|
||||
$title = trans(
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
|
||||
);
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
|
||||
);
|
||||
$breadcrumbs->push($title, route('categories.show', [$category->id, $moment]));
|
||||
}
|
||||
}
|
||||
@ -450,10 +450,10 @@ Breadcrumbs::register(
|
||||
// when is specific period or when empty:
|
||||
if ($moment !== 'all' && $moment !== '(nothing)') {
|
||||
$title = trans(
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
|
||||
);
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
|
||||
);
|
||||
$breadcrumbs->push($title, route('categories.no-category', [$moment]));
|
||||
}
|
||||
}
|
||||
@ -559,9 +559,9 @@ Breadcrumbs::register(
|
||||
function (BreadCrumbGenerator $breadcrumbs, PiggyBank $piggyBank) {
|
||||
$breadcrumbs->parent('piggy-banks.show', $piggyBank);
|
||||
$breadcrumbs->push(
|
||||
trans('firefly.remove_money_from_piggy_title', ['name' => $piggyBank->name]),
|
||||
route('piggy-banks.remove-money-mobile', [$piggyBank->id])
|
||||
);
|
||||
trans('firefly.remove_money_from_piggy_title', ['name' => $piggyBank->name]),
|
||||
route('piggy-banks.remove-money-mobile', [$piggyBank->id])
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@ -795,7 +795,9 @@ Breadcrumbs::register(
|
||||
'rule-groups.select-transactions',
|
||||
function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) {
|
||||
$breadcrumbs->parent('rules.index');
|
||||
$breadcrumbs->push(trans('firefly.rule_group_select_transactions', ['title' => $ruleGroup->title]), route('rule-groups.select-transactions', [$ruleGroup]));
|
||||
$breadcrumbs->push(
|
||||
trans('firefly.rule_group_select_transactions', ['title' => $ruleGroup->title]), route('rule-groups.select-transactions', [$ruleGroup])
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@ -804,9 +806,9 @@ Breadcrumbs::register(
|
||||
function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) {
|
||||
$breadcrumbs->parent('rules.index');
|
||||
$breadcrumbs->push(
|
||||
trans('firefly.execute_group_on_existing_transactions', ['title' => $ruleGroup->title]),
|
||||
route('rule-groups.select_transactions', [$ruleGroup])
|
||||
);
|
||||
trans('firefly.execute_group_on_existing_transactions', ['title' => $ruleGroup->title]),
|
||||
route('rule-groups.select_transactions', [$ruleGroup])
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
@ -870,10 +872,10 @@ Breadcrumbs::register(
|
||||
// when is specific period or when empty:
|
||||
if ($moment !== 'all' && $moment !== '(nothing)') {
|
||||
$title = trans(
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
|
||||
);
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
|
||||
);
|
||||
$breadcrumbs->push($title, route('tags.show', [$tag->id, $moment]));
|
||||
}
|
||||
}
|
||||
@ -894,10 +896,10 @@ Breadcrumbs::register(
|
||||
// when is specific period or when empty:
|
||||
if ($moment !== 'all' && $moment !== '(nothing)') {
|
||||
$title = trans(
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
|
||||
);
|
||||
'firefly.between_dates_breadcrumb',
|
||||
['start' => $start->formatLocalized(strval(trans('config.month_and_day'))),
|
||||
'end' => $end->formatLocalized(strval(trans('config.month_and_day')))]
|
||||
);
|
||||
$breadcrumbs->push($title, route('transactions.index', [$what, $moment]));
|
||||
}
|
||||
}
|
||||
@ -940,9 +942,9 @@ Breadcrumbs::register(
|
||||
function (BreadCrumbGenerator $breadcrumbs, TransactionType $destinationType, TransactionJournal $journal) {
|
||||
$breadcrumbs->parent('transactions.show', $journal);
|
||||
$breadcrumbs->push(
|
||||
trans('firefly.convert_to_' . $destinationType->type, ['description' => $journal->description]),
|
||||
route('transactions.convert.index', [strtolower($destinationType->type), $journal->id])
|
||||
);
|
||||
trans('firefly.convert_to_' . $destinationType->type, ['description' => $journal->description]),
|
||||
route('transactions.convert.index', [strtolower($destinationType->type), $journal->id])
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -140,6 +140,7 @@ class ImportRoutine
|
||||
|
||||
if ($this->journals->count() < 1) {
|
||||
Log::info(sprintf('Will not create tag, %d journals imported.', $this->journals->count()));
|
||||
|
||||
return new Tag;
|
||||
}
|
||||
|
||||
|
@ -277,10 +277,10 @@ trait ImportSupport
|
||||
'transactions AS destination',
|
||||
function (JoinClause $join) {
|
||||
$join->on('transaction_journals.id', '=', 'destination.transaction_journal_id')->where(
|
||||
'destination.amount',
|
||||
'>',
|
||||
0
|
||||
);
|
||||
'destination.amount',
|
||||
'>',
|
||||
0
|
||||
);
|
||||
}
|
||||
)
|
||||
->leftJoin('accounts as source_accounts', 'source.account_id', '=', 'source_accounts.id')
|
||||
|
@ -89,10 +89,10 @@ class JournalTasker implements JournalTaskerInterface
|
||||
'transactions as destination',
|
||||
function (JoinClause $join) {
|
||||
$join
|
||||
->on('transactions.transaction_journal_id', '=', 'destination.transaction_journal_id')
|
||||
->where('transactions.amount', '=', DB::raw('destination.amount * -1'))
|
||||
->where('transactions.identifier', '=', DB::raw('destination.identifier'))
|
||||
->whereNull('destination.deleted_at');
|
||||
->on('transactions.transaction_journal_id', '=', 'destination.transaction_journal_id')
|
||||
->where('transactions.amount', '=', DB::raw('destination.amount * -1'))
|
||||
->where('transactions.identifier', '=', DB::raw('destination.identifier'))
|
||||
->whereNull('destination.deleted_at');
|
||||
}
|
||||
)
|
||||
->with(['budgets', 'categories'])
|
||||
|
@ -176,7 +176,7 @@ class AmountFormat extends Twig_Extension
|
||||
'formatDestinationAfter',
|
||||
function (array $transaction): string {
|
||||
|
||||
// build fake currency for main amount.
|
||||
// build fake currency for main amount.
|
||||
$format = new TransactionCurrency;
|
||||
$format->decimal_places = $transaction['transaction_currency_dp'];
|
||||
$format->symbol = $transaction['transaction_currency_symbol'];
|
||||
@ -207,7 +207,7 @@ class AmountFormat extends Twig_Extension
|
||||
'formatDestinationBefore',
|
||||
function (array $transaction): string {
|
||||
|
||||
// build fake currency for main amount.
|
||||
// build fake currency for main amount.
|
||||
$format = new TransactionCurrency;
|
||||
$format->decimal_places = $transaction['transaction_currency_dp'];
|
||||
$format->symbol = $transaction['transaction_currency_symbol'];
|
||||
@ -227,7 +227,7 @@ class AmountFormat extends Twig_Extension
|
||||
'formatSourceAfter',
|
||||
function (array $transaction): string {
|
||||
|
||||
// build fake currency for main amount.
|
||||
// build fake currency for main amount.
|
||||
$format = new TransactionCurrency;
|
||||
$format->decimal_places = $transaction['transaction_currency_dp'];
|
||||
$format->symbol = $transaction['transaction_currency_symbol'];
|
||||
@ -258,7 +258,7 @@ class AmountFormat extends Twig_Extension
|
||||
'formatSourceBefore',
|
||||
function (array $transaction): string {
|
||||
|
||||
// build fake currency for main amount.
|
||||
// build fake currency for main amount.
|
||||
$format = new TransactionCurrency;
|
||||
$format->decimal_places = $transaction['transaction_currency_dp'];
|
||||
$format->symbol = $transaction['transaction_currency_symbol'];
|
||||
|
@ -310,7 +310,7 @@ class Transaction extends Twig_Extension
|
||||
$other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id)
|
||||
->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where(
|
||||
'identifier',
|
||||
$transaction->identifier
|
||||
$transaction->identifier
|
||||
)
|
||||
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
||||
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
|
||||
@ -489,7 +489,7 @@ class Transaction extends Twig_Extension
|
||||
$other = TransactionModel::where('transaction_journal_id', $journalId)->where('transactions.id', '!=', $transaction->id)
|
||||
->where('amount', '=', bcmul($transaction->transaction_amount, '-1'))->where(
|
||||
'identifier',
|
||||
$transaction->identifier
|
||||
$transaction->identifier
|
||||
)
|
||||
->leftJoin('accounts', 'accounts.id', '=', 'transactions.account_id')
|
||||
->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
|
||||
|
@ -118,8 +118,8 @@ class General extends Twig_Extension
|
||||
function ($context): string {
|
||||
$args = func_get_args();
|
||||
$route = $args[1]; // name of the route.
|
||||
$what = $args[2]; // name of the route.
|
||||
$activeWhat = $context['what'] ?? false;
|
||||
$what = $args[2]; // name of the route.
|
||||
$activeWhat = $context['what'] ?? false;
|
||||
|
||||
if ($what === $activeWhat && !(strpos(Route::getCurrentRoute()->getName(), $route) === false)) {
|
||||
return 'active';
|
||||
@ -194,7 +194,7 @@ class General extends Twig_Extension
|
||||
'filesize',
|
||||
function (int $size): string {
|
||||
|
||||
// less than one GB, more than one MB
|
||||
// less than one GB, more than one MB
|
||||
if ($size < (1024 * 1024 * 2014) && $size >= (1024 * 1024)) {
|
||||
return round($size / (1024 * 1024), 2) . ' MB';
|
||||
}
|
||||
@ -245,14 +245,14 @@ class General extends Twig_Extension
|
||||
'mimeIcon',
|
||||
function (string $string): string {
|
||||
switch ($string) {
|
||||
default:
|
||||
return 'fa-file-o';
|
||||
case 'application/pdf':
|
||||
return 'fa-file-pdf-o';
|
||||
case 'image/png':
|
||||
case 'image/jpeg':
|
||||
return 'fa-file-image-o';
|
||||
}
|
||||
default:
|
||||
return 'fa-file-o';
|
||||
case 'application/pdf':
|
||||
return 'fa-file-pdf-o';
|
||||
case 'image/png':
|
||||
case 'image/jpeg':
|
||||
return 'fa-file-image-o';
|
||||
}
|
||||
},
|
||||
['is_safe' => ['html']]
|
||||
);
|
||||
|
@ -207,11 +207,11 @@ class Journal extends Twig_Extension
|
||||
}
|
||||
if (count($categories) === 0) {
|
||||
$set = Category::distinct()->leftJoin('category_transaction', 'categories.id', '=', 'category_transaction.category_id')
|
||||
->leftJoin('transactions', 'category_transaction.transaction_id', '=', 'transactions.id')
|
||||
->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->where('categories.user_id', $journal->user_id)
|
||||
->where('transaction_journals.id', $journal->id)
|
||||
->get(['categories.*']);
|
||||
->leftJoin('transactions', 'category_transaction.transaction_id', '=', 'transactions.id')
|
||||
->leftJoin('transaction_journals', 'transactions.transaction_journal_id', '=', 'transaction_journals.id')
|
||||
->where('categories.user_id', $journal->user_id)
|
||||
->where('transaction_journals.id', $journal->id)
|
||||
->get(['categories.*']);
|
||||
/** @var Category $category */
|
||||
foreach ($set as $category) {
|
||||
$categories[] = sprintf('<a title="%1$s" href="%2$s">%1$s</a>', e($category->name), route('categories.show', $category->id));
|
||||
|
@ -66,9 +66,9 @@ class Rule extends Twig_Extension
|
||||
'allJournalTriggers',
|
||||
function () {
|
||||
return [
|
||||
'store-journal' => trans('firefly.rule_trigger_store_journal'),
|
||||
'update-journal' => trans('firefly.rule_trigger_update_journal'),
|
||||
];
|
||||
'store-journal' => trans('firefly.rule_trigger_store_journal'),
|
||||
'update-journal' => trans('firefly.rule_trigger_update_journal'),
|
||||
];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -60,9 +60,9 @@ class SetBudget implements ActionInterface
|
||||
/** @var BudgetRepositoryInterface $repository */
|
||||
$repository = app(BudgetRepositoryInterface::class);
|
||||
$repository->setUser($journal->user);
|
||||
$search = $this->action->action_value;
|
||||
$search = $this->action->action_value;
|
||||
$budgets = $repository->getActiveBudgets();
|
||||
$budget = $budgets->filter(
|
||||
$budget = $budgets->filter(
|
||||
function (Budget $current) use ($search) {
|
||||
return $current->name === $search;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ return [
|
||||
*/
|
||||
|
||||
'defaults' => [
|
||||
'guard' => 'web',
|
||||
'guard' => 'web',
|
||||
'passwords' => 'users',
|
||||
],
|
||||
|
||||
@ -59,12 +59,12 @@ return [
|
||||
|
||||
'guards' => [
|
||||
'web' => [
|
||||
'driver' => 'session',
|
||||
'driver' => 'session',
|
||||
'provider' => 'users',
|
||||
],
|
||||
|
||||
'api' => [
|
||||
'driver' => 'token',
|
||||
'driver' => 'token',
|
||||
'provider' => 'users',
|
||||
],
|
||||
],
|
||||
@ -89,7 +89,7 @@ return [
|
||||
'providers' => [
|
||||
'users' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => FireflyIII\User::class,
|
||||
'model' => FireflyIII\User::class,
|
||||
],
|
||||
|
||||
// 'users' => [
|
||||
@ -116,8 +116,8 @@ return [
|
||||
'passwords' => [
|
||||
'users' => [
|
||||
'provider' => 'users',
|
||||
'table' => 'password_resets',
|
||||
'expire' => 60,
|
||||
'table' => 'password_resets',
|
||||
'expire' => 60,
|
||||
],
|
||||
],
|
||||
|
||||
|
@ -53,17 +53,17 @@ return [
|
||||
'connections' => [
|
||||
|
||||
'pusher' => [
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_APP_KEY'),
|
||||
'secret' => env('PUSHER_APP_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'driver' => 'pusher',
|
||||
'key' => env('PUSHER_APP_KEY'),
|
||||
'secret' => env('PUSHER_APP_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
'options' => [
|
||||
//
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
|
||||
|
@ -61,37 +61,37 @@ return [
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'cache',
|
||||
'driver' => 'database',
|
||||
'table' => 'cache',
|
||||
'connection' => null,
|
||||
],
|
||||
|
||||
'file' => [
|
||||
'driver' => 'file',
|
||||
'path' => storage_path('framework/cache/data'),
|
||||
'path' => storage_path('framework/cache/data'),
|
||||
],
|
||||
|
||||
'memcached' => [
|
||||
'driver' => 'memcached',
|
||||
'driver' => 'memcached',
|
||||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
|
||||
'sasl' => [
|
||||
'sasl' => [
|
||||
env('MEMCACHED_USERNAME'),
|
||||
env('MEMCACHED_PASSWORD'),
|
||||
],
|
||||
'options' => [
|
||||
'options' => [
|
||||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
||||
],
|
||||
'servers' => [
|
||||
'servers' => [
|
||||
[
|
||||
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||
'port' => env('MEMCACHED_PORT', 11211),
|
||||
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
|
||||
'port' => env('MEMCACHED_PORT', 11211),
|
||||
'weight' => 100,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
|
||||
|
@ -57,32 +57,32 @@ return [
|
||||
],
|
||||
|
||||
'database' => [
|
||||
'driver' => 'database',
|
||||
'table' => 'jobs',
|
||||
'queue' => 'default',
|
||||
'driver' => 'database',
|
||||
'table' => 'jobs',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
],
|
||||
|
||||
'beanstalkd' => [
|
||||
'driver' => 'beanstalkd',
|
||||
'host' => 'localhost',
|
||||
'queue' => 'default',
|
||||
'driver' => 'beanstalkd',
|
||||
'host' => 'localhost',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
],
|
||||
|
||||
'sqs' => [
|
||||
'driver' => 'sqs',
|
||||
'key' => 'your-public-key',
|
||||
'key' => 'your-public-key',
|
||||
'secret' => 'your-secret-key',
|
||||
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
|
||||
'queue' => 'your-queue-name',
|
||||
'queue' => 'your-queue-name',
|
||||
'region' => 'us-east-1',
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
'queue' => 'default',
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
'queue' => 'default',
|
||||
'retry_after' => 90,
|
||||
],
|
||||
|
||||
@ -101,7 +101,7 @@ return [
|
||||
|
||||
'failed' => [
|
||||
'database' => env('DB_CONNECTION', 'mysql'),
|
||||
'table' => 'failed_jobs',
|
||||
'table' => 'failed_jobs',
|
||||
],
|
||||
|
||||
];
|
||||
|
@ -42,7 +42,7 @@ return [
|
||||
],
|
||||
|
||||
'ses' => [
|
||||
'key' => env('SES_KEY'),
|
||||
'key' => env('SES_KEY'),
|
||||
'secret' => env('SES_SECRET'),
|
||||
'region' => 'us-east-1',
|
||||
],
|
||||
@ -52,8 +52,8 @@ return [
|
||||
],
|
||||
|
||||
'stripe' => [
|
||||
'model' => FireflyIII\User::class,
|
||||
'key' => env('STRIPE_KEY'),
|
||||
'model' => FireflyIII\User::class,
|
||||
'key' => env('STRIPE_KEY'),
|
||||
'secret' => env('STRIPE_SECRET'),
|
||||
],
|
||||
|
||||
|
@ -176,7 +176,7 @@ return [
|
||||
'is_safe' => [
|
||||
'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer', 'textarea', 'location',
|
||||
'multiRadio', 'file', 'multiCheckbox', 'staticText', 'amountSmall', 'password', 'nonSelectableBalance', 'nonSelectableAmount',
|
||||
'number'
|
||||
'number',
|
||||
],
|
||||
],
|
||||
'Form' => [
|
||||
|
@ -27,13 +27,13 @@ return [
|
||||
[
|
||||
'4.3' => 'Make sure you run the migrations and clear your cache. If you need more help, please check Github or the Firefly III website.',
|
||||
'4.6.3' => 'This will be the last version to require PHP7.0. Future versions will require PHP7.1 minimum.',
|
||||
'4.6.4' => 'This version of Firefly III requires PHP7.1.'
|
||||
'4.6.4' => 'This version of Firefly III requires PHP7.1.',
|
||||
],
|
||||
'install' =>
|
||||
[
|
||||
'4.3' => 'Welcome to Firefly! Make sure you follow the installation guide. If you need more help, please check Github or the Firefly III website. The installation guide has a FAQ which you should check out as well.',
|
||||
'4.6.3' => 'This will be the last version to require PHP7.0. Future versions will require PHP7.1 minimum.',
|
||||
'4.6.4' => 'This version of Firefly III requires PHP7.1.'
|
||||
'4.6.4' => 'This version of Firefly III requires PHP7.1.',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
@ -28,7 +28,7 @@
|
||||
}
|
||||
|
||||
p.tagcloud .label {
|
||||
line-height:2;
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
.handle {
|
||||
|
@ -26,6 +26,7 @@
|
||||
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-cyrillic-ext.woff2') format('woff2');
|
||||
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
|
||||
}
|
||||
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -34,6 +35,7 @@
|
||||
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-cyrillic.woff2') format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -42,6 +44,7 @@
|
||||
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-greek-ext.woff2') format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -50,6 +53,7 @@
|
||||
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-greek.woff2') format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -58,6 +62,7 @@
|
||||
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-vietnamese.woff2') format('woff2');
|
||||
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -66,6 +71,7 @@
|
||||
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-latin-ext.woff2') format('woff2');
|
||||
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -74,6 +80,7 @@
|
||||
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-latin.woff2') format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
|
||||
}
|
||||
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -82,6 +89,7 @@
|
||||
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-cyrillic-ext.woff2') format('woff2');
|
||||
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
|
||||
}
|
||||
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -90,6 +98,7 @@
|
||||
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-cyrillic.woff2') format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -98,6 +107,7 @@
|
||||
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-greek-ext.woff2') format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -106,6 +116,7 @@
|
||||
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-greek.woff2') format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -114,6 +125,7 @@
|
||||
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-vietnamese.woff2') format('woff2');
|
||||
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -122,6 +134,7 @@
|
||||
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-latin-ext.woff2') format('woff2');
|
||||
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -130,6 +143,7 @@
|
||||
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-latin.woff2') format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
|
||||
}
|
||||
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -138,6 +152,7 @@
|
||||
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-cyrillic-ext.woff2') format('woff2');
|
||||
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
|
||||
}
|
||||
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -146,6 +161,7 @@
|
||||
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-cyrillic.woff2') format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -154,6 +170,7 @@
|
||||
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-greek-ext.woff2') format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -162,6 +179,7 @@
|
||||
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-greek.woff2') format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -170,6 +188,7 @@
|
||||
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-vietnamese.woff2') format('woff2');
|
||||
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -178,6 +197,7 @@
|
||||
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-latin-ext.woff2') format('woff2');
|
||||
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -186,6 +206,7 @@
|
||||
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-latin.woff2') format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
|
||||
}
|
||||
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -194,6 +215,7 @@
|
||||
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-cyrillic-ext.woff2') format('woff2');
|
||||
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
|
||||
}
|
||||
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -202,6 +224,7 @@
|
||||
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-cyrillic.woff2') format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -210,6 +233,7 @@
|
||||
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-greek-ext.woff2') format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -218,6 +242,7 @@
|
||||
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-greek.woff2') format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -226,6 +251,7 @@
|
||||
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-vietnamese.woff2') format('woff2');
|
||||
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -234,6 +260,7 @@
|
||||
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-latin-ext.woff2') format('woff2');
|
||||
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -242,6 +269,7 @@
|
||||
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-latin.woff2') format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
|
||||
}
|
||||
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -250,6 +278,7 @@
|
||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-cyrillic-ext.woff2') format('woff2');
|
||||
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
|
||||
}
|
||||
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -258,6 +287,7 @@
|
||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-cyrillic.woff2') format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -266,6 +296,7 @@
|
||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-greek-ext.woff2') format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -274,6 +305,7 @@
|
||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-greek.woff2') format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -282,6 +314,7 @@
|
||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-vietnamese.woff2') format('woff2');
|
||||
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -290,6 +323,7 @@
|
||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-latin-ext.woff2') format('woff2');
|
||||
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -298,6 +332,7 @@
|
||||
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-latin.woff2') format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
|
||||
}
|
||||
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -306,6 +341,7 @@
|
||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-cyrillic-ext.woff2') format('woff2');
|
||||
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
|
||||
}
|
||||
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -314,6 +350,7 @@
|
||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-cyrillic.woff2') format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -322,6 +359,7 @@
|
||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-greek-ext.woff2') format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -330,6 +368,7 @@
|
||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-greek.woff2') format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -338,6 +377,7 @@
|
||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-vietnamese.woff2') format('woff2');
|
||||
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -346,6 +386,7 @@
|
||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-latin-ext.woff2') format('woff2');
|
||||
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -354,6 +395,7 @@
|
||||
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-latin.woff2') format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
|
||||
}
|
||||
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -362,6 +404,7 @@
|
||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-cyrillic-ext.woff2') format('woff2');
|
||||
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
|
||||
}
|
||||
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -370,6 +413,7 @@
|
||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-cyrillic.woff2') format('woff2');
|
||||
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
|
||||
/* greek-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -378,6 +422,7 @@
|
||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-greek-ext.woff2') format('woff2');
|
||||
unicode-range: U+1F00-1FFF;
|
||||
}
|
||||
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -386,6 +431,7 @@
|
||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-greek.woff2') format('woff2');
|
||||
unicode-range: U+0370-03FF;
|
||||
}
|
||||
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -394,6 +440,7 @@
|
||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-vietnamese.woff2') format('woff2');
|
||||
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
@ -402,6 +449,7 @@
|
||||
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-latin-ext.woff2') format('woff2');
|
||||
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Source Sans Pro';
|
||||
|
@ -40,7 +40,7 @@ define('LARAVEL_START', microtime(true));
|
||||
|
|
||||
*/
|
||||
|
||||
require __DIR__.'/../vendor/autoload.php';
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -54,7 +54,7 @@ require __DIR__.'/../vendor/autoload.php';
|
||||
|
|
||||
*/
|
||||
|
||||
$app = require_once __DIR__.'/../bootstrap/app.php';
|
||||
$app = require_once __DIR__ . '/../bootstrap/app.php';
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -120,7 +120,7 @@ function callExport() {
|
||||
var response = jqXHR.responseJSON;
|
||||
var errorText = 'The export failed. Please check the log files to find out why.';
|
||||
if (typeof response === 'object') {
|
||||
errorText =response.message;
|
||||
errorText = response.message;
|
||||
}
|
||||
|
||||
showError(errorText);
|
||||
|
@ -42,5 +42,5 @@ function setupIntro(steps) {
|
||||
}
|
||||
|
||||
function reportIntroFinished() {
|
||||
$.post(routeForFinishedTour, {_token:token});
|
||||
$.post(routeForFinishedTour, {_token: token});
|
||||
}
|
@ -58,7 +58,7 @@ function testRuleTriggers(e) {
|
||||
var obj = $(e.target);
|
||||
var ruleId = parseInt(obj.data('id'));
|
||||
var icon = obj;
|
||||
if(obj.prop("tagName") === 'A') {
|
||||
if (obj.prop("tagName") === 'A') {
|
||||
icon = $('i', obj);
|
||||
}
|
||||
// change icon:
|
||||
|
@ -31,7 +31,14 @@ $(function () {
|
||||
*/
|
||||
|
||||
// make map:
|
||||
var mymap = L.map('tag_location_map', {zoomControl: false, touchZoom: false, doubleClickZoom: false, scrollWheelZoom: false, boxZoom: false, dragging: false}).setView([latitude, longitude], zoomLevel);
|
||||
var mymap = L.map('tag_location_map', {
|
||||
zoomControl: false,
|
||||
touchZoom: false,
|
||||
doubleClickZoom: false,
|
||||
scrollWheelZoom: false,
|
||||
boxZoom: false,
|
||||
dragging: false
|
||||
}).setView([latitude, longitude], zoomLevel);
|
||||
|
||||
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
|
||||
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
|
||||
@ -40,7 +47,7 @@ $(function () {
|
||||
accessToken: mapboxToken
|
||||
}).addTo(mymap);
|
||||
|
||||
if(doPlaceMarker) {
|
||||
if (doPlaceMarker) {
|
||||
var marker = L.marker([latitude, longitude]).addTo(mymap);
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ $(function () {
|
||||
source: data,
|
||||
autoSelect: true
|
||||
});
|
||||
$input.change(function() {
|
||||
$input.change(function () {
|
||||
var current = $input.typeahead("getActive");
|
||||
if (current) {
|
||||
// Some item from your model is active!
|
||||
|
@ -35,7 +35,7 @@ trait CreatesApplication
|
||||
*/
|
||||
public function createApplication()
|
||||
{
|
||||
$app = require __DIR__.'/../bootstrap/app.php';
|
||||
$app = require __DIR__ . '/../bootstrap/app.php';
|
||||
|
||||
$app->make(Kernel::class)->bootstrap();
|
||||
|
||||
|
@ -205,7 +205,7 @@ class BudgetControllerTest extends TestCase
|
||||
// mock stuff
|
||||
$budget = factory(Budget::class)->make();
|
||||
$budgetLimit = factory(BudgetLimit::class)->make();
|
||||
$budgetInfo = [
|
||||
$budgetInfo = [
|
||||
$budget->id => [
|
||||
'spent' => '0',
|
||||
'budgeted' => '0',
|
||||
|
@ -155,7 +155,7 @@ class ExportControllerTest extends TestCase
|
||||
$processor->shouldReceive('collectOldUploads')->once();
|
||||
$processor->shouldReceive('collectAttachments')->once();
|
||||
|
||||
$job = new ExportJob;
|
||||
$job = new ExportJob;
|
||||
$job->user = $this->user();
|
||||
|
||||
$repository->shouldReceive('changeStatus')->andReturn(true);
|
||||
|
@ -23,15 +23,10 @@ declare(strict_types=1);
|
||||
|
||||
namespace Tests\Feature\Controllers;
|
||||
|
||||
use Amount;
|
||||
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\Tag;
|
||||
use FireflyIII\Models\Transaction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||
|
@ -296,7 +296,7 @@ class SingleControllerTest extends TestCase
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::store
|
||||
* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::groupedActiveAccountList
|
||||
* @covers \FireflyIII\Http\Controllers\Transaction\SingleController::groupedActiveAccountList
|
||||
*/
|
||||
public function testStoreSuccess()
|
||||
{
|
||||
|
@ -25,7 +25,6 @@ declare(strict_types=1);
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
|
@ -25,7 +25,6 @@ declare(strict_types=1);
|
||||
namespace Tests\Unit;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
|
||||
class ExampleTest extends TestCase
|
||||
{
|
||||
|
@ -22,6 +22,7 @@
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests\Unit\TransactionRules\Actions;
|
||||
|
||||
use FireflyIII\Models\RuleAction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\TransactionRules\Actions\ClearCategory;
|
||||
@ -41,7 +42,7 @@ class ClearCategoryTest extends TestCase
|
||||
public function testAct()
|
||||
{
|
||||
// associate budget with journal:
|
||||
$journal = TransactionJournal::find(5);
|
||||
$journal = TransactionJournal::find(5);
|
||||
$category = $journal->user->categories()->first();
|
||||
$journal->budgets()->save($category);
|
||||
$this->assertGreaterThan(0, $journal->categories()->count());
|
||||
|
@ -55,10 +55,10 @@ class PrependDescriptionTest extends TestCase
|
||||
$action = new PrependDescription($ruleAction);
|
||||
$result = $action->act($journal);
|
||||
$this->assertTrue($result);
|
||||
$journal = TransactionJournal::find(7);
|
||||
$journal = TransactionJournal::find(7);
|
||||
|
||||
// assert result
|
||||
$this->assertEquals($prepend.$description, $journal->description);
|
||||
$this->assertEquals($prepend . $description, $journal->description);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -166,6 +166,7 @@ class SetDestinationAccountTest extends TestCase
|
||||
|
||||
/**
|
||||
* Test this on a split journal.
|
||||
*
|
||||
* @covers \FireflyIII\TransactionRules\Actions\SetDestinationAccount::__construct()
|
||||
* @covers \FireflyIII\TransactionRules\Actions\SetDestinationAccount::act()
|
||||
*/
|
||||
|
@ -27,7 +27,6 @@ namespace Tests\Unit\TransactionRules\Actions;
|
||||
use FireflyIII\Models\Note;
|
||||
use FireflyIII\Models\RuleAction;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\TransactionRules\Actions\ClearNotes;
|
||||
use FireflyIII\TransactionRules\Actions\SetNotes;
|
||||
use Tests\TestCase;
|
||||
|
||||
|
@ -35,18 +35,6 @@ use Tests\TestCase;
|
||||
*/
|
||||
class AmountLessTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\AmountLess::triggered
|
||||
*/
|
||||
public function testTriggeredLess()
|
||||
{
|
||||
$journal = new TransactionJournal;
|
||||
$journal->destination_amount = '12.34';
|
||||
$trigger = AmountLess::makeFromStrings('12.50', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\AmountLess::triggered
|
||||
*/
|
||||
@ -59,6 +47,18 @@ class AmountLessTest extends TestCase
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\AmountLess::triggered
|
||||
*/
|
||||
public function testTriggeredLess()
|
||||
{
|
||||
$journal = new TransactionJournal;
|
||||
$journal->destination_amount = '12.34';
|
||||
$trigger = AmountLess::makeFromStrings('12.50', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\AmountLess::triggered
|
||||
*/
|
||||
|
@ -47,19 +47,6 @@ class DescriptionContainsTest extends TestCase
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered
|
||||
*/
|
||||
public function testTriggeredNot()
|
||||
{
|
||||
$journal = new TransactionJournal;
|
||||
$journal->description = 'Lorem IPSUM bla bla ';
|
||||
$trigger = DescriptionContains::makeFromStrings('blurb', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered
|
||||
*/
|
||||
@ -84,6 +71,18 @@ class DescriptionContainsTest extends TestCase
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered
|
||||
*/
|
||||
public function testTriggeredNot()
|
||||
{
|
||||
$journal = new TransactionJournal;
|
||||
$journal->description = 'Lorem IPSUM bla bla ';
|
||||
$trigger = DescriptionContains::makeFromStrings('blurb', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered
|
||||
*/
|
||||
|
@ -50,16 +50,15 @@ class DescriptionEndsTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered
|
||||
*/
|
||||
public function testTriggeredNot()
|
||||
public function testTriggeredClose()
|
||||
{
|
||||
$journal = new TransactionJournal;
|
||||
$journal->description = 'Lorem IPSUM blabla';
|
||||
$trigger = DescriptionEnds::makeFromStrings('lorem', false);
|
||||
$journal->description = 'Something is going to happen';
|
||||
$trigger = DescriptionEnds::makeFromStrings('happe', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered
|
||||
*/
|
||||
@ -75,11 +74,11 @@ class DescriptionEndsTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered
|
||||
*/
|
||||
public function testTriggeredClose()
|
||||
public function testTriggeredLongSearch()
|
||||
{
|
||||
$journal = new TransactionJournal;
|
||||
$journal->description = 'Something is going to happen';
|
||||
$trigger = DescriptionEnds::makeFromStrings('happe', false);
|
||||
$journal->description = 'Something';
|
||||
$trigger = DescriptionEnds::makeFromStrings('Something is', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
@ -99,11 +98,11 @@ class DescriptionEndsTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered
|
||||
*/
|
||||
public function testTriggeredLongSearch()
|
||||
public function testTriggeredNot()
|
||||
{
|
||||
$journal = new TransactionJournal;
|
||||
$journal->description = 'Something';
|
||||
$trigger = DescriptionEnds::makeFromStrings('Something is', false);
|
||||
$journal->description = 'Lorem IPSUM blabla';
|
||||
$trigger = DescriptionEnds::makeFromStrings('lorem', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
@ -50,16 +50,15 @@ class DescriptionIsTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::triggered
|
||||
*/
|
||||
public function testTriggeredNot()
|
||||
public function testTriggeredClose()
|
||||
{
|
||||
$journal = new TransactionJournal;
|
||||
$journal->description = 'Lorem IPSUM blabla';
|
||||
$trigger = DescriptionIs::makeFromStrings('lorem', false);
|
||||
$journal->description = 'Something is going to happen';
|
||||
$trigger = DescriptionIs::makeFromStrings('Something is going to happe', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::triggered
|
||||
*/
|
||||
@ -75,11 +74,11 @@ class DescriptionIsTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::triggered
|
||||
*/
|
||||
public function testTriggeredClose()
|
||||
public function testTriggeredNot()
|
||||
{
|
||||
$journal = new TransactionJournal;
|
||||
$journal->description = 'Something is going to happen';
|
||||
$trigger = DescriptionIs::makeFromStrings('Something is going to happe', false);
|
||||
$journal->description = 'Lorem IPSUM blabla';
|
||||
$trigger = DescriptionIs::makeFromStrings('lorem', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
@ -50,16 +50,15 @@ class DescriptionStartsTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered
|
||||
*/
|
||||
public function testTriggeredNot()
|
||||
public function testTriggeredClose()
|
||||
{
|
||||
$journal = new TransactionJournal;
|
||||
$journal->description = 'Lorem IPSUM blabla';
|
||||
$trigger = DescriptionStarts::makeFromStrings('blabla', false);
|
||||
$journal->description = 'Something is going to happen';
|
||||
$trigger = DescriptionStarts::makeFromStrings('omething', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered
|
||||
*/
|
||||
@ -75,11 +74,11 @@ class DescriptionStartsTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered
|
||||
*/
|
||||
public function testTriggeredClose()
|
||||
public function testTriggeredLongSearch()
|
||||
{
|
||||
$journal = new TransactionJournal;
|
||||
$journal->description = 'Something is going to happen';
|
||||
$trigger = DescriptionStarts::makeFromStrings('omething', false);
|
||||
$journal->description = 'Something';
|
||||
$trigger = DescriptionStarts::makeFromStrings('Something is', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
@ -87,11 +86,11 @@ class DescriptionStartsTest extends TestCase
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered
|
||||
*/
|
||||
public function testTriggeredLongSearch()
|
||||
public function testTriggeredNot()
|
||||
{
|
||||
$journal = new TransactionJournal;
|
||||
$journal->description = 'Something';
|
||||
$trigger = DescriptionStarts::makeFromStrings('Something is', false);
|
||||
$journal->description = 'Lorem IPSUM blabla';
|
||||
$trigger = DescriptionStarts::makeFromStrings('blabla', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
@ -62,6 +62,16 @@ class FromAccountIsTest extends TestCase
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\FromAccountIs::willMatchEverything
|
||||
*/
|
||||
public function testWillMatchEverythingEmpty()
|
||||
{
|
||||
$value = '';
|
||||
$result = FromAccountIs::willMatchEverything($value);
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\FromAccountIs::willMatchEverything
|
||||
*/
|
||||
@ -82,15 +92,4 @@ class FromAccountIsTest extends TestCase
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\FromAccountIs::willMatchEverything
|
||||
*/
|
||||
public function testWillMatchEverythingEmpty()
|
||||
{
|
||||
$value = '';
|
||||
$result = FromAccountIs::willMatchEverything($value);
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ class FromAccountStartsTest extends TestCase
|
||||
$transaction = $journal->transactions()->where('amount', '<', 0)->first();
|
||||
$account = $transaction->account;
|
||||
|
||||
$trigger = FromAccountStarts::makeFromStrings(substr($account->name,0, -3), false);
|
||||
$trigger = FromAccountStarts::makeFromStrings(substr($account->name, 0, -3), false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
|
@ -39,8 +39,8 @@ class HasAnyTagTest extends TestCase
|
||||
*/
|
||||
public function testTriggered()
|
||||
{
|
||||
$journal = TransactionJournal::find(25);
|
||||
$tag = $journal->user->tags()->first();
|
||||
$journal = TransactionJournal::find(25);
|
||||
$tag = $journal->user->tags()->first();
|
||||
$journal->tags()->detach();
|
||||
$journal->tags()->save($tag);
|
||||
|
||||
|
@ -53,22 +53,6 @@ class NotesAreTest extends TestCase
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered
|
||||
*/
|
||||
public function testTriggeredEmpty()
|
||||
{
|
||||
$journal = TransactionJournal::find(40);
|
||||
$journal->notes()->delete();
|
||||
$note = new Note();
|
||||
$note->noteable()->associate($journal);
|
||||
$note->text = '';
|
||||
$note->save();
|
||||
$trigger = NotesAre::makeFromStrings('', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered
|
||||
*/
|
||||
@ -85,6 +69,22 @@ class NotesAreTest extends TestCase
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered
|
||||
*/
|
||||
public function testTriggeredEmpty()
|
||||
{
|
||||
$journal = TransactionJournal::find(40);
|
||||
$journal->notes()->delete();
|
||||
$note = new Note();
|
||||
$note->noteable()->associate($journal);
|
||||
$note->text = '';
|
||||
$note->save();
|
||||
$trigger = NotesAre::makeFromStrings('', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered
|
||||
*/
|
||||
|
@ -53,38 +53,6 @@ class NotesContainTest extends TestCase
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered
|
||||
*/
|
||||
public function testTriggeredEmpty()
|
||||
{
|
||||
$journal = TransactionJournal::find(44);
|
||||
$journal->notes()->delete();
|
||||
$note = new Note();
|
||||
$note->noteable()->associate($journal);
|
||||
$note->text = '';
|
||||
$note->save();
|
||||
$trigger = NotesContain::makeFromStrings('', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered
|
||||
*/
|
||||
public function testTriggeredPartial()
|
||||
{
|
||||
$journal = TransactionJournal::find(45);
|
||||
$journal->notes()->delete();
|
||||
$note = new Note();
|
||||
$note->noteable()->associate($journal);
|
||||
$note->text = 'Some note';
|
||||
$note->save();
|
||||
$trigger = NotesContain::makeFromStrings('Some note contains', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered
|
||||
*/
|
||||
@ -101,6 +69,22 @@ class NotesContainTest extends TestCase
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered
|
||||
*/
|
||||
public function testTriggeredEmpty()
|
||||
{
|
||||
$journal = TransactionJournal::find(44);
|
||||
$journal->notes()->delete();
|
||||
$note = new Note();
|
||||
$note->noteable()->associate($journal);
|
||||
$note->text = '';
|
||||
$note->save();
|
||||
$trigger = NotesContain::makeFromStrings('', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered
|
||||
*/
|
||||
@ -113,6 +97,22 @@ class NotesContainTest extends TestCase
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered
|
||||
*/
|
||||
public function testTriggeredPartial()
|
||||
{
|
||||
$journal = TransactionJournal::find(45);
|
||||
$journal->notes()->delete();
|
||||
$note = new Note();
|
||||
$note->noteable()->associate($journal);
|
||||
$note->text = 'Some note';
|
||||
$note->save();
|
||||
$trigger = NotesContain::makeFromStrings('Some note contains', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::willMatchEverything
|
||||
*/
|
||||
|
@ -36,6 +36,20 @@ use Tests\TestCase;
|
||||
class TagIsTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\TagIs::triggered
|
||||
*/
|
||||
public function testNotTriggered()
|
||||
{
|
||||
$journal = TransactionJournal::find(58);
|
||||
$journal->tags()->detach();
|
||||
$this->assertEquals(0, $journal->tags()->count());
|
||||
|
||||
$trigger = TagIs::makeFromStrings('SomeTag', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\TagIs::triggered
|
||||
*/
|
||||
@ -58,20 +72,6 @@ class TagIsTest extends TestCase
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\TagIs::triggered
|
||||
*/
|
||||
public function testNotTriggered()
|
||||
{
|
||||
$journal = TransactionJournal::find(58);
|
||||
$journal->tags()->detach();
|
||||
$this->assertEquals(0, $journal->tags()->count());
|
||||
|
||||
$trigger = TagIs::makeFromStrings('SomeTag', false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\TagIs::willMatchEverything
|
||||
*/
|
||||
|
@ -62,16 +62,6 @@ class ToAccountIsTest extends TestCase
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::willMatchEverything
|
||||
*/
|
||||
public function testWillMatchEverythingNotNull()
|
||||
{
|
||||
$value = 'x';
|
||||
$result = ToAccountIs::willMatchEverything($value);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::willMatchEverything
|
||||
*/
|
||||
@ -82,6 +72,16 @@ class ToAccountIsTest extends TestCase
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::willMatchEverything
|
||||
*/
|
||||
public function testWillMatchEverythingNotNull()
|
||||
{
|
||||
$value = 'x';
|
||||
$result = ToAccountIs::willMatchEverything($value);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::willMatchEverything
|
||||
*/
|
||||
|
@ -44,7 +44,7 @@ class ToAccountStartsTest extends TestCase
|
||||
$transaction = $journal->transactions()->where('amount', '>', 0)->first();
|
||||
$account = $transaction->account;
|
||||
|
||||
$trigger = ToAccountStarts::makeFromStrings(substr($account->name,0, -3), false);
|
||||
$trigger = ToAccountStarts::makeFromStrings(substr($account->name, 0, -3), false);
|
||||
$result = $trigger->triggered($journal);
|
||||
$this->assertTrue($result);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user