dolibarr/htdocs/compta/tva/fiche.php

98 lines
2.9 KiB
PHP
Raw Normal View History

<?php
2005-01-23 03:03:08 +01:00
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
2003-08-04 21:00:07 +02:00
*
* 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$
*
*/
2005-01-23 03:03:08 +01:00
/** \file htdocs/compta/tva/fiche.php
\brief Page des r<EFBFBD>glements de TVA
\version $Revision$
*/
2003-09-11 22:18:51 +02:00
require("./pre.inc.php");
require("../../tva.class.php");
2003-08-04 21:00:07 +02:00
2003-08-25 12:17:21 +02:00
2003-08-04 21:00:07 +02:00
$mesg = '';
if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel"))
2003-08-04 21:00:07 +02:00
{
$tva = new Tva($db);
$tva->add_payement(mktime(12,0,0,
$_POST["datevmonth"],
$_POST["datevday"],
$_POST["datevyear"]
2003-08-04 21:00:07 +02:00
),
mktime(12,0,0,
$_POST["datepmonth"],
$_POST["datepday"],
$_POST["datepyear"]
2003-08-04 21:00:07 +02:00
),
$_POST["amount"]
2003-08-04 21:00:07 +02:00
);
Header ( "Location: reglement.php");
}
llxHeader();
/*
*
*
*/
$html = new Form($db);
2005-01-23 03:03:08 +01:00
if ($_GET["action"] == 'create')
2003-08-04 21:00:07 +02:00
{
print "<form action=\"fiche.php\" method=\"post\">\n";
print '<input type="hidden" name="action" value="add">';
print '<div class="titre">Nouveau r<>glement TVA</div><br>';
2005-01-23 03:03:08 +01:00
print '<table class="border" width="100%">';
2003-08-04 21:00:07 +02:00
print "<tr>";
2005-01-23 03:03:08 +01:00
print '<td>'.$langs->trans("DatePayment").'</td><td>';
2003-08-04 21:00:07 +02:00
print $html->select_date("","datev");
print '</td></tr>';
2005-01-23 03:03:08 +01:00
print '<td>'.$langs->trans("DateValue").'</td><td>';
2003-08-04 21:00:07 +02:00
print $html->select_date("","datep");
print '</td></tr>';
2005-01-23 03:03:08 +01:00
print '<tr><td>'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value=""></td></tr>';
print '<tr><td>&nbsp;</td><td><input type="submit" value="'.$langs->trans("Save").'">&nbsp;';
print '<input type="submit" name="cancel" value="'.$langs->trans("Cancel").'"></td></tr>';
2003-08-04 21:00:07 +02:00
print '</table>';
print '</form>';
}
/* ************************************************************************** */
/* */
/* Barre d'action */
/* */
/* ************************************************************************** */
// Aucune action
2003-08-04 21:00:07 +02:00
$db->close();
llxFooter("<em>Derni&egrave;re modification $Date$ r&eacute;vision $Revision$</em>");
?>