From c75fade6497549ad298362feb3fe3e08cbd258c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 Mar 2021 17:07:44 +0100 Subject: [PATCH] Fix regression --- htdocs/compta/tva/index.php | 48 +++++-------------------------------- 1 file changed, 6 insertions(+), 42 deletions(-) diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index a2fa47fca61..2b396fe6006 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -345,8 +345,12 @@ if ($refresh === true) { while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) { // $mcursor is to avoid too large loop //$m = $conf->global->SOCIETE_FISCAL_MONTH_START + ($mcursor % 12); - if ($m == 13) $y++; - if ($m > 12) $m -= 12; + if ($m == 13) { + $y++; + } + if ($m > 12) { + $m -= 12; + } $mcursor++; $x_coll = tax_by_rate('vat', $db, $y, 0, 0, 0, $modetax, 'sell', $m); @@ -622,46 +626,6 @@ if ($refresh === true) { pt($db, $sql, $langs->trans("Month")); - if (!empty($conf->global->MAIN_FEATURES_LEVEL)) { - print '
'; - - /* - * Recap - */ - - print load_fiche_titre($langs->trans("VATBalance"), '', ''); // need to add translation - - $sql1 = "SELECT SUM(amount) as mm"; - $sql1 .= " FROM " . MAIN_DB_PREFIX . "tva as f"; - $sql1 .= " WHERE f.entity = " . $conf->entity; - $sql1 .= " AND f.datev >= '" . $db->idate($date_start) . "'"; - $sql1 .= " AND f.datev <= '" . $db->idate($date_end) . "'"; - - $result = $db->query($sql1); - if ($result) { - $obj = $db->fetch_object($result); - print ''; - - print ""; - print ''; - print ''; - print "\n"; - - print ""; - print ''; - print '\n"; - print "\n"; - - $restopay = $total - $obj->mm; - print ""; - print ''; - print ''; - print "\n"; - - print '
' . $langs->trans("VATDue") . '' . price(price2num($total, 'MT')) . '
' . $langs->trans("VATPaid") . '' . price(price2num($obj->mm, 'MT')) . "
' . $langs->trans("RemainToPay") . '' . price(price2num($restopay, 'MT')) . '
'; - } - } - print ''; }