Got up to categories with the new tables.

This commit is contained in:
James Cole
2014-11-14 10:17:12 +01:00
parent 0530c0402c
commit ac2ab65471
11 changed files with 114 additions and 21 deletions

View File

@@ -224,7 +224,7 @@ class AccountController extends BaseController
/** @var \FireflyIII\Database\Account $acct */
$acct = App::make('FireflyIII\Database\Account');
$journals = $acct->getTransactionJournals($account, 50);
$journals = $acct->getTransactionJournals($account, 10);
//$data = $this->_accounts->show($account, 40);

View File

@@ -191,17 +191,28 @@ class BudgetController extends BaseController
if (!is_null($repetition) && $repetition->limit->budget->id != $budget->id) {
App::abort(500);
}
/** @var \FireflyIII\Database\Budget $repos */
$repos = App::make('FireflyIII\Database\Budget');
if (is_null($repetition)) {
// get all other repetitions:
$limits = $budget->limits()->orderBy('startdate', 'DESC')->get();
// get all transaction journals for this budget.
$journals = $repos->getTransactionJournals($budget, 50);
$subTitle = $budget->name;
} else {
// get nothing? i dunno
$limits = [$repetition->limit];
// get all transaction journals for this budget and limit repetition.
$journals = [];
$subTitle = $budget->name.' in ' . $repetition->startdate->format('F Y');
$journals = $repos->getTransactionJournalsInRepetition($budget, $repetition, 50);
}
$hideBudget = true;
return View::make('budgets.show', compact('limits', 'budget', 'repetition'));
return View::make('budgets.show', compact('limits', 'budget', 'repetition', 'journals','subTitle','hideBudget'));
}
/**

View File

@@ -65,7 +65,10 @@ class CategoryController extends BaseController
*/
public function index()
{
return View::make('categories.index');
/** @var \FireflyIII\Database\Category $repos */
$repos = App::make('FireflyIII\Database\Category');
$categories = $repos->get();
return View::make('categories.index',compact('categories'));
}
/**