[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> 4 * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> 5 * Copyright (C) 2005 Regis Houssin <regis.houssin@cap-networks.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 * 21 * $Id: note.php,v 1.25.2.1 2006/01/04 20:18:03 eldy Exp $ 22 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/comm/propal/note.php,v $ 23 */ 24 25 /** 26 \file htdocs/comm/propal/note.php 27 \ingroup propale 28 \brief Fiche d'information sur une proposition commerciale 29 \version $Revision: 1.25.2.1 $ 30 */ 31 32 require ('./pre.inc.php'); 33 require_once (DOL_DOCUMENT_ROOT."/propal.class.php"); 34 35 $langs->load('propal'); 36 $langs->load('compta'); 37 38 $user->getrights('propale'); 39 if (!$user->rights->propale->lire) 40 accessforbidden(); 41 42 43 /* 44 * Sécurité accés client 45 */ 46 if ($user->societe_id > 0) 47 { 48 unset($_GET['action']); 49 $socidp = $user->societe_id; 50 } 51 52 /******************************************************************************/ 53 /* Actions */ 54 /******************************************************************************/ 55 56 if ($_POST['action'] == 'update' && $user->rights->propale->creer) 57 { 58 $propal = new Propal($db); 59 $propal->fetch($_GET['propalid']); 60 $propal->update_note($_POST['note']); 61 } 62 63 llxHeader(); 64 $html = new Form($db); 65 /******************************************************************************/ 66 /* Fin des Actions */ 67 /******************************************************************************/ 68 69 if ($_GET['propalid']) 70 { 71 $propal = new Propal($db); 72 if ( $propal->fetch($_GET['propalid']) ) 73 { 74 $societe = new Societe($db); 75 if ( $societe->fetch($propal->soc_id) ) 76 { 77 $h=0; 78 79 $head[$h][0] = DOL_URL_ROOT.'/comm/propal.php?propalid='.$propal->id; 80 $head[$h][1] = $langs->trans('CommercialCard'); 81 $h++; 82 83 $head[$h][0] = DOL_URL_ROOT.'/compta/propal.php?propalid='.$propal->id; 84 $head[$h][1] = $langs->trans('AccountancyCard'); 85 $h++; 86 87 if ($conf->use_preview_tabs) 88 { 89 $head[$h][0] = DOL_URL_ROOT.'/comm/propal/apercu.php?propalid='.$propal->id; 90 $head[$h][1] = $langs->trans("Preview"); 91 $h++; 92 } 93 94 $head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id; 95 $head[$h][1] = $langs->trans('Note'); 96 $hselected=$h; 97 $h++; 98 99 $head[$h][0] = DOL_URL_ROOT.'/comm/propal/info.php?propalid='.$propal->id; 100 $head[$h][1] = $langs->trans('Info'); 101 $h++; 102 103 $head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?propalid='.$propal->id; 104 $head[$h][1] = $langs->trans('Documents'); 105 $h++; 106 107 dolibarr_fiche_head($head, $hselected, $langs->trans("Proposal").": $propal->ref"); 108 109 print '<table class="border" width="100%">'; 110 111 print '<tr><td>'.$langs->trans('Company').'</td><td>'; 112 if ($societe->client == 1) 113 { 114 $url = DOL_URL_ROOT.'/comm/fiche.php?socid='.$societe->id; 115 } 116 else 117 { 118 $url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$societe->id; 119 } 120 print '<a href="'.$url.'">'.$societe->nom.'</a></td>'; 121 print '<td align="left" width="25%">Conditions de réglement</td>'; 122 print '<td width="25%">'.' '.'</td>'; 123 print '</tr>'; 124 125 print '<tr><td>'.$langs->trans('Date').'</td><td>'; 126 print dolibarr_print_date($propal->date,'%a %d %B %Y'); 127 print '</td>'; 128 129 print '<td>'.$langs->trans('DateEndPropal').'</td><td>'; 130 if ($propal->fin_validite) 131 { 132 print dolibarr_print_date($propal->fin_validite,'%a %d %B %Y'); 133 if ($propal->statut == 1 && $propal->fin_validite < (time() - $conf->propal->cloture->warning_delay)) print img_warning($langs->trans("Late")); 134 } 135 else 136 { 137 print $langs->trans("Unknown"); 138 } 139 print '</td>'; 140 print '</tr>'; 141 142 print '<tr><td valign="top" colspan="4">'.$langs->trans('Note').' :<br>'. nl2br($propal->note).'</td></tr>'; 143 144 if ($_GET['action'] == 'edit') 145 { 146 print '<form method="post" action="note.php?propalid='.$propal->id.'">'; 147 print '<input type="hidden" name="action" value="update">'; 148 print '<tr><td valign="top" colspan="4"><textarea name="note" cols="80" rows="8">'.$propal->note."</textarea></td></tr>"; 149 print '<tr><td align="center" colspan="4"><input type="submit" class="button" value="'.$langs->trans("Save").'"></td></tr>'; 150 print '</form>'; 151 } 152 153 print '</table>'; 154 155 print '</div>'; 156 157 /* 158 * Actions 159 */ 160 161 print '<div class="tabsAction">'; 162 if ($user->rights->propale->creer && $_GET['action'] <> 'edit') 163 { 164 print '<a class="tabAction" href="note.php?propalid='.$propal->id.'&action=edit">'.$langs->trans('Edit').'</a>'; 165 } 166 print '</div>'; 167 } 168 } 169 } 170 $db->close(); 171 llxFooter('$Date: 2006/01/04 20:18:03 $ - $Revision: 1.15 '); 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 |
![]() |