item relationships added to document models in reports.
This commit is contained in:
parent
bbc85909c4
commit
d80843f152
|
|
@ -46,7 +46,7 @@ class ExpenseSummary extends Report
|
|||
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');
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class IncomeExpenseSummary extends Report
|
|||
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 @@ class IncomeExpenseSummary extends Report
|
|||
$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');
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class IncomeSummary extends Report
|
|||
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');
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class ProfitLoss extends Report
|
|||
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 @@ class ProfitLoss extends Report
|
|||
$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);
|
||||
|
||||
|
|
|
|||
|
|
@ -57,12 +57,12 @@ class TaxSummary extends Report
|
|||
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');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue