[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2004-2005 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: note.php,v 1.10 2005/10/14 21:49:28 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/fourn/commande/note.php,v $ 21 */ 22 23 /** 24 \file htdocs/fourn/commande/note.php 25 \ingroup commande 26 \brief Fiche commande 27 \version $Revision: 1.10 $ 28 */ 29 30 require ("./pre.inc.php"); 31 32 $langs->load("orders"); 33 $langs->load("suppliers"); 34 $langs->load("companies"); 35 36 $user->getrights('fournisseur'); 37 38 if (!$user->rights->fournisseur->commande->lire) accessforbidden(); 39 40 /* 41 * 42 */ 43 44 if ($_POST["action"] == 'updatenote' && $user->rights->fournisseur->commande->creer) 45 { 46 $commande = new CommandeFournisseur($db); 47 $commande->fetch($_GET["id"]); 48 49 $result = $commande->UpdateNote($user, $_POST["note"]); 50 if ($result == 0) 51 { 52 Header("Location: note.php?id=".$_GET["id"]); 53 } 54 } 55 56 llxHeader('',$langs->trans("OrderCard"),"CommandeFournisseur"); 57 58 $html = new Form($db); 59 60 /* *************************************************************************** */ 61 /* */ 62 /* Mode vue et edition */ 63 /* */ 64 /* *************************************************************************** */ 65 66 if ($_GET["id"] > 0) 67 { 68 $commande = new CommandeFournisseur($db); 69 if ( $commande->fetch($_GET["id"]) == 0) 70 { 71 $soc = new Societe($db); 72 $soc->fetch($commande->soc_id); 73 $author = new User($db); 74 $author->id = $commande->user_author_id; 75 $author->fetch(); 76 77 $h = 0; 78 $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/fiche.php?id='.$commande->id; 79 $head[$h][1] = $langs->trans("OrderCard"); 80 $h++; 81 82 $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$commande->id; 83 $head[$h][1] = $langs->trans("Note"); 84 $a = $h; 85 $h++; 86 87 $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/history.php?id='.$commande->id; 88 $head[$h][1] = $langs->trans("OrderFollow"); 89 $h++; 90 91 $title=$langs->trans("Order").": $commande->ref"; 92 dolibarr_fiche_head($head, $a, $title); 93 94 95 /* 96 * Commande 97 */ 98 print '<form action="note.php?id='.$commande->id.'" method="post">'; 99 print '<input type="hidden" name="action" value="updatenote">'; 100 101 print '<table class="border" width="100%">'; 102 print '<tr><td width="20%">'.$langs->trans("Supplier").'</td>'; 103 print '<td colspan="3">'; 104 print '<b><a href="'.DOL_URL_ROOT.'/fourn/fiche.php?socid='.$soc->id.'">'.img_object($langs->trans("ShowSupplier"),'company').' '.$soc->nom.'</a></b></td>'; 105 print '</tr>'; 106 107 print '<tr>'; 108 print '<td>'.$langs->trans("Status").'</td>'; 109 print '<td colspan="3">'; 110 print '<img src="statut'.$commande->statut.'.png"> '; 111 print $commande->statuts[$commande->statut]; 112 print "</td></tr>"; 113 114 if ($commande->methode_commande_id > 0) 115 { 116 print '<tr><td>'.$langs->trans("Date").'</td>'; 117 print '<td colspan="2">'; 118 119 if ($commande->date_commande) 120 { 121 print strftime("%A %d %B %Y",$commande->date_commande)."\n"; 122 } 123 124 print ' </td><td width="50%">'; 125 if ($commande->methode_commande) 126 { 127 print "Méthode : " .$commande->methode_commande; 128 } 129 print "</td></tr>"; 130 } 131 132 // Auteur 133 print '<tr><td>'.$langs->trans("Author").'</td><td colspan="2">'.$author->fullname.'</td>'; 134 print '<td width="50%">'; 135 print " </td></tr>"; 136 137 // Ligne de 3 colonnes 138 print '<tr><td>'.$langs->trans("AmountHT").'</td>'; 139 print '<td align="right"><b>'.price($commande->total_ht).'</b></td>'; 140 print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td>'; 141 print '<td valign="top"> </td></tr>'; 142 143 print '<tr><td>'.$langs->trans("AmountVAT").'</td><td align="right">'.price($commande->total_tva).'</td>'; 144 print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td><td> </td></tr>'; 145 print '<tr><td>'.$langs->trans("AmountTTC").'</td><td align="right">'.price($commande->total_ttc).'</td>'; 146 print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td><td> </td></tr>'; 147 148 149 if ($user->rights->fournisseur->commande->creer) 150 { 151 print '<tr><td valign="top">'.$langs->trans("Note").'</td><td colspan="3"><textarea cols="60" rows="10" name="note">'.nl2br($commande->note)."</textarea></td></tr>"; 152 print '<tr><td colspan="4" align="center"><input type="submit" class="button"></td></tr>'; 153 } 154 else 155 { 156 print '<tr><td>'.$langs->trans("Note").'</td><td colspan="3">'.nl2br($commande->note)."</td></tr>"; 157 } 158 159 print "</table></form>"; 160 } 161 else 162 { 163 /* Commande non trouvée */ 164 print "Commande inexistante"; 165 } 166 } 167 168 169 $db->close(); 170 171 llxFooter('$Date: 2005/10/14 21:49:28 $ - $Revision: 1.10 $'); 172 ?>
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 |
![]() |