[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004-2005 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: commandes.php,v 1.15 2005/10/02 19:48:55 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/projet/commandes.php,v $ 21 */ 22 23 /** 24 \file htdocs/projet/commandes.php 25 \ingroup projet commande 26 \brief Page des commandes par projet 27 \version $Revision: 1.15 $ 28 */ 29 30 require ("./pre.inc.php"); 31 require_once (DOL_DOCUMENT_ROOT."/propal.class.php"); 32 require_once (DOL_DOCUMENT_ROOT."/facture.class.php"); 33 require_once (DOL_DOCUMENT_ROOT."/commande/commande.class.php"); 34 35 $langs->load("projects"); 36 $langs->load("companies"); 37 $langs->load("orders"); 38 39 40 llxHeader("","../"); 41 42 $projet = new Project($db); 43 $projet->fetch($_GET["id"]); 44 45 $h=0; 46 $head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id; 47 $head[$h][1] = $langs->trans("Project"); 48 $h++; 49 50 if ($conf->propal->enabled) { 51 $langs->load("propal"); 52 $head[$h][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id; 53 $head[$h][1] = $langs->trans("Proposals"); 54 $h++; 55 } 56 57 if ($conf->commande->enabled) { 58 $langs->load("orders"); 59 $head[$h][0] = DOL_URL_ROOT.'/projet/commandes.php?id='.$projet->id; 60 $head[$h][1] = $langs->trans("Orders"); 61 $hselected=$h; 62 $h++; 63 } 64 65 if ($conf->facture->enabled) { 66 $langs->load("bills"); 67 $head[$h][0] = DOL_URL_ROOT.'/projet/facture.php?id='.$projet->id; 68 $head[$h][1] = $langs->trans("Bills"); 69 $h++; 70 } 71 72 dolibarr_fiche_head($head, $hselected, $langs->trans("Project").": ".$projet->ref); 73 74 75 $projet->societe->fetch($projet->societe->id); 76 77 print '<table class="border" width="100%">'; 78 print '<tr><td>'.$langs->trans("Company").'</td><td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$projet->societe->id.'">'.$projet->societe->nom.'</a></td></tr>'; 79 print '<tr><td>'.$langs->trans("Ref").'</td><td>'.$projet->ref.'</td></tr>'; 80 print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projet->title.'</td></tr>'; 81 print '</table>'; 82 83 /* 84 * Commandes 85 * 86 */ 87 $commandes = $projet->get_commande_list(); 88 $total = 0 ; 89 if (sizeof($commandes)>0 && is_array($commandes)) 90 { 91 print '<br>'; 92 93 print_titre('Listes des commandes associées au projet'); 94 print '<table class="noborder" width="100%">'; 95 96 print '<tr class="liste_titre">'; 97 print '<td width="15%">'.$langs->trans("Ref").'</td><td width="25%">Date</td><td align="right">'.$langs->trans("Amount").'</td><td> </td></tr>'; 98 99 for ($i = 0; $i<sizeof($commandes);$i++) 100 { 101 $commande = new Commande($db); 102 $commande->fetch($commandes[$i]); 103 104 $var=!$var; 105 print "<tr $bc[$var]>"; 106 print "<td><a href=\"../commande/fiche.php?id=$commande->id\">$commande->ref</a></td>\n"; 107 print '<td>'.strftime("%d %B %Y",$commande->date).'</td>'; 108 print '<td align="right">'.price($commande->total_ht).'</td><td> </td></tr>'; 109 110 $total = $total + $commande->total_ht; 111 } 112 113 print '<tr class="liste_total"><td colspan="2">'.$i.' '.$langs->trans("Orders").'</td>'; 114 print '<td align="right">'.$langs->trans("TotalHT").': '.price($total).'</td>'; 115 print '<td align="left">'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; 116 print "</table>"; 117 } 118 119 print '</div>'; 120 121 // Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent 122 print '<div class="tabsAction">'; 123 print '</div>'; 124 125 $db->close(); 126 127 llxFooter('$Date: 2005/10/02 19:48:55 $ - $Revision: 1.15 $'); 128 ?>
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 |
![]() |