Fix for invoice report totals

This commit is contained in:
Hillel Coren 2016-06-07 21:50:09 +03:00
parent a91f257f01
commit de4e79f537

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);