Skip to content
Snippets Groups Projects
Commit 882423f9 authored by Laurent Destailleur's avatar Laurent Destailleur Committed by GitHub
Browse files

Merge pull request #6390 from fmarcet/3.9

Fix: Wrong vat calculation when split discounts
parents 68a6a08a d5978a50
No related branches found
No related tags found
No related merge requests found
......@@ -109,7 +109,7 @@ if ($action == 'confirm_split' && GETPOST("confirm") == 'yes')
$newdiscount2->amount_ttc=price2num($discount->amount_ttc-$newdiscount1->amount_ttc);
$newdiscount1->amount_ht=price2num($newdiscount1->amount_ttc/(1+$newdiscount1->tva_tx/100),'MT');
$newdiscount2->amount_ht=price2num($newdiscount2->amount_ttc/(1+$newdiscount2->tva_tx/100),'MT');
$newdiscount1->amount_tva=price2num($newdiscount1->amount_ttc-$newdiscount2->amount_ht);
$newdiscount1->amount_tva=price2num($newdiscount1->amount_ttc-$newdiscount1->amount_ht);
$newdiscount2->amount_tva=price2num($newdiscount2->amount_ttc-$newdiscount2->amount_ht);
$db->begin();
......
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