* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * $Id$ * $Source$ * */ /** * Gestion d'une proposition commerciale * @package propale */ require("./pre.inc.php"); $user->getrights('propale'); if (!$user->rights->propale->lire) accessforbidden(); /* * Modules optionnels */ require("../../propal.class.php"); /* * Sécurité accés client */ if ($user->societe_id > 0) { $action = ''; $socidp = $user->societe_id; } /******************************************************************************/ /* Actions */ /******************************************************************************/ if ($_GET["valid"] == 1 && $user->rights->propale->valider) { $propal = new Propal($db); $propal->fetch($_GET["propalid"]); $propal->update_price($_GET["propalid"]); propale_pdf_create($db, $_GET["propalid"], $propal->modelpdf); $propal->valid($user); } llxHeader(); $html = new Form($db); /******************************************************************************/ /* Fin des Actions */ /******************************************************************************/ if ($_GET["propalid"]) { $propal = new Propal($db); if ( $propal->fetch($_GET["propalid"]) ) { $societe = new Societe($db); if ( $societe->fetch($propal->soc_id) ) { $head[0][0] = DOL_URL_ROOT.'/comm/propal.php?propalid='.$propal->id; $head[0][1] = "Proposition commerciale : $propal->ref"; $h = 1; $head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id; $head[$h][1] = "Note"; $a = 1; dolibarr_fiche_head($head, $a); print '
| Société | '; if ($societe->client == 1) { $url ='fiche.php?socid='.$societe->id; } else { $url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$societe->id; } print ''.$societe->nom.' | '; print 'Statut | '.$propal->statut_libelle.' |
| Date | '.strftime("%A %d %B %Y",$propal->date); if ($propal->fin_validite) { print " (".strftime("%d %B %Y",$propal->fin_validite).")"; } print ' | '; print 'Auteur | '; $author = new User($db, $propal->user_author_id); $author->fetch(''); print $author->fullname.' |
| Note : '. nl2br($propal->note)." | |||