mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-18 20:38:57 +00:00
Got up to categories with the new tables.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user