Fix discount rounding #1305

This commit is contained in:
Hillel Coren 2017-01-25 13:03:26 +02:00
parent 38591271fb
commit 97bbc55c23

View File

@ -467,8 +467,8 @@ class InvoiceRepository extends BaseRepository
if ($invoice->is_amount_discount) {
$total -= $invoice->discount;
} else {
$total *= (100 - $invoice->discount) / 100;
$total = round($total, 2);
$discount = round($total * ($invoice->discount/100), 2);
$total -= $discount;
}
}