* Copyright (C) 2004-2005 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * * 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$ * */ /** \file htdocs/comm/propal/note.php \ingroup propale \brief Fiche d'information sur une proposition commerciale \version $Revision$ */ require('./pre.inc.php'); require('../../propal.class.php'); $langs->load('propal'); $user->getrights('propale'); if (!$user->rights->propale->lire) accessforbidden(); /* * Sécurité accés client */ if ($user->societe_id > 0) { unset($_GET['action']); $socidp = $user->societe_id; } /******************************************************************************/ /* Actions */ /******************************************************************************/ if ($_POST['action'] == 'update' && $user->rights->propale->creer) { $propal = new Propal($db); $propal->fetch($_GET['propalid']); $propal->update_note($_POST['note']); } 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) ) { $h=0; $head[$h][0] = DOL_URL_ROOT.'/comm/propal.php?propalid='.$propal->id; $head[$h][1] = $langs->trans('Card'); $h++; $head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id; $head[$h][1] = $langs->trans('Note'); $hselected=$h; $h++; $head[$h][0] = DOL_URL_ROOT.'/comm/propal/info.php?propalid='.$propal->id; $head[$h][1] = $langs->trans('Info'); $h++; $head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?propalid='.$propal->id; $head[$h][1] = $langs->trans('Documents'); $h++; dolibarr_fiche_head($head, $hselected, $langs->trans("Proposal").": $propal->ref"); print ''; print ''; print ''; print ''; print ''; print ''; if ($_GET['action'] == 'edit') { print ''; print ''; print '"; print ''; print ''; } print '
'.$langs->trans('Company').''; if ($societe->client == 1) { $url = DOL_URL_ROOT.'/comm/fiche.php?socid='.$societe->id; } else { $url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$societe->id; } print ''.$societe->nom.''.$langs->trans('Status').''.$propal->statut_libelle.'
'.$langs->trans('Date').''; print dolibarr_print_date($propal->date); if ($propal->fin_validite) { print ' ('.dolibarr_print_date($propal->fin_validite).')'; } print ''.$langs->trans('Author').''; $author = new User($db, $propal->user_author_id); $author->fetch(''); print $author->fullname.'
'.$langs->trans('Note').' :
'. nl2br($propal->note).'
'; print '
'; print ''; /* * Actions */ print '
'; if ($user->rights->propale->creer && $_GET['action'] <> 'edit') { print ''.$langs->trans('Edit').''; } print '
'; } } } $db->close(); llxFooter('$Date$ - $Revision: 1.15 '); ?>