From 0caf374e9a0a382ff8fbacf3742cf9f1fcac186d Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 5 Mar 2004 16:10:16 +0000 Subject: [PATCH] Nouveau fichier --- htdocs/comm/propal/note.php | 142 ++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 htdocs/comm/propal/note.php diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php new file mode 100644 index 00000000000..4ce220399de --- /dev/null +++ b/htdocs/comm/propal/note.php @@ -0,0 +1,142 @@ + + * + * 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 ''; + + print ''; + print ''; + + print ''; + + print ''; + + print '"; + + if ($_GET["action"] == 'edit') + { + print '"; + } + + + 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.'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 'Auteur'; + $author = new User($db, $propal->user_author_id); + $author->fetch(''); + print $author->fullname.'
Note :
'. nl2br($propal->note)."
"; + + + /* + * Actions + */ + print ''; + print '

'; + + if ($user->rights->propale->creer && $_GET["action"] <> 'edit') + { + print "id&action=edit\">Editer"; + } + + print "
"; + + } + } + +} +$db->close(); +llxFooter("Dernière modification $Date$ révision $Revision$"); +?>