Moved to high charts.

This commit is contained in:
James Cole
2014-07-15 06:58:08 +02:00
parent 6e7ea89c70
commit 0e09e52e45
26 changed files with 2055 additions and 85 deletions

View File

@@ -16,6 +16,16 @@ class EloquentAccountRepository implements AccountRepositoryInterface
return \Auth::user()->accounts()->with('accounttype')->get();
}
public function getBeneficiaries() {
$list = \Auth::user()->accounts()->leftJoin(
'account_types', 'account_types.id', '=', 'accounts.account_type_id'
)
->where('account_types.description', 'Beneficiary account')->where('accounts.active', 1)
->get(['accounts.*']);
return $list;
}
public function find($id)
{
return \Auth::user()->accounts()->where('id', $id)->first();
@@ -42,6 +52,21 @@ class EloquentAccountRepository implements AccountRepositoryInterface
->get(['accounts.*']);
}
public function getActiveDefaultAsSelectList()
{
$list = \Auth::user()->accounts()->leftJoin(
'account_types', 'account_types.id', '=', 'accounts.account_type_id'
)
->where('account_types.description', 'Default account')->where('accounts.active', 1)
->get(['accounts.*']);
$return = [];
foreach ($list as $entry) {
$return[intval($entry->id)] = $entry->name;
}
return $return;
}
public function count()
{
return \Auth::user()->accounts()->count();