[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 * 19 * $Id: fiche.php,v 1.14 2005/11/20 19:43:49 eldy Exp $ 20 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/compta/tva/fiche.php,v $ 21 */ 22 23 /** 24 \file htdocs/compta/tva/fiche.php 25 \brief Page des règlements de TVA 26 \version $Revision: 1.14 $ 27 */ 28 29 require ("./pre.inc.php"); 30 require ("../../tva.class.php"); 31 32 $langs->load("compta"); 33 34 35 $mesg = ''; 36 37 38 /** 39 * Action ajout paiement tva 40 */ 41 if ($_POST["action"] == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) 42 { 43 $tva = new Tva($db); 44 45 $db->begin(); 46 47 $tva->label = $langs->trans("VATPayment"); 48 $tva->accountid=$_POST["accountid"]; 49 $tva->paymenttype=$_POST["paiementtype"]; 50 $tva->datev=mktime(12,0,0, $_POST["datevmonth"], $_POST["datevday"], $_POST["datevyear"]); 51 $tva->datep=mktime(12,0,0, $_POST["datepmonth"], $_POST["datepday"], $_POST["datepyear"]); 52 $tva->amount=$_POST["amount"]; 53 54 $ret=$tva->add_payement($user); 55 if ($ret > 0) 56 { 57 $db->commit(); 58 Header ("Location: reglement.php"); 59 exit; 60 } 61 else 62 { 63 $db->rollback(); 64 $message='<div class="error">'.$tva->error.'</div>'; 65 $_GET["action"]="create"; 66 } 67 } 68 69 70 71 llxHeader(); 72 73 $html = new Form($db); 74 75 // Formulaire saisie tva 76 if ($_GET["action"] == 'create') 77 { 78 print "<form action=\"fiche.php\" method=\"post\">\n"; 79 print '<input type="hidden" name="action" value="add">'; 80 81 print_fiche_titre($langs->trans("NewVATPayment")); 82 83 if ($message) print $message; 84 85 print '<table class="border" width="100%">'; 86 87 print "<tr>"; 88 print '<td>'.$langs->trans("DatePayment").'</td><td>'; 89 print $html->select_date("","datev"); 90 print '</td></tr>'; 91 92 print '<tr><td>'.$langs->trans("DateValue").'</td><td>'; 93 print $html->select_date("","datep"); 94 print '</td></tr>'; 95 96 print '<tr><td>'.$langs->trans("Type").'</td><td>'; 97 $html->select_types_paiements($charge->paiementtype, "paiementtype"); 98 print "</td>\n"; 99 100 if ($conf->banque->enabled) 101 { 102 print '<tr><td>'.$langs->trans("Account").'</td><td>'; 103 $html->select_comptes($charge->accountid,"accountid",0,"courant=1",1); // Affiche liste des comptes courant 104 print '</td></tr>'; 105 } 106 107 print '<tr><td>'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value=""></td></tr>'; 108 print '<tr><td> </td><td><input type="submit" class="button" value="'.$langs->trans("Save").'"> '; 109 print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'"></td></tr>'; 110 print '</table>'; 111 print '</form>'; 112 } 113 114 115 /* ************************************************************************** */ 116 /* */ 117 /* Barre d'action */ 118 /* */ 119 /* ************************************************************************** */ 120 121 // Aucune action 122 123 $db->close(); 124 125 llxFooter('$Date: 2005/11/20 19:43:49 $ - $Revision: 1.14 $'); 126 127 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |