Fix for profit and loss report

This commit is contained in:
Hillel Coren 2017-02-05 23:51:34 +02:00
parent 459d662e76
commit e114794f3a

View File

@ -55,9 +55,9 @@ class ProfitAndLossReport extends AbstractReport
$expense->present()->category, $expense->present()->category,
]; ];
$this->addToTotals($client->currency_id, 'revenue', 0, $expense->present()->month); $this->addToTotals($expense->expense_currency_id, 'revenue', 0, $expense->present()->month);
$this->addToTotals($client->currency_id, 'expenses', $expense->amount, $expense->present()->month); $this->addToTotals($expense->expense_currency_id, 'expenses', $expense->amount, $expense->present()->month);
$this->addToTotals($client->currency_id, 'profit', $expense->amount * -1, $expense->present()->month); $this->addToTotals($expense->expense_currency_id, 'profit', $expense->amount * -1, $expense->present()->month);
} }