Increased number of decimals for tax calculations.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 10 Jan 2010 16:21:25 +0000 (16:21 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 10 Jan 2010 16:21:25 +0000 (16:21 +0000)
taxes/tax_calc.inc

index 7107cdca7a75c8f6732e533231faeda6c84cc92e..db98540842b321e134efa61fca56db60725c3a7c 100644 (file)
@@ -50,7 +50,7 @@ function get_tax_free_price_for_item($stock_id, $price, $tax_group, $tax_include
                        $tax_multiplier += $taxitem["rate"];
        }
        
-       return round($price / (1 + ($tax_multiplier / 100)),  user_price_dec());
+       return round($price / (1 + ($tax_multiplier / 100)),  2*user_price_dec());
 }
 //
 //     Full price (incl. VAT) for item $stock_id with line price $price,
@@ -86,7 +86,7 @@ function get_full_price_for_item($stock_id, $price, $tax_group, $tax_included, $
                        $tax_multiplier += $taxitem["rate"];
        }
        
-       return round($price * (1 + ($tax_multiplier / 100)),  user_price_dec());
+       return round($price * (1 + ($tax_multiplier / 100)),  2*user_price_dec());
 }
 
 //---------------------------------------------------------------------------------