* Copyright (C) 2004-2005 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/tva/fiche.php \brief Page des règlements de TVA \version $Revision$ */ require("./pre.inc.php"); require("../../tva.class.php"); $langs->load("compta"); $mesg = ''; /** * Action ajout paiement tva */ if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) { $tva = new Tva($db); $db->begin(); $tva->label = $langs->trans("VATPayment"); $tva->accountid=$_POST["accountid"]; $tva->paymenttype=$_POST["paiementtype"]; $tva->datev=mktime(12,0,0, $_POST["datevmonth"], $_POST["datevday"], $_POST["datevyear"]); $tva->datep=mktime(12,0,0, $_POST["datepmonth"], $_POST["datepday"], $_POST["datepyear"]); $tva->amount=$_POST["amount"]; $ret=$tva->add_payement($user); if ($ret > 0) { $db->commit(); Header ("Location: reglement.php"); } else { $db->rollback(); $message=$langs->trans("Error"); $_GET["action"]="create"; } } llxHeader(); $html = new Form($db); // Formulaire saisie tva if ($_GET["action"] == 'create') { print "
\n"; print ''; print_fiche_titre($langs->trans("NewVATPayment")); if ($message) print '
'.$message.'
'; print ''; print ""; print ''; print ''; print '\n"; print ''; print ''; print ''; print '
'.$langs->trans("DatePayment").''; print $html->select_date("","datev"); print '
'.$langs->trans("DateValue").''; print $html->select_date("","datep"); print '
'.$langs->trans("Type").''; $html->select_types_paiements($charge->paiementtype, "paiementtype"); print "
Compte à créditer :'; $html->select_comptes($charge->accountid, "accountid", 0, "courant=1"); // Affiche liste des comptes courant print '
'.$langs->trans("Amount").'
  '; print '
'; print '
'; } /* ************************************************************************** */ /* */ /* Barre d'action */ /* */ /* ************************************************************************** */ // Aucune action $db->close(); llxFooter('$Date$ - $Revision$'); ?>