diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index b3b8f2edaf5..f34981a12cc 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Éric Seigne - * Copyright (C) 2004 Laurent Destailleur + * 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 @@ -21,11 +21,18 @@ * $Source$ * */ + +/** + \file htdocs/compta/tva/index.php + \ingroup compta + \brief Page des societes + \version $Revision$ +*/ + require("./pre.inc.php"); require("../../tva.class.php"); /* - * * */ function tva_coll($db, $y,$m) { @@ -40,8 +47,8 @@ function tva_coll($db, $y,$m) { return $obj->amount; } } + /* - * * */ function tva_paye($db, $y,$m) @@ -60,17 +67,17 @@ function tva_paye($db, $y,$m) } function pt ($db, $sql, $date) { - global $bc; + global $bc,$langs; $result = $db->query($sql); if ($result) { $num = $db->num_rows(); $i = 0; $total = 0 ; - print ""; + print "
"; print ""; print ""; - print ""; + print ""; print "\n"; print "\n"; $var=True; @@ -86,12 +93,12 @@ function pt ($db, $sql, $date) { $i++; } - print ""; + print ""; print "
$dateMontant".$langs->trans("Amount")." 
Total :".price($total)."euros HT
".$langs->trans("TotalHT")." :".price($total)."euros
"; $db->free(); } else { - print $db->error(); + dolibar_print_error($db); } } @@ -103,9 +110,9 @@ llxHeader(); $tva = new Tva($db); +$year=$_GET["year"]; if ($year == 0 ) { $year_current = strftime("%Y",time()); - //$year_start = $conf->years; $year_start = $year_current; } else { $year_current = $year; @@ -113,32 +120,27 @@ if ($year == 0 ) { } $textprevyear="".img_previous().""; -// On n'affiche pas "Année suivante" si c'est dans le futur ! -if(($year < strftime("%Y",time())) && ($year != 0)) { - $textnextyear=" ".img_next().""; -} +$textnextyear=" ".img_next().""; -print_fiche_titre("TVA Solde : ".price($tva->solde($year_start)),"$textprevyear Année $year_start $textnextyear"); +print_fiche_titre($langs->trans("VAT")." : ".price($tva->solde($year_start)),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear"); echo ''; echo ''; -print_fiche_titre("TVA réglée"); -//echo ''; +print_fiche_titre($langs->trans("VATPayed")); echo ''; for ($y = $year_current ; $y >= $year_start ; $y=$y-1 ) { echo '
'; -print_fiche_titre("TVA collectée"); +print_fiche_titre($langs->trans("VATSummary")); echo ''; -//TVA collectéeTva Réglée
'; - print ""; + print "
"; print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; print "\n"; print "\n"; print "\n"; @@ -166,7 +168,7 @@ for ($y = $year_current ; $y >= $year_start ; $y=$y-1 ) { $i++; if ($i > 2) { - print ''; + print ''; $i = 0; $subtotal = 0; } @@ -189,7 +191,8 @@ for ($y = $year_current ; $y >= $year_start ; $y=$y-1 ) { $sql .= " FROM ".MAIN_DB_PREFIX."tva as f WHERE f.datev >= '$y-01-01' AND f.datev <= '$y-12-31' "; $sql .= " GROUP BY dm DESC"; - pt($db, $sql,"Année $y"); + pt($db, $sql,$langs->trans("Year")." $y"); + print "
Année $yCollectéePayée".$langs->trans("Year")." $y".$langs->trans("VATToCollect")."".$langs->trans("VATToPay")."  
Sous total :'.price($subtotal).''.price($subtotal * 0.8).'
'.$langs->trans("SubTotal").':'.price($subtotal).''.price($subtotal * 0.8).'
";