From 1bc7134c0f1e9d5cb2b10c794945f76ca00fdc74 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Tue, 20 Jul 2004 14:57:48 +0000 Subject: [PATCH] Ajout page rigolote --- htdocs/comm/propal/aideremise.php | 109 ++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 htdocs/comm/propal/aideremise.php diff --git a/htdocs/comm/propal/aideremise.php b/htdocs/comm/propal/aideremise.php new file mode 100644 index 00000000000..50b06484f04 --- /dev/null +++ b/htdocs/comm/propal/aideremise.php @@ -0,0 +1,109 @@ + + * Copyright (C) 2004 Laurent Destailleur + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ + * $Source$ + * + */ + +/** +* Gestion d'une proposition commerciale +* @package propale +*/ + +require("./pre.inc.php"); + +$user->getrights('propale'); +if (!$user->rights->propale->lire) + accessforbidden(); + +require("../../propal.class.php"); +/* + * Sécurité accés client + */ +if ($user->societe_id > 0) +{ + $action = ''; + $socidp = $user->societe_id; +} + +/******************************************************************************/ +/* Actions */ +/******************************************************************************/ + + + +llxHeader(); + +/******************************************************************************/ +/* Fin des Actions */ +/******************************************************************************/ +/* + * + * Mode fiche + * + * + */ +if ($_GET["propalid"]) +{ + $html = new Form($db); + + $propal = new Propal($db); + $propal->fetch($_GET["propalid"]); + + $societe = new Societe($db); + $societe->fetch($propal->soc_id); + + $head[0][0] = DOL_URL_ROOT.'/comm/propal.php?propalid='.$propal->id; + $head[0][1] = "Proposition commerciale : $propal->ref"; + $h = 1; + $a = 0; + $head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id; + $head[$h][1] = "Note"; + $h++; + $head[$h][0] = DOL_URL_ROOT.'/comm/propal/info.php?propalid='.$propal->id; + $head[$h][1] = "Info"; + + dolibarr_fiche_head($head, $a, $societe->nom); + print_titre("Simulation des remises sur le prix HT"); + 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 ); + + print ""; + print ""; + print ""; + + $j++; + + + } + print "
$j %".price($ht1)." (".price($ttc1).")".($j+33)." %".price($ht2)." (".price($ttc2).")".($j+66)." %".price($ht3)." (".price($ttc3).")
"; + +} +$db->close(); +llxFooter("Dernière modification $Date$ révision $Revision$"); +?>