mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-17 09:51:40 +00:00
Correctly order account names.
This commit is contained in:
@@ -137,7 +137,7 @@ class ReportHelper implements ReportHelperInterface
|
|||||||
$sharedAccounts[] = $account->id;
|
$sharedAccounts[] = $account->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$accounts = \Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*'])->filter(
|
$accounts = \Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->orderBy('accounts.name','ASC')->get(['accounts.*'])->filter(
|
||||||
function (Account $account) use ($sharedAccounts) {
|
function (Account $account) use ($sharedAccounts) {
|
||||||
if (!in_array($account->id, $sharedAccounts)) {
|
if (!in_array($account->id, $sharedAccounts)) {
|
||||||
return $account;
|
return $account;
|
||||||
|
@@ -129,6 +129,7 @@ class ReportQuery implements ReportQueryInterface
|
|||||||
$join->on('account_meta.account_id', '=', 'accounts.id')->where('account_meta.name', '=', 'accountRole');
|
$join->on('account_meta.account_id', '=', 'accounts.id')->where('account_meta.name', '=', 'accountRole');
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
->orderBy('accounts.name','ASC')
|
||||||
->where(
|
->where(
|
||||||
function (Builder $query) {
|
function (Builder $query) {
|
||||||
$query->where('account_meta.data', '!=', '"sharedAsset"');
|
$query->where('account_meta.data', '!=', '"sharedAsset"');
|
||||||
|
@@ -8,11 +8,11 @@ use FireflyIII\Models\Bill;
|
|||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
|
use Input;
|
||||||
use Redirect;
|
use Redirect;
|
||||||
use Session;
|
use Session;
|
||||||
use URL;
|
use URL;
|
||||||
use View;
|
use View;
|
||||||
use Input;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class BillController
|
* Class BillController
|
||||||
@@ -109,7 +109,9 @@ class BillController extends Controller
|
|||||||
return Redirect::intended('/');
|
return Redirect::intended('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
$set = \DB::table('transactions')->where('amount', '>', 0)->where('amount', '>=', $bill->amount_min)->where('amount', '<=', $bill->amount_max)->get(['transaction_journal_id']);
|
$set = \DB::table('transactions')->where('amount', '>', 0)->where('amount', '>=', $bill->amount_min)->where('amount', '<=', $bill->amount_max)->get(
|
||||||
|
['transaction_journal_id']
|
||||||
|
);
|
||||||
$ids = [];
|
$ids = [];
|
||||||
|
|
||||||
/** @var Transaction $entry */
|
/** @var Transaction $entry */
|
||||||
|
@@ -1,15 +1,15 @@
|
|||||||
<?php namespace FireflyIII\Http\Controllers;
|
<?php namespace FireflyIII\Http\Controllers;
|
||||||
|
|
||||||
|
use Cache;
|
||||||
use FireflyIII\Http\Requests;
|
use FireflyIII\Http\Requests;
|
||||||
use FireflyIII\Http\Requests\CurrencyFormRequest;
|
use FireflyIII\Http\Requests\CurrencyFormRequest;
|
||||||
use FireflyIII\Models\Transaction;
|
use FireflyIII\Models\Transaction;
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
|
use Input;
|
||||||
use Preferences;
|
use Preferences;
|
||||||
use Redirect;
|
use Redirect;
|
||||||
use Session;
|
use Session;
|
||||||
use View;
|
use View;
|
||||||
use Cache;
|
|
||||||
use Input;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -78,9 +78,9 @@ class GoogleChartController extends Controller
|
|||||||
$end = Session::get('end', Carbon::now()->endOfMonth());
|
$end = Session::get('end', Carbon::now()->endOfMonth());
|
||||||
|
|
||||||
if ($frontPage->data == []) {
|
if ($frontPage->data == []) {
|
||||||
$accounts = Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*']);
|
$accounts = Auth::user()->accounts()->orderBy('accounts.name', 'ASC')->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*']);
|
||||||
} else {
|
} else {
|
||||||
$accounts = Auth::user()->accounts()->whereIn('id', $frontPage->data)->get(['accounts.*']);
|
$accounts = Auth::user()->accounts()->whereIn('id', $frontPage->data)->orderBy('accounts.name', 'ASC')->get(['accounts.*']);
|
||||||
}
|
}
|
||||||
$index = 1;
|
$index = 1;
|
||||||
/** @var Account $account */
|
/** @var Account $account */
|
||||||
@@ -521,7 +521,6 @@ class GoogleChartController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param PiggyBank $piggyBank
|
* @param PiggyBank $piggyBank
|
||||||
*
|
*
|
||||||
|
@@ -1,21 +1,19 @@
|
|||||||
<?php namespace FireflyIII\Http\Controllers;
|
<?php namespace FireflyIII\Http\Controllers;
|
||||||
|
|
||||||
|
use Cache;
|
||||||
use ErrorException;
|
use ErrorException;
|
||||||
use FireflyIII\Http\Requests;
|
use FireflyIII\Http\Requests;
|
||||||
use FireflyIII\Http\Controllers\Controller;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use League\CommonMark\CommonMarkConverter;
|
use League\CommonMark\CommonMarkConverter;
|
||||||
use Route;
|
|
||||||
use Response;
|
use Response;
|
||||||
use Cache;
|
use Route;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class HelpController
|
* Class HelpController
|
||||||
*
|
*
|
||||||
* @package FireflyIII\Http\Controllers
|
* @package FireflyIII\Http\Controllers
|
||||||
*/
|
*/
|
||||||
class HelpController extends Controller {
|
class HelpController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $route
|
* @param $route
|
||||||
|
@@ -7,7 +7,7 @@ use Input;
|
|||||||
use Preferences;
|
use Preferences;
|
||||||
use Redirect;
|
use Redirect;
|
||||||
use Session;
|
use Session;
|
||||||
use DB;
|
|
||||||
/**
|
/**
|
||||||
* Class HomeController
|
* Class HomeController
|
||||||
*
|
*
|
||||||
@@ -64,7 +64,7 @@ class HomeController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
if ($frontPage->data == []) {
|
if ($frontPage->data == []) {
|
||||||
$accounts = Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*']);
|
$accounts = Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->orderBy('accounts.name', 'ASC')->get(['accounts.*']);
|
||||||
} else {
|
} else {
|
||||||
$accounts = Auth::user()->accounts()->whereIn('id', $frontPage->data)->get(['accounts.*']);
|
$accounts = Auth::user()->accounts()->whereIn('id', $frontPage->data)->get(['accounts.*']);
|
||||||
}
|
}
|
||||||
|
@@ -7,6 +7,7 @@ use FireflyIII\Http\Requests;
|
|||||||
use FireflyIII\Models\Bill;
|
use FireflyIII\Models\Bill;
|
||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
use Input;
|
use Input;
|
||||||
|
use Preferences;
|
||||||
use Response;
|
use Response;
|
||||||
use Session;
|
use Session;
|
||||||
|
|
||||||
@@ -121,8 +122,6 @@ class JsonController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Response::json($return);
|
return Response::json($return);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -132,7 +131,7 @@ class JsonController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function expenseAccounts()
|
public function expenseAccounts()
|
||||||
{
|
{
|
||||||
$list = Auth::user()->accounts()->accountTypeIn(['Expense account', 'Beneficiary account'])->get();
|
$list = Auth::user()->accounts()->orderBy('accounts.name', 'ASC')->accountTypeIn(['Expense account', 'Beneficiary account'])->get();
|
||||||
$return = [];
|
$return = [];
|
||||||
foreach ($list as $entry) {
|
foreach ($list as $entry) {
|
||||||
$return[] = $entry->name;
|
$return[] = $entry->name;
|
||||||
@@ -147,7 +146,7 @@ class JsonController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function revenueAccounts()
|
public function revenueAccounts()
|
||||||
{
|
{
|
||||||
$list = Auth::user()->accounts()->accountTypeIn(['Revenue account'])->get();
|
$list = Auth::user()->accounts()->accountTypeIn(['Revenue account'])->orderBy('accounts.name', 'ASC')->get(['accounts.*']);
|
||||||
$return = [];
|
$return = [];
|
||||||
foreach ($list as $entry) {
|
foreach ($list as $entry) {
|
||||||
$return[] = $entry->name;
|
$return[] = $entry->name;
|
||||||
@@ -157,4 +156,27 @@ class JsonController extends Controller
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \Symfony\Component\HttpFoundation\Response
|
||||||
|
*/
|
||||||
|
public function showSharedReports()
|
||||||
|
{
|
||||||
|
$pref = Preferences::get('showSharedReports', false);
|
||||||
|
|
||||||
|
return Response::json(['value' => $pref->data]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return \Symfony\Component\HttpFoundation\Response
|
||||||
|
*/
|
||||||
|
public function setSharedReports()
|
||||||
|
{
|
||||||
|
$pref = Preferences::get('showSharedReports', false);
|
||||||
|
$new = !$pref->data;
|
||||||
|
Preferences::set('showSharedReports', $new);
|
||||||
|
|
||||||
|
|
||||||
|
return Response::json(['value' => $new]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -63,7 +63,9 @@ class PiggyBankController extends Controller
|
|||||||
{
|
{
|
||||||
|
|
||||||
$periods = Config::get('firefly.piggy_bank_periods');
|
$periods = Config::get('firefly.piggy_bank_periods');
|
||||||
$accounts = ExpandedForm::makeSelectList(Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*']));
|
$accounts = ExpandedForm::makeSelectList(
|
||||||
|
Auth::user()->accounts()->orderBy('accounts.name', 'ASC')->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*'])
|
||||||
|
);
|
||||||
$subTitle = 'Create new piggy bank';
|
$subTitle = 'Create new piggy bank';
|
||||||
$subTitleIcon = 'fa-plus';
|
$subTitleIcon = 'fa-plus';
|
||||||
|
|
||||||
@@ -107,7 +109,9 @@ class PiggyBankController extends Controller
|
|||||||
{
|
{
|
||||||
|
|
||||||
$periods = Config::get('firefly.piggy_bank_periods');
|
$periods = Config::get('firefly.piggy_bank_periods');
|
||||||
$accounts = ExpandedForm::makeSelectList(Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*']));
|
$accounts = ExpandedForm::makeSelectList(
|
||||||
|
Auth::user()->accounts()->orderBy('accounts.name', 'ASC')->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*'])
|
||||||
|
);
|
||||||
$subTitle = 'Edit piggy bank "' . e($piggyBank->name) . '"';
|
$subTitle = 'Edit piggy bank "' . e($piggyBank->name) . '"';
|
||||||
$subTitleIcon = 'fa-pencil';
|
$subTitleIcon = 'fa-pencil';
|
||||||
|
|
||||||
@@ -335,5 +339,4 @@ class PiggyBankController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,21 +1,20 @@
|
|||||||
<?php namespace FireflyIII\Http\Controllers;
|
<?php namespace FireflyIII\Http\Controllers;
|
||||||
|
|
||||||
use FireflyIII\Http\Requests;
|
|
||||||
use FireflyIII\Http\Controllers\Controller;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use View;
|
|
||||||
use Auth;
|
use Auth;
|
||||||
use Preferences;
|
use FireflyIII\Http\Requests;
|
||||||
use Input;
|
use Input;
|
||||||
use Session;
|
use Preferences;
|
||||||
use Redirect;
|
use Redirect;
|
||||||
|
use Session;
|
||||||
|
use View;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class PreferencesController
|
* Class PreferencesController
|
||||||
*
|
*
|
||||||
* @package FireflyIII\Http\Controllers
|
* @package FireflyIII\Http\Controllers
|
||||||
*/
|
*/
|
||||||
class PreferencesController extends Controller {
|
class PreferencesController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -32,7 +31,7 @@ class PreferencesController extends Controller {
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$accounts = Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*']);
|
$accounts = Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->orderBy('accounts.name', 'ASC')->get(['accounts.*']);
|
||||||
$viewRange = Preferences::get('viewRange', '1M');
|
$viewRange = Preferences::get('viewRange', '1M');
|
||||||
$viewRangeValue = $viewRange->data;
|
$viewRangeValue = $viewRange->data;
|
||||||
$frontPage = Preferences::get('frontPageAccounts', []);
|
$frontPage = Preferences::get('frontPageAccounts', []);
|
||||||
|
@@ -6,8 +6,8 @@ use FireflyIII\Helpers\Reminders\ReminderHelperInterface;
|
|||||||
use FireflyIII\Http\Requests;
|
use FireflyIII\Http\Requests;
|
||||||
use FireflyIII\Models\Reminder;
|
use FireflyIII\Models\Reminder;
|
||||||
use Redirect;
|
use Redirect;
|
||||||
use URL;
|
|
||||||
use Session;
|
use Session;
|
||||||
|
use URL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ReminderController
|
* Class ReminderController
|
||||||
|
@@ -36,7 +36,9 @@ class RepeatedExpenseController extends Controller
|
|||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
$periods = Config::get('firefly.piggy_bank_periods');
|
$periods = Config::get('firefly.piggy_bank_periods');
|
||||||
$accounts = ExpandedForm::makeSelectList(Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*']));
|
$accounts = ExpandedForm::makeSelectList(
|
||||||
|
Auth::user()->accounts()->orderBy('accounts.name', 'ASC')->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*'])
|
||||||
|
);
|
||||||
|
|
||||||
return view('repeatedExpense.create', compact('accounts', 'periods'))->with('subTitle', 'Create new repeated expense')->with(
|
return view('repeatedExpense.create', compact('accounts', 'periods'))->with('subTitle', 'Create new repeated expense')->with(
|
||||||
'subTitleIcon', 'fa-plus'
|
'subTitleIcon', 'fa-plus'
|
||||||
@@ -79,7 +81,9 @@ class RepeatedExpenseController extends Controller
|
|||||||
{
|
{
|
||||||
|
|
||||||
$periods = Config::get('firefly.piggy_bank_periods');
|
$periods = Config::get('firefly.piggy_bank_periods');
|
||||||
$accounts = ExpandedForm::makeSelectList(Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*']));
|
$accounts = ExpandedForm::makeSelectList(
|
||||||
|
Auth::user()->accounts()->orderBy('accounts.name', 'ASC')->accountTypeIn(['Default account', 'Asset account'])->get(['accounts.*'])
|
||||||
|
);
|
||||||
$subTitle = 'Edit repeated expense "' . e($repeatedExpense->name) . '"';
|
$subTitle = 'Edit repeated expense "' . e($repeatedExpense->name) . '"';
|
||||||
$subTitleIcon = 'fa-pencil';
|
$subTitleIcon = 'fa-pencil';
|
||||||
|
|
||||||
|
@@ -1,10 +1,7 @@
|
|||||||
<?php namespace FireflyIII\Http\Controllers;
|
<?php namespace FireflyIII\Http\Controllers;
|
||||||
|
|
||||||
use FireflyIII\Http\Requests;
|
use FireflyIII\Http\Requests;
|
||||||
use FireflyIII\Http\Controllers\Controller;
|
|
||||||
|
|
||||||
use FireflyIII\Support\Search\SearchInterface;
|
use FireflyIII\Support\Search\SearchInterface;
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Input;
|
use Input;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -12,7 +9,8 @@ use Input;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Http\Controllers
|
* @package FireflyIII\Http\Controllers
|
||||||
*/
|
*/
|
||||||
class SearchController extends Controller {
|
class SearchController extends Controller
|
||||||
|
{
|
||||||
/**
|
/**
|
||||||
* Results always come in the form of an array [results, count, fullCount]
|
* Results always come in the form of an array [results, count, fullCount]
|
||||||
*/
|
*/
|
||||||
|
@@ -11,7 +11,6 @@ use FireflyIII\Models\Transaction;
|
|||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
use Illuminate\Pagination\LengthAwarePaginator;
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
use Illuminate\Support\Collection;
|
|
||||||
use Input;
|
use Input;
|
||||||
use Redirect;
|
use Redirect;
|
||||||
use Session;
|
use Session;
|
||||||
@@ -43,7 +42,9 @@ class TransactionController extends Controller
|
|||||||
public function create($what = 'deposit')
|
public function create($what = 'deposit')
|
||||||
{
|
{
|
||||||
$accounts = ExpandedForm::makeSelectList(
|
$accounts = ExpandedForm::makeSelectList(
|
||||||
Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->where('active', 1)->orderBy('name', 'DESC')->get(['accounts.*'])
|
Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->orderBy('accounts.name', 'ASC')->orderBy('name', 'ASC')->where(
|
||||||
|
'active', 1
|
||||||
|
)->orderBy('name', 'DESC')->get(['accounts.*'])
|
||||||
);
|
);
|
||||||
$budgets = ExpandedForm::makeSelectList(Auth::user()->budgets()->get());
|
$budgets = ExpandedForm::makeSelectList(Auth::user()->budgets()->get());
|
||||||
$budgets[0] = '(no budget)';
|
$budgets[0] = '(no budget)';
|
||||||
@@ -120,7 +121,9 @@ class TransactionController extends Controller
|
|||||||
{
|
{
|
||||||
$what = strtolower($journal->transactiontype->type);
|
$what = strtolower($journal->transactiontype->type);
|
||||||
$accounts = ExpandedForm::makeSelectList(
|
$accounts = ExpandedForm::makeSelectList(
|
||||||
Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->where('active', 1)->orderBy('name', 'DESC')->get(['accounts.*'])
|
Auth::user()->accounts()->accountTypeIn(['Default account', 'Asset account'])->orderBy('accounts.name', 'ASC')->where('active', 1)->orderBy(
|
||||||
|
'name', 'DESC'
|
||||||
|
)->get(['accounts.*'])
|
||||||
);
|
);
|
||||||
$budgets = ExpandedForm::makeSelectList(Auth::user()->budgets()->get());
|
$budgets = ExpandedForm::makeSelectList(Auth::user()->budgets()->get());
|
||||||
$budgets[0] = '(no budget)';
|
$budgets[0] = '(no budget)';
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
use FireflyIII\Models\Account;
|
use FireflyIII\Models\Account;
|
||||||
use FireflyIII\Models\Bill;
|
use FireflyIII\Models\Bill;
|
||||||
use FireflyIII\Models\Reminder;
|
|
||||||
use FireflyIII\Models\Budget;
|
use FireflyIII\Models\Budget;
|
||||||
use FireflyIII\Models\Category;
|
use FireflyIII\Models\Category;
|
||||||
use FireflyIII\Models\LimitRepetition;
|
use FireflyIII\Models\LimitRepetition;
|
||||||
|
use FireflyIII\Models\PiggyBank;
|
||||||
|
use FireflyIII\Models\Reminder;
|
||||||
use FireflyIII\Models\TransactionCurrency;
|
use FireflyIII\Models\TransactionCurrency;
|
||||||
use FireflyIII\Models\TransactionJournal;
|
use FireflyIII\Models\TransactionJournal;
|
||||||
use FireflyIII\Models\PiggyBank;
|
|
||||||
|
|
||||||
|
|
||||||
// models
|
// models
|
||||||
@@ -260,6 +260,8 @@ Route::group(
|
|||||||
Route::get('/json/revenue-accounts', ['uses' => 'JsonController@revenueAccounts', 'as' => 'json.revenue-accounts']);
|
Route::get('/json/revenue-accounts', ['uses' => 'JsonController@revenueAccounts', 'as' => 'json.revenue-accounts']);
|
||||||
Route::get('/json/categories', ['uses' => 'JsonController@categories', 'as' => 'json.categories']);
|
Route::get('/json/categories', ['uses' => 'JsonController@categories', 'as' => 'json.categories']);
|
||||||
Route::get('/json/box', ['uses' => 'JsonController@box', 'as' => 'json.box']);
|
Route::get('/json/box', ['uses' => 'JsonController@box', 'as' => 'json.box']);
|
||||||
|
Route::get('/json/show-shared-reports', 'JsonController@showSharedReports');
|
||||||
|
Route::get('/json/show-shared-reports/set', 'JsonController@setSharedReports');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -332,8 +334,13 @@ Route::group(
|
|||||||
|
|
||||||
// pop ups for budget report:
|
// pop ups for budget report:
|
||||||
Route::get('/reports/modal/{account}/{year}/{month}/no-budget', ['uses' => 'ReportController@modalNoBudget', 'as' => 'reports.no-budget']);
|
Route::get('/reports/modal/{account}/{year}/{month}/no-budget', ['uses' => 'ReportController@modalNoBudget', 'as' => 'reports.no-budget']);
|
||||||
Route::get('/reports/modal/{account}/{year}/{month}/balanced-transfers', ['uses' => 'ReportController@modalBalancedTransfers','as' => 'reports.balanced-transfers']);
|
Route::get(
|
||||||
Route::get('/reports/modal/{account}/{year}/{month}/left-unbalanced', ['uses' => 'ReportController@modalLeftUnbalanced','as' => 'reports.left-unbalanced']);
|
'/reports/modal/{account}/{year}/{month}/balanced-transfers',
|
||||||
|
['uses' => 'ReportController@modalBalancedTransfers', 'as' => 'reports.balanced-transfers']
|
||||||
|
);
|
||||||
|
Route::get(
|
||||||
|
'/reports/modal/{account}/{year}/{month}/left-unbalanced', ['uses' => 'ReportController@modalLeftUnbalanced', 'as' => 'reports.left-unbalanced']
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search Controller
|
* Search Controller
|
||||||
|
@@ -11,6 +11,8 @@ if (typeof(google) != 'undefined') {
|
|||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
$('.openModal').on('click', openModal);
|
$('.openModal').on('click', openModal);
|
||||||
|
includeSharedToggle();
|
||||||
|
$('#includeShared').click(includeSharedSet);
|
||||||
});
|
});
|
||||||
|
|
||||||
function openModal(e) {
|
function openModal(e) {
|
||||||
@@ -27,3 +29,32 @@ function openModal(e) {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function includeSharedToggle() {
|
||||||
|
// get setting from JSON.
|
||||||
|
$.getJSON('json/show-shared-reports').success(function (data) {
|
||||||
|
console.log('GO');
|
||||||
|
if (data.value == true) {
|
||||||
|
// show shared data, update button:
|
||||||
|
//<i class="state-icon glyphicon glyphicon-check"></i>
|
||||||
|
$('#includeShared').empty().addClass('btn-info').append($('<i>').addClass('state-icon glyphicon glyphicon-check')).append(' Include shared asset accounts').show();
|
||||||
|
console.log('true');
|
||||||
|
} else {
|
||||||
|
$('#includeShared').empty().removeClass('btn-info').append($('<i>').addClass('state-icon glyphicon glyphicon-unchecked')).append(' Include shared asset accounts').show();
|
||||||
|
console.log('false');
|
||||||
|
}
|
||||||
|
}).fail(function () {
|
||||||
|
console.log('fail');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function includeSharedSet() {
|
||||||
|
// get setting from JSON.
|
||||||
|
$.getJSON('json/show-shared-reports/set').success(function (data) {
|
||||||
|
console.log('Value is now: ' + data.value);
|
||||||
|
includeSharedToggle();
|
||||||
|
}).fail(function () {
|
||||||
|
console.log('fail');
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
@@ -1,8 +1,21 @@
|
|||||||
@extends('layouts.default')
|
@extends('layouts.default')
|
||||||
@section('content')
|
@section('content')
|
||||||
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $date) !!}
|
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $date) !!}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||||
|
<p>
|
||||||
|
<a href="#" class="btn btn-default" id="includeShared" style="display:none;">
|
||||||
|
<i class="state-icon glyphicon glyphicon-unchecked"></i>
|
||||||
|
Include shared asset accounts</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
Accounts
|
||||||
|
</div>
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Account</th>
|
<th>Account</th>
|
||||||
@@ -31,9 +44,13 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
Budgets
|
||||||
|
</div>
|
||||||
<table class="table table-bordered table-striped">
|
<table class="table table-bordered table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">Budgets</th>
|
<th colspan="2">Budgets</th>
|
||||||
@@ -125,6 +142,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- modal to show various budget information -->
|
<!-- modal to show various budget information -->
|
||||||
<div class="modal fade" id="budgetModal">
|
<div class="modal fade" id="budgetModal">
|
||||||
@@ -133,6 +151,5 @@
|
|||||||
|
|
||||||
@stop
|
@stop
|
||||||
@section('scripts')
|
@section('scripts')
|
||||||
|
|
||||||
<script type="text/javascript" src="js/reports.js"></script>
|
<script type="text/javascript" src="js/reports.js"></script>
|
||||||
@stop
|
@stop
|
||||||
|
@@ -1,6 +1,15 @@
|
|||||||
@extends('layouts.default')
|
@extends('layouts.default')
|
||||||
@section('content')
|
@section('content')
|
||||||
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) !!}
|
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) !!}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||||
|
<p>
|
||||||
|
<a href="#" class="btn btn-default" id="includeShared" style="display:none;">
|
||||||
|
<i class="state-icon glyphicon glyphicon-unchecked"></i>
|
||||||
|
Include shared asset accounts</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-4 col-md-4 col-sm-4">
|
<div class="col-lg-4 col-md-4 col-sm-4">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
@@ -51,9 +60,11 @@
|
|||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@stop
|
@stop
|
||||||
|
@section('scripts')
|
||||||
|
<script type="text/javascript" src="js/reports.js"></script>
|
||||||
|
@stop
|
@@ -1,6 +1,15 @@
|
|||||||
@extends('layouts.default')
|
@extends('layouts.default')
|
||||||
@section('content')
|
@section('content')
|
||||||
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $date) !!}
|
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $date) !!}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||||
|
<p>
|
||||||
|
<a href="#" class="btn btn-default" id="includeShared" style="display:none;">
|
||||||
|
<i class="state-icon glyphicon glyphicon-unchecked"></i>
|
||||||
|
Include shared asset accounts</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-5 col-md-5 col-sm-12">
|
<div class="col-lg-5 col-md-5 col-sm-12">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
|
@@ -1,6 +1,15 @@
|
|||||||
@extends('layouts.default')
|
@extends('layouts.default')
|
||||||
@section('content')
|
@section('content')
|
||||||
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $date) !!}
|
{!! Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName(), $date) !!}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||||
|
<p>
|
||||||
|
<a href="#" class="btn btn-default" id="includeShared" style="display:none;">
|
||||||
|
<i class="state-icon glyphicon glyphicon-unchecked"></i>
|
||||||
|
Include shared asset accounts</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-10 col-md-8 col-sm-12">
|
<div class="col-lg-10 col-md-8 col-sm-12">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
|
@@ -13,7 +13,7 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
|||||||
*/
|
*/
|
||||||
public function createApplication()
|
public function createApplication()
|
||||||
{
|
{
|
||||||
$app = require __DIR__ . '/../bootstrap/app.php';
|
$app = require __DIR__ . '/../../bootstrap/app.php';
|
||||||
|
|
||||||
$app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();
|
$app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user