src/Money/Module/Budget/Controller/Budget.php
public function ajaxList()
    {
        if (!Server::getInstance()->isAjax()) {
            throw new \RuntimeException();
        }

        $get = Get::getInstance();

        $accountId = (int) $this->route->getParameterCollection()->getByName('id')->getValue();

        //~ Retrieve user account / account
        $account = $this->verifyAccount($accountId);

        if ($get->has('date_start')) {
            $dateStart = new \DateTimeImmutable($get->get('date_start'));
        } else {
            $dateStart = new \DateTimeImmutable(date('Y-m-01'));
        }

        $budgetMapper = new BudgetMapper(Database::get('money'));
        $budgets = $budgetMapper->findAllByDate($account, $dateStart);

        $this->dataCollection->add('account', $account);
        $this->dataCollection->add('budgets', $budgets);
        $this->dataCollection->add('isMain',  true);
        $this->dataCollection->add('date',    $dateStart);
        $this->dataCollection->add('total',   array('planned' => 0.0, 'transactions' => 0.0, 'diff' => 0.0));

        return $this->getResponse('Partial/Budget', true);
    }
public function ajaxList()
    {
        if (!Server::getInstance()->isAjax()) {
            throw new \RuntimeException();
        }

        $get = Get::getInstance();

        $accountId = (int) $this->route->getParameterCollection()->getByName('id')->getValue();

        //~ Retrieve user account / account
        $account = $this->verifyAccount($accountId);

        if ($get->has('date_start')) {
            $dateStart = new \DateTimeImmutable($get->get('date_start'));
        } else {
            $dateStart = new \DateTimeImmutable(date('Y-m-01'));
        }

        $budgetMapper = new BudgetMapper(Database::get('money'));
        $budgets = $budgetMapper->findAllByDate($account, $dateStart);

        $this->dataCollection->add('account', $account);
        $this->dataCollection->add('budgets', $budgets);
        $this->dataCollection->add('isMain',  true);
        $this->dataCollection->add('date',    $dateStart);
        $this->dataCollection->add('total',   array('planned' => 0.0, 'transactions' => 0.0, 'diff' => 0.0));

        return $this->getResponse('Partial/Budget', true);
    }
Load items.

@return ResponseInterface
@throws \Exception