src/Money/DataMapper/Data/Money/Budget.php
public function getTransactions(\DateTimeImmutable $date, $withChildren = true)
    {
        $list = $this->getAllBudgetCategory();

        $categories = array();
        foreach ($list as $category) {
            $categories[] = $category->getCategoryId();
        }

        $transactions = array();
        if ($this->getParentId() === 0 && $withChildren) {
            $budgetMapper = new BudgetMapper($this->dependencyContainer->getDatabase('money'));
            $budgets = $budgetMapper->findAllByParentId($this->getId());
            foreach ($budgets as $budget) {
                $transactions = array_merge($transactions, $budget->getTransactions($date, false));
            }
        }

        $transactionMapper = new TransactionMapper($this->dependencyContainer->getDatabase('money'));
        $transactionMapper->addIn('category_id', $categories);
        $transactions = array_merge($transactions, $transactionMapper->findAllForAccount($this->getAccount(), $date, $date->add(new \DateInterval('P1M'))));

        return $transactions;
    }
public function getTransactions(\DateTimeImmutable $date, $withChildren = true)
    {
        $list = $this->getAllBudgetCategory();

        $categories = array();
        foreach ($list as $category) {
            $categories[] = $category->getCategoryId();
        }

        $transactions = array();
        if ($this->getParentId() === 0 && $withChildren) {
            $budgetMapper = new BudgetMapper($this->dependencyContainer->getDatabase('money'));
            $budgets = $budgetMapper->findAllByParentId($this->getId());
            foreach ($budgets as $budget) {
                $transactions = array_merge($transactions, $budget->getTransactions($date, false));
            }
        }

        $transactionMapper = new TransactionMapper($this->dependencyContainer->getDatabase('money'));
        $transactionMapper->addIn('category_id', $categories);
        $transactions = array_merge($transactions, $transactionMapper->findAllForAccount($this->getAccount(), $date, $date->add(new \DateInterval('P1M'))));

        return $transactions;
    }
Get list of transactions (limited to given date month)

@param  \DateTimeImmutable $date
@param  bool $withChildren
@return Transaction[]