* Copyright (C) 2004 Laurent Destailleur * * 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/compta/facture/note.php \ingroup facture \brief Fiche de notes sur une facture \version $Revision$ */ require("./pre.inc.php"); $user->getrights('facture'); if (!$user->rights->facture->lire) accessforbidden(); $langs->load("companies"); $langs->load("bills"); /* * Sécurité accés client */ if ($user->societe_id > 0) { unset($_GET["action"]); $socidp = $user->societe_id; } /******************************************************************************/ /* Actions */ /******************************************************************************/ if ($_POST["action"] == 'update' && $user->rights->facture->creer) { $facture = new Facture($db); $facture->fetch($_GET["facid"]); $facture->update_note($_POST["note"]); } llxHeader(); $html = new Form($db); /******************************************************************************/ /* Fin des Actions */ /******************************************************************************/ if ($_GET["facid"]) { $facture = new Facture($db); if ( $facture->fetch($_GET["facid"]) ) { $soc = new Societe($db, $facture->socidp); $soc->fetch($facture->socidp); $h=0; $head[$h][0] = DOL_URL_ROOT.'/compta/facture.php?facid='.$facture->id; $head[$h][1] = $langs->trans("CardBill"); $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/apercu.php?facid='.$facture->id; $head[$h][1] = $langs->trans("Apercu"); $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$facture->id; $head[$h][1] = $langs->trans("Note"); $hselected = $h; $h++; $head[$h][0] = DOL_URL_ROOT.'/compta/facture/info.php?facid='.$facture->id; $head[$h][1] = $langs->trans("Info"); $h++; dolibarr_fiche_head($head, $hselected, $langs->trans("Bill")." : $facture->ref"); print ''; print ''; print ''; print ''; print ''; print '"; if ($_GET["action"] == 'edit') { print ''; print ''; print '"; print ''; print ''; } print "
'.$langs->trans("Company").''; if ($soc->client == 1) { $url = DOL_URL_ROOT.'/compta/fiche.php?socid='.$soc->id; } else { $url = DOL_URL_ROOT.'/comm/prospect/fiche.php?socid='.$soc->id; } print ''.$soc->nom.''.$langs->trans("Status").''.$facture->statut_libelle.'
Date'.strftime("%A %d %B %Y",$facture->date); if ($facture->fin_validite) { print " (".strftime("%d %B %Y",$facture->fin_validite).")"; } print ''.$langs->trans("Author").''; $author = new User($db, $facture->user_author); $author->fetch(''); print $author->fullname.'
Note :
'. nl2br($facture->note)."
"; print "
"; /* * Actions */ print ''; print '
'; if ($user->rights->facture->creer && $_GET["action"] <> 'edit') { print "id&action=edit\">".$langs->trans('Edit').""; } print "
"; } } $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); ?>