From 6710112f3d2d0b999169675d60fe9810314ae51f Mon Sep 17 00:00:00 2001 From: jekkos-t520 Date: Tue, 17 Feb 2015 12:20:53 +0100 Subject: [PATCH] Change to bc-style operations for totals calculation in receivings --- application/libraries/Receiving_lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/libraries/Receiving_lib.php b/application/libraries/Receiving_lib.php index 38eb70358..e74040a06 100644 --- a/application/libraries/Receiving_lib.php +++ b/application/libraries/Receiving_lib.php @@ -366,7 +366,7 @@ class Receiving_lib $total = 0; foreach($this->get_cart() as $item) { - $total += $this->get_item_total($item['quantity'], $item['price'], $item['discount']); + $total = bcadd($total, $this->get_item_total($item['quantity'], $item['price'], $item['discount']), PRECISION); } return $total;