diff --git a/ChangeLog b/ChangeLog index 2ae3483046c..4c3c0bfdb41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,7 +10,8 @@ English Dolibarr ChangeLog - Fix: Edition of percentage of an event. - Fix: Minor look fix for theme bureau2crea. - Fix: Start and end date not saved at project creation -- Fix: Default vat is zero for customer invoices if company does not use vat +- Fix: Default vat is zero for customer invoices if company does not use vat +- Fix: Localtaxes unit prices precision diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index 9db77faeeec..5d6dea9f39b 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -1,7 +1,7 @@ * Copyright (C) 2006-2008 Laurent Destailleur - * Copyright (C) 2010 Juanjo Menent + * Copyright (C) 2010-2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -95,8 +95,8 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $txlocalta $result[9] = price2num(($result[0] * ( 1 + ( $txlocaltax1 / 100))) - $result[0], 'MT'); $result[2] = price2num($result[2] + $result[9], 'MT'); - $result[11] = price2num(($result[3] * ( 1 + ( $txlocaltax1 / 100))) - $pu, 'MT'); - $result[5] = price2num($result[5] + $result[11], 'MT'); + $result[11] = price2num(($result[3] * ( 1 + ( $txlocaltax1 / 100))) - $pu, 'MU'); + $result[5] = price2num($result[5] + $result[11], 'MU'); } else @@ -110,7 +110,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $txlocalta { $result[15] = price2num(($result[6] * ( 1 + ( $txlocaltax2 / 100))) - $result[6], 'MT'); $result[10] = price2num(($result[0] * ( 1 + ( $txlocaltax2 / 100))) - $result[0], 'MT'); - $result[12] = price2num(($result[3] * ( 1 + ( $txlocaltax2 / 100))) - $pu, 'MT'); + $result[12] = price2num(($result[3] * ( 1 + ( $txlocaltax2 / 100))) - $pu, 'MU'); //If Country is Spain, localtax2 (IRPF) will be subtracted if ($mysoc->country_code=='ES')