mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +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()
|
||||
->with('client.contacts')
|
||||
->withArchived()
|
||||
->excludeFailed();
|
||||
->excludeFailed()
|
||||
->where('payment_date', '>=', $this->startDate)
|
||||
->where('payment_date', '<=', $this->endDate);
|
||||
|
||||
foreach ($payments->get() as $payment) {
|
||||
$client = $payment->client;
|
||||
@ -42,7 +44,9 @@ class ProfitAndLossReport extends AbstractReport
|
||||
|
||||
$expenses = Expense::scope()
|
||||
->with('client.contacts')
|
||||
->withArchived();
|
||||
->withArchived()
|
||||
->where('expense_date', '>=', $this->startDate)
|
||||
->where('expense_date', '<=', $this->endDate);
|
||||
|
||||
foreach ($expenses->get() as $expense) {
|
||||
$client = $expense->client;
|
||||
|
Loading…
Reference in New Issue
Block a user