[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2003-2005 Éric Seigne <eric.seigne@ryxeo.com> 4 * Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 * 20 * $Id: fiche.php,v 1.13 2005/07/09 14:34:44 eldy Exp $ 21 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/boutique/commande/fiche.php,v $ 22 * 23 */ 24 25 require ("./pre.inc.php"); 26 27 $langs->load("products"); 28 29 llxHeader(); 30 31 /* 32 * 33 * 34 */ 35 36 if ($_GET['id']) 37 { 38 $commande = new Commande($db); 39 $result = $commande->fetch($_GET['id']); 40 41 if ( $result ) 42 { 43 44 print '<div class="titre">Fiche Commande : '.$commande->id.'</div><br>'; 45 46 print '<table border="1" width="100%" cellspacing="0" cellpadding="4">'; 47 print '<tr><td width="20%">Date</td><td width="80%" colspan="2">'.$commande->date.'</td></tr>'; 48 print '<td width="20%">Client</td><td width="80%" colspan="2"><a href="'.DOL_URL_ROOT.'/boutique/client/fiche.php?id='.$commande->client_id.'">'.$commande->client_name.'</a></td></tr>'; 49 50 print '<td width="20%">Paiement</td><td width="80%" colspan="2">'.$commande->payment_method.'</td></tr>'; 51 52 print "<tr><td>Adresses</td><td>Livraison</td><td>Facturation</td></tr>"; 53 54 print "<td> </td><td>".$commande->delivery_adr->name."<br>".$commande->delivery_adr->street."<br>".$commande->delivery_adr->cp."<br>".$commande->delivery_adr->city."<br>".$commande->delivery_adr->country."</td>"; 55 print "<td>".$commande->billing_adr->name."<br>".$commande->billing_adr->street."<br>".$commande->billing_adr->cp."<br>".$commande->billing_adr->city."<br>".$commande->billing_adr->country."</td>"; 56 print "</tr>"; 57 58 print "</table>"; 59 60 print "<br />"; 61 62 /* 63 * Produits 64 * 65 */ 66 $sql = "SELECT orders_id, products_id, products_model, products_name, products_price, final_price, products_quantity"; 67 $sql .= " FROM ".OSC_DB_NAME.".orders_products"; 68 $sql .= " WHERE orders_id = " . $commande->id; 69 70 if ( $db->query($sql) ) 71 { 72 $num = $db->num_rows(); 73 $i = 0; 74 print '<table class="noborder" width="100%">'; 75 print '<tr class="liste_titre"><td align="left" width="40%">'.$langs->trans("Products").'</td>'; 76 print '<td align="center">'.$langs->trans("Number").'</td><td align="right">'.$langs->trans("Price").'</td><td align="right">Prix final</td>'; 77 print "</tr>\n"; 78 $var=True; 79 while ($i < $num) 80 { 81 $objp = $db->fetch_object(); 82 $var=!$var; 83 print "<tr $bc[$var]>"; 84 print '<td align="left" width="40%">'; 85 print '<a href="fiche.php?id='.$objp->products_id.'"><img src="/theme/'.$conf->theme.'/img/filenew.png" border="0" width="16" height="16" alt="Fiche livre"></a>'; 86 87 print '<a href="fiche.php?id='.$objp->products_id.'">'.$objp->products_name.'</a>'; 88 print "</td>"; 89 90 print '<td align="center"><a href="fiche.php?id='.$objp->rowid."\">$objp->products_quantity</a></TD>\n"; 91 print "<td align=\"right\"><a href=\"fiche.php?id=$objp->rowid\">".price($objp->products_price)."</a></TD>\n"; 92 print "<td align=\"right\"><a href=\"fiche.php?id=$objp->rowid\">".price($objp->final_price)."</a></TD>\n"; 93 94 print "</tr>\n"; 95 $i++; 96 } 97 print "</table>"; 98 $db->free(); 99 } 100 else 101 { 102 print $db->error(); 103 } 104 105 /* 106 * 107 * 108 */ 109 print "<br />"; 110 111 print '<table border="1" width="100%" cellspacing="0" cellpadding="4">'; 112 print "<tr>"; 113 print '<td width="20%">Frais d\'expéditions</td><td width="80%">'.price($commande->total_ot_shipping).' EUR</td></tr>'; 114 print '<td width="20%">'.$langs->trans("Lastname").'</td><td width="80%">'.price($commande->total_ot_total).' EUR</td></tr>'; 115 print "</table>"; 116 117 118 119 } 120 else 121 { 122 print "Fetch failed"; 123 } 124 } 125 else 126 { 127 print "Error"; 128 } 129 130 131 /* ************************************************************************** */ 132 /* */ 133 /* Barre d'action */ 134 /* */ 135 /* ************************************************************************** */ 136 137 print '<br><table width="100%" border="1" cellspacing="0" cellpadding="3">'; 138 print '<td width="20%" align="center">-</td>'; 139 print '<td width="20%" align="center">-</td>'; 140 print '<td width="20%" align="center">-</td>'; 141 print '<td width="20%" align="center">-</td>'; 142 print '<td width="20%" align="center">-</td>'; 143 print '</table><br>'; 144 145 146 147 $db->close(); 148 149 llxFooter("<em>Dernière modification $Date: 2005/07/09 14:34:44 $ révision $Revision: 1.13 $</em>"); 150 ?>
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 |
![]() |