src/Money/Module/Transaction/Controller/Transaction.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'));
            $dateEnd   = new \DateTimeImmutable($get->get('date_end'));
        } else {
            $dateStart = new \DateTimeImmutable(date('Y-m-01'));
            $dateEnd   = new \DateTimeImmutable(date('Y-m-31'));
        }

        //~ Get transactions for this account
        $transactionMapper = new TransactionMapper(Database::get('money'));
        $transactions      = $transactionMapper->findAllForAccount($account, $dateStart, $dateEnd);

        $this->dataCollection->add('account', $account);
        $this->dataCollection->add('transactions', $transactions);

        return $this->getResponse('Partial/Transactions', 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'));
            $dateEnd   = new \DateTimeImmutable($get->get('date_end'));
        } else {
            $dateStart = new \DateTimeImmutable(date('Y-m-01'));
            $dateEnd   = new \DateTimeImmutable(date('Y-m-31'));
        }

        //~ Get transactions for this account
        $transactionMapper = new TransactionMapper(Database::get('money'));
        $transactions      = $transactionMapper->findAllForAccount($account, $dateStart, $dateEnd);

        $this->dataCollection->add('account', $account);
        $this->dataCollection->add('transactions', $transactions);

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

@return ResponseInterface
@throws \Exception