| [ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2001-2002 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: reduc.php,v 1.8 2004/10/23 17:01:21 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/compta/voyage/reduc.php,v $ 21 * 22 */ 23 24 require ("./pre.inc.php"); 25 26 llxHeader(); 27 28 print_titre ("Abonnement de réduction"); 29 30 print "<table class=\"border\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">"; 31 print "<tr class=\"liste_titre\">"; 32 print '<td>Date</td><td>'.$langs->trans("Description").'</td>'; 33 print "<td align=\"right\"><a href=\"reduc.php?vue=credit\">Montant</a></td>"; 34 print "</tr>\n"; 35 36 37 $sql = "SELECT b.rowid,".$db->pdate("b.date_debut")." as debut,".$db->pdate("b.date_fin")." as fin, b.amount, b.label "; 38 $sql .= " FROM ".MAIN_DB_PREFIX."voyage_reduc as b "; 39 40 $result = $db->query($sql); 41 if ($result) { 42 $var=True; 43 $num = $db->num_rows(); 44 $i = 0; $total = 0; 45 46 $sep = 0; 47 48 while ($i < $num) { 49 $objp = $db->fetch_object($result); 50 $total = $total + $objp->amount; 51 $time = time(); 52 53 $var=!$var; 54 55 print "<tr $bc[$var]>"; 56 print "<td>".strftime("%d %b %y",$objp->debut)." au ".strftime("%d %b %y",$objp->fin)."</TD>\n"; 57 print "<td>$objp->label</td>"; 58 print "<td align=\"right\">".price($objp->amount)."</TD>\n"; 59 print "</tr>"; 60 61 $i++; 62 } 63 $db->free(); 64 } 65 66 print "<tr><td align=\"right\" colspan=\"2\">".$langs->trans("TotalHT").":</td>"; 67 print "<td align=\"right\"><b>".price($total)."</b></td></tr>\n"; 68 69 70 print "</table>"; 71 72 73 $db->close(); 74 75 llxFooter("<em>Dernière modification $Date: 2004/10/23 17:01:21 $ révision $Revision: 1.8 $</em>"); 76 ?>
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 |
|