Skip to content
Snippets Groups Projects
Commit 424bd525 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #490 from simnandez/develop

Fix: Bad calculation of localtax amount calculation if type of localtaxes are 1 3 or 5. Researched by Eldy
parents 1a4c582b 3fe79b37
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,22 @@
* @param int $info_bits Miscellanous informations on line
* @param int $type 0/1=Product/service
* @param string $seller Thirdparty seller (we need $seller->country_code property). Provided only if seller is the supplier.
* @return result[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] (total_ht, total_vat, total_ttc, pu_ht, pu_tva, pu_ttc, total_ht_without_discount, total_vat_without_discount, total_ttc_without_discount, ...)
* @return result[ 0=total_ht,
* 1=total_vat,
* 2=total_ttc,
* 3=pu_ht,
* 4=pu_tva,
* 5=pu_ttc,
* 6=total_ht_without_discount,
* 7=total_vat_without_discount,
* 8=total_ttc_without_discount,
* 9=amount tax1 for total_ht,
* 10=amount tax2 for total_ht,
* 11=amount tax1 for pu_ht,
* 12=amount tax2 for pu_ht,
* 13=not used???,
* 14=amount tax1 for total_ht_without_discount,
* 15=amount tax1 for total_ht_without_discount]
*/
function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocaltax1_rate, $uselocaltax2_rate, $remise_percent_global, $price_base_type, $info_bits, $type, $seller = '')
{
......@@ -183,6 +198,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt
{
$tot_sans_remise= price2num($tot_sans_remise / (1 + ($txtva / 100)),'MU');
$tot_avec_remise= price2num($tot_avec_remise / (1 + ($txtva / 100)),'MU');
$pu = price2num($pu / (1 + ($txtva / 100)),'MU');
}
$apply_tax = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment