From 164d4663696a45fedb31ab6de7f87763615607ef Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 21 Mar 2018 18:11:00 +0200 Subject: [PATCH] Fix for P&L report --- app/Ninja/Reports/ProfitAndLossReport.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Ninja/Reports/ProfitAndLossReport.php b/app/Ninja/Reports/ProfitAndLossReport.php index 085cdd5a269b..7f11081e86dc 100644 --- a/app/Ninja/Reports/ProfitAndLossReport.php +++ b/app/Ninja/Reports/ProfitAndLossReport.php @@ -82,9 +82,9 @@ class ProfitAndLossReport extends AbstractReport if ($subgroup == 'type') { $dimension = trans('texts.expense'); } else { - $dimension = $this->getDimension($payment); + $dimension = $this->getDimension($expense); } - $this->addChartData($dimension, $payment->expense_date, $expense->amountWithTax()); + $this->addChartData($dimension, $expense->expense_date, $expense->amountWithTax()); } //$this->addToTotals($client->currency_id, 'paid', $payment ? $payment->getCompletedAmount() : 0);