mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Added the ability to see cash accounts. [skip ci]
This commit is contained in:
@@ -31,6 +31,9 @@ Breadcrumbs::register(
|
||||
case 'Asset account':
|
||||
$what = 'asset';
|
||||
break;
|
||||
case 'Cash account':
|
||||
$what = 'cash';
|
||||
break;
|
||||
case 'Expense account':
|
||||
case 'Beneficiary account':
|
||||
$what = 'expense';
|
||||
|
||||
@@ -28,6 +28,7 @@ class AccountController extends BaseController
|
||||
'Expense account' => 'expense',
|
||||
'Beneficiary account' => 'expense',
|
||||
'Revenue account' => 'revenue',
|
||||
'Cash account' => 'cash',
|
||||
];
|
||||
|
||||
/** @var array */
|
||||
@@ -36,6 +37,7 @@ class AccountController extends BaseController
|
||||
'asset' => 'fa-money',
|
||||
'Asset account' => 'fa-money',
|
||||
'Default account' => 'fa-money',
|
||||
'Cash account' => 'fa-money',
|
||||
'expense' => 'fa-shopping-cart',
|
||||
'Expense account' => 'fa-shopping-cart',
|
||||
'Beneficiary account' => 'fa-shopping-cart',
|
||||
|
||||
@@ -6,8 +6,11 @@ Route::bind(
|
||||
function ($value, $route) {
|
||||
if (Auth::check()) {
|
||||
$account = Account::
|
||||
leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')->where('account_types.editable', 1)->where('accounts.id', $value)
|
||||
->where('user_id', Auth::user()->id)->first(['accounts.*']);
|
||||
leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id')
|
||||
->where('account_types.editable', 1)
|
||||
->where('accounts.id', $value)
|
||||
->where('user_id', Auth::user()->id)
|
||||
->first(['accounts.*']);
|
||||
if ($account) {
|
||||
return $account;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user