* * 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/sociales/charges.php \ingroup compta \brief Fiche d'une charge sociale \version $Revision$ */ require("./pre.inc.php"); $langs->load("compta"); $langs->load("bills"); $user->getrights('compta'); if (!$user->admin && !$user->rights->compta->charges) accessforbidden(); require("../../chargesociales.class.php"); llxHeader(); $chid=isset($_GET["id"])?$_GET["id"]:$_POST["id"]; /* *************************************************************************** */ /* */ /* Action Classer Payé */ /* */ /* *************************************************************************** */ if ($_GET["action"] == 'payed') { $cha = new ChargeSociales($db); $result = $cha->set_payed($chid); } /* *************************************************************************** */ /* */ /* Mode fiche */ /* */ /* *************************************************************************** */ if ($chid > 0) { $html = new Form($db); $cha = new ChargeSociales($db); if ( $cha->fetch($chid) > 0) { /* * Charge */ //$head[0][0] = DOL_URL_ROOT.'/comm/propal.php?propalid='.$propal->id; $head[0][1] = $langs->trans("SocialContribution").": $cha->id"; $h = 1; $a = 0; dolibarr_fiche_head($head, $a); /* * Confirmation de la suppression de la charge * */ if ($_GET["action"] == 'delete') { $html->form_confirm("index.php?id=$cha->id&action=del","Supprimer la charge sociale","Etes-vous sûr de vouloir supprimer cette charge sociale ?","confirm_delete"); } print "
\n"; print ''; if (! $_GET["action"]) { /* * Boutons actions */ print "