Invoice: Implicitly rounding price totals
This commit is contained in:
@@ -681,6 +681,8 @@ class InvoiceController extends mfBaseController {
|
||||
}
|
||||
|
||||
// save Invoiceposition
|
||||
// first round price
|
||||
$position->price_gross = round($position->price_gross, 4);
|
||||
if (!$position->save()) {
|
||||
$invoice->rollbackTransaction();
|
||||
die("Error saving Invoiceposition");
|
||||
@@ -703,7 +705,7 @@ class InvoiceController extends mfBaseController {
|
||||
}
|
||||
|
||||
$invoice->total = $total_net;
|
||||
$invoice->total_gross = $total_gross;
|
||||
$invoice->total_gross = round($total_gross, 4);
|
||||
//$invoice->total_vat = $total_vat;
|
||||
|
||||
if (!$invoice->save()) {
|
||||
|
||||
Reference in New Issue
Block a user