From d80476413468dc6684089cbd4684e6b4d75a7951 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 15 Mar 2018 10:24:45 +0100 Subject: [PATCH] Standardize look and feel --- htdocs/compta/localtax/card.php | 6 +-- htdocs/compta/localtax/index.php | 46 +++++++++++-------- .../localtax/{reglement.php => list.php} | 0 htdocs/compta/tva/card.php | 8 ++-- htdocs/compta/tva/index.php | 37 +++++++-------- htdocs/compta/tva/info.php | 2 +- htdocs/compta/tva/{reglement.php => list.php} | 4 +- htdocs/core/menus/init_menu_auguria.sql | 9 ++-- htdocs/core/menus/standard/eldy.lib.php | 19 ++++---- htdocs/langs/en_US/companies.lang | 3 +- 10 files changed, 74 insertions(+), 60 deletions(-) rename htdocs/compta/localtax/{reglement.php => list.php} (100%) rename htdocs/compta/tva/{reglement.php => list.php} (98%) diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index 317d3ae813d..b2f175a5f35 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -54,7 +54,7 @@ $hookmanager->initHooks(array('localtaxvatcard','globalcard')); //add payment of localtax if($_POST["cancel"] == $langs->trans("Cancel")){ - header("Location: reglement.php?localTaxType=".$lttype); + header("Location: list.php?localTaxType=".$lttype); exit; } @@ -78,7 +78,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) if ($ret > 0) { $db->commit(); - header("Location: reglement.php?localTaxType=".$lttype); + header("Location: list.php?localTaxType=".$lttype); exit; } else @@ -111,7 +111,7 @@ if ($action == 'delete') if ($result >= 0) { $db->commit(); - header("Location: ".DOL_URL_ROOT.'/compta/localtax/reglement.php?localTaxType='.$localtax->ltt); + header("Location: ".DOL_URL_ROOT.'/compta/localtax/list.php?localTaxType='.$localtax->ltt); exit; } else diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 5d17688fc68..df4909faad6 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -1,6 +1,7 @@ * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2018 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 @@ -22,14 +23,12 @@ * \brief Index page of IRPF reports */ require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -$langs->load("other"); -$langs->load("compta"); -$langs->load("banks"); -$langs->load("bills"); +$langs->loadLangs(array("other","compta","banks","bills","companies")); $localTaxType=GETPOST('localTaxType', 'int'); @@ -45,22 +44,21 @@ if ($year == 0) // Security check $socid = isset($_GET["socid"])?$_GET["socid"]:''; -if ($user->societe_id) - $socid=$user->societe_id; +if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'tax', '', '', 'charges'); // Define modetax (0 or 1) // 0=normal, 1=option vat for services is on debit $modetax = $conf->global->TAX_MODE; -if (isset($_GET["modetax"])) - $modetax=$_GET["modetax"]; +if (isset($_GET["modetax"])) $modetax=GETPOST("modetax",'alpha'); + /** * print function * - * @param DoliDB $db Database - * @param string $sql sql - * @param string $date date + * @param DoliDB $db Database handler + * @param string $sql SQL Request + * @param string $date Date * @return void */ function pt ($db, $sql, $date) @@ -78,10 +76,10 @@ function pt ($db, $sql, $date) print ''.$langs->trans("Amount").''; print ' '."\n"; print "\n"; - $var=True; + while ($i < $num) { $obj = $db->fetch_object($result); - + print ''; print ''.$obj->dm."\n"; $total = $total + $obj->mm; @@ -95,7 +93,8 @@ function pt ($db, $sql, $date) print ""; $db->free($result); - } else { + } + else { dol_print_error($db); } } @@ -105,7 +104,7 @@ function pt ($db, $sql, $date) * View */ -llxHeader(); +$tva = new Tva($db); if($localTaxType==1) { $LT='LT1'; @@ -124,15 +123,25 @@ if($localTaxType==1) { } +$name = $langs->trans("ReportByMonth"); +$description = $langs->trans($LT); +$calcmode = $langs->trans("LTReportBuildWithOptionDefinedInModule").' '; +$calcmode.= '('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')
'; +$builddate=dol_now(); + +llxHeader('', $name); + $textprevyear="".img_previous().""; $textnextyear=" ".img_next().""; -print load_fiche_titre($langs->transcountry($LT,$mysoc->country_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear", 'title_accountancy.png'); +//print load_fiche_titre($langs->transcountry($LT,$mysoc->country_code),"$textprevyear ".$langs->trans("Year")." $year_start $textnextyear", 'title_accountancy.png'); + +report_header($name,'',$textprevyear.$langs->trans("Year")." ".$year_start.$textnextyear,'',$description,$builddate,$exportlink,array(),$calcmode); -print $langs->trans("LTReportBuildWithOptionDefinedInModule").'
'; -print '('.$langs->trans("TaxModuleSetupToModifyRulesLT",DOL_URL_ROOT.'/admin/company.php').')
'; print '
'; +//print load_fiche_titre($langs->trans("Summary"), '', ''); + print ''; print '\n"; $y = $year_current ; -$var=True; $total=0; $subtotalcoll=0; $subtotalpaye=0; $subtotal=0; $i=0; for ($m = 1 ; $m < 13 ; $m++ ) { diff --git a/htdocs/compta/localtax/reglement.php b/htdocs/compta/localtax/list.php similarity index 100% rename from htdocs/compta/localtax/reglement.php rename to htdocs/compta/localtax/list.php diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index e76d96e1a5e..2411858a924 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -55,7 +55,7 @@ $hookmanager->initHooks(array('taxvatcard','globalcard')); if ($_POST["cancel"] == $langs->trans("Cancel") && ! $id) { - header("Location: reglement.php"); + header("Location: list.php"); exit; } @@ -119,7 +119,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) if ($ret > 0) { $db->commit(); - header("Location: reglement.php"); + header("Location: list.php"); exit; } else @@ -154,7 +154,7 @@ if ($action == 'delete') if ($result >= 0) { $db->commit(); - header("Location: ".DOL_URL_ROOT.'/compta/tva/reglement.php'); + header("Location: ".DOL_URL_ROOT.'/compta/tva/list.php'); exit; } else @@ -306,7 +306,7 @@ if ($id) dol_fiche_head($head, 'card', $langs->trans("VATPayment"), -1, 'payment'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', ''); diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index 89accf57492..6891bda675e 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2014 Ferran Marcet * @@ -25,14 +25,12 @@ * \brief Index page of VAT reports */ require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -$langs->load("other"); -$langs->load("compta"); -$langs->load("banks"); -$langs->load("bills"); +$langs->loadLangs(array("other","compta","banks","bills","companies")); $year=GETPOST("year","int"); if ($year == 0) @@ -52,7 +50,7 @@ $result = restrictedArea($user, 'tax', '', '', 'charges'); // Define modetax (0 or 1) // 0=normal, 1=option vat for services is on debit $modetax = $conf->global->TAX_MODE; -if (isset($_GET["modetax"])) $modetax=$_GET["modetax"]; +if (isset($_GET["modetax"])) $modetax=GETPOST("modetax",'alpha'); /** @@ -68,8 +66,7 @@ function pt ($db, $sql, $date) global $conf, $bc,$langs; $result = $db->query($sql); - if ($result) - { + if ($result) { $num = $db->num_rows($result); $i = 0; $total = 0; @@ -79,9 +76,8 @@ function pt ($db, $sql, $date) print ''; print ''."\n"; print "\n"; - $var=True; - while ($i < $num) - { + + while ($i < $num) { $obj = $db->fetch_object($result); print ''; @@ -108,19 +104,25 @@ function pt ($db, $sql, $date) * View */ -llxHeader(); - $tva = new Tva($db); +$name = $langs->trans("ReportByMonth"); +$description = $langs->trans("VATSummary"); +$calcmode = $langs->trans("VATReportBuildWithOptionDefinedInModule").' '; +$calcmode.= '('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')'; +$builddate=dol_now(); + +llxHeader('', $name); + $textprevyear="".img_previous($langs->trans("Previous"), 'class="valignbottom"').""; $textnextyear=" ".img_next($langs->trans("Next"), 'class="valignbottom"').""; -print $conf->dol_optimize_smallscreen; -print load_fiche_titre($langs->transcountry("VAT", $mysoc->country_code), $textprevyear." ".$langs->trans("Year")." ".$year_start." ".$textnextyear, 'title_accountancy.png'); +//print load_fiche_titre($langs->transcountry("VAT", $mysoc->country_code), $textprevyear." ".$langs->trans("Year")." ".$year_start." ".$textnextyear, 'title_accountancy.png'); + +report_header($name,'',$textprevyear.$langs->trans("Year")." ".$year_start.$textnextyear,'',$description,$builddate,$exportlink,array(),$calcmode); + -print $langs->trans("VATReportBuildWithOptionDefinedInModule").'
'; -print '('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')
'; print '
'; print '
'; @@ -140,7 +142,6 @@ print '
'."\n"; $y = $year_current ; -$var=True; $total=0; $subtotalcoll=0; $subtotalpaye=0; $subtotal=0; $i=0; for ($m = 1 ; $m < 13 ; $m++ ) diff --git a/htdocs/compta/tva/info.php b/htdocs/compta/tva/info.php index f6026c8f8ea..6a3955403e7 100644 --- a/htdocs/compta/tva/info.php +++ b/htdocs/compta/tva/info.php @@ -53,7 +53,7 @@ $head = vat_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans("VATPayment"), -1, 'payment'); -$linkback = ''.$langs->trans("BackToList").''; +$linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', ''); diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/list.php similarity index 98% rename from htdocs/compta/tva/reglement.php rename to htdocs/compta/tva/list.php index 5041450dd8b..8f2044369a1 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011-2017 Alexandre Spangaro * @@ -19,7 +19,7 @@ */ /** - * \file htdocs/compta/tva/reglement.php + * \file htdocs/compta/tva/list.php * \ingroup tax * \brief List of VAT payments */ diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 28eb9fa044a..9f6c351bd72 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -206,11 +206,12 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled', __HANDLER__, 'left', 2250__+MAX_llx_menu__, 'billing', 'tax_social', 2200__+MAX_llx_menu__, '/compta/sociales/index.php?leftmenu=tax_social', 'SocialContributions', 1, '', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2251__+MAX_llx_menu__, 'billing', '', 2250__+MAX_llx_menu__, '/compta/sociales/card.php?leftmenu=tax_social&action=create', 'MenuNewSocialContribution', 2, '', '$user->rights->tax->charges->creer', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && $leftmenu=="tax_social"', __HANDLER__, 'left', 2252__+MAX_llx_menu__, 'billing', '', 2250__+MAX_llx_menu__, '/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=billing&mode=sconly', 'Payments', 2, '', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)', __HANDLER__, 'left', 2300__+MAX_llx_menu__, 'billing', 'tax_vat', 2200__+MAX_llx_menu__, '/compta/tva/index.php?leftmenu=tax_vat&mainmenu=billing', 'VAT', 1, 'companies', '$user->rights->tax->charges->lire', '', 0, 7, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS)', __HANDLER__, 'left', 2300__+MAX_llx_menu__, 'billing', 'tax_vat', 2200__+MAX_llx_menu__, '/compta/tva/list.php?leftmenu=tax_vat&mainmenu=billing', 'VAT', 1, 'companies', '$user->rights->tax->charges->lire', '', 0, 7, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2301__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/card.php?leftmenu=tax_vat&action=create', 'New', 2, 'companies', '$user->rights->tax->charges->creer', '', 0, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2302__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/reglement.php?leftmenu=tax_vat', 'List', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2303__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?leftmenu=tax_vat', 'ReportByCustomers', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2302__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/list.php?leftmenu=tax_vat', 'List', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2303__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/index.php?leftmenu=tax_vat', 'ReportByMonth', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?leftmenu=tax_vat', 'ReportByCustomers', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2305__+MAX_llx_menu__, 'billing', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1', __HANDLER__, 'left', 2350__+MAX_llx_menu__, 'billing', 'tax_various', 2200__+MAX_llx_menu__, '/compta/bank/various_payment/index.php?leftmenu=tax_various&mainmenu=billing', 'MenuVariousPayment', 1, 'banks', '$user->rights->banque->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && $leftmenu=="tax_various"', __HANDLER__, 'left', 2351__+MAX_llx_menu__, 'billing', '', 2350__+MAX_llx_menu__, '/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create', 'MenuNewVariousPayment', 2, 'various_payment', '$user->rights->banque->modifier', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && $leftmenu=="tax_various"', __HANDLER__, 'left', 2352__+MAX_llx_menu__, 'billing', '', 2350__+MAX_llx_menu__, '/compta/bank/various_payment/index.php?leftmenu=tax_various', 'List', 2, 'various_payment', '$user->rights->banque->lire', '', 0, 3, __ENTITY__); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 75630841225..0b1521a69fe 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -894,9 +894,10 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu // VAT if (empty($conf->global->TAX_DISABLE_VAT_MENUS)) { - $newmenu->add("/compta/tva/index.php?leftmenu=tax_vat&mainmenu=billing",$langs->transcountry("VAT", $mysoc->country_code),1,$user->rights->tax->charges->lire, '', $mainmenu, 'tax_vat'); + $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat&mainmenu=billing",$langs->transcountry("VAT", $mysoc->country_code),1,$user->rights->tax->charges->lire, '', $mainmenu, 'tax_vat'); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_vat/i',$leftmenu)) $newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create",$langs->trans("New"),2,$user->rights->tax->charges->creer); - if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_vat/i',$leftmenu)) $newmenu->add("/compta/tva/reglement.php?leftmenu=tax_vat",$langs->trans("List"),2,$user->rights->tax->charges->lire); + if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_vat/i',$leftmenu)) $newmenu->add("/compta/tva/list.php?leftmenu=tax_vat",$langs->trans("List"),2,$user->rights->tax->charges->lire); + if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_vat/i',$leftmenu)) $newmenu->add("/compta/tva/index.php?leftmenu=tax_vat",$langs->trans("ReportByMonth"),2,$user->rights->tax->charges->lire); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_vat/i',$leftmenu)) $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", $langs->trans("ReportByCustomers"), 2, $user->rights->tax->charges->lire); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_vat/i',$leftmenu)) $newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); global $mysoc; @@ -905,18 +906,20 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu //Local Taxes 1 if($mysoc->useLocalTax(1) && (isset($mysoc->localtax1_assuj) && $mysoc->localtax1_assuj=="1")) { - $newmenu->add("/compta/localtax/index.php?leftmenu=tax_1_vat&mainmenu=billing&localTaxType=1",$langs->transcountry("LT1",$mysoc->country_code),1,$user->rights->tax->charges->lire); - if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_1_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&localTaxType=1",$langs->trans("NewPayment"),2,$user->rights->tax->charges->creer); - if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_1_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/reglement.php?leftmenu=tax_1_vat&localTaxType=1",$langs->trans("Payments"),2,$user->rights->tax->charges->lire); + $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&mainmenu=billing&localTaxType=1",$langs->transcountry("LT1",$mysoc->country_code),1,$user->rights->tax->charges->lire); + if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_1_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&localTaxType=1",$langs->trans("New"),2,$user->rights->tax->charges->creer); + if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_1_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&localTaxType=1",$langs->trans("List"),2,$user->rights->tax->charges->lire); + if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_1_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/index.php?leftmenu=tax_1_vat&localTaxType=1",$langs->trans("ReportByMonth"),2,$user->rights->tax->charges->lire); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_1_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByCustomers"), 2, $user->rights->tax->charges->lire); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_1_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_1_vat&localTaxType=1", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); } //Local Taxes 2 if($mysoc->useLocalTax(2) && (isset($mysoc->localtax2_assuj) && $mysoc->localtax2_assuj=="1")) { - $newmenu->add("/compta/localtax/index.php?leftmenu=tax_2_vat&mainmenu=billing&localTaxType=2",$langs->transcountry("LT2",$mysoc->country_code),1,$user->rights->tax->charges->lire); - if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_2_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&localTaxType=2",$langs->trans("NewPayment"),2,$user->rights->tax->charges->creer); - if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_2_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/reglement.php?leftmenu=tax_2_vat&localTaxType=2",$langs->trans("Payments"),2,$user->rights->tax->charges->lire); + $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&mainmenu=billing&localTaxType=2",$langs->transcountry("LT2",$mysoc->country_code),1,$user->rights->tax->charges->lire); + if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_2_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&localTaxType=2",$langs->trans("New"),2,$user->rights->tax->charges->creer); + if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_2_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&localTaxType=2",$langs->trans("List"),2,$user->rights->tax->charges->lire); + if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_2_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/index.php?leftmenu=tax_2_vat&localTaxType=2",$langs->trans("ReportByMonth"),2,$user->rights->tax->charges->lire); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_2_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByCustomers"), 2, $user->rights->tax->charges->lire); if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_2_vat/i',$leftmenu)) $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&localTaxType=2", $langs->trans("ReportByQuarter"), 2, $user->rights->tax->charges->lire); } diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 36339d5ce08..b4820e0fa2d 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -43,7 +43,8 @@ Individual=Private individual ToCreateContactWithSameName=Will create automatically a contact/address with same information than third party under the third party. In most cases, even if your third party is a physical people, creating a third party alone is enough. ParentCompany=Parent company Subsidiaries=Subsidiaries -ReportByCustomers=Report by customers +ReportByMonth=Report by month +ReportByCustomers=Report by customer ReportByQuarter=Report by rate CivilityCode=Civility code RegisteredOffice=Registered office
'; print load_fiche_titre($langs->transcountry($LTSummary,$mysoc->country_code), '', ''); @@ -162,7 +171,6 @@ print "
'.$langs->trans("Amount").'