PreorderBilling: Fixed rounding of totals
This commit is contained in:
@@ -377,8 +377,8 @@ class PreorderBillingInvoiceController extends mfBaseController {
|
||||
$position_data["article_number"] = $bill->article_number;
|
||||
$position_data["product_name"] = $bill->product_name;
|
||||
$position_data["article_info"] = $bill->product_info;
|
||||
$position_data["total"] = round($price, 2);
|
||||
$position_data["total_gross"] = round($price_gross, 2);
|
||||
$position_data["total"] = $price;
|
||||
$position_data["total_gross"] = $price_gross;
|
||||
$position_data["vatrate"] = $bill->vatrate;
|
||||
$position_data["billing_id"] = $bill->id;
|
||||
$position_data["fibu_cost_account"] = $bill->fibu_cost_account;
|
||||
@@ -527,6 +527,10 @@ class PreorderBillingInvoiceController extends mfBaseController {
|
||||
$total_net += $position->price_total;
|
||||
$total_gross += $position->price_gross;
|
||||
|
||||
$position->price_total = round($position->price_total, 2);
|
||||
$position->price_gross = round($position->price_gross, 2);
|
||||
|
||||
|
||||
if (!$position->save()) {
|
||||
$invoice->rollbackTransaction();
|
||||
die("Error saving Invoiceposition");
|
||||
|
||||
Reference in New Issue
Block a user