diff --git a/htdocs/compta/paiement/liste.php b/htdocs/compta/paiement/liste.php index 6b349f2bf55..08a9b625d7e 100644 --- a/htdocs/compta/paiement/liste.php +++ b/htdocs/compta/paiement/liste.php @@ -126,7 +126,10 @@ if ($resql) print_liste_field_titre($langs->trans("Account"),"liste.php","ba.label","",$paramlist,"",$sortfield,$sortorder); print_liste_field_titre($langs->trans("AmountTTC"),"liste.php","p.amount","",$paramlist,'align="right"',$sortfield,$sortorder); //print_liste_field_titre($langs->trans("Invoices"),"","","",$paramlist,'align="left"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),"liste.php","p.statut","",$paramlist,'align="right"',$sortfield,$sortorder); + if ($conf->global->BILL_ADD_PAYMENT_VALIDATION) + { + print_liste_field_titre($langs->trans("Status"),"liste.php","p.statut","",$paramlist,'align="right"',$sortfield,$sortorder); + } print "\n"; // Lignes des champs de filtre @@ -134,9 +137,13 @@ if ($resql) print ' '; print ''; print ''; - print ''; print ''; print ''; + if ($conf->global->BILL_ADD_PAYMENT_VALIDATION) + { + print ''; + print ''; + } print "\n"; $var=true; @@ -175,12 +182,16 @@ if ($resql) else print ' '; print ''; print ''.price($objp->amount).''; - print ''; - if ($objp->statut == 0) print ''; - print $paymentstatic->LibStatut($objp->statut,5); - if ($objp->statut == 0) print ''; - print ''; + if ($conf->global->BILL_ADD_PAYMENT_VALIDATION) + { + print ''; + if ($objp->statut == 0) print ''; + print $paymentstatic->LibStatut($objp->statut,5); + if ($objp->statut == 0) print ''; + print ''; + } + print ''; $i++; diff --git a/htdocs/compta/paiement/pre.inc.php b/htdocs/compta/paiement/pre.inc.php index 6acda5a07a9..d6b3e62c910 100644 --- a/htdocs/compta/paiement/pre.inc.php +++ b/htdocs/compta/paiement/pre.inc.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2003-2006 Rodolphe Quiedeville * Copyright (C) 2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -15,16 +15,14 @@ * 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$ */ - -/** - \file htdocs/compta/paiement/pre.inc.php - \ingroup compta - \brief Fichier gestionnaire du menu compta paiement -*/ + +/** + * \file htdocs/compta/paiement/pre.inc.php + * \ingroup compta + * \brief Fichier gestionnaire du menu compta paiement + * \version $Id$ + */ require("../../main.inc.php"); @@ -32,26 +30,31 @@ $langs->load("bills"); $langs->load("compta"); $langs->load("propal"); -function llxHeader($head = "", $title="") { - global $user, $langs; - $langs->load("bills"); - - top_menu($head, $title); +function llxHeader($head = "", $title="") +{ - $menu = new Menu(); + global $conf, $user, $langs; - $menu->add("liste.php",$langs->trans("Payments")); - $menu->add_submenu("liste.php",$langs->trans("List")); + $langs->load("bills"); - $menu->add(DOL_URL_ROOT."/compta/paiement/cheque/index.php",$langs->trans("MenuChequeDeposits")); + top_menu($head, $title); - $menu->add("rapport.php",$langs->trans("Reportings")); + $menu = new Menu(); - $menu->add(DOL_URL_ROOT."/compta/facture.php",$langs->trans("Bills")); - $menu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpayed")); + $menu->add("liste.php",$langs->trans("Payments")); + $menu->add_submenu("liste.php",$langs->trans("List")); - $menu->add_submenu("avalider.php",$langs->trans("MenuToValid")); + $menu->add(DOL_URL_ROOT."/compta/paiement/cheque/index.php",$langs->trans("MenuChequeDeposits")); - left_menu($menu->liste); + $menu->add("rapport.php",$langs->trans("Reportings")); + + $menu->add(DOL_URL_ROOT."/compta/facture.php",$langs->trans("Bills")); + $menu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpayed")); + + if ($conf->global->BILL_ADD_PAYMENT_VALIDATION) + { + $menu->add_submenu("avalider.php",$langs->trans("MenuToValid")); + } + left_menu($menu->liste); } ?> diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php index 7c4f9747dbc..38ebf539a5e 100644 --- a/htdocs/includes/menus/barre_left/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php @@ -439,7 +439,10 @@ class MenuLeft { if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/liste.php?leftmenu=customers_bills_payments",$langs->trans("Payments"),2,$user->rights->facture->lire); - if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/avalider.php?leftmenu=customers_bills_payments",$langs->trans("MenuToValid"),3,$user->rights->facture->lire); + if ($conf->global->BILL_ADD_PAYMENT_VALIDATION) + { + if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/avalider.php?leftmenu=customers_bills_payments",$langs->trans("MenuToValid"),3,$user->rights->facture->lire); + } if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/rapport.php?leftmenu=customers_bills_payments",$langs->trans("Reportings"),3,$user->rights->facture->lire); if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/stats/index.php?leftmenu=customers_bills", $langs->trans("Statistics"),2,$user->rights->facture->lire); diff --git a/htdocs/includes/menus/barre_left/eldy_frontoffice.php b/htdocs/includes/menus/barre_left/eldy_frontoffice.php index c85ee8561b5..b537a870aad 100644 --- a/htdocs/includes/menus/barre_left/eldy_frontoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_frontoffice.php @@ -419,7 +419,10 @@ class MenuLeft { if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/liste.php?leftmenu=customers_bills_payments",$langs->trans("Payments"),2,$user->rights->facture->lire); - if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/avalider.php?leftmenu=customers_bills_payments",$langs->trans("MenuToValid"),3,$user->rights->facture->lire); + if ($conf->global->BILL_ADD_PAYMENT_VALIDATION) + { + if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/avalider.php?leftmenu=customers_bills_payments",$langs->trans("MenuToValid"),3,$user->rights->facture->lire); + } if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/rapport.php?leftmenu=customers_bills_payments",$langs->trans("Reportings"),3,$user->rights->facture->lire); if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/stats/index.php?leftmenu=customers_bills", $langs->trans("Statistics"),2,$user->rights->facture->lire); diff --git a/htdocs/includes/menus/init_menu_auguria.sql b/htdocs/includes/menus/init_menu_auguria.sql index 09441ba8533..18c07549eef 100644 --- a/htdocs/includes/menus/init_menu_auguria.sql +++ b/htdocs/includes/menus/init_menu_auguria.sql @@ -183,7 +183,6 @@ insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 1706, 'accountancy', '', 1704, '/compta/facture/fiche-rec.php?leftmenu=customers_bills', 'Repeatable', 2, 'bills', '$user->rights->facture->lire', '', 2, 4); insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 1707, 'accountancy', '', 1704, '/compta/facture/impayees.php?action=facturer&leftmenu=customers_bills', 'Unpayed', 2, 'bills', '$user->rights->facture->lire', '', 2, 5); insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 1708, 'accountancy', '', 1704, '/compta/paiement/liste.php?leftmenu=customers_bills_payments', 'Payments', 2, 'bills', '$user->rights->facture->lire', '', 2, 6); -insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 1709, 'accountancy', '', 1708, '/compta/paiement/avalider.php?leftmenu=customers_bills_payments', 'MenuToValid', 3, 'bills', '$user->rights->facture->lire', '', 2, 0); insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 1710, 'accountancy', '', 1708, '/compta/paiement/rapport.php?leftmenu=customers_bills_payments', 'Reportings', 3, 'bills', '$user->rights->facture->lire', '', 2, 1); insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 1711, 'accountancy', '', __6__, '/compta/paiement/cheque/index.php?leftmenu=checks', 'MenuChequeDeposits', 0, 'bills', '$user->rights->facture->lire', '', 2, 1); insert into `llx_menu` (`menu_handler`, `type`, `rowid`, `mainmenu`, `leftmenu`, `fk_menu`, `url`, `titre`, `level`, `langs`, perms, `target`, `user`, position) values ('auguria', 'left', 1712, 'accountancy', '', 1711, '/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'bills', '$user->rights->facture->lire', '', 2, 0);