From c6c98fe8f69951d39a31645bb8929f7aae11d101 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 20 Jul 2004 15:19:32 +0000 Subject: [PATCH] =?UTF-8?q?Modif=20calculs=20erronn=E9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/propal/aideremise.php | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/htdocs/comm/propal/aideremise.php b/htdocs/comm/propal/aideremise.php index 50b06484f04..9fef70cd735 100644 --- a/htdocs/comm/propal/aideremise.php +++ b/htdocs/comm/propal/aideremise.php @@ -80,22 +80,25 @@ if ($_GET["propalid"]) $head[$h][1] = "Info"; dolibarr_fiche_head($head, $a, $societe->nom); - print_titre("Simulation des remises sur le prix HT"); + + $price = $propal->price + $propal->remise; + + print_titre("Simulation des remises sur le prix HT : ".price($price)); print ''; $j=1; for ($i = 1 ; $i < 100 ; $i= $i+3) { - $ht1 = $propal->total_ht - ($propal->total_ht * $j / 100 ); - $ttc1 = $propal->total_ttc - ($propal->total_ttc * $j / 100 ); - $ht2 = $propal->total_ht - ($propal->total_ht * ($j+33) / 100 ); - $ttc2 = $propal->total_ttc - ($propal->total_ttc * ($j+33) / 100 ); - $ht3 = $propal->total_ht - ($propal->total_ht * ($j+66) / 100 ); - $ttc3 = $propal->total_ttc - ($propal->total_ttc * ($j+66) / 100 ); + $ht1 = $price - ($price * $j / 100 ); - print ""; - print ""; - print ""; + $ht2 = $price - ($price * ($j+33) / 100 ); + + $ht3 = $price - ($price * ($j+66) / 100 ); + + + print ""; + print ""; + print ""; $j++;
$j %".price($ht1)." (".price($ttc1).")".($j+33)." %".price($ht2)." (".price($ttc2).")".($j+66)." %".price($ht3)." (".price($ttc3).")
$j %".price($ht1)."".($j+33)." %".price($ht2)."".($j+66)." %".price($ht3)."