diff --git a/app/Reports/ExpenseSummary.php b/app/Reports/ExpenseSummary.php index ab1fe32ef7a..9570ed8075f 100644 --- a/app/Reports/ExpenseSummary.php +++ b/app/Reports/ExpenseSummary.php @@ -46,7 +46,7 @@ public function setData() break; default: // Bills - $bills = $this->applyFilters(Document::bill()->with('recurring', 'transactions')->accrued(), ['date_field' => 'issued_at'])->get(); + $bills = $this->applyFilters(Document::bill()->with('recurring', 'transactions', 'items')->accrued(), ['date_field' => 'issued_at'])->get(); Recurring::reflect($bills, 'issued_at'); $this->setTotals($bills, 'issued_at', false, 'expense'); diff --git a/app/Reports/IncomeExpenseSummary.php b/app/Reports/IncomeExpenseSummary.php index a705e17724e..2544b79855a 100644 --- a/app/Reports/IncomeExpenseSummary.php +++ b/app/Reports/IncomeExpenseSummary.php @@ -64,7 +64,7 @@ public function setData() break; default: // Invoices - $invoices = $this->applyFilters(Document::invoice()->with('recurring', 'transactions')->accrued(), ['date_field' => 'issued_at'])->get(); + $invoices = $this->applyFilters(Document::invoice()->with('recurring', 'transactions', 'items')->accrued(), ['date_field' => 'issued_at'])->get(); Recurring::reflect($invoices, 'issued_at'); $this->setTotals($invoices, 'issued_at', false, 'income'); @@ -74,7 +74,7 @@ public function setData() $this->setTotals($incomes, 'paid_at', false, 'income'); // Bills - $bills = $this->applyFilters(Document::bill()->with('recurring', 'transactions')->accrued(), ['date_field' => 'issued_at'])->get(); + $bills = $this->applyFilters(Document::bill()->with('recurring', 'transactions', 'items')->accrued(), ['date_field' => 'issued_at'])->get(); Recurring::reflect($bills, 'issued_at'); $this->setTotals($bills, 'issued_at', false, 'expense'); diff --git a/app/Reports/IncomeSummary.php b/app/Reports/IncomeSummary.php index a567096a600..c7ad1af8d27 100644 --- a/app/Reports/IncomeSummary.php +++ b/app/Reports/IncomeSummary.php @@ -46,7 +46,7 @@ public function setData() break; default: // Invoices - $invoices = $this->applyFilters(Document::invoice()->with('recurring', 'transactions')->accrued(), ['date_field' => 'issued_at'])->get(); + $invoices = $this->applyFilters(Document::invoice()->with('recurring', 'transactions', 'items')->accrued(), ['date_field' => 'issued_at'])->get(); Recurring::reflect($invoices, 'issued_at'); $this->setTotals($invoices, 'issued_at', false, 'income'); diff --git a/app/Reports/ProfitLoss.php b/app/Reports/ProfitLoss.php index dd217ab47f3..46891b79623 100644 --- a/app/Reports/ProfitLoss.php +++ b/app/Reports/ProfitLoss.php @@ -54,7 +54,7 @@ public function setData() break; default: // Invoices - $invoices = $this->applyFilters(Document::invoice()->with('recurring', 'totals', 'transactions')->accrued(), ['date_field' => 'issued_at'])->get(); + $invoices = $this->applyFilters(Document::invoice()->with('recurring', 'totals', 'transactions', 'items')->accrued(), ['date_field' => 'issued_at'])->get(); Recurring::reflect($invoices, 'issued_at'); $this->setTotals($invoices, 'issued_at', false, 'income', false); @@ -64,7 +64,7 @@ public function setData() $this->setTotals($incomes, 'paid_at', false, 'income', false); // Bills - $bills = $this->applyFilters(Document::bill()->with('recurring', 'totals', 'transactions')->accrued(), ['date_field' => 'issued_at'])->get(); + $bills = $this->applyFilters(Document::bill()->with('recurring', 'totals', 'transactions', 'items')->accrued(), ['date_field' => 'issued_at'])->get(); Recurring::reflect($bills, 'issued_at'); $this->setTotals($bills, 'issued_at', false, 'expense', false); diff --git a/app/Reports/TaxSummary.php b/app/Reports/TaxSummary.php index 2fd0ee6b1ee..62ee34b704d 100644 --- a/app/Reports/TaxSummary.php +++ b/app/Reports/TaxSummary.php @@ -57,12 +57,12 @@ public function setData() break; default: // Invoices - $invoices = $this->applyFilters(Document::invoice()->with('recurring', 'totals', 'transactions')->accrued(), ['date_field' => 'issued_at'])->get(); + $invoices = $this->applyFilters(Document::invoice()->with('recurring', 'totals', 'transactions', 'items')->accrued(), ['date_field' => 'issued_at'])->get(); Recurring::reflect($invoices, 'issued_at'); $this->setTotals($invoices, 'issued_at'); // Bills - $bills = $this->applyFilters(Document::bill()->with('recurring', 'totals', 'transactions')->accrued(), ['date_field' => 'issued_at'])->get(); + $bills = $this->applyFilters(Document::bill()->with('recurring', 'totals', 'transactions', 'items')->accrued(), ['date_field' => 'issued_at'])->get(); Recurring::reflect($bills, 'issued_at'); $this->setTotals($bills, 'issued_at');