mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 14:12:44 +01:00
Fix date range in profit/loss report
This commit is contained in:
parent
431ef3121e
commit
8a1142e696
@ -23,7 +23,9 @@ class ProfitAndLossReport extends AbstractReport
|
|||||||
$payments = Payment::scope()
|
$payments = Payment::scope()
|
||||||
->with('client.contacts')
|
->with('client.contacts')
|
||||||
->withArchived()
|
->withArchived()
|
||||||
->excludeFailed();
|
->excludeFailed()
|
||||||
|
->where('payment_date', '>=', $this->startDate)
|
||||||
|
->where('payment_date', '<=', $this->endDate);
|
||||||
|
|
||||||
foreach ($payments->get() as $payment) {
|
foreach ($payments->get() as $payment) {
|
||||||
$client = $payment->client;
|
$client = $payment->client;
|
||||||
@ -42,7 +44,9 @@ class ProfitAndLossReport extends AbstractReport
|
|||||||
|
|
||||||
$expenses = Expense::scope()
|
$expenses = Expense::scope()
|
||||||
->with('client.contacts')
|
->with('client.contacts')
|
||||||
->withArchived();
|
->withArchived()
|
||||||
|
->where('expense_date', '>=', $this->startDate)
|
||||||
|
->where('expense_date', '<=', $this->endDate);
|
||||||
|
|
||||||
foreach ($expenses->get() as $expense) {
|
foreach ($expenses->get() as $expense) {
|
||||||
$client = $expense->client;
|
$client = $expense->client;
|
||||||
|
Loading…
Reference in New Issue
Block a user