Account show didn't show anything.

This commit is contained in:
James Cole
2015-03-01 10:44:10 +01:00
parent 19e34b460f
commit 675530458c
3 changed files with 16 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ class AccountRepository implements AccountRepositoryInterface
*/
public function getJournals(Account $account, $page, $range = 'session')
{
$offset = $page * 50;
$offset = ($page-1) * 50;
$query = Auth::user()
->transactionJournals()
->withRelevantData()
@@ -55,7 +55,7 @@ class AccountRepository implements AccountRepositoryInterface
->orderBy('date', 'DESC');
if ($range == 'session') {
$query->before(Session::get('end', Carbon::now()->startOfMonth()));
$query->before(Session::get('end', Carbon::now()->endOfMonth()));
$query->after(Session::get('start', Carbon::now()->startOfMonth()));
}
$count = $query->count();