Fix for invoice report totals

This commit is contained in:
Hillel Coren 2016-06-07 21:49:20 +03:00
parent 1d3efda4ea
commit 13fbb880e1

View File

@ -398,9 +398,7 @@ class ReportController extends BaseController
$payment ? $account->formatMoney($payment->amount, $client) : '',
$payment ? $payment->present()->method : '',
];
if ($payment) {
$reportTotals = $this->addToTotals($reportTotals, $client->currency_id, 'paid', $payment->amount);
}
$reportTotals = $this->addToTotals($reportTotals, $client->currency_id, 'paid', $payment ? $payment->amount : 0);
}
$reportTotals = $this->addToTotals($reportTotals, $client->currency_id, 'amount', $invoice->amount);