Merge pull request #368 from simnandez/3.2
Fix: Localtaxes unit prices precision
This commit is contained in:
commit
2b75c81af9
@ -11,6 +11,7 @@ English Dolibarr ChangeLog
|
|||||||
- Fix: Minor look fix for theme bureau2crea.
|
- Fix: Minor look fix for theme bureau2crea.
|
||||||
- Fix: Start and end date not saved at project creation
|
- 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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* 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[9] = price2num(($result[0] * ( 1 + ( $txlocaltax1 / 100))) - $result[0], 'MT');
|
||||||
$result[2] = price2num($result[2] + $result[9], 'MT');
|
$result[2] = price2num($result[2] + $result[9], 'MT');
|
||||||
|
|
||||||
$result[11] = price2num(($result[3] * ( 1 + ( $txlocaltax1 / 100))) - $pu, 'MT');
|
$result[11] = price2num(($result[3] * ( 1 + ( $txlocaltax1 / 100))) - $pu, 'MU');
|
||||||
$result[5] = price2num($result[5] + $result[11], 'MT');
|
$result[5] = price2num($result[5] + $result[11], 'MU');
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
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[15] = price2num(($result[6] * ( 1 + ( $txlocaltax2 / 100))) - $result[6], 'MT');
|
||||||
$result[10] = price2num(($result[0] * ( 1 + ( $txlocaltax2 / 100))) - $result[0], '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 Country is Spain, localtax2 (IRPF) will be subtracted
|
||||||
if ($mysoc->country_code=='ES')
|
if ($mysoc->country_code=='ES')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user