[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * 19 * $Id: aideremise.php,v 1.5 2005/08/25 20:27:17 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/comm/propal/aideremise.php,v $ 21 * 22 */ 23 24 /** 25 \file htdocs/comm/propal/aideremise.php 26 \ingroup propale 27 \brief Page de simulation des remises 28 */ 29 30 require ("./pre.inc.php"); 31 32 $user->getrights('propale'); 33 if (!$user->rights->propale->lire) 34 accessforbidden(); 35 36 include_once (DOL_DOCUMENT_ROOT."/propal.class.php"); 37 38 // Sécurité accés client 39 if ($user->societe_id > 0) 40 { 41 $action = ''; 42 $socidp = $user->societe_id; 43 } 44 45 46 /******************************************************************************/ 47 /* Actions */ 48 /******************************************************************************/ 49 50 51 52 llxHeader(); 53 54 /******************************************************************************/ 55 /* Fin des Actions */ 56 /******************************************************************************/ 57 /* 58 * 59 * Mode fiche 60 * 61 * 62 */ 63 if ($_GET["propalid"]) 64 { 65 $html = new Form($db); 66 67 $propal = new Propal($db); 68 $propal->fetch($_GET["propalid"]); 69 70 $societe = new Societe($db); 71 $societe->fetch($propal->soc_id); 72 73 $head[0][0] = DOL_URL_ROOT.'/comm/propal.php?propalid='.$propal->id; 74 $head[0][1] = "Proposition commerciale : $propal->ref"; 75 $h = 1; 76 $a = 0; 77 $head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id; 78 $head[$h][1] = "Note"; 79 $h++; 80 $head[$h][0] = DOL_URL_ROOT.'/comm/propal/info.php?propalid='.$propal->id; 81 $head[$h][1] = "Info"; 82 83 dolibarr_fiche_head($head, $a, $societe->nom); 84 85 $price = $propal->price + $propal->remise; 86 87 print_titre("Simulation des remises sur le prix HT : ".price($price)); 88 print '<table class="border" cellspacing="0" cellpadding="2" width="100%">'; 89 $j=1; 90 for ($i = 1 ; $i < 100 ; $i= $i+3) 91 { 92 93 $ht1 = $price - ($price * $j / 100 ); 94 95 $ht2 = $price - ($price * ($j+33) / 100 ); 96 97 $ht3 = $price - ($price * ($j+66) / 100 ); 98 99 100 print "<tr><td>$j %</td><td>".price($ht1)."</td>"; 101 print "<td>".($j+33)." %</td><td>".price($ht2)."</td>"; 102 print "<td>".($j+66)." %</td><td>".price($ht3)."</td></tr>"; 103 104 $j++; 105 106 107 } 108 print "</table>"; 109 110 } 111 $db->close(); 112 llxFooter("<em>Dernière modification $Date: 2005/08/25 20:27:17 $ révision $Revision: 1.5 $</em>"); 113 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |