@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | EldyLib::print_start_menu_array(); |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - $usemenuhider = (DolUtils::GETPOST('testmenuhider', 'int') ||!empty(Globals::$conf->global->MAIN_TESTMENUHIDER));
|
|
| 65 | + $usemenuhider = (DolUtils::GETPOST('testmenuhider', 'int') || !empty(Globals::$conf->global->MAIN_TESTMENUHIDER));
|
|
| 66 | 66 | |
| 67 | 67 | // Show/Hide vertical menu |
| 68 | 68 | if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty(Globals::$conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | |
| 115 | 115 | // Third parties |
| 116 | 116 | $tmpentry = array( |
| 117 | - 'enabled' => ((!empty(Globals::$conf->societe->enabled) && (empty(Globals::$conf->global->SOCIETE_DISABLE_PROSPECTS) || empty(Globals::$conf->global->SOCIETE_DISABLE_CUSTOMERS))) ||!empty(Globals::$conf->fournisseur->enabled)), |
|
| 117 | + 'enabled' => ((!empty(Globals::$conf->societe->enabled) && (empty(Globals::$conf->global->SOCIETE_DISABLE_PROSPECTS) || empty(Globals::$conf->global->SOCIETE_DISABLE_CUSTOMERS))) || !empty(Globals::$conf->fournisseur->enabled)), |
|
| 118 | 118 | 'perms' => (!empty(Globals::$user->rights->societe->lire) || !empty(Globals::$user->rights->fournisseur->lire)), |
| 119 | 119 | 'module' => 'societe|fournisseur', |
| 120 | 120 | ); |
@@ -412,14 +412,14 @@ discard block |
||
| 412 | 412 | $param = (isset($tmp[1]) ? $tmp[1] : ''); |
| 413 | 413 | |
| 414 | 414 | if (!preg_match('/mainmenu/i', $param) || !preg_match('/leftmenu/i', $param)) {
|
| 415 | - $param .= ($param ? '&' : '') . 'mainmenu=' . $newTabMenu[$i]['mainmenu'] . '&leftmenu='; |
|
| 415 | + $param .= ($param ? '&' : '').'mainmenu='.$newTabMenu[$i]['mainmenu'].'&leftmenu='; |
|
| 416 | 416 | } |
| 417 | 417 | //$url.="idmenu=".$newTabMenu[$i]['rowid']; // Already done by menuLoad |
| 418 | - $url = DolUtils::dol_buildpath($url, 1) . ($param ? '?' . $param : ''); |
|
| 418 | + $url = DolUtils::dol_buildpath($url, 1).($param ? '?'.$param : ''); |
|
| 419 | 419 | //$shorturl = $shorturl.($param?'?'.$param:''); |
| 420 | 420 | $shorturl = $url; |
| 421 | 421 | if (BASE_URI) {
|
| 422 | - $shorturl = preg_replace('/^' . preg_quote(BASE_URI, '/') . '/', '', $shorturl);
|
|
| 422 | + $shorturl = preg_replace('/^'.preg_quote(BASE_URI, '/').'/', '', $shorturl);
|
|
| 423 | 423 | } |
| 424 | 424 | } |
| 425 | 425 | |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | if (empty($noout)) {
|
| 446 | 446 | foreach ($menu->liste as $menkey => $menuval) {
|
| 447 | 447 | self::print_start_menu_entry($menuval['idsel'], $menuval['classname'], $menuval['enabled']); |
| 448 | - self::print_text_menu_entry($menuval['titre'], $menuval['enabled'], (($menuval['url'] != '#' && !preg_match('/^(http:\/\/|https:\/\/)/i', $menuval['url'])) ? BASE_URI : '') . $menuval['url'], $menuval['id'], $menuval['idsel'], $menuval['classname'], ($menuval['target'] ? $menuval['target'] : $atarget));
|
|
| 448 | + self::print_text_menu_entry($menuval['titre'], $menuval['enabled'], (($menuval['url'] != '#' && !preg_match('/^(http:\/\/|https:\/\/)/i', $menuval['url'])) ? BASE_URI : '').$menuval['url'], $menuval['id'], $menuval['idsel'], $menuval['classname'], ($menuval['target'] ? $menuval['target'] : $atarget));
|
|
| 449 | 449 | self::print_end_menu_entry($menuval['enabled']); |
| 450 | 450 | } |
| 451 | 451 | } |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | // global $conf; |
| 471 | 471 | |
| 472 | 472 | print '<div class="tmenudiv">'; |
| 473 | - print '<ul class="tmenu"' . (empty(Globals::$conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' title="Top menu"') . '>'; |
|
| 473 | + print '<ul class="tmenu"'.(empty(Globals::$conf->MAIN_OPTIMIZEFORTEXTBROWSER) ? '' : ' title="Top menu"').'>'; |
|
| 474 | 474 | } |
| 475 | 475 | |
| 476 | 476 | /** |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | static function print_start_menu_entry($idsel, $classname, $showmode) |
| 485 | 485 | {
|
| 486 | 486 | if ($showmode) {
|
| 487 | - print '<li ' . $classname . ' id="mainmenutd_' . $idsel . '">'; |
|
| 487 | + print '<li '.$classname.' id="mainmenutd_'.$idsel.'">'; |
|
| 488 | 488 | //print '<div class="tmenuleft tmenusep"></div>'; |
| 489 | 489 | print '<div class="tmenucenter">'; |
| 490 | 490 | } |
@@ -507,17 +507,17 @@ discard block |
||
| 507 | 507 | // global Globals::$langs; |
| 508 | 508 | |
| 509 | 509 | if ($showmode == 1) {
|
| 510 | - print '<a class="tmenuimage" tabindex="-1" href="' . $url . '"' . ($atarget ? ' target="' . $atarget . '"' : '') . '>'; |
|
| 511 | - print '<div class="' . $id . ' ' . $idsel . ' topmenuimage"><span class="' . $id . ' tmenuimage" id="mainmenuspan_' . $idsel . '"></span></div>'; |
|
| 510 | + print '<a class="tmenuimage" tabindex="-1" href="'.$url.'"'.($atarget ? ' target="'.$atarget.'"' : '').'>'; |
|
| 511 | + print '<div class="'.$id.' '.$idsel.' topmenuimage"><span class="'.$id.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>'; |
|
| 512 | 512 | print '</a>'; |
| 513 | - print '<a ' . $classname . ' id="mainmenua_' . $idsel . '" href="' . $url . '"' . ($atarget ? ' target="' . $atarget . '"' : '') . '>'; |
|
| 513 | + print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($atarget ? ' target="'.$atarget.'"' : '').'>'; |
|
| 514 | 514 | print '<span class="mainmenuaspan">'; |
| 515 | 515 | print $text; |
| 516 | 516 | print '</span>'; |
| 517 | 517 | print '</a>'; |
| 518 | 518 | } elseif ($showmode == 2) {
|
| 519 | - print '<div class="' . $id . ' ' . $idsel . ' topmenuimage tmenudisabled"><span class="' . $id . '" id="mainmenuspan_' . $idsel . '"></span></div>'; |
|
| 520 | - print '<a class="tmenudisabled" id="mainmenua_' . $idsel . '" href="#" title="' . dol_escape_htmltag(Globals::$langs->trans("NotAllowed")) . '">';
|
|
| 519 | + print '<div class="'.$id.' '.$idsel.' topmenuimage tmenudisabled"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>'; |
|
| 520 | + print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag(Globals::$langs->trans("NotAllowed")).'">';
|
|
| 521 | 521 | print '<span class="mainmenuaspan">'; |
| 522 | 522 | print $text; |
| 523 | 523 | print '</span>'; |
@@ -576,43 +576,43 @@ discard block |
||
| 576 | 576 | $mainmenu = ($forcemainmenu ? $forcemainmenu : $_SESSION["mainmenu"]); |
| 577 | 577 | $leftmenu = ($forceleftmenu ? '' : (empty($_SESSION["leftmenu"]) ? 'none' : $_SESSION["leftmenu"])); |
| 578 | 578 | |
| 579 | - $usemenuhider = (DolUtils::GETPOST('testmenuhider', 'int') ||!empty(Globals::$conf->global->MAIN_TESTMENUHIDER));
|
|
| 579 | + $usemenuhider = (DolUtils::GETPOST('testmenuhider', 'int') || !empty(Globals::$conf->global->MAIN_TESTMENUHIDER));
|
|
| 580 | 580 | |
| 581 | 581 | // Show logo company |
| 582 | - if (empty(Globals::$conf->global->MAIN_MENU_INVERT) && empty($noout) &&!empty(Globals::$conf->global->MAIN_SHOW_LOGO) && empty(Globals::$conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
|
| 582 | + if (empty(Globals::$conf->global->MAIN_MENU_INVERT) && empty($noout) && !empty(Globals::$conf->global->MAIN_SHOW_LOGO) && empty(Globals::$conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
|
| 583 | 583 | $mysoc->logo_mini = Globals::$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI; |
| 584 | - if (!empty($mysoc->logo_mini) && is_readable(Globals::$conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_mini)) {
|
|
| 585 | - $urllogo = DOL_BASE_URI . '/viewimage.php?cache=1&modulepart=mycompany&file=' . urlencode('logos/thumbs/' . $mysoc->logo_mini);
|
|
| 584 | + if (!empty($mysoc->logo_mini) && is_readable(Globals::$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) {
|
|
| 585 | + $urllogo = DOL_BASE_URI.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini);
|
|
| 586 | 586 | } else {
|
| 587 | - $urllogo = DOL_BASE_URI . '/theme/dolibarr_logo.png'; |
|
| 587 | + $urllogo = DOL_BASE_URI.'/theme/dolibarr_logo.png'; |
|
| 588 | 588 | } |
| 589 | 589 | $title = Globals::$langs->trans("GoIntoSetupToChangeLogo");
|
| 590 | - print "\n" . '<!-- Show logo on menu -->' . "\n"; |
|
| 591 | - print '<div class="blockvmenuimpair blockvmenulogo">' . "\n"; |
|
| 590 | + print "\n".'<!-- Show logo on menu -->'."\n"; |
|
| 591 | + print '<div class="blockvmenuimpair blockvmenulogo">'."\n"; |
|
| 592 | 592 | print '<div class="menu_titre" id="menu_titre_logo"></div>'; |
| 593 | 593 | print '<div class="menu_top" id="menu_top_logo"></div>'; |
| 594 | 594 | print '<div class="menu_contenu" id="menu_contenu_logo">'; |
| 595 | - print '<div class="center"><img class="mycompany" title="' . dol_escape_htmltag($title) . '" alt="" src="' . $urllogo . '" style="max-width: 70%"></div>' . "\n"; |
|
| 595 | + print '<div class="center"><img class="mycompany" title="'.dol_escape_htmltag($title).'" alt="" src="'.$urllogo.'" style="max-width: 70%"></div>'."\n"; |
|
| 596 | 596 | print '</div>'; |
| 597 | 597 | print '<div class="menu_end" id="menu_end_logo"></div>'; |
| 598 | - print '</div>' . "\n"; |
|
| 598 | + print '</div>'."\n"; |
|
| 599 | 599 | } |
| 600 | 600 | |
| 601 | 601 | if (is_array($moredata) && !empty($moredata['searchform'])) { // searchform can contains select2 code or link to show old search form or link to switch on search page
|
| 602 | 602 | print "\n"; |
| 603 | 603 | print "<!-- Begin SearchForm -->\n"; |
| 604 | - print '<div id="blockvmenusearch" class="blockvmenusearch">' . "\n"; |
|
| 604 | + print '<div id="blockvmenusearch" class="blockvmenusearch">'."\n"; |
|
| 605 | 605 | print $moredata['searchform']; |
| 606 | - print '</div>' . "\n"; |
|
| 606 | + print '</div>'."\n"; |
|
| 607 | 607 | print "<!-- End SearchForm -->\n"; |
| 608 | 608 | } |
| 609 | 609 | |
| 610 | 610 | if (is_array($moredata) && !empty($moredata['bookmarks'])) {
|
| 611 | 611 | print "\n"; |
| 612 | 612 | print "<!-- Begin Bookmarks -->\n"; |
| 613 | - print '<div id="blockvmenubookmarks" class="blockvmenubookmarks">' . "\n"; |
|
| 613 | + print '<div id="blockvmenubookmarks" class="blockvmenubookmarks">'."\n"; |
|
| 614 | 614 | print $moredata['bookmarks']; |
| 615 | - print '</div>' . "\n"; |
|
| 615 | + print '</div>'."\n"; |
|
| 616 | 616 | print "<!-- End Bookmarks -->\n"; |
| 617 | 617 | } |
| 618 | 618 | |
@@ -629,11 +629,11 @@ discard block |
||
| 629 | 629 | |
| 630 | 630 | // Home - dashboard |
| 631 | 631 | //$newmenu->add("/index.php?mainmenu=home&leftmenu=home", Globals::$langs->trans("MyDashboard"), 0, 1, '', $mainmenu, 'home', 0, '', '', '', '<i class="fa fa-bar-chart fa-fw paddingright"></i>');
|
| 632 | - $newmenu->add(BASE_URI . "?controller=home&method=home&mainmenu=home&leftmenu=home", Globals::$langs->trans("MyDashboard"), 0, 1, '', $mainmenu, 'home', 0, '', '', '', '<i class="fa fa-bar-chart fa-fw paddingright"></i>');
|
|
| 632 | + $newmenu->add(BASE_URI."?controller=home&method=home&mainmenu=home&leftmenu=home", Globals::$langs->trans("MyDashboard"), 0, 1, '', $mainmenu, 'home', 0, '', '', '', '<i class="fa fa-bar-chart fa-fw paddingright"></i>');
|
|
| 633 | 633 | |
| 634 | 634 | // Setup |
| 635 | 635 | //$newmenu->add("/admin/index.php?mainmenu=home&leftmenu=setup", Globals::$langs->trans("Setup"), 0, Globals::$user->admin, '', $mainmenu, 'setup', 0, '', '', '', '<i class="fa fa-wrench fa-fw paddingright"></i>');
|
| 636 | - $newmenu->add(BASE_URI . "?controller=admin&method=index&mainmenu=home&leftmenu=setup", Globals::$langs->trans("Setup"), 0, Globals::$user->admin, '', $mainmenu, 'setup', 0, '', '', '', '<i class="fa fa-wrench fa-fw paddingright"></i>');
|
|
| 636 | + $newmenu->add(BASE_URI."?controller=admin&method=index&mainmenu=home&leftmenu=setup", Globals::$langs->trans("Setup"), 0, Globals::$user->admin, '', $mainmenu, 'setup', 0, '', '', '', '<i class="fa fa-wrench fa-fw paddingright"></i>');
|
|
| 637 | 637 | |
| 638 | 638 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "setup") {
|
| 639 | 639 | // Load translation files required by the page |
@@ -642,14 +642,14 @@ discard block |
||
| 642 | 642 | $warnpicto = ''; |
| 643 | 643 | if (empty(Globals::$conf->global->MAIN_INFO_SOCIETE_NOM) || empty(Globals::$conf->global->MAIN_INFO_SOCIETE_COUNTRY)) {
|
| 644 | 644 | Globals::$langs->load("errors");
|
| 645 | - $warnpicto = ' ' . img_warning(Globals::$langs->trans("WarningMandatorySetupNotComplete"));
|
|
| 645 | + $warnpicto = ' '.img_warning(Globals::$langs->trans("WarningMandatorySetupNotComplete"));
|
|
| 646 | 646 | } |
| 647 | 647 | //$newmenu->add("/admin/company.php?mainmenu=home", Globals::$langs->trans("MenuCompanySetup") . $warnpicto, 1);
|
| 648 | - $newmenu->add(BASE_URI . "?controller=admin&method=company&mainmenu=home", Globals::$langs->trans("MenuCompanySetup") . $warnpicto, 1);
|
|
| 648 | + $newmenu->add(BASE_URI."?controller=admin&method=company&mainmenu=home", Globals::$langs->trans("MenuCompanySetup").$warnpicto, 1);
|
|
| 649 | 649 | $warnpicto = ''; |
| 650 | 650 | if (count(Globals::$conf->modules) <= (empty(Globals::$conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : Globals::$conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) { // If only user module enabled
|
| 651 | 651 | Globals::$langs->load("errors");
|
| 652 | - $warnpicto = ' ' . img_warning(Globals::$langs->trans("WarningMandatorySetupNotComplete"));
|
|
| 652 | + $warnpicto = ' '.img_warning(Globals::$langs->trans("WarningMandatorySetupNotComplete"));
|
|
| 653 | 653 | } |
| 654 | 654 | /* |
| 655 | 655 | $newmenu->add("/admin/modules.php?mainmenu=home", Globals::$langs->trans("Modules") . $warnpicto, 1);
|
@@ -668,42 +668,42 @@ discard block |
||
| 668 | 668 | $newmenu->add("/admin/dict.php?mainmenu=home", Globals::$langs->trans("Dictionary"), 1);
|
| 669 | 669 | $newmenu->add("/admin/const.php?mainmenu=home", Globals::$langs->trans("OtherSetup"), 1);
|
| 670 | 670 | */ |
| 671 | - $newmenu->add(BASE_URI . "?controller=admin&method=modules&mainmenu=home", Globals::$langs->trans("Modules") . $warnpicto, 1);
|
|
| 672 | - $newmenu->add(BASE_URI . "?controller=admin&method=menus&mainmenu=home", Globals::$langs->trans("Menus"), 1);
|
|
| 673 | - $newmenu->add(BASE_URI . "?controller=admin&method=ihm&mainmenu=home", Globals::$langs->trans("GUISetup"), 1);
|
|
| 674 | - |
|
| 675 | - $newmenu->add(BASE_URI . "?controller=admin&method=translation&mainmenu=home", Globals::$langs->trans("Translation"), 1);
|
|
| 676 | - $newmenu->add(BASE_URI . "?controller=admin&method=defaultvalues&mainmenu=home", Globals::$langs->trans("DefaultValues"), 1);
|
|
| 677 | - $newmenu->add(BASE_URI . "?controller=admin&method=boxes&mainmenu=home", Globals::$langs->trans("Boxes"), 1);
|
|
| 678 | - $newmenu->add(BASE_URI . "?controller=admin&method=delais&mainmenu=home", Globals::$langs->trans("MenuWarnings"), 1);
|
|
| 679 | - $newmenu->add(BASE_URI . "?controller=admin&method=security_other&mainmenu=home", Globals::$langs->trans("Security"), 1);
|
|
| 680 | - $newmenu->add(BASE_URI . "?controller=admin&method=limits&mainmenu=home", Globals::$langs->trans("MenuLimits"), 1);
|
|
| 681 | - $newmenu->add(BASE_URI . "?controller=admin&method=pdf&mainmenu=home", Globals::$langs->trans("PDF"), 1);
|
|
| 682 | - $newmenu->add(BASE_URI . "?controller=admin&method=mails&mainmenu=home", Globals::$langs->trans("Emails"), 1);
|
|
| 683 | - $newmenu->add(BASE_URI . "?controller=admin&method=sms&mainmenu=home", Globals::$langs->trans("SMS"), 1);
|
|
| 684 | - $newmenu->add(BASE_URI . "?controller=admin&method=dict&mainmenu=home", Globals::$langs->trans("Dictionary"), 1);
|
|
| 685 | - $newmenu->add(BASE_URI . "?controller=admin&method=const&mainmenu=home", Globals::$langs->trans("OtherSetup"), 1);
|
|
| 671 | + $newmenu->add(BASE_URI."?controller=admin&method=modules&mainmenu=home", Globals::$langs->trans("Modules").$warnpicto, 1);
|
|
| 672 | + $newmenu->add(BASE_URI."?controller=admin&method=menus&mainmenu=home", Globals::$langs->trans("Menus"), 1);
|
|
| 673 | + $newmenu->add(BASE_URI."?controller=admin&method=ihm&mainmenu=home", Globals::$langs->trans("GUISetup"), 1);
|
|
| 674 | + |
|
| 675 | + $newmenu->add(BASE_URI."?controller=admin&method=translation&mainmenu=home", Globals::$langs->trans("Translation"), 1);
|
|
| 676 | + $newmenu->add(BASE_URI."?controller=admin&method=defaultvalues&mainmenu=home", Globals::$langs->trans("DefaultValues"), 1);
|
|
| 677 | + $newmenu->add(BASE_URI."?controller=admin&method=boxes&mainmenu=home", Globals::$langs->trans("Boxes"), 1);
|
|
| 678 | + $newmenu->add(BASE_URI."?controller=admin&method=delais&mainmenu=home", Globals::$langs->trans("MenuWarnings"), 1);
|
|
| 679 | + $newmenu->add(BASE_URI."?controller=admin&method=security_other&mainmenu=home", Globals::$langs->trans("Security"), 1);
|
|
| 680 | + $newmenu->add(BASE_URI."?controller=admin&method=limits&mainmenu=home", Globals::$langs->trans("MenuLimits"), 1);
|
|
| 681 | + $newmenu->add(BASE_URI."?controller=admin&method=pdf&mainmenu=home", Globals::$langs->trans("PDF"), 1);
|
|
| 682 | + $newmenu->add(BASE_URI."?controller=admin&method=mails&mainmenu=home", Globals::$langs->trans("Emails"), 1);
|
|
| 683 | + $newmenu->add(BASE_URI."?controller=admin&method=sms&mainmenu=home", Globals::$langs->trans("SMS"), 1);
|
|
| 684 | + $newmenu->add(BASE_URI."?controller=admin&method=dict&mainmenu=home", Globals::$langs->trans("Dictionary"), 1);
|
|
| 685 | + $newmenu->add(BASE_URI."?controller=admin&method=const&mainmenu=home", Globals::$langs->trans("OtherSetup"), 1);
|
|
| 686 | 686 | } |
| 687 | 687 | |
| 688 | 688 | // System tools |
| 689 | 689 | //$newmenu->add("/admin/tools/index.php?mainmenu=home&leftmenu=admintools", Globals::$langs->trans("AdminTools"), 0, Globals::$user->admin, '', $mainmenu, 'admintools', 0, '', '', '', '<i class="fa fa-server fa-fw paddingright"></i>');
|
| 690 | - $newmenu->add(BASE_URI . "?controller=admin/tools&method=index&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("AdminTools"), 0, Globals::$user->admin, '', $mainmenu, 'admintools', 0, '', '', '', '<i class="fa fa-server fa-fw paddingright"></i>');
|
|
| 690 | + $newmenu->add(BASE_URI."?controller=admin/tools&method=index&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("AdminTools"), 0, Globals::$user->admin, '', $mainmenu, 'admintools', 0, '', '', '', '<i class="fa fa-server fa-fw paddingright"></i>');
|
|
| 691 | 691 | |
| 692 | 692 | if ($usemenuhider || empty($leftmenu) || preg_match('/^admintools/', $leftmenu)) {
|
| 693 | 693 | // Load translation files required by the page |
| 694 | 694 | Globals::$langs->loadLangs(array('admin', 'help'));
|
| 695 | 695 | |
| 696 | 696 | //$newmenu->add('/admin/system/dolibarr.php?mainmenu=home&leftmenu=admintools_info', Globals::$langs->trans('InfoDolibarr'), 1);
|
| 697 | - $newmenu->add(BASE_URI . "?controller=admin/system&method=dolibarr&mainmenu=home&leftmenu=admintools_info", Globals::$langs->trans('InfoDolibarr'), 1);
|
|
| 697 | + $newmenu->add(BASE_URI."?controller=admin/system&method=dolibarr&mainmenu=home&leftmenu=admintools_info", Globals::$langs->trans('InfoDolibarr'), 1);
|
|
| 698 | 698 | if ($usemenuhider || empty($leftmenu) || $leftmenu == 'admintools_info') {
|
| 699 | 699 | /* |
| 700 | 700 | $newmenu->add('/admin/system/modules.php?mainmenu=home&leftmenu=admintools_info', Globals::$langs->trans('Modules'), 2);
|
| 701 | 701 | $newmenu->add('/admin/triggers.php?mainmenu=home&leftmenu=admintools_info', Globals::$langs->trans('Triggers'), 2);
|
| 702 | 702 | $newmenu->add('/admin/system/filecheck.php?mainmenu=home&leftmenu=admintools_info', Globals::$langs->trans('FileCheck'), 2);
|
| 703 | 703 | */ |
| 704 | - $newmenu->add(BASE_URI . '?controller=admin/system&method=modules&mainmenu=home&leftmenu=admintools_info', Globals::$langs->trans('Modules'), 2);
|
|
| 705 | - $newmenu->add(BASE_URI . '?controller=admin&method=triggers&mainmenu=home&leftmenu=admintools_info', Globals::$langs->trans('Triggers'), 2);
|
|
| 706 | - $newmenu->add(BASE_URI . '?controller=admin/system&method=filecheck&mainmenu=home&leftmenu=admintools_info', Globals::$langs->trans('FileCheck'), 2);
|
|
| 704 | + $newmenu->add(BASE_URI.'?controller=admin/system&method=modules&mainmenu=home&leftmenu=admintools_info', Globals::$langs->trans('Modules'), 2);
|
|
| 705 | + $newmenu->add(BASE_URI.'?controller=admin&method=triggers&mainmenu=home&leftmenu=admintools_info', Globals::$langs->trans('Triggers'), 2);
|
|
| 706 | + $newmenu->add(BASE_URI.'?controller=admin/system&method=filecheck&mainmenu=home&leftmenu=admintools_info', Globals::$langs->trans('FileCheck'), 2);
|
|
| 707 | 707 | } |
| 708 | 708 | /* |
| 709 | 709 | $newmenu->add('/admin/system/browser.php?mainmenu=home&leftmenu=admintools', Globals::$langs->trans('InfoBrowser'), 1);
|
@@ -723,33 +723,33 @@ discard block |
||
| 723 | 723 | $newmenu->add("/admin/tools/listsessions.php?mainmenu=home&leftmenu=admintools", Globals::$langs->trans("Sessions"), 1);
|
| 724 | 724 | $newmenu->add('/admin/system/about.php?mainmenu=home&leftmenu=admintools', Globals::$langs->trans('ExternalResources'), 1);
|
| 725 | 725 | */ |
| 726 | - $newmenu->add(BASE_URI . '?controller=admin/system&method=browser&mainmenu=home&leftmenu=admintools', Globals::$langs->trans('InfoBrowser'), 1);
|
|
| 727 | - $newmenu->add(BASE_URI . '?controller=admin/system&method=os&mainmenu=home&leftmenu=admintools', Globals::$langs->trans('InfoOS'), 1);
|
|
| 728 | - $newmenu->add(BASE_URI . '?controller=admin/system&method=web&mainmenu=home&leftmenu=admintools', Globals::$langs->trans('InfoWebServer'), 1);
|
|
| 729 | - $newmenu->add(BASE_URI . '?controller=admin/system&method=phpinfo&mainmenu=home&leftmenu=admintools', Globals::$langs->trans('InfoPHP'), 1);
|
|
| 726 | + $newmenu->add(BASE_URI.'?controller=admin/system&method=browser&mainmenu=home&leftmenu=admintools', Globals::$langs->trans('InfoBrowser'), 1);
|
|
| 727 | + $newmenu->add(BASE_URI.'?controller=admin/system&method=os&mainmenu=home&leftmenu=admintools', Globals::$langs->trans('InfoOS'), 1);
|
|
| 728 | + $newmenu->add(BASE_URI.'?controller=admin/system&method=web&mainmenu=home&leftmenu=admintools', Globals::$langs->trans('InfoWebServer'), 1);
|
|
| 729 | + $newmenu->add(BASE_URI.'?controller=admin/system&method=phpinfo&mainmenu=home&leftmenu=admintools', Globals::$langs->trans('InfoPHP'), 1);
|
|
| 730 | 730 | //if (function_exists('xdebug_is_enabled')) $newmenu->add('/admin/system/xdebug.php', Globals::$langs->trans('XDebug'),1);
|
| 731 | - $newmenu->add(BASE_URI . '?controller=admin/system&method=database&mainmenu=home&leftmenu=admintools', Globals::$langs->trans('InfoDatabase'), 1);
|
|
| 731 | + $newmenu->add(BASE_URI.'?controller=admin/system&method=database&mainmenu=home&leftmenu=admintools', Globals::$langs->trans('InfoDatabase'), 1);
|
|
| 732 | 732 | if (function_exists('eaccelerator_info')) {
|
| 733 | - $newmenu->add(BASE_URI . "?controller=admin/tools&method=eaccelerator&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("EAccelerator"), 1);
|
|
| 733 | + $newmenu->add(BASE_URI."?controller=admin/tools&method=eaccelerator&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("EAccelerator"), 1);
|
|
| 734 | 734 | } |
| 735 | 735 | //$newmenu->add("/admin/system/perf.php?mainmenu=home&leftmenu=admintools", Globals::$langs->trans("InfoPerf"),1);
|
| 736 | - $newmenu->add(BASE_URI . "?controller=admin/tools&method=dolibarr_export&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("Backup"), 1);
|
|
| 737 | - $newmenu->add(BASE_URI . "?controller=admin/tools&method=dolibarr_import&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("Restore"), 1);
|
|
| 738 | - $newmenu->add(BASE_URI . "?controller=admin/tools&method=update&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("MenuUpgrade"), 1);
|
|
| 739 | - $newmenu->add(BASE_URI . "?controller=admin/tools&method=purge&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("Purge"), 1);
|
|
| 740 | - $newmenu->add(BASE_URI . "?controller=admin/tools&method=listevents&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("Audit"), 1);
|
|
| 741 | - $newmenu->add(BASE_URI . "?controller=admin/tools&method=listsessions&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("Sessions"), 1);
|
|
| 742 | - $newmenu->add(BASE_URI . '?controller=admin/system&method=about&mainmenu=home&leftmenu=admintools', Globals::$langs->trans('ExternalResources'), 1);
|
|
| 736 | + $newmenu->add(BASE_URI."?controller=admin/tools&method=dolibarr_export&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("Backup"), 1);
|
|
| 737 | + $newmenu->add(BASE_URI."?controller=admin/tools&method=dolibarr_import&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("Restore"), 1);
|
|
| 738 | + $newmenu->add(BASE_URI."?controller=admin/tools&method=update&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("MenuUpgrade"), 1);
|
|
| 739 | + $newmenu->add(BASE_URI."?controller=admin/tools&method=purge&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("Purge"), 1);
|
|
| 740 | + $newmenu->add(BASE_URI."?controller=admin/tools&method=listevents&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("Audit"), 1);
|
|
| 741 | + $newmenu->add(BASE_URI."?controller=admin/tools&method=listsessions&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("Sessions"), 1);
|
|
| 742 | + $newmenu->add(BASE_URI.'?controller=admin/system&method=about&mainmenu=home&leftmenu=admintools', Globals::$langs->trans('ExternalResources'), 1);
|
|
| 743 | 743 | |
| 744 | 744 | if (!empty(Globals::$conf->product->enabled) || !empty(Globals::$conf->service->enabled)) {
|
| 745 | 745 | Globals::$langs->load("products");
|
| 746 | 746 | //$newmenu->add("/product/admin/product_tools.php?mainmenu=home&leftmenu=admintools", Globals::$langs->trans("ProductVatMassChange"), 1, Globals::$user->admin);
|
| 747 | - $newmenu->add(BASE_URI . "?controller=product/admin&method=product_tools&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("ProductVatMassChange"), 1, Globals::$user->admin);
|
|
| 747 | + $newmenu->add(BASE_URI."?controller=product/admin&method=product_tools&mainmenu=home&leftmenu=admintools", Globals::$langs->trans("ProductVatMassChange"), 1, Globals::$user->admin);
|
|
| 748 | 748 | } |
| 749 | 749 | } |
| 750 | 750 | |
| 751 | 751 | //$newmenu->add("/user/home.php?leftmenu=users", Globals::$langs->trans("MenuUsersAndGroups"), 0, Globals::$user->rights->user->user->lire, '', $mainmenu, 'users', 0, '', '', '', '<i class="fa fa-users fa-fw paddingright"></i>');
|
| 752 | - $newmenu->add(BASE_URI . "?controller=user&method=home&leftmenu=users", Globals::$langs->trans("MenuUsersAndGroups"), 0, Globals::$user->rights->user->user->lire, '', $mainmenu, 'users', 0, '', '', '', '<i class="fa fa-users fa-fw paddingright"></i>');
|
|
| 752 | + $newmenu->add(BASE_URI."?controller=user&method=home&leftmenu=users", Globals::$langs->trans("MenuUsersAndGroups"), 0, Globals::$user->rights->user->user->lire, '', $mainmenu, 'users', 0, '', '', '', '<i class="fa fa-users fa-fw paddingright"></i>');
|
|
| 753 | 753 | if (Globals::$user->rights->user->user->lire) {
|
| 754 | 754 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "users") {
|
| 755 | 755 | $newmenu->add("", Globals::$langs->trans("Users"), 1, Globals::$user->rights->user->user->lire || Globals::$user->admin);
|
@@ -765,16 +765,16 @@ discard block |
||
| 765 | 765 | $newmenu->add("/user/group/card.php?leftmenu=users&action=create", Globals::$langs->trans("NewGroup"), 2, ((Globals::$conf->global->MAIN_USE_ADVANCED_PERMS ? Globals::$user->rights->user->group_advance->write : Globals::$user->rights->user->user->creer) || Globals::$user->admin) && !(!empty(Globals::$conf->multicompany->enabled) && Globals::$conf->entity > 1 && Globals::$conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
| 766 | 766 | $newmenu->add("/user/group/list.php?leftmenu=users", Globals::$langs->trans("ListOfGroups"), 2, ((Globals::$conf->global->MAIN_USE_ADVANCED_PERMS ? Globals::$user->rights->user->group_advance->read : Globals::$user->rights->user->user->lire) || Globals::$user->admin) && !(!empty(Globals::$conf->multicompany->enabled) && Globals::$conf->entity > 1 && Globals::$conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
| 767 | 767 | */ |
| 768 | - $newmenu->add(BASE_URI . "?controller=user&method=card&leftmenu=users&action=create", Globals::$langs->trans("NewUser"), 2, (Globals::$user->rights->user->user->creer || Globals::$user->admin) &&!(!empty(Globals::$conf->multicompany->enabled) && Globals::$conf->entity > 1 && Globals::$conf->global->MULTICOMPANY_TRANSVERSE_MODE), '', 'home');
|
|
| 769 | - $newmenu->add(BASE_URI . "?controller=user&method=list&leftmenu=users", Globals::$langs->trans("ListOfUsers"), 2, Globals::$user->rights->user->user->lire || Globals::$user->admin);
|
|
| 770 | - $newmenu->add(BASE_URI . "?controller=user&method=hierarchy&leftmenu=users", Globals::$langs->trans("HierarchicView"), 2, Globals::$user->rights->user->user->lire || Globals::$user->admin);
|
|
| 768 | + $newmenu->add(BASE_URI."?controller=user&method=card&leftmenu=users&action=create", Globals::$langs->trans("NewUser"), 2, (Globals::$user->rights->user->user->creer || Globals::$user->admin) && !(!empty(Globals::$conf->multicompany->enabled) && Globals::$conf->entity > 1 && Globals::$conf->global->MULTICOMPANY_TRANSVERSE_MODE), '', 'home');
|
|
| 769 | + $newmenu->add(BASE_URI."?controller=user&method=list&leftmenu=users", Globals::$langs->trans("ListOfUsers"), 2, Globals::$user->rights->user->user->lire || Globals::$user->admin);
|
|
| 770 | + $newmenu->add(BASE_URI."?controller=user&method=hierarchy&leftmenu=users", Globals::$langs->trans("HierarchicView"), 2, Globals::$user->rights->user->user->lire || Globals::$user->admin);
|
|
| 771 | 771 | if (!empty(Globals::$conf->categorie->enabled)) {
|
| 772 | 772 | Globals::$langs->load("categories");
|
| 773 | - $newmenu->add(BASE_URI . "?controller=categories&method=index&leftmenu=users&type=7", Globals::$langs->trans("UsersCategoriesShort"), 2, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
|
| 773 | + $newmenu->add(BASE_URI."?controller=categories&method=index&leftmenu=users&type=7", Globals::$langs->trans("UsersCategoriesShort"), 2, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
|
| 774 | 774 | } |
| 775 | - $newmenu->add("", Globals::$langs->trans("Groups"), 1, (Globals::$user->rights->user->user->lire || Globals::$user->admin) &&!(!empty(Globals::$conf->multicompany->enabled) && Globals::$conf->entity > 1 && Globals::$conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
|
| 776 | - $newmenu->add(BASE_URI . "?controller=user/group&method=card&leftmenu=users&action=create", Globals::$langs->trans("NewGroup"), 2, ((Globals::$conf->global->MAIN_USE_ADVANCED_PERMS ? Globals::$user->rights->user->group_advance->write : Globals::$user->rights->user->user->creer) || Globals::$user->admin) &&!(!empty(Globals::$conf->multicompany->enabled) && Globals::$conf->entity > 1 && Globals::$conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
|
| 777 | - $newmenu->add(BASE_URI . "?controller=user/group&method=list&leftmenu=users", Globals::$langs->trans("ListOfGroups"), 2, ((Globals::$conf->global->MAIN_USE_ADVANCED_PERMS ? Globals::$user->rights->user->group_advance->read : Globals::$user->rights->user->user->lire) || Globals::$user->admin) &&!(!empty(Globals::$conf->multicompany->enabled) && Globals::$conf->entity > 1 && Globals::$conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
|
| 775 | + $newmenu->add("", Globals::$langs->trans("Groups"), 1, (Globals::$user->rights->user->user->lire || Globals::$user->admin) && !(!empty(Globals::$conf->multicompany->enabled) && Globals::$conf->entity > 1 && Globals::$conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
|
| 776 | + $newmenu->add(BASE_URI."?controller=user/group&method=card&leftmenu=users&action=create", Globals::$langs->trans("NewGroup"), 2, ((Globals::$conf->global->MAIN_USE_ADVANCED_PERMS ? Globals::$user->rights->user->group_advance->write : Globals::$user->rights->user->user->creer) || Globals::$user->admin) && !(!empty(Globals::$conf->multicompany->enabled) && Globals::$conf->entity > 1 && Globals::$conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
|
| 777 | + $newmenu->add(BASE_URI."?controller=user/group&method=list&leftmenu=users", Globals::$langs->trans("ListOfGroups"), 2, ((Globals::$conf->global->MAIN_USE_ADVANCED_PERMS ? Globals::$user->rights->user->group_advance->read : Globals::$user->rights->user->user->lire) || Globals::$user->admin) && !(!empty(Globals::$conf->multicompany->enabled) && Globals::$conf->entity > 1 && Globals::$conf->global->MULTICOMPANY_TRANSVERSE_MODE));
|
|
| 778 | 778 | } |
| 779 | 779 | } |
| 780 | 780 | } |
@@ -787,26 +787,26 @@ discard block |
||
| 787 | 787 | if (!empty(Globals::$conf->societe->enabled)) {
|
| 788 | 788 | Globals::$langs->load("companies");
|
| 789 | 789 | //$newmenu->add("/societe/index.php?leftmenu=thirdparties", Globals::$langs->trans("ThirdParty"), 0, Globals::$user->rights->societe->lire, '', $mainmenu, 'thirdparties');
|
| 790 | - $newmenu->add(BASE_URI . "?controller=societe&method=index&leftmenu=thirdparties", Globals::$langs->trans("ThirdParty"), 0, Globals::$user->rights->societe->lire, '', $mainmenu, 'thirdparties');
|
|
| 790 | + $newmenu->add(BASE_URI."?controller=societe&method=index&leftmenu=thirdparties", Globals::$langs->trans("ThirdParty"), 0, Globals::$user->rights->societe->lire, '', $mainmenu, 'thirdparties');
|
|
| 791 | 791 | |
| 792 | 792 | if (Globals::$user->rights->societe->creer) {
|
| 793 | 793 | //$newmenu->add("/societe/card.php?action=create", Globals::$langs->trans("MenuNewThirdParty"), 1);
|
| 794 | - $newmenu->add(BASE_URI . "?controller=societe&method=card&action=create", Globals::$langs->trans("MenuNewThirdParty"), 1);
|
|
| 794 | + $newmenu->add(BASE_URI."?controller=societe&method=card&action=create", Globals::$langs->trans("MenuNewThirdParty"), 1);
|
|
| 795 | 795 | if (!Globals::$conf->use_javascript_ajax) {
|
| 796 | 796 | //$newmenu->add("/societe/card.php?action=create&private=1", Globals::$langs->trans("MenuNewPrivateIndividual"), 1);
|
| 797 | - $newmenu->add(BASE_URI . "?controller=societe&method=card&action=create&private=1", Globals::$langs->trans("MenuNewPrivateIndividual"), 1);
|
|
| 797 | + $newmenu->add(BASE_URI."?controller=societe&method=card&action=create&private=1", Globals::$langs->trans("MenuNewPrivateIndividual"), 1);
|
|
| 798 | 798 | } |
| 799 | 799 | } |
| 800 | 800 | } |
| 801 | 801 | |
| 802 | 802 | //$newmenu->add("/societe/list.php?leftmenu=thirdparties", Globals::$langs->trans("List"), 1);
|
| 803 | - $newmenu->add(BASE_URI . "?controller=societe&method=list&leftmenu=thirdparties", Globals::$langs->trans("List"), 1);
|
|
| 803 | + $newmenu->add(BASE_URI."?controller=societe&method=list&leftmenu=thirdparties", Globals::$langs->trans("List"), 1);
|
|
| 804 | 804 | |
| 805 | 805 | // Prospects |
| 806 | 806 | if (!empty(Globals::$conf->societe->enabled) && empty(Globals::$conf->global->SOCIETE_DISABLE_PROSPECTS)) {
|
| 807 | 807 | Globals::$langs->load("commercial");
|
| 808 | 808 | //$newmenu->add("/societe/list.php?type=p&leftmenu=prospects", Globals::$langs->trans("ListProspectsShort"), 1, Globals::$user->rights->societe->lire, '', $mainmenu, 'prospects');
|
| 809 | - $newmenu->add(BASE_URI . "?controller=societe&method=list&type=p&leftmenu=prospects", Globals::$langs->trans("ListProspectsShort"), 1, Globals::$user->rights->societe->lire, '', $mainmenu, 'prospects');
|
|
| 809 | + $newmenu->add(BASE_URI."?controller=societe&method=list&type=p&leftmenu=prospects", Globals::$langs->trans("ListProspectsShort"), 1, Globals::$user->rights->societe->lire, '', $mainmenu, 'prospects');
|
|
| 810 | 810 | /* no more required, there is a filter that can do more |
| 811 | 811 | if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=-1", Globals::$langs->trans("LastProspectDoNotContact"), 2, Globals::$user->rights->societe->lire);
|
| 812 | 812 | if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=0", Globals::$langs->trans("LastProspectNeverContacted"), 2, Globals::$user->rights->societe->lire);
|
@@ -815,7 +815,7 @@ discard block |
||
| 815 | 815 | if ($usemenuhider || empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=3", Globals::$langs->trans("LastProspectContactDone"), 2, Globals::$user->rights->societe->lire);
|
| 816 | 816 | */ |
| 817 | 817 | //$newmenu->add("/societe/card.php?leftmenu=prospects&action=create&type=p", Globals::$langs->trans("MenuNewProspect"), 2, Globals::$user->rights->societe->creer);
|
| 818 | - $newmenu->add(BASE_URI . "?controller=societe&method=card&leftmenu=prospects&action=create&type=p", Globals::$langs->trans("MenuNewProspect"), 2, Globals::$user->rights->societe->creer);
|
|
| 818 | + $newmenu->add(BASE_URI."?controller=societe&method=card&leftmenu=prospects&action=create&type=p", Globals::$langs->trans("MenuNewProspect"), 2, Globals::$user->rights->societe->creer);
|
|
| 819 | 819 | //$newmenu->add("/contact/list.php?leftmenu=customers&type=p", Globals::$langs->trans("Contacts"), 2, Globals::$user->rights->societe->contact->lire);
|
| 820 | 820 | } |
| 821 | 821 | |
@@ -823,10 +823,10 @@ discard block |
||
| 823 | 823 | if (!empty(Globals::$conf->societe->enabled) && empty(Globals::$conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
|
| 824 | 824 | Globals::$langs->load("commercial");
|
| 825 | 825 | //$newmenu->add("/societe/list.php?type=c&leftmenu=customers", Globals::$langs->trans("ListCustomersShort"), 1, Globals::$user->rights->societe->lire, '', $mainmenu, 'customers');
|
| 826 | - $newmenu->add(BASE_URI . "?controller=societe&method=list&type=c&leftmenu=customers", Globals::$langs->trans("ListCustomersShort"), 1, Globals::$user->rights->societe->lire, '', $mainmenu, 'customers');
|
|
| 826 | + $newmenu->add(BASE_URI."?controller=societe&method=list&type=c&leftmenu=customers", Globals::$langs->trans("ListCustomersShort"), 1, Globals::$user->rights->societe->lire, '', $mainmenu, 'customers');
|
|
| 827 | 827 | |
| 828 | 828 | //$newmenu->add("/societe/card.php?leftmenu=customers&action=create&type=c", Globals::$langs->trans("MenuNewCustomer"), 2, Globals::$user->rights->societe->creer);
|
| 829 | - $newmenu->add(BASE_URI . "?controller=societe&method=card&leftmenu=customers&action=create&type=c", Globals::$langs->trans("MenuNewCustomer"), 2, Globals::$user->rights->societe->creer);
|
|
| 829 | + $newmenu->add(BASE_URI."?controller=societe&method=card&leftmenu=customers&action=create&type=c", Globals::$langs->trans("MenuNewCustomer"), 2, Globals::$user->rights->societe->creer);
|
|
| 830 | 830 | //$newmenu->add("/contact/list.php?leftmenu=customers&type=c", Globals::$langs->trans("Contacts"), 2, Globals::$user->rights->societe->contact->lire);
|
| 831 | 831 | } |
| 832 | 832 | |
@@ -835,8 +835,8 @@ discard block |
||
| 835 | 835 | Globals::$langs->load("suppliers");
|
| 836 | 836 | //$newmenu->add("/societe/list.php?type=f&leftmenu=suppliers", Globals::$langs->trans("ListSuppliersShort"), 1, (Globals::$user->rights->fournisseur->lire || Globals::$user->rights->supplier_proposal->lire), '', $mainmenu, 'suppliers');
|
| 837 | 837 | //$newmenu->add("/societe/card.php?leftmenu=suppliers&action=create&type=f", Globals::$langs->trans("MenuNewSupplier"), 2, Globals::$user->rights->societe->creer && (Globals::$user->rights->fournisseur->lire || Globals::$user->rights->supplier_proposal->lire));
|
| 838 | - $newmenu->add(BASE_URI . "?controller=societe&method=list&type=f&leftmenu=suppliers", Globals::$langs->trans("ListSuppliersShort"), 1, (Globals::$user->rights->fournisseur->lire || Globals::$user->rights->supplier_proposal->lire), '', $mainmenu, 'suppliers');
|
|
| 839 | - $newmenu->add(BASE_URI . "?controller=societe&method=card&leftmenu=suppliers&action=create&type=f", Globals::$langs->trans("MenuNewSupplier"), 2, Globals::$user->rights->societe->creer && (Globals::$user->rights->fournisseur->lire || Globals::$user->rights->supplier_proposal->lire));
|
|
| 838 | + $newmenu->add(BASE_URI."?controller=societe&method=list&type=f&leftmenu=suppliers", Globals::$langs->trans("ListSuppliersShort"), 1, (Globals::$user->rights->fournisseur->lire || Globals::$user->rights->supplier_proposal->lire), '', $mainmenu, 'suppliers');
|
|
| 839 | + $newmenu->add(BASE_URI."?controller=societe&method=card&leftmenu=suppliers&action=create&type=f", Globals::$langs->trans("MenuNewSupplier"), 2, Globals::$user->rights->societe->creer && (Globals::$user->rights->fournisseur->lire || Globals::$user->rights->supplier_proposal->lire));
|
|
| 840 | 840 | } |
| 841 | 841 | |
| 842 | 842 | // Categories |
@@ -852,12 +852,12 @@ discard block |
||
| 852 | 852 | $menutoshow = Globals::$langs->trans("ProspectsCategoriesShort");
|
| 853 | 853 | } |
| 854 | 854 | //$newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
| 855 | - $newmenu->add(BASE_URI . "?controller=categories&method=index&leftmenu=cat&type=2", $menutoshow, 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat'); |
|
| 855 | + $newmenu->add(BASE_URI."?controller=categories&method=index&leftmenu=cat&type=2", $menutoshow, 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat'); |
|
| 856 | 856 | } |
| 857 | 857 | // Categories suppliers |
| 858 | 858 | if (!empty(Globals::$conf->fournisseur->enabled)) {
|
| 859 | 859 | //$newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", Globals::$langs->trans("SuppliersCategoriesShort"), 1, Globals::$user->rights->categorie->lire);
|
| 860 | - $newmenu->add(BASE_URI . "?controller=categories&method=index&leftmenu=catfournish&type=1", Globals::$langs->trans("SuppliersCategoriesShort"), 1, Globals::$user->rights->categorie->lire);
|
|
| 860 | + $newmenu->add(BASE_URI."?controller=categories&method=index&leftmenu=catfournish&type=1", Globals::$langs->trans("SuppliersCategoriesShort"), 1, Globals::$user->rights->categorie->lire);
|
|
| 861 | 861 | } |
| 862 | 862 | } |
| 863 | 863 | |
@@ -865,30 +865,30 @@ discard block |
||
| 865 | 865 | //$newmenu->add("/societe/index.php?leftmenu=thirdparties", (!empty(Globals::$conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? Globals::$langs->trans("Contacts") : Globals::$langs->trans("ContactsAddresses")), 0, Globals::$user->rights->societe->contact->lire, '', $mainmenu, 'contacts');
|
| 866 | 866 | //$newmenu->add("/contact/card.php?leftmenu=contacts&action=create", (!empty(Globals::$conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? Globals::$langs->trans("NewContact") : Globals::$langs->trans("NewContactAddress")), 1, Globals::$user->rights->societe->contact->creer);
|
| 867 | 867 | //$newmenu->add("/contact/list.php?leftmenu=contacts", Globals::$langs->trans("List"), 1, Globals::$user->rights->societe->contact->lire);
|
| 868 | - $newmenu->add(BASE_URI . "?controller=societe&method=index&leftmenu=thirdparties", (!empty(Globals::$conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? Globals::$langs->trans("Contacts") : Globals::$langs->trans("ContactsAddresses")), 0, Globals::$user->rights->societe->contact->lire, '', $mainmenu, 'contacts');
|
|
| 869 | - $newmenu->add(BASE_URI . "?controller=contact&method=card&leftmenu=contacts&action=create", (!empty(Globals::$conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? Globals::$langs->trans("NewContact") : Globals::$langs->trans("NewContactAddress")), 1, Globals::$user->rights->societe->contact->creer);
|
|
| 870 | - $newmenu->add(BASE_URI . "?controller=contact&method=list&leftmenu=contacts", Globals::$langs->trans("List"), 1, Globals::$user->rights->societe->contact->lire);
|
|
| 868 | + $newmenu->add(BASE_URI."?controller=societe&method=index&leftmenu=thirdparties", (!empty(Globals::$conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? Globals::$langs->trans("Contacts") : Globals::$langs->trans("ContactsAddresses")), 0, Globals::$user->rights->societe->contact->lire, '', $mainmenu, 'contacts');
|
|
| 869 | + $newmenu->add(BASE_URI."?controller=contact&method=card&leftmenu=contacts&action=create", (!empty(Globals::$conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? Globals::$langs->trans("NewContact") : Globals::$langs->trans("NewContactAddress")), 1, Globals::$user->rights->societe->contact->creer);
|
|
| 870 | + $newmenu->add(BASE_URI."?controller=contact&method=list&leftmenu=contacts", Globals::$langs->trans("List"), 1, Globals::$user->rights->societe->contact->lire);
|
|
| 871 | 871 | if (empty(Globals::$conf->global->SOCIETE_DISABLE_PROSPECTS)) {
|
| 872 | 872 | //$newmenu->add("/contact/list.php?leftmenu=contacts&type=p", Globals::$langs->trans("Prospects"), 2, Globals::$user->rights->societe->contact->lire);
|
| 873 | - $newmenu->add(BASE_URI . "?controller=contact&method=list&leftmenu=contacts&type=p", Globals::$langs->trans("Prospects"), 2, Globals::$user->rights->societe->contact->lire);
|
|
| 873 | + $newmenu->add(BASE_URI."?controller=contact&method=list&leftmenu=contacts&type=p", Globals::$langs->trans("Prospects"), 2, Globals::$user->rights->societe->contact->lire);
|
|
| 874 | 874 | } |
| 875 | 875 | if (empty(Globals::$conf->global->SOCIETE_DISABLE_CUSTOMERS)) {
|
| 876 | 876 | //$newmenu->add("/contact/list.php?leftmenu=contacts&type=c", Globals::$langs->trans("Customers"), 2, Globals::$user->rights->societe->contact->lire);
|
| 877 | - $newmenu->add(BASE_URI . "?controller=contact&method=list&leftmenu=contacts&type=c", Globals::$langs->trans("Customers"), 2, Globals::$user->rights->societe->contact->lire);
|
|
| 877 | + $newmenu->add(BASE_URI."?controller=contact&method=list&leftmenu=contacts&type=c", Globals::$langs->trans("Customers"), 2, Globals::$user->rights->societe->contact->lire);
|
|
| 878 | 878 | } |
| 879 | 879 | if (!empty(Globals::$conf->fournisseur->enabled)) {
|
| 880 | 880 | //$newmenu->add("/contact/list.php?leftmenu=contacts&type=f", Globals::$langs->trans("Suppliers"), 2, Globals::$user->rights->societe->contact->lire);
|
| 881 | - $newmenu->add(BASE_URI . "?controller=contact&method=list&leftmenu=contacts&type=f", Globals::$langs->trans("Suppliers"), 2, Globals::$user->rights->societe->contact->lire);
|
|
| 881 | + $newmenu->add(BASE_URI."?controller=contact&method=list&leftmenu=contacts&type=f", Globals::$langs->trans("Suppliers"), 2, Globals::$user->rights->societe->contact->lire);
|
|
| 882 | 882 | } |
| 883 | 883 | //$newmenu->add("/contact/list.php?leftmenu=contacts&type=o", Globals::$langs->trans("ContactOthers"), 2, Globals::$user->rights->societe->contact->lire);
|
| 884 | - $newmenu->add(BASE_URI . "?controller=contact&methos=list&leftmenu=contacts&type=o", Globals::$langs->trans("ContactOthers"), 2, Globals::$user->rights->societe->contact->lire);
|
|
| 884 | + $newmenu->add(BASE_URI."?controller=contact&methos=list&leftmenu=contacts&type=o", Globals::$langs->trans("ContactOthers"), 2, Globals::$user->rights->societe->contact->lire);
|
|
| 885 | 885 | //$newmenu->add("/contact/list.php?userid=Globals::$user->id", Globals::$langs->trans("MyContacts"), 1, Globals::$user->rights->societe->contact->lire);
|
| 886 | 886 | // Categories |
| 887 | 887 | if (!empty(Globals::$conf->categorie->enabled)) {
|
| 888 | 888 | Globals::$langs->load("categories");
|
| 889 | 889 | // Categories Contact |
| 890 | 890 | //$newmenu->add("/categories/index.php?leftmenu=catcontact&type=4", Globals::$langs->trans("ContactCategoriesShort"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
| 891 | - $newmenu->add(BASE_URI . "?controller=categories&method=index&leftmenu=catcontact&type=4", Globals::$langs->trans("ContactCategoriesShort"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
|
| 891 | + $newmenu->add(BASE_URI."?controller=categories&method=index&leftmenu=catcontact&type=4", Globals::$langs->trans("ContactCategoriesShort"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
|
| 892 | 892 | } |
| 893 | 893 | } |
| 894 | 894 | |
@@ -904,9 +904,9 @@ discard block |
||
| 904 | 904 | //$newmenu->add("/comm/propal/index.php?leftmenu=propals", Globals::$langs->trans("Proposals"), 0, Globals::$user->rights->propale->lire, '', $mainmenu, 'propals', 100);
|
| 905 | 905 | //$newmenu->add("/comm/propal/card.php?action=create&leftmenu=propals", Globals::$langs->trans("NewPropal"), 1, Globals::$user->rights->propale->creer);
|
| 906 | 906 | //$newmenu->add("/comm/propal/list.php?leftmenu=propals", Globals::$langs->trans("List"), 1, Globals::$user->rights->propale->lire);
|
| 907 | - $newmenu->add(BASE_URI . "?controller=comm/propal&method=index&leftmenu=propals", Globals::$langs->trans("Proposals"), 0, Globals::$user->rights->propale->lire, '', $mainmenu, 'propals', 100);
|
|
| 908 | - $newmenu->add(BASE_URI . "?controller=comm/propal&method=card&action=create&leftmenu=propals", Globals::$langs->trans("NewPropal"), 1, Globals::$user->rights->propale->creer);
|
|
| 909 | - $newmenu->add(BASE_URI . "?controller=comm/propal&method=list&leftmenu=propals", Globals::$langs->trans("List"), 1, Globals::$user->rights->propale->lire);
|
|
| 907 | + $newmenu->add(BASE_URI."?controller=comm/propal&method=index&leftmenu=propals", Globals::$langs->trans("Proposals"), 0, Globals::$user->rights->propale->lire, '', $mainmenu, 'propals', 100);
|
|
| 908 | + $newmenu->add(BASE_URI."?controller=comm/propal&method=card&action=create&leftmenu=propals", Globals::$langs->trans("NewPropal"), 1, Globals::$user->rights->propale->creer);
|
|
| 909 | + $newmenu->add(BASE_URI."?controller=comm/propal&method=list&leftmenu=propals", Globals::$langs->trans("List"), 1, Globals::$user->rights->propale->lire);
|
|
| 910 | 910 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "propals") {
|
| 911 | 911 | /* |
| 912 | 912 | $newmenu->add("/comm/propal/list.php?leftmenu=propals&viewstatut=0", Globals::$langs->trans("PropalsDraft"), 2, Globals::$user->rights->propale->lire);
|
@@ -915,15 +915,15 @@ discard block |
||
| 915 | 915 | $newmenu->add("/comm/propal/list.php?leftmenu=propals&viewstatut=3", Globals::$langs->trans("PropalStatusNotSigned"), 2, Globals::$user->rights->propale->lire);
|
| 916 | 916 | $newmenu->add("/comm/propal/list.php?leftmenu=propals&viewstatut=4", Globals::$langs->trans("PropalStatusBilled"), 2, Globals::$user->rights->propale->lire);
|
| 917 | 917 | */ |
| 918 | - $newmenu->add(BASE_URI . "?controller=comm/propal&method=list&leftmenu=propals&viewstatut=0", Globals::$langs->trans("PropalsDraft"), 2, Globals::$user->rights->propale->lire);
|
|
| 919 | - $newmenu->add(BASE_URI . "?controller=comm/propal&method=list&leftmenu=propals&viewstatut=1", Globals::$langs->trans("PropalsOpened"), 2, Globals::$user->rights->propale->lire);
|
|
| 920 | - $newmenu->add(BASE_URI . "?controller=comm/propal&method=list&leftmenu=propals&viewstatut=2", Globals::$langs->trans("PropalStatusSigned"), 2, Globals::$user->rights->propale->lire);
|
|
| 921 | - $newmenu->add(BASE_URI . "?controller=comm/propal&method=list&leftmenu=propals&viewstatut=3", Globals::$langs->trans("PropalStatusNotSigned"), 2, Globals::$user->rights->propale->lire);
|
|
| 922 | - $newmenu->add(BASE_URI . "?controller=comm/propal&method=list&leftmenu=propals&viewstatut=4", Globals::$langs->trans("PropalStatusBilled"), 2, Globals::$user->rights->propale->lire);
|
|
| 918 | + $newmenu->add(BASE_URI."?controller=comm/propal&method=list&leftmenu=propals&viewstatut=0", Globals::$langs->trans("PropalsDraft"), 2, Globals::$user->rights->propale->lire);
|
|
| 919 | + $newmenu->add(BASE_URI."?controller=comm/propal&method=list&leftmenu=propals&viewstatut=1", Globals::$langs->trans("PropalsOpened"), 2, Globals::$user->rights->propale->lire);
|
|
| 920 | + $newmenu->add(BASE_URI."?controller=comm/propal&method=list&leftmenu=propals&viewstatut=2", Globals::$langs->trans("PropalStatusSigned"), 2, Globals::$user->rights->propale->lire);
|
|
| 921 | + $newmenu->add(BASE_URI."?controller=comm/propal&method=list&leftmenu=propals&viewstatut=3", Globals::$langs->trans("PropalStatusNotSigned"), 2, Globals::$user->rights->propale->lire);
|
|
| 922 | + $newmenu->add(BASE_URI."?controller=comm/propal&method=list&leftmenu=propals&viewstatut=4", Globals::$langs->trans("PropalStatusBilled"), 2, Globals::$user->rights->propale->lire);
|
|
| 923 | 923 | //$newmenu->add("/comm/propal/list.php?leftmenu=propals&viewstatut=2,3,4", Globals::$langs->trans("PropalStatusClosedShort"), 2, Globals::$user->rights->propale->lire);
|
| 924 | 924 | } |
| 925 | 925 | //$newmenu->add("/comm/propal/stats/index.php?leftmenu=propals", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->propale->lire);
|
| 926 | - $newmenu->add(BASE_URI . "?controller=comm/propal/stats&method=index&leftmenu=propals", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->propale->lire);
|
|
| 926 | + $newmenu->add(BASE_URI."?controller=comm/propal/stats&method=index&leftmenu=propals", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->propale->lire);
|
|
| 927 | 927 | } |
| 928 | 928 | |
| 929 | 929 | // Customers orders |
@@ -932,26 +932,26 @@ discard block |
||
| 932 | 932 | //$newmenu->add("/commande/index.php?leftmenu=orders", Globals::$langs->trans("CustomersOrders"), 0, Globals::$user->rights->commande->lire, '', $mainmenu, 'orders', 200);
|
| 933 | 933 | //$newmenu->add("/commande/card.php?action=create&leftmenu=orders", Globals::$langs->trans("NewOrder"), 1, Globals::$user->rights->commande->creer);
|
| 934 | 934 | //$newmenu->add("/commande/list.php?leftmenu=orders", Globals::$langs->trans("List"), 1, Globals::$user->rights->commande->lire);
|
| 935 | - $newmenu->add(BASE_URI . "?controller=commande&method=index&leftmenu=orders", Globals::$langs->trans("CustomersOrders"), 0, Globals::$user->rights->commande->lire, '', $mainmenu, 'orders', 200);
|
|
| 936 | - $newmenu->add(BASE_URI . "?controller=commande&method=card&action=create&leftmenu=orders", Globals::$langs->trans("NewOrder"), 1, Globals::$user->rights->commande->creer);
|
|
| 937 | - $newmenu->add(BASE_URI . "?controller=commande&method=list&leftmenu=orders", Globals::$langs->trans("List"), 1, Globals::$user->rights->commande->lire);
|
|
| 935 | + $newmenu->add(BASE_URI."?controller=commande&method=index&leftmenu=orders", Globals::$langs->trans("CustomersOrders"), 0, Globals::$user->rights->commande->lire, '', $mainmenu, 'orders', 200);
|
|
| 936 | + $newmenu->add(BASE_URI."?controller=commande&method=card&action=create&leftmenu=orders", Globals::$langs->trans("NewOrder"), 1, Globals::$user->rights->commande->creer);
|
|
| 937 | + $newmenu->add(BASE_URI."?controller=commande&method=list&leftmenu=orders", Globals::$langs->trans("List"), 1, Globals::$user->rights->commande->lire);
|
|
| 938 | 938 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders") {
|
| 939 | 939 | //$newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=0", Globals::$langs->trans("StatusOrderDraftShort"), 2, Globals::$user->rights->commande->lire);
|
| 940 | 940 | //$newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=1", Globals::$langs->trans("StatusOrderValidated"), 2, Globals::$user->rights->commande->lire);
|
| 941 | - $newmenu->add(BASE_URI . "?controller=commande&method=list&leftmenu=orders&viewstatut=0", Globals::$langs->trans("StatusOrderDraftShort"), 2, Globals::$user->rights->commande->lire);
|
|
| 942 | - $newmenu->add(BASE_URI . "?controller=commande&method=list&leftmenu=orders&viewstatut=1", Globals::$langs->trans("StatusOrderValidated"), 2, Globals::$user->rights->commande->lire);
|
|
| 941 | + $newmenu->add(BASE_URI."?controller=commande&method=list&leftmenu=orders&viewstatut=0", Globals::$langs->trans("StatusOrderDraftShort"), 2, Globals::$user->rights->commande->lire);
|
|
| 942 | + $newmenu->add(BASE_URI."?controller=commande&method=list&leftmenu=orders&viewstatut=1", Globals::$langs->trans("StatusOrderValidated"), 2, Globals::$user->rights->commande->lire);
|
|
| 943 | 943 | if (!empty(Globals::$conf->expedition->enabled)) {
|
| 944 | 944 | //$newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=2", Globals::$langs->trans("StatusOrderSentShort"), 2, Globals::$user->rights->commande->lire);
|
| 945 | - $newmenu->add(BASE_URI . "?controller=commande&method=list&leftmenu=orders&viewstatut=2", Globals::$langs->trans("StatusOrderSentShort"), 2, Globals::$user->rights->commande->lire);
|
|
| 945 | + $newmenu->add(BASE_URI."?controller=commande&method=list&leftmenu=orders&viewstatut=2", Globals::$langs->trans("StatusOrderSentShort"), 2, Globals::$user->rights->commande->lire);
|
|
| 946 | 946 | } |
| 947 | 947 | //$newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=3", Globals::$langs->trans("StatusOrderDelivered"), 2, Globals::$user->rights->commande->lire);
|
| 948 | - $newmenu->add(BASE_URI . "?controller=commande&method=list&leftmenu=orders&viewstatut=3", Globals::$langs->trans("StatusOrderDelivered"), 2, Globals::$user->rights->commande->lire);
|
|
| 948 | + $newmenu->add(BASE_URI."?controller=commande&method=list&leftmenu=orders&viewstatut=3", Globals::$langs->trans("StatusOrderDelivered"), 2, Globals::$user->rights->commande->lire);
|
|
| 949 | 949 | //$newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=4", Globals::$langs->trans("StatusOrderProcessed"), 2, Globals::$user->rights->commande->lire);
|
| 950 | 950 | //$newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=-1", Globals::$langs->trans("StatusOrderCanceledShort"), 2, Globals::$user->rights->commande->lire);
|
| 951 | - $newmenu->add(BASE_URI . "?controller=commande&method=list&leftmenu=orders&viewstatut=-1", Globals::$langs->trans("StatusOrderCanceledShort"), 2, Globals::$user->rights->commande->lire);
|
|
| 951 | + $newmenu->add(BASE_URI."?controller=commande&method=list&leftmenu=orders&viewstatut=-1", Globals::$langs->trans("StatusOrderCanceledShort"), 2, Globals::$user->rights->commande->lire);
|
|
| 952 | 952 | } |
| 953 | 953 | //$newmenu->add("/commande/stats/index.php?leftmenu=orders", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->commande->lire);
|
| 954 | - $newmenu->add(BASE_URI . "?controller=commande/stats&method=index&leftmenu=orders", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->commande->lire);
|
|
| 954 | + $newmenu->add(BASE_URI."?controller=commande/stats&method=index&leftmenu=orders", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->commande->lire);
|
|
| 955 | 955 | } |
| 956 | 956 | |
| 957 | 957 | // Suppliers orders |
@@ -960,16 +960,16 @@ discard block |
||
| 960 | 960 | //$newmenu->add("/fourn/commande/index.php?leftmenu=orders_suppliers", Globals::$langs->trans("SuppliersOrders"), 0, Globals::$user->rights->fournisseur->commande->lire, '', $mainmenu, 'orders_suppliers', 400);
|
| 961 | 961 | //$newmenu->add("/fourn/commande/card.php?action=create&leftmenu=orders_suppliers", Globals::$langs->trans("NewOrder"), 1, Globals::$user->rights->fournisseur->commande->creer);
|
| 962 | 962 | //$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", Globals::$langs->trans("List"), 1, Globals::$user->rights->fournisseur->commande->lire);
|
| 963 | - $newmenu->add(BASE_URI . "?controller=fourn/commande&method=index&leftmenu=orders_suppliers", Globals::$langs->trans("SuppliersOrders"), 0, Globals::$user->rights->fournisseur->commande->lire, '', $mainmenu, 'orders_suppliers', 400);
|
|
| 964 | - $newmenu->add(BASE_URI . "?controller=fourn/commande&method=card&action=create&leftmenu=orders_suppliers", Globals::$langs->trans("NewOrder"), 1, Globals::$user->rights->fournisseur->commande->creer);
|
|
| 965 | - $newmenu->add(BASE_URI . "?controller=fourn/commande&method=list&leftmenu=orders_suppliers", Globals::$langs->trans("List"), 1, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 963 | + $newmenu->add(BASE_URI."?controller=fourn/commande&method=index&leftmenu=orders_suppliers", Globals::$langs->trans("SuppliersOrders"), 0, Globals::$user->rights->fournisseur->commande->lire, '', $mainmenu, 'orders_suppliers', 400);
|
|
| 964 | + $newmenu->add(BASE_URI."?controller=fourn/commande&method=card&action=create&leftmenu=orders_suppliers", Globals::$langs->trans("NewOrder"), 1, Globals::$user->rights->fournisseur->commande->creer);
|
|
| 965 | + $newmenu->add(BASE_URI."?controller=fourn/commande&method=list&leftmenu=orders_suppliers", Globals::$langs->trans("List"), 1, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 966 | 966 | |
| 967 | 967 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "orders_suppliers") {
|
| 968 | 968 | //$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", Globals::$langs->trans("StatusOrderDraftShort"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
| 969 | - $newmenu->add(BASE_URI . "?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=0", Globals::$langs->trans("StatusOrderDraftShort"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 969 | + $newmenu->add(BASE_URI."?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=0", Globals::$langs->trans("StatusOrderDraftShort"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 970 | 970 | if (empty(Globals::$conf->global->SUPPLIER_ORDER_HIDE_VALIDATED)) {
|
| 971 | 971 | //$newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", Globals::$langs->trans("StatusOrderValidated"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
| 972 | - $newmenu->add(BASE_URI . "?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=1", Globals::$langs->trans("StatusOrderValidated"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 972 | + $newmenu->add(BASE_URI."?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=1", Globals::$langs->trans("StatusOrderValidated"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 973 | 973 | } |
| 974 | 974 | /* |
| 975 | 975 | $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", Globals::$langs->trans("StatusOrderApprovedShort"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
@@ -979,16 +979,16 @@ discard block |
||
| 979 | 979 | $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", Globals::$langs->trans("StatusOrderCanceled"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
| 980 | 980 | $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", Globals::$langs->trans("StatusOrderRefused"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
| 981 | 981 | */ |
| 982 | - $newmenu->add(BASE_URI . "?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=2", Globals::$langs->trans("StatusOrderApprovedShort"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 983 | - $newmenu->add(BASE_URI . "?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=3", Globals::$langs->trans("StatusOrderOnProcessShort"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 984 | - $newmenu->add(BASE_URI . "?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=4", Globals::$langs->trans("StatusOrderReceivedPartiallyShort"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 985 | - $newmenu->add(BASE_URI . "?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=5", Globals::$langs->trans("StatusOrderReceivedAll"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 986 | - $newmenu->add(BASE_URI . "?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=6,7", Globals::$langs->trans("StatusOrderCanceled"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 987 | - $newmenu->add(BASE_URI . "?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=9", Globals::$langs->trans("StatusOrderRefused"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 982 | + $newmenu->add(BASE_URI."?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=2", Globals::$langs->trans("StatusOrderApprovedShort"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 983 | + $newmenu->add(BASE_URI."?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=3", Globals::$langs->trans("StatusOrderOnProcessShort"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 984 | + $newmenu->add(BASE_URI."?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=4", Globals::$langs->trans("StatusOrderReceivedPartiallyShort"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 985 | + $newmenu->add(BASE_URI."?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=5", Globals::$langs->trans("StatusOrderReceivedAll"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 986 | + $newmenu->add(BASE_URI."?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=6,7", Globals::$langs->trans("StatusOrderCanceled"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 987 | + $newmenu->add(BASE_URI."?controller=fourn/commande&method=list&leftmenu=orders_suppliers&statut=9", Globals::$langs->trans("StatusOrderRefused"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 988 | 988 | } |
| 989 | 989 | // Billed is another field. We should add instead a dedicated filter on list. if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&billed=1", Globals::$langs->trans("StatusOrderBilled"), 2, Globals::$user->rights->fournisseur->commande->lire);
|
| 990 | 990 | //$newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->fournisseur->commande->lire);
|
| 991 | - $newmenu->add(BASE_URI . "?controller=commande/stats&method=index&leftmenu=orders_suppliers&mode=supplier", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 991 | + $newmenu->add(BASE_URI."?controller=commande/stats&method=index&leftmenu=orders_suppliers&mode=supplier", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 992 | 992 | } |
| 993 | 993 | |
| 994 | 994 | // Contrat |
@@ -1000,10 +1000,10 @@ discard block |
||
| 1000 | 1000 | $newmenu->add("/contrat/list.php?leftmenu=contracts", Globals::$langs->trans("List"), 1, Globals::$user->rights->contrat->lire);
|
| 1001 | 1001 | $newmenu->add("/contrat/services_list.php?leftmenu=contracts", Globals::$langs->trans("MenuServices"), 1, Globals::$user->rights->contrat->lire);
|
| 1002 | 1002 | */ |
| 1003 | - $newmenu->add(BASE_URI . "?controller=contrat&method=index&leftmenu=contracts", Globals::$langs->trans("ContractsSubscriptions"), 0, Globals::$user->rights->contrat->lire, '', $mainmenu, 'contracts', 2000);
|
|
| 1004 | - $newmenu->add(BASE_URI . "?controller=contrat&method=card&action=create&leftmenu=contracts", Globals::$langs->trans("NewContractSubscription"), 1, Globals::$user->rights->contrat->creer);
|
|
| 1005 | - $newmenu->add(BASE_URI . "?controller=contrat&method=list&leftmenu=contracts", Globals::$langs->trans("List"), 1, Globals::$user->rights->contrat->lire);
|
|
| 1006 | - $newmenu->add(BASE_URI . "?controller=contrat&method=services_list&leftmenu=contracts", Globals::$langs->trans("MenuServices"), 1, Globals::$user->rights->contrat->lire);
|
|
| 1003 | + $newmenu->add(BASE_URI."?controller=contrat&method=index&leftmenu=contracts", Globals::$langs->trans("ContractsSubscriptions"), 0, Globals::$user->rights->contrat->lire, '', $mainmenu, 'contracts', 2000);
|
|
| 1004 | + $newmenu->add(BASE_URI."?controller=contrat&method=card&action=create&leftmenu=contracts", Globals::$langs->trans("NewContractSubscription"), 1, Globals::$user->rights->contrat->creer);
|
|
| 1005 | + $newmenu->add(BASE_URI."?controller=contrat&method=list&leftmenu=contracts", Globals::$langs->trans("List"), 1, Globals::$user->rights->contrat->lire);
|
|
| 1006 | + $newmenu->add(BASE_URI."?controller=contrat&method=services_list&leftmenu=contracts", Globals::$langs->trans("MenuServices"), 1, Globals::$user->rights->contrat->lire);
|
|
| 1007 | 1007 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "contracts") {
|
| 1008 | 1008 | /* |
| 1009 | 1009 | $newmenu->add("/contrat/services_list.php?leftmenu=contracts&mode=0", Globals::$langs->trans("MenuInactiveServices"), 2, Globals::$user->rights->contrat->lire);
|
@@ -1011,10 +1011,10 @@ discard block |
||
| 1011 | 1011 | $newmenu->add("/contrat/services_list.php?leftmenu=contracts&mode=4&filter=expired", Globals::$langs->trans("MenuExpiredServices"), 2, Globals::$user->rights->contrat->lire);
|
| 1012 | 1012 | $newmenu->add("/contrat/services_list.php?leftmenu=contracts&mode=5", Globals::$langs->trans("MenuClosedServices"), 2, Globals::$user->rights->contrat->lire);
|
| 1013 | 1013 | */ |
| 1014 | - $newmenu->add(BASE_URI . "?controller=contrat&method=services_list&leftmenu=contracts&mode=0", Globals::$langs->trans("MenuInactiveServices"), 2, Globals::$user->rights->contrat->lire);
|
|
| 1015 | - $newmenu->add(BASE_URI . "?controller=contrat&method=services_list&leftmenu=contracts&mode=4", Globals::$langs->trans("MenuRunningServices"), 2, Globals::$user->rights->contrat->lire);
|
|
| 1016 | - $newmenu->add(BASE_URI . "?controller=contrat&method=services_list&leftmenu=contracts&mode=4&filter=expired", Globals::$langs->trans("MenuExpiredServices"), 2, Globals::$user->rights->contrat->lire);
|
|
| 1017 | - $newmenu->add(BASE_URI . "?controller=contrat&method=services_list&leftmenu=contracts&mode=5", Globals::$langs->trans("MenuClosedServices"), 2, Globals::$user->rights->contrat->lire);
|
|
| 1014 | + $newmenu->add(BASE_URI."?controller=contrat&method=services_list&leftmenu=contracts&mode=0", Globals::$langs->trans("MenuInactiveServices"), 2, Globals::$user->rights->contrat->lire);
|
|
| 1015 | + $newmenu->add(BASE_URI."?controller=contrat&method=services_list&leftmenu=contracts&mode=4", Globals::$langs->trans("MenuRunningServices"), 2, Globals::$user->rights->contrat->lire);
|
|
| 1016 | + $newmenu->add(BASE_URI."?controller=contrat&method=services_list&leftmenu=contracts&mode=4&filter=expired", Globals::$langs->trans("MenuExpiredServices"), 2, Globals::$user->rights->contrat->lire);
|
|
| 1017 | + $newmenu->add(BASE_URI."?controller=contrat&method=services_list&leftmenu=contracts&mode=5", Globals::$langs->trans("MenuClosedServices"), 2, Globals::$user->rights->contrat->lire);
|
|
| 1018 | 1018 | } |
| 1019 | 1019 | } |
| 1020 | 1020 | |
@@ -1028,11 +1028,11 @@ discard block |
||
| 1028 | 1028 | $newmenu->add("/fichinter/card-red.php?leftmenu=ficheinter", Globals::$langs->trans("ModelList"), 1, Globals::$user->rights->ficheinter->lire, '', '', '', 203);
|
| 1029 | 1029 | $newmenu->add("/fichinter/stats/index.php?leftmenu=ficheinter", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->fournisseur->commande->lire);
|
| 1030 | 1030 | */ |
| 1031 | - $newmenu->add(BASE_URI . "?controller=fichinter&method=index&leftmenu=ficheinter", Globals::$langs->trans("Interventions"), 0, Globals::$user->rights->ficheinter->lire, '', $mainmenu, 'ficheinter', 2200);
|
|
| 1032 | - $newmenu->add(BASE_URI . "?controller=fichinter&method=card&action=create&leftmenu=ficheinter", Globals::$langs->trans("NewIntervention"), 1, Globals::$user->rights->ficheinter->creer, '', '', '', 201);
|
|
| 1033 | - $newmenu->add(BASE_URI . "?controller=fichinter&method=list&leftmenu=ficheinter", Globals::$langs->trans("List"), 1, Globals::$user->rights->ficheinter->lire, '', '', '', 202);
|
|
| 1034 | - $newmenu->add(BASE_URI . "?controller=fichinter&method=card-red&leftmenu=ficheinter", Globals::$langs->trans("ModelList"), 1, Globals::$user->rights->ficheinter->lire, '', '', '', 203);
|
|
| 1035 | - $newmenu->add(BASE_URI . "?controller=fichinter/stats&method=index&leftmenu=ficheinter", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 1031 | + $newmenu->add(BASE_URI."?controller=fichinter&method=index&leftmenu=ficheinter", Globals::$langs->trans("Interventions"), 0, Globals::$user->rights->ficheinter->lire, '', $mainmenu, 'ficheinter', 2200);
|
|
| 1032 | + $newmenu->add(BASE_URI."?controller=fichinter&method=card&action=create&leftmenu=ficheinter", Globals::$langs->trans("NewIntervention"), 1, Globals::$user->rights->ficheinter->creer, '', '', '', 201);
|
|
| 1033 | + $newmenu->add(BASE_URI."?controller=fichinter&method=list&leftmenu=ficheinter", Globals::$langs->trans("List"), 1, Globals::$user->rights->ficheinter->lire, '', '', '', 202);
|
|
| 1034 | + $newmenu->add(BASE_URI."?controller=fichinter&method=card-red&leftmenu=ficheinter", Globals::$langs->trans("ModelList"), 1, Globals::$user->rights->ficheinter->lire, '', '', '', 203);
|
|
| 1035 | + $newmenu->add(BASE_URI."?controller=fichinter/stats&method=index&leftmenu=ficheinter", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->fournisseur->commande->lire);
|
|
| 1036 | 1036 | } |
| 1037 | 1037 | } |
| 1038 | 1038 | |
@@ -1050,9 +1050,9 @@ discard block |
||
| 1050 | 1050 | $newmenu->add("/compta/facture/card.php?action=create", Globals::$langs->trans("NewBill"), 1, Globals::$user->rights->facture->creer);
|
| 1051 | 1051 | $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills", Globals::$langs->trans("List"), 1, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills_list');
|
| 1052 | 1052 | */ |
| 1053 | - $newmenu->add(BASE_URI . "?controller=compta/facture&method=list&leftmenu=customers_bills", Globals::$langs->trans("BillsCustomers"), 0, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills');
|
|
| 1054 | - $newmenu->add(BASE_URI . "?controller=compta/facture&method=card&action=create", Globals::$langs->trans("NewBill"), 1, Globals::$user->rights->facture->creer);
|
|
| 1055 | - $newmenu->add(BASE_URI . "?controller=compta/facture&method=list&leftmenu=customers_bills", Globals::$langs->trans("List"), 1, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills_list');
|
|
| 1053 | + $newmenu->add(BASE_URI."?controller=compta/facture&method=list&leftmenu=customers_bills", Globals::$langs->trans("BillsCustomers"), 0, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills');
|
|
| 1054 | + $newmenu->add(BASE_URI."?controller=compta/facture&method=card&action=create", Globals::$langs->trans("NewBill"), 1, Globals::$user->rights->facture->creer);
|
|
| 1055 | + $newmenu->add(BASE_URI."?controller=compta/facture&method=list&leftmenu=customers_bills", Globals::$langs->trans("List"), 1, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills_list');
|
|
| 1056 | 1056 | |
| 1057 | 1057 | if ($usemenuhider || empty($leftmenu) || preg_match('/customers_bills(|_draft|_notpaid|_paid|_canceled)$/', $leftmenu)) {
|
| 1058 | 1058 | /* |
@@ -1061,24 +1061,24 @@ discard block |
||
| 1061 | 1061 | $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_paid&search_status=2", Globals::$langs->trans("BillShortStatusPaid"), 2, Globals::$user->rights->facture->lire);
|
| 1062 | 1062 | $newmenu->add("/compta/facture/list.php?leftmenu=customers_bills_canceled&search_status=3", Globals::$langs->trans("BillShortStatusCanceled"), 2, Globals::$user->rights->facture->lire);
|
| 1063 | 1063 | */ |
| 1064 | - $newmenu->add(BASE_URI . "?controller=compta/facture&method=list&leftmenu=customers_bills_draft&search_status=0", Globals::$langs->trans("BillShortStatusDraft"), 2, Globals::$user->rights->facture->lire);
|
|
| 1065 | - $newmenu->add(BASE_URI . "?controller=compta/facture&method=list&leftmenu=customers_bills_notpaid&search_status=1", Globals::$langs->trans("BillShortStatusNotPaid"), 2, Globals::$user->rights->facture->lire);
|
|
| 1066 | - $newmenu->add(BASE_URI . "?controller=compta/facture&method=list&leftmenu=customers_bills_paid&search_status=2", Globals::$langs->trans("BillShortStatusPaid"), 2, Globals::$user->rights->facture->lire);
|
|
| 1067 | - $newmenu->add(BASE_URI . "?controller=compta/facture&method=list&leftmenu=customers_bills_canceled&search_status=3", Globals::$langs->trans("BillShortStatusCanceled"), 2, Globals::$user->rights->facture->lire);
|
|
| 1064 | + $newmenu->add(BASE_URI."?controller=compta/facture&method=list&leftmenu=customers_bills_draft&search_status=0", Globals::$langs->trans("BillShortStatusDraft"), 2, Globals::$user->rights->facture->lire);
|
|
| 1065 | + $newmenu->add(BASE_URI."?controller=compta/facture&method=list&leftmenu=customers_bills_notpaid&search_status=1", Globals::$langs->trans("BillShortStatusNotPaid"), 2, Globals::$user->rights->facture->lire);
|
|
| 1066 | + $newmenu->add(BASE_URI."?controller=compta/facture&method=list&leftmenu=customers_bills_paid&search_status=2", Globals::$langs->trans("BillShortStatusPaid"), 2, Globals::$user->rights->facture->lire);
|
|
| 1067 | + $newmenu->add(BASE_URI."?controller=compta/facture&method=list&leftmenu=customers_bills_canceled&search_status=3", Globals::$langs->trans("BillShortStatusCanceled"), 2, Globals::$user->rights->facture->lire);
|
|
| 1068 | 1068 | } |
| 1069 | 1069 | //$newmenu->add("/compta/facture/invoicetemplate_list.php?leftmenu=customers_bills_templates", Globals::$langs->trans("ListOfTemplates"), 1, Globals::$user->rights->facture->creer, '', $mainmenu, 'customers_bills_templates'); // No need to see recurring invoices, if user has no permission to create invoice.
|
| 1070 | 1070 | //$newmenu->add("/compta/paiement/list.php?leftmenu=customers_bills_payment", Globals::$langs->trans("Payments"), 1, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills_payment');
|
| 1071 | - $newmenu->add(BASE_URI . "?controller=compta/facture&method=invoicetemplate_list&leftmenu=customers_bills_templates", Globals::$langs->trans("ListOfTemplates"), 1, Globals::$user->rights->facture->creer, '', $mainmenu, 'customers_bills_templates'); // No need to see recurring invoices, if user has no permission to create invoice.
|
|
| 1072 | - $newmenu->add(BASE_URI . "?controller=compta/paiement&method=list&leftmenu=customers_bills_payment", Globals::$langs->trans("Payments"), 1, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills_payment');
|
|
| 1071 | + $newmenu->add(BASE_URI."?controller=compta/facture&method=invoicetemplate_list&leftmenu=customers_bills_templates", Globals::$langs->trans("ListOfTemplates"), 1, Globals::$user->rights->facture->creer, '', $mainmenu, 'customers_bills_templates'); // No need to see recurring invoices, if user has no permission to create invoice.
|
|
| 1072 | + $newmenu->add(BASE_URI."?controller=compta/paiement&method=list&leftmenu=customers_bills_payment", Globals::$langs->trans("Payments"), 1, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills_payment');
|
|
| 1073 | 1073 | |
| 1074 | 1074 | if (!empty(Globals::$conf->global->BILL_ADD_PAYMENT_VALIDATION)) {
|
| 1075 | 1075 | //$newmenu->add("/compta/paiement/tovalidate.php?leftmenu=customers_bills_tovalid", Globals::$langs->trans("MenuToValid"), 2, Globals::$user->rights->facture->lire, '', $mainmenu, 'customer_bills_tovalid');
|
| 1076 | - $newmenu->add(BASE_URI . "?controller=compta/paiement&method=tovalidate&leftmenu=customers_bills_tovalid", Globals::$langs->trans("MenuToValid"), 2, Globals::$user->rights->facture->lire, '', $mainmenu, 'customer_bills_tovalid');
|
|
| 1076 | + $newmenu->add(BASE_URI."?controller=compta/paiement&method=tovalidate&leftmenu=customers_bills_tovalid", Globals::$langs->trans("MenuToValid"), 2, Globals::$user->rights->facture->lire, '', $mainmenu, 'customer_bills_tovalid');
|
|
| 1077 | 1077 | } |
| 1078 | 1078 | //$newmenu->add("/compta/paiement/rapport.php?leftmenu=customers_bills_reports", Globals::$langs->trans("Reportings"), 2, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills_reports');
|
| 1079 | 1079 | //$newmenu->add("/compta/facture/stats/index.php?leftmenu=customers_bills_stats", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills_stats');
|
| 1080 | - $newmenu->add(BASE_URI . "?controller=compta/paiement&method=rapport&leftmenu=customers_bills_reports", Globals::$langs->trans("Reportings"), 2, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills_reports');
|
|
| 1081 | - $newmenu->add(BASE_URI . "?controller=compta/facture/stats&method=index&leftmenu=customers_bills_stats", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills_stats');
|
|
| 1080 | + $newmenu->add(BASE_URI."?controller=compta/paiement&method=rapport&leftmenu=customers_bills_reports", Globals::$langs->trans("Reportings"), 2, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills_reports');
|
|
| 1081 | + $newmenu->add(BASE_URI."?controller=compta/facture/stats&method=index&leftmenu=customers_bills_stats", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->facture->lire, '', $mainmenu, 'customers_bills_stats');
|
|
| 1082 | 1082 | } |
| 1083 | 1083 | |
| 1084 | 1084 | // Suppliers invoices |
@@ -1087,25 +1087,25 @@ discard block |
||
| 1087 | 1087 | //$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", Globals::$langs->trans("BillsSuppliers"), 0, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills');
|
| 1088 | 1088 | //$newmenu->add("/fourn/facture/card.php?leftmenu=suppliers_bills&action=create", Globals::$langs->trans("NewBill"), 1, Globals::$user->rights->fournisseur->facture->creer, '', $mainmenu, 'suppliers_bills_create');
|
| 1089 | 1089 | //$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills", Globals::$langs->trans("List"), 1, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_list');
|
| 1090 | - $newmenu->add(BASE_URI . "?controller=fourn/facture&method=list&leftmenu=suppliers_bills", Globals::$langs->trans("BillsSuppliers"), 0, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills');
|
|
| 1091 | - $newmenu->add(BASE_URI . "?controller=fourn/facture&method=card&leftmenu=suppliers_bills&action=create", Globals::$langs->trans("NewBill"), 1, Globals::$user->rights->fournisseur->facture->creer, '', $mainmenu, 'suppliers_bills_create');
|
|
| 1092 | - $newmenu->add(BASE_URI . "?controller=fourn/facture&method=list&leftmenu=suppliers_bills", Globals::$langs->trans("List"), 1, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_list');
|
|
| 1090 | + $newmenu->add(BASE_URI."?controller=fourn/facture&method=list&leftmenu=suppliers_bills", Globals::$langs->trans("BillsSuppliers"), 0, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills');
|
|
| 1091 | + $newmenu->add(BASE_URI."?controller=fourn/facture&method=card&leftmenu=suppliers_bills&action=create", Globals::$langs->trans("NewBill"), 1, Globals::$user->rights->fournisseur->facture->creer, '', $mainmenu, 'suppliers_bills_create');
|
|
| 1092 | + $newmenu->add(BASE_URI."?controller=fourn/facture&method=list&leftmenu=suppliers_bills", Globals::$langs->trans("List"), 1, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_list');
|
|
| 1093 | 1093 | |
| 1094 | 1094 | if ($usemenuhider || empty($leftmenu) || preg_match('/suppliers_bills/', $leftmenu)) {
|
| 1095 | 1095 | //$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_draft&search_status=0", Globals::$langs->trans("BillShortStatusDraft"), 2, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_draft');
|
| 1096 | 1096 | //$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_notpaid&search_status=1", Globals::$langs->trans("BillShortStatusNotPaid"), 2, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_notpaid');
|
| 1097 | 1097 | //$newmenu->add("/fourn/facture/list.php?leftmenu=suppliers_bills_paid&search_status=2", Globals::$langs->trans("BillShortStatusPaid"), 2, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_paid');
|
| 1098 | - $newmenu->add(BASE_URI . "?controller=fourn/facture&method=list&leftmenu=suppliers_bills_draft&search_status=0", Globals::$langs->trans("BillShortStatusDraft"), 2, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_draft');
|
|
| 1099 | - $newmenu->add(BASE_URI . "?controller=fourn/facture&method=list&leftmenu=suppliers_bills_notpaid&search_status=1", Globals::$langs->trans("BillShortStatusNotPaid"), 2, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_notpaid');
|
|
| 1100 | - $newmenu->add(BASE_URI . "?controller=fourn/facture&method=list&leftmenu=suppliers_bills_paid&search_status=2", Globals::$langs->trans("BillShortStatusPaid"), 2, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_paid');
|
|
| 1098 | + $newmenu->add(BASE_URI."?controller=fourn/facture&method=list&leftmenu=suppliers_bills_draft&search_status=0", Globals::$langs->trans("BillShortStatusDraft"), 2, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_draft');
|
|
| 1099 | + $newmenu->add(BASE_URI."?controller=fourn/facture&method=list&leftmenu=suppliers_bills_notpaid&search_status=1", Globals::$langs->trans("BillShortStatusNotPaid"), 2, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_notpaid');
|
|
| 1100 | + $newmenu->add(BASE_URI."?controller=fourn/facture&method=list&leftmenu=suppliers_bills_paid&search_status=2", Globals::$langs->trans("BillShortStatusPaid"), 2, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_paid');
|
|
| 1101 | 1101 | } |
| 1102 | 1102 | |
| 1103 | 1103 | //$newmenu->add("/fourn/facture/paiement.php?leftmenu=suppliers_bills_payment", Globals::$langs->trans("Payments"), 1, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_payment');
|
| 1104 | 1104 | //$newmenu->add("/fourn/facture/rapport.php?leftmenu=suppliers_bills_report", Globals::$langs->trans("Reportings"), 2, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_report');
|
| 1105 | 1105 | //$newmenu->add("/compta/facture/stats/index.php?mode=supplier&leftmenu=suppliers_bills_stats", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_stats');
|
| 1106 | - $newmenu->add(BASE_URI . "?controller=fourn/facture&method=paiement&leftmenu=suppliers_bills_payment", Globals::$langs->trans("Payments"), 1, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_payment');
|
|
| 1107 | - $newmenu->add(BASE_URI . "?controller=fourn/facture&method=rapport&leftmenu=suppliers_bills_report", Globals::$langs->trans("Reportings"), 2, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_report');
|
|
| 1108 | - $newmenu->add(BASE_URI . "?controller=compta/facture/stats&method=index&mode=supplier&leftmenu=suppliers_bills_stats", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_stats');
|
|
| 1106 | + $newmenu->add(BASE_URI."?controller=fourn/facture&method=paiement&leftmenu=suppliers_bills_payment", Globals::$langs->trans("Payments"), 1, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_payment');
|
|
| 1107 | + $newmenu->add(BASE_URI."?controller=fourn/facture&method=rapport&leftmenu=suppliers_bills_report", Globals::$langs->trans("Reportings"), 2, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_report');
|
|
| 1108 | + $newmenu->add(BASE_URI."?controller=compta/facture/stats&method=index&mode=supplier&leftmenu=suppliers_bills_stats", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->fournisseur->facture->lire, '', $mainmenu, 'suppliers_bills_stats');
|
|
| 1109 | 1109 | } |
| 1110 | 1110 | |
| 1111 | 1111 | // Orders |
@@ -1113,7 +1113,7 @@ discard block |
||
| 1113 | 1113 | Globals::$langs->load("orders");
|
| 1114 | 1114 | if (!empty(Globals::$conf->facture->enabled)) {
|
| 1115 | 1115 | //$newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=-3&billed=0&contextpage=billableorders", Globals::$langs->trans("MenuOrdersToBill2"), 0, Globals::$user->rights->commande->lire, '', $mainmenu, 'orders');
|
| 1116 | - $newmenu->add(BASE_URI . "?controller=commande&method=list&leftmenu=orders&viewstatut=-3&billed=0&contextpage=billableorders", Globals::$langs->trans("MenuOrdersToBill2"), 0, Globals::$user->rights->commande->lire, '', $mainmenu, 'orders');
|
|
| 1116 | + $newmenu->add(BASE_URI."?controller=commande&method=list&leftmenu=orders&viewstatut=-3&billed=0&contextpage=billableorders", Globals::$langs->trans("MenuOrdersToBill2"), 0, Globals::$user->rights->commande->lire, '', $mainmenu, 'orders');
|
|
| 1117 | 1117 | } |
| 1118 | 1118 | // if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", Globals::$langs->trans("StatusOrderToBill"), 1, Globals::$user->rights->commande->lire);
|
| 1119 | 1119 | } |
@@ -1123,7 +1123,7 @@ discard block |
||
| 1123 | 1123 | if (!empty(Globals::$conf->global->SUPPLIER_MENU_ORDER_RECEIVED_INTO_INVOICE)) {
|
| 1124 | 1124 | Globals::$langs->load("supplier");
|
| 1125 | 1125 | //$newmenu->add("/fourn/commande/list.php?leftmenu=orders&search_status=5&billed=0", Globals::$langs->trans("MenuOrdersSupplierToBill"), 0, Globals::$user->rights->commande->lire, '', $mainmenu, 'orders');
|
| 1126 | - $newmenu->add(BASE_URI . "?controller=fourn/commande&method=list&leftmenu=orders&search_status=5&billed=0", Globals::$langs->trans("MenuOrdersSupplierToBill"), 0, Globals::$user->rights->commande->lire, '', $mainmenu, 'orders');
|
|
| 1126 | + $newmenu->add(BASE_URI."?controller=fourn/commande&method=list&leftmenu=orders&search_status=5&billed=0", Globals::$langs->trans("MenuOrdersSupplierToBill"), 0, Globals::$user->rights->commande->lire, '', $mainmenu, 'orders');
|
|
| 1127 | 1127 | // if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", Globals::$langs->trans("StatusOrderToBill"), 1, Globals::$user->rights->commande->lire);
|
| 1128 | 1128 | } |
| 1129 | 1129 | } |
@@ -1133,12 +1133,12 @@ discard block |
||
| 1133 | 1133 | if (!empty(Globals::$conf->don->enabled)) {
|
| 1134 | 1134 | Globals::$langs->load("donations");
|
| 1135 | 1135 | //$newmenu->add("/don/index.php?leftmenu=donations&mainmenu=billing", Globals::$langs->trans("Donations"), 0, Globals::$user->rights->don->lire, '', $mainmenu, 'donations');
|
| 1136 | - $newmenu->add(BASE_URI . "?controller=don&method=index&leftmenu=donations&mainmenu=billing", Globals::$langs->trans("Donations"), 0, Globals::$user->rights->don->lire, '', $mainmenu, 'donations');
|
|
| 1136 | + $newmenu->add(BASE_URI."?controller=don&method=index&leftmenu=donations&mainmenu=billing", Globals::$langs->trans("Donations"), 0, Globals::$user->rights->don->lire, '', $mainmenu, 'donations');
|
|
| 1137 | 1137 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "donations") {
|
| 1138 | 1138 | //$newmenu->add("/don/card.php?leftmenu=donations&action=create", Globals::$langs->trans("NewDonation"), 1, Globals::$user->rights->don->creer);
|
| 1139 | 1139 | //$newmenu->add("/don/list.php?leftmenu=donations", Globals::$langs->trans("List"), 1, Globals::$user->rights->don->lire);
|
| 1140 | - $newmenu->add(BASE_URI . "?controller=don&method=card&leftmenu=donations&action=create", Globals::$langs->trans("NewDonation"), 1, Globals::$user->rights->don->creer);
|
|
| 1141 | - $newmenu->add(BASE_URI . "?controller=don&method=list&leftmenu=donations", Globals::$langs->trans("List"), 1, Globals::$user->rights->don->lire);
|
|
| 1140 | + $newmenu->add(BASE_URI."?controller=don&method=card&leftmenu=donations&action=create", Globals::$langs->trans("NewDonation"), 1, Globals::$user->rights->don->creer);
|
|
| 1141 | + $newmenu->add(BASE_URI."?controller=don&method=list&leftmenu=donations", Globals::$langs->trans("List"), 1, Globals::$user->rights->don->lire);
|
|
| 1142 | 1142 | } |
| 1143 | 1143 | // if ($leftmenu=="donations") $newmenu->add("/don/stats/index.php",Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->don->lire);
|
| 1144 | 1144 | } |
@@ -1149,24 +1149,24 @@ discard block |
||
| 1149 | 1149 | |
| 1150 | 1150 | $permtoshowmenu = ((!empty(Globals::$conf->tax->enabled) && Globals::$user->rights->tax->charges->lire) || (!empty(Globals::$conf->salaries->enabled) && !empty(Globals::$user->rights->salaries->read)) || (!empty(Globals::$conf->loan->enabled) && Globals::$user->rights->loan->read) || (!empty(Globals::$conf->banque->enabled) && Globals::$user->rights->banque->lire)); |
| 1151 | 1151 | //$newmenu->add("/compta/charges/index.php?leftmenu=tax&mainmenu=billing", Globals::$langs->trans("MenuSpecialExpenses"), 0, $permtoshowmenu, '', $mainmenu, 'tax');
|
| 1152 | - $newmenu->add(BASE_URI . "?controller=compta/charges&method=index&leftmenu=tax&mainmenu=billing", Globals::$langs->trans("MenuSpecialExpenses"), 0, $permtoshowmenu, '', $mainmenu, 'tax');
|
|
| 1152 | + $newmenu->add(BASE_URI."?controller=compta/charges&method=index&leftmenu=tax&mainmenu=billing", Globals::$langs->trans("MenuSpecialExpenses"), 0, $permtoshowmenu, '', $mainmenu, 'tax');
|
|
| 1153 | 1153 | |
| 1154 | 1154 | // Social contributions |
| 1155 | 1155 | if (!empty(Globals::$conf->tax->enabled)) {
|
| 1156 | 1156 | //$newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", Globals::$langs->trans("MenuSocialContributions"), 1, Globals::$user->rights->tax->charges->lire);
|
| 1157 | - $newmenu->add(BASE_URI . "?controller=compta/sociales&method=list&leftmenu=tax_social", Globals::$langs->trans("MenuSocialContributions"), 1, Globals::$user->rights->tax->charges->lire);
|
|
| 1157 | + $newmenu->add(BASE_URI."?controller=compta/sociales&method=list&leftmenu=tax_social", Globals::$langs->trans("MenuSocialContributions"), 1, Globals::$user->rights->tax->charges->lire);
|
|
| 1158 | 1158 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_social/i', $leftmenu)) {
|
| 1159 | 1159 | //$newmenu->add("/compta/sociales/card.php?leftmenu=tax_social&action=create", Globals::$langs->trans("MenuNewSocialContribution"), 2, Globals::$user->rights->tax->charges->creer);
|
| 1160 | 1160 | //$newmenu->add("/compta/sociales/list.php?leftmenu=tax_social", Globals::$langs->trans("List"), 2, Globals::$user->rights->tax->charges->lire);
|
| 1161 | 1161 | //$newmenu->add("/compta/sociales/payments.php?leftmenu=tax_social&mainmenu=billing&mode=sconly", Globals::$langs->trans("Payments"), 2, Globals::$user->rights->tax->charges->lire);
|
| 1162 | - $newmenu->add(BASE_URI . "?controller=compta/sociales&method=card&leftmenu=tax_social&action=create", Globals::$langs->trans("MenuNewSocialContribution"), 2, Globals::$user->rights->tax->charges->creer);
|
|
| 1163 | - $newmenu->add(BASE_URI . "?controller=compta/sociales&method=list&leftmenu=tax_social", Globals::$langs->trans("List"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1164 | - $newmenu->add(BASE_URI . "?controller=compta/sociales&method=payments&leftmenu=tax_social&mainmenu=billing&mode=sconly", Globals::$langs->trans("Payments"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1162 | + $newmenu->add(BASE_URI."?controller=compta/sociales&method=card&leftmenu=tax_social&action=create", Globals::$langs->trans("MenuNewSocialContribution"), 2, Globals::$user->rights->tax->charges->creer);
|
|
| 1163 | + $newmenu->add(BASE_URI."?controller=compta/sociales&method=list&leftmenu=tax_social", Globals::$langs->trans("List"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1164 | + $newmenu->add(BASE_URI."?controller=compta/sociales&method=payments&leftmenu=tax_social&mainmenu=billing&mode=sconly", Globals::$langs->trans("Payments"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1165 | 1165 | } |
| 1166 | 1166 | // VAT |
| 1167 | 1167 | if (empty(Globals::$conf->global->TAX_DISABLE_VAT_MENUS)) {
|
| 1168 | 1168 | //$newmenu->add("/compta/tva/list.php?leftmenu=tax_vat&mainmenu=billing", Globals::$langs->transcountry("VAT", $mysoc->country_code), 1, Globals::$user->rights->tax->charges->lire, '', $mainmenu, 'tax_vat');
|
| 1169 | - $newmenu->add(BASE_URI . "?controller=compta/tva&method=list&leftmenu=tax_vat&mainmenu=billing", Globals::$langs->transcountry("VAT", $mysoc->country_code), 1, Globals::$user->rights->tax->charges->lire, '', $mainmenu, 'tax_vat');
|
|
| 1169 | + $newmenu->add(BASE_URI."?controller=compta/tva&method=list&leftmenu=tax_vat&mainmenu=billing", Globals::$langs->transcountry("VAT", $mysoc->country_code), 1, Globals::$user->rights->tax->charges->lire, '', $mainmenu, 'tax_vat');
|
|
| 1170 | 1170 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_vat/i', $leftmenu)) {
|
| 1171 | 1171 | /* |
| 1172 | 1172 | $newmenu->add("/compta/tva/card.php?leftmenu=tax_vat&action=create", Globals::$langs->trans("New"), 2, Globals::$user->rights->tax->charges->creer);
|
@@ -1175,18 +1175,18 @@ discard block |
||
| 1175 | 1175 | $newmenu->add("/compta/tva/clients.php?leftmenu=tax_vat", Globals::$langs->trans("ReportByCustomers"), 2, Globals::$user->rights->tax->charges->lire);
|
| 1176 | 1176 | $newmenu->add("/compta/tva/quadri_detail.php?leftmenu=tax_vat", Globals::$langs->trans("ReportByQuarter"), 2, Globals::$user->rights->tax->charges->lire);
|
| 1177 | 1177 | */ |
| 1178 | - $newmenu->add(BASE_URI . "?controller=compta/tva&method=card&leftmenu=tax_vat&action=create", Globals::$langs->trans("New"), 2, Globals::$user->rights->tax->charges->creer);
|
|
| 1179 | - $newmenu->add(BASE_URI . "?controller=compta/tva&method=list&leftmenu=tax_vat", Globals::$langs->trans("List"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1180 | - $newmenu->add(BASE_URI . "?controller=compta/tva&method=index&leftmenu=tax_vat", Globals::$langs->trans("ReportByMonth"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1181 | - $newmenu->add(BASE_URI . "?controller=compta/tva&method=clients&leftmenu=tax_vat", Globals::$langs->trans("ReportByCustomers"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1182 | - $newmenu->add(BASE_URI . "?controller=compta/tva&method=quadri_detail&leftmenu=tax_vat", Globals::$langs->trans("ReportByQuarter"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1178 | + $newmenu->add(BASE_URI."?controller=compta/tva&method=card&leftmenu=tax_vat&action=create", Globals::$langs->trans("New"), 2, Globals::$user->rights->tax->charges->creer);
|
|
| 1179 | + $newmenu->add(BASE_URI."?controller=compta/tva&method=list&leftmenu=tax_vat", Globals::$langs->trans("List"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1180 | + $newmenu->add(BASE_URI."?controller=compta/tva&method=index&leftmenu=tax_vat", Globals::$langs->trans("ReportByMonth"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1181 | + $newmenu->add(BASE_URI."?controller=compta/tva&method=clients&leftmenu=tax_vat", Globals::$langs->trans("ReportByCustomers"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1182 | + $newmenu->add(BASE_URI."?controller=compta/tva&method=quadri_detail&leftmenu=tax_vat", Globals::$langs->trans("ReportByQuarter"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1183 | 1183 | } |
| 1184 | 1184 | global $mysoc; |
| 1185 | 1185 | |
| 1186 | 1186 | //Local Taxes 1 |
| 1187 | 1187 | if ($mysoc->useLocalTax(1) && (isset($mysoc->localtax1_assuj) && $mysoc->localtax1_assuj == "1")) {
|
| 1188 | 1188 | //$newmenu->add("/compta/localtax/list.php?leftmenu=tax_1_vat&mainmenu=billing&localTaxType=1", Globals::$langs->transcountry("LT1", $mysoc->country_code), 1, Globals::$user->rights->tax->charges->lire);
|
| 1189 | - $newmenu->add(BASE_URI . "?controller=compta/localtax&method=list&leftmenu=tax_1_vat&mainmenu=billing&localTaxType=1", Globals::$langs->transcountry("LT1", $mysoc->country_code), 1, Globals::$user->rights->tax->charges->lire);
|
|
| 1189 | + $newmenu->add(BASE_URI."?controller=compta/localtax&method=list&leftmenu=tax_1_vat&mainmenu=billing&localTaxType=1", Globals::$langs->transcountry("LT1", $mysoc->country_code), 1, Globals::$user->rights->tax->charges->lire);
|
|
| 1190 | 1190 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_1_vat/i', $leftmenu)) {
|
| 1191 | 1191 | /* |
| 1192 | 1192 | $newmenu->add("/compta/localtax/card.php?leftmenu=tax_1_vat&action=create&localTaxType=1", Globals::$langs->trans("New"), 2, Globals::$user->rights->tax->charges->creer);
|
@@ -1195,17 +1195,17 @@ discard block |
||
| 1195 | 1195 | $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_1_vat&localTaxType=1", Globals::$langs->trans("ReportByCustomers"), 2, Globals::$user->rights->tax->charges->lire);
|
| 1196 | 1196 | $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_1_vat&localTaxType=1", Globals::$langs->trans("ReportByQuarter"), 2, Globals::$user->rights->tax->charges->lire);
|
| 1197 | 1197 | */ |
| 1198 | - $newmenu->add(BASE_URI . "?controller=compta/localtax&method=card&leftmenu=tax_1_vat&action=create&localTaxType=1", Globals::$langs->trans("New"), 2, Globals::$user->rights->tax->charges->creer);
|
|
| 1199 | - $newmenu->add(BASE_URI . "?controller=compta/localtax&method=list&leftmenu=tax_1_vat&localTaxType=1", Globals::$langs->trans("List"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1200 | - $newmenu->add(BASE_URI . "?controller=compta/localtax&method=index&leftmenu=tax_1_vat&localTaxType=1", Globals::$langs->trans("ReportByMonth"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1201 | - $newmenu->add(BASE_URI . "?controller=compta/localtax&method=clients&leftmenu=tax_1_vat&localTaxType=1", Globals::$langs->trans("ReportByCustomers"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1202 | - $newmenu->add(BASE_URI . "?controller=compta/localtax&method=quadri_detail&leftmenu=tax_1_vat&localTaxType=1", Globals::$langs->trans("ReportByQuarter"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1198 | + $newmenu->add(BASE_URI."?controller=compta/localtax&method=card&leftmenu=tax_1_vat&action=create&localTaxType=1", Globals::$langs->trans("New"), 2, Globals::$user->rights->tax->charges->creer);
|
|
| 1199 | + $newmenu->add(BASE_URI."?controller=compta/localtax&method=list&leftmenu=tax_1_vat&localTaxType=1", Globals::$langs->trans("List"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1200 | + $newmenu->add(BASE_URI."?controller=compta/localtax&method=index&leftmenu=tax_1_vat&localTaxType=1", Globals::$langs->trans("ReportByMonth"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1201 | + $newmenu->add(BASE_URI."?controller=compta/localtax&method=clients&leftmenu=tax_1_vat&localTaxType=1", Globals::$langs->trans("ReportByCustomers"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1202 | + $newmenu->add(BASE_URI."?controller=compta/localtax&method=quadri_detail&leftmenu=tax_1_vat&localTaxType=1", Globals::$langs->trans("ReportByQuarter"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1203 | 1203 | } |
| 1204 | 1204 | } |
| 1205 | 1205 | //Local Taxes 2 |
| 1206 | 1206 | if ($mysoc->useLocalTax(2) && (isset($mysoc->localtax2_assuj) && $mysoc->localtax2_assuj == "1")) {
|
| 1207 | 1207 | //$newmenu->add("/compta/localtax/list.php?leftmenu=tax_2_vat&mainmenu=billing&localTaxType=2", Globals::$langs->transcountry("LT2", $mysoc->country_code), 1, Globals::$user->rights->tax->charges->lire);
|
| 1208 | - $newmenu->add(BASE_URI . "?controller=compta/localtax&method=list&leftmenu=tax_2_vat&mainmenu=billing&localTaxType=2", Globals::$langs->transcountry("LT2", $mysoc->country_code), 1, Globals::$user->rights->tax->charges->lire);
|
|
| 1208 | + $newmenu->add(BASE_URI."?controller=compta/localtax&method=list&leftmenu=tax_2_vat&mainmenu=billing&localTaxType=2", Globals::$langs->transcountry("LT2", $mysoc->country_code), 1, Globals::$user->rights->tax->charges->lire);
|
|
| 1209 | 1209 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_2_vat/i', $leftmenu)) {
|
| 1210 | 1210 | /* |
| 1211 | 1211 | $newmenu->add("/compta/localtax/card.php?leftmenu=tax_2_vat&action=create&localTaxType=2", Globals::$langs->trans("New"), 2, Globals::$user->rights->tax->charges->creer);
|
@@ -1214,11 +1214,11 @@ discard block |
||
| 1214 | 1214 | $newmenu->add("/compta/localtax/clients.php?leftmenu=tax_2_vat&localTaxType=2", Globals::$langs->trans("ReportByCustomers"), 2, Globals::$user->rights->tax->charges->lire);
|
| 1215 | 1215 | $newmenu->add("/compta/localtax/quadri_detail.php?leftmenu=tax_2_vat&localTaxType=2", Globals::$langs->trans("ReportByQuarter"), 2, Globals::$user->rights->tax->charges->lire);
|
| 1216 | 1216 | */ |
| 1217 | - $newmenu->add(BASE_URI . "?controller=compta/localtax&method=card&leftmenu=tax_2_vat&action=create&localTaxType=2", Globals::$langs->trans("New"), 2, Globals::$user->rights->tax->charges->creer);
|
|
| 1218 | - $newmenu->add(BASE_URI . "?controller=compta/localtax&method=list&leftmenu=tax_2_vat&localTaxType=2", Globals::$langs->trans("List"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1219 | - $newmenu->add(BASE_URI . "?controller=compta/localtax&method=index&leftmenu=tax_2_vat&localTaxType=2", Globals::$langs->trans("ReportByMonth"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1220 | - $newmenu->add(BASE_URI . "?controller=compta/localtax&method=clients&leftmenu=tax_2_vat&localTaxType=2", Globals::$langs->trans("ReportByCustomers"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1221 | - $newmenu->add(BASE_URI . "?controller=compta/localtax&method=quadri_detail&leftmenu=tax_2_vat&localTaxType=2", Globals::$langs->trans("ReportByQuarter"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1217 | + $newmenu->add(BASE_URI."?controller=compta/localtax&method=card&leftmenu=tax_2_vat&action=create&localTaxType=2", Globals::$langs->trans("New"), 2, Globals::$user->rights->tax->charges->creer);
|
|
| 1218 | + $newmenu->add(BASE_URI."?controller=compta/localtax&method=list&leftmenu=tax_2_vat&localTaxType=2", Globals::$langs->trans("List"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1219 | + $newmenu->add(BASE_URI."?controller=compta/localtax&method=index&leftmenu=tax_2_vat&localTaxType=2", Globals::$langs->trans("ReportByMonth"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1220 | + $newmenu->add(BASE_URI."?controller=compta/localtax&method=clients&leftmenu=tax_2_vat&localTaxType=2", Globals::$langs->trans("ReportByCustomers"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1221 | + $newmenu->add(BASE_URI."?controller=compta/localtax&method=quadri_detail&leftmenu=tax_2_vat&localTaxType=2", Globals::$langs->trans("ReportByQuarter"), 2, Globals::$user->rights->tax->charges->lire);
|
|
| 1222 | 1222 | } |
| 1223 | 1223 | } |
| 1224 | 1224 | } |
@@ -1228,14 +1228,14 @@ discard block |
||
| 1228 | 1228 | if (!empty(Globals::$conf->salaries->enabled)) {
|
| 1229 | 1229 | Globals::$langs->load("salaries");
|
| 1230 | 1230 | //$newmenu->add("/compta/salaries/list.php?leftmenu=tax_salary&mainmenu=billing", Globals::$langs->trans("Salaries"), 1, Globals::$user->rights->salaries->read, '', $mainmenu, 'tax_salary');
|
| 1231 | - $newmenu->add(BASE_URI . "?controller=compta/salaries&method=list&leftmenu=tax_salary&mainmenu=billing", Globals::$langs->trans("Salaries"), 1, Globals::$user->rights->salaries->read, '', $mainmenu, 'tax_salary');
|
|
| 1231 | + $newmenu->add(BASE_URI."?controller=compta/salaries&method=list&leftmenu=tax_salary&mainmenu=billing", Globals::$langs->trans("Salaries"), 1, Globals::$user->rights->salaries->read, '', $mainmenu, 'tax_salary');
|
|
| 1232 | 1232 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_salary/i', $leftmenu)) {
|
| 1233 | 1233 | //$newmenu->add("/compta/salaries/card.php?leftmenu=tax_salary&action=create", Globals::$langs->trans("NewPayment"), 2, Globals::$user->rights->salaries->write);
|
| 1234 | 1234 | //$newmenu->add("/compta/salaries/list.php?leftmenu=tax_salary", Globals::$langs->trans("Payments"), 2, Globals::$user->rights->salaries->read);
|
| 1235 | 1235 | //$newmenu->add("/compta/salaries/stats/index.php?leftmenu=tax_salary", Globals::$langs->trans("Statistics"), 2, Globals::$user->rights->salaries->read);
|
| 1236 | - $newmenu->add(BASE_URI . "?controller=compta/salaries&method=card&leftmenu=tax_salary&action=create", Globals::$langs->trans("NewPayment"), 2, Globals::$user->rights->salaries->write);
|
|
| 1237 | - $newmenu->add(BASE_URI . "?controller=compta/salaries&method=list&leftmenu=tax_salary", Globals::$langs->trans("Payments"), 2, Globals::$user->rights->salaries->read);
|
|
| 1238 | - $newmenu->add(BASE_URI . "?controller=compta/salaries/stats&method=index&leftmenu=tax_salary", Globals::$langs->trans("Statistics"), 2, Globals::$user->rights->salaries->read);
|
|
| 1236 | + $newmenu->add(BASE_URI."?controller=compta/salaries&method=card&leftmenu=tax_salary&action=create", Globals::$langs->trans("NewPayment"), 2, Globals::$user->rights->salaries->write);
|
|
| 1237 | + $newmenu->add(BASE_URI."?controller=compta/salaries&method=list&leftmenu=tax_salary", Globals::$langs->trans("Payments"), 2, Globals::$user->rights->salaries->read);
|
|
| 1238 | + $newmenu->add(BASE_URI."?controller=compta/salaries/stats&method=index&leftmenu=tax_salary", Globals::$langs->trans("Statistics"), 2, Globals::$user->rights->salaries->read);
|
|
| 1239 | 1239 | } |
| 1240 | 1240 | } |
| 1241 | 1241 | |
@@ -1243,10 +1243,10 @@ discard block |
||
| 1243 | 1243 | if (!empty(Globals::$conf->loan->enabled)) {
|
| 1244 | 1244 | Globals::$langs->load("loan");
|
| 1245 | 1245 | //$newmenu->add("/loan/list.php?leftmenu=tax_loan&mainmenu=billing", Globals::$langs->trans("Loans"), 1, Globals::$user->rights->loan->read, '', $mainmenu, 'tax_loan');
|
| 1246 | - $newmenu->add(BASE_URI . "?controller=loan&method=list&leftmenu=tax_loan&mainmenu=billing", Globals::$langs->trans("Loans"), 1, Globals::$user->rights->loan->read, '', $mainmenu, 'tax_loan');
|
|
| 1246 | + $newmenu->add(BASE_URI."?controller=loan&method=list&leftmenu=tax_loan&mainmenu=billing", Globals::$langs->trans("Loans"), 1, Globals::$user->rights->loan->read, '', $mainmenu, 'tax_loan');
|
|
| 1247 | 1247 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_loan/i', $leftmenu)) {
|
| 1248 | 1248 | //$newmenu->add("/loan/card.php?leftmenu=tax_loan&action=create", Globals::$langs->trans("NewLoan"), 2, Globals::$user->rights->loan->write);
|
| 1249 | - $newmenu->add(BASE_URI . "?controller=loan&method=card&leftmenu=tax_loan&action=create", Globals::$langs->trans("NewLoan"), 2, Globals::$user->rights->loan->write);
|
|
| 1249 | + $newmenu->add(BASE_URI."?controller=loan&method=card&leftmenu=tax_loan&action=create", Globals::$langs->trans("NewLoan"), 2, Globals::$user->rights->loan->write);
|
|
| 1250 | 1250 | //$newmenu->add("/loan/payment/list.php?leftmenu=tax_loan",Globals::$langs->trans("Payments"),2,Globals::$user->rights->loan->read);
|
| 1251 | 1251 | } |
| 1252 | 1252 | } |
@@ -1255,12 +1255,12 @@ discard block |
||
| 1255 | 1255 | if (!empty(Globals::$conf->banque->enabled) && empty(Globals::$conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) {
|
| 1256 | 1256 | Globals::$langs->load("banks");
|
| 1257 | 1257 | //$newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various&mainmenu=billing", Globals::$langs->trans("MenuVariousPayment"), 1, Globals::$user->rights->banque->lire, '', $mainmenu, 'tax_various');
|
| 1258 | - $newmenu->add(BASE_URI . "?controller=compta/bank/various_payment&method=list&leftmenu=tax_various&mainmenu=billing", Globals::$langs->trans("MenuVariousPayment"), 1, Globals::$user->rights->banque->lire, '', $mainmenu, 'tax_various');
|
|
| 1258 | + $newmenu->add(BASE_URI."?controller=compta/bank/various_payment&method=list&leftmenu=tax_various&mainmenu=billing", Globals::$langs->trans("MenuVariousPayment"), 1, Globals::$user->rights->banque->lire, '', $mainmenu, 'tax_various');
|
|
| 1259 | 1259 | if ($usemenuhider || empty($leftmenu) || preg_match('/^tax_various/i', $leftmenu)) {
|
| 1260 | 1260 | //$newmenu->add("/compta/bank/various_payment/card.php?leftmenu=tax_various&action=create", Globals::$langs->trans("New"), 2, Globals::$user->rights->banque->modifier);
|
| 1261 | 1261 | //$newmenu->add("/compta/bank/various_payment/list.php?leftmenu=tax_various", Globals::$langs->trans("List"), 2, Globals::$user->rights->banque->lire);
|
| 1262 | - $newmenu->add(BASE_URI . "?controller=compta/bank/various_payment&method=card&leftmenu=tax_various&action=create", Globals::$langs->trans("New"), 2, Globals::$user->rights->banque->modifier);
|
|
| 1263 | - $newmenu->add(BASE_URI . "?controller=compta/bank/various_payment&method=list&leftmenu=tax_various", Globals::$langs->trans("List"), 2, Globals::$user->rights->banque->lire);
|
|
| 1262 | + $newmenu->add(BASE_URI."?controller=compta/bank/various_payment&method=card&leftmenu=tax_various&action=create", Globals::$langs->trans("New"), 2, Globals::$user->rights->banque->modifier);
|
|
| 1263 | + $newmenu->add(BASE_URI."?controller=compta/bank/various_payment&method=list&leftmenu=tax_various", Globals::$langs->trans("List"), 2, Globals::$user->rights->banque->lire);
|
|
| 1264 | 1264 | } |
| 1265 | 1265 | } |
| 1266 | 1266 | } |
@@ -1278,11 +1278,11 @@ discard block |
||
| 1278 | 1278 | |
| 1279 | 1279 | $permtoshowmenu = (!empty(Globals::$conf->accounting->enabled) || Globals::$user->rights->accounting->bind->write || Globals::$user->rights->compta->resultat->lire); |
| 1280 | 1280 | //$newmenu->add("/accountancy/index.php?leftmenu=accountancy", Globals::$langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy');
|
| 1281 | - $newmenu->add(BASE_URI . "?controller=accountancy&method=index&leftmenu=accountancy", Globals::$langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy');
|
|
| 1281 | + $newmenu->add(BASE_URI."?controller=accountancy&method=index&leftmenu=accountancy", Globals::$langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy');
|
|
| 1282 | 1282 | |
| 1283 | 1283 | // Chart of account |
| 1284 | 1284 | //$newmenu->add("/accountancy/index.php?leftmenu=accountancy_admin", Globals::$langs->trans("Setup"), 1, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin', 1);
|
| 1285 | - $newmenu->add(BASE_URI . "?controller=accountancy&method=index&leftmenu=accountancy_admin", Globals::$langs->trans("Setup"), 1, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin', 1);
|
|
| 1285 | + $newmenu->add(BASE_URI."?controller=accountancy&method=index&leftmenu=accountancy_admin", Globals::$langs->trans("Setup"), 1, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin', 1);
|
|
| 1286 | 1286 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_admin/', $leftmenu)) {
|
| 1287 | 1287 | /* |
| 1288 | 1288 | $newmenu->add("/accountancy/admin/index.php?mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("General"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_general', 10);
|
@@ -1292,71 +1292,71 @@ discard block |
||
| 1292 | 1292 | $newmenu->add("/accountancy/admin/categories_list.php?id=32&search_country_id=" . $mysoc->country_id . "&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("AccountingCategory"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 41);
|
| 1293 | 1293 | $newmenu->add("/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuDefaultAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 50);
|
| 1294 | 1294 | */ |
| 1295 | - $newmenu->add(BASE_URI . "?controller=accountancy/admin&method=index&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("General"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_general', 10);
|
|
| 1296 | - $newmenu->add(BASE_URI . "?controller=accountancy/admin&method=journals_list&id=35&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("AccountingJournals"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_journal', 20);
|
|
| 1297 | - $newmenu->add(BASE_URI . "?controller=accountancy/admin&method=accountmodel&id=31&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("Pcg_version"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chartmodel', 30);
|
|
| 1298 | - $newmenu->add(BASE_URI . "?controller=accountancy/admin&method=account&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("Chartofaccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 40);
|
|
| 1299 | - $newmenu->add(BASE_URI . "?controller=accountancy/admin&method=categories_list&id=32&search_country_id=" . $mysoc->country_id . "&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("AccountingCategory"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 41);
|
|
| 1300 | - $newmenu->add(BASE_URI . "?controller=accountancy/admin&method=defaultaccounts&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuDefaultAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 50);
|
|
| 1295 | + $newmenu->add(BASE_URI."?controller=accountancy/admin&method=index&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("General"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_general', 10);
|
|
| 1296 | + $newmenu->add(BASE_URI."?controller=accountancy/admin&method=journals_list&id=35&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("AccountingJournals"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_journal', 20);
|
|
| 1297 | + $newmenu->add(BASE_URI."?controller=accountancy/admin&method=accountmodel&id=31&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("Pcg_version"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chartmodel', 30);
|
|
| 1298 | + $newmenu->add(BASE_URI."?controller=accountancy/admin&method=account&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("Chartofaccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 40);
|
|
| 1299 | + $newmenu->add(BASE_URI."?controller=accountancy/admin&method=categories_list&id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("AccountingCategory"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_chart', 41);
|
|
| 1300 | + $newmenu->add(BASE_URI."?controller=accountancy/admin&method=defaultaccounts&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuDefaultAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 50);
|
|
| 1301 | 1301 | if (!empty(Globals::$conf->banque->enabled)) {
|
| 1302 | 1302 | //$newmenu->add("/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", Globals::$langs->trans("MenuBankAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_bank', 51);
|
| 1303 | - $newmenu->add(BASE_URI . "?controller=compta/bank&method=list&mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", Globals::$langs->trans("MenuBankAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_bank', 51);
|
|
| 1303 | + $newmenu->add(BASE_URI."?controller=compta/bank&method=list&mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", Globals::$langs->trans("MenuBankAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_bank', 51);
|
|
| 1304 | 1304 | } |
| 1305 | 1305 | if (!empty(Globals::$conf->facture->enabled) || !empty(Globals::$conf->fournisseur->enabled)) {
|
| 1306 | 1306 | //$newmenu->add("/admin/dict.php?id=10&from=accountancy&search_country_id=" . $mysoc->country_id . "&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuVatAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 52);
|
| 1307 | - $newmenu->add(BASE_URI . "?controller=admin&method=dict&id=10&from=accountancy&search_country_id=" . $mysoc->country_id . "&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuVatAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 52);
|
|
| 1307 | + $newmenu->add(BASE_URI."?controller=admin&method=dict&id=10&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuVatAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 52);
|
|
| 1308 | 1308 | } |
| 1309 | 1309 | if (!empty(Globals::$conf->tax->enabled)) {
|
| 1310 | 1310 | //$newmenu->add("/admin/dict.php?id=7&from=accountancy&search_country_id=" . $mysoc->country_id . "&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuTaxAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 53);
|
| 1311 | - $newmenu->add(BASE_URI . "?controller=admin&method=dict&id=7&from=accountancy&search_country_id=" . $mysoc->country_id . "&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuTaxAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 53);
|
|
| 1311 | + $newmenu->add(BASE_URI."?controller=admin&method=dict&id=7&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuTaxAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 53);
|
|
| 1312 | 1312 | } |
| 1313 | 1313 | if (!empty(Globals::$conf->expensereport->enabled)) {
|
| 1314 | 1314 | //$newmenu->add("/admin/dict.php?id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuExpenseReportAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 54);
|
| 1315 | - $newmenu->add(BASE_URI . "?controller=admin&method=dict&id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuExpenseReportAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 54);
|
|
| 1315 | + $newmenu->add(BASE_URI."?controller=admin&method=dict&id=17&from=accountancy&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuExpenseReportAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 54);
|
|
| 1316 | 1316 | } |
| 1317 | 1317 | //$newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuProductsAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_product', 55);
|
| 1318 | 1318 | //$newmenu->add("/accountancy/admin/export.php?mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("ExportOptions"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_export', 60);
|
| 1319 | - $newmenu->add(BASE_URI . "?controller=accountancy/admin&method=productaccount&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuProductsAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_product', 55);
|
|
| 1320 | - $newmenu->add(BASE_URI . "?controller=accountancy/admin&method=export&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("ExportOptions"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_export', 60);
|
|
| 1319 | + $newmenu->add(BASE_URI."?controller=accountancy/admin&method=productaccount&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("MenuProductsAccounts"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_product', 55);
|
|
| 1320 | + $newmenu->add(BASE_URI."?controller=accountancy/admin&method=export&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("ExportOptions"), 2, Globals::$user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_export', 60);
|
|
| 1321 | 1321 | |
| 1322 | 1322 | // Fiscal year |
| 1323 | 1323 | if (Globals::$conf->global->MAIN_FEATURES_LEVEL > 1) {
|
| 1324 | 1324 | // Not yet used. In a future will lock some periods. |
| 1325 | 1325 | //$newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("FiscalPeriod"), 2, Globals::$user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear');
|
| 1326 | - $newmenu->add(BASE_URI . "?controller=accountancy/admin&method=fiscalyear&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("FiscalPeriod"), 2, Globals::$user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear');
|
|
| 1326 | + $newmenu->add(BASE_URI."?controller=accountancy/admin&method=fiscalyear&mainmenu=accountancy&leftmenu=accountancy_admin", Globals::$langs->trans("FiscalPeriod"), 2, Globals::$user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear');
|
|
| 1327 | 1327 | } |
| 1328 | 1328 | } |
| 1329 | 1329 | |
| 1330 | 1330 | // Binding |
| 1331 | 1331 | if (!empty(Globals::$conf->facture->enabled)) {
|
| 1332 | 1332 | //$newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", Globals::$langs->trans("CustomersVentilation"), 1, Globals::$user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_customer');
|
| 1333 | - $newmenu->add(BASE_URI . "?controller=accountancy/customer&method=index&leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", Globals::$langs->trans("CustomersVentilation"), 1, Globals::$user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_customer');
|
|
| 1333 | + $newmenu->add(BASE_URI."?controller=accountancy/customer&method=index&leftmenu=accountancy_dispatch_customer&mainmenu=accountancy", Globals::$langs->trans("CustomersVentilation"), 1, Globals::$user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_customer');
|
|
| 1334 | 1334 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_customer/', $leftmenu)) {
|
| 1335 | 1335 | //$newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", Globals::$langs->trans("ToBind"), 2, Globals::$user->rights->accounting->bind->write);
|
| 1336 | 1336 | //$newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", Globals::$langs->trans("Binded"), 2, Globals::$user->rights->accounting->bind->write);
|
| 1337 | - $newmenu->add(BASE_URI . "?controller=accountancy/customer&method=list&mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", Globals::$langs->trans("ToBind"), 2, Globals::$user->rights->accounting->bind->write);
|
|
| 1338 | - $newmenu->add(BASE_URI . "?controller=accountancy/customer&method=lines&mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", Globals::$langs->trans("Binded"), 2, Globals::$user->rights->accounting->bind->write);
|
|
| 1337 | + $newmenu->add(BASE_URI."?controller=accountancy/customer&method=list&mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", Globals::$langs->trans("ToBind"), 2, Globals::$user->rights->accounting->bind->write);
|
|
| 1338 | + $newmenu->add(BASE_URI."?controller=accountancy/customer&method=lines&mainmenu=accountancy&leftmenu=accountancy_dispatch_customer", Globals::$langs->trans("Binded"), 2, Globals::$user->rights->accounting->bind->write);
|
|
| 1339 | 1339 | } |
| 1340 | 1340 | } |
| 1341 | 1341 | if (!empty(Globals::$conf->supplier_invoice->enabled)) {
|
| 1342 | 1342 | //$newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", Globals::$langs->trans("SuppliersVentilation"), 1, Globals::$user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_supplier');
|
| 1343 | - $newmenu->add(BASE_URI . "?controller=accountancy/supplier&method=index&leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", Globals::$langs->trans("SuppliersVentilation"), 1, Globals::$user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_supplier');
|
|
| 1343 | + $newmenu->add(BASE_URI."?controller=accountancy/supplier&method=index&leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy", Globals::$langs->trans("SuppliersVentilation"), 1, Globals::$user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_supplier');
|
|
| 1344 | 1344 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_supplier/', $leftmenu)) {
|
| 1345 | 1345 | //$newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", Globals::$langs->trans("ToBind"), 2, Globals::$user->rights->accounting->bind->write);
|
| 1346 | 1346 | //$newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", Globals::$langs->trans("Binded"), 2, Globals::$user->rights->accounting->bind->write);
|
| 1347 | - $newmenu->add(BASE_URI . "?controller=accountancy/supplier&method=list&mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", Globals::$langs->trans("ToBind"), 2, Globals::$user->rights->accounting->bind->write);
|
|
| 1348 | - $newmenu->add(BASE_URI . "?controller=accountancy/supplier&method=lines&mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", Globals::$langs->trans("Binded"), 2, Globals::$user->rights->accounting->bind->write);
|
|
| 1347 | + $newmenu->add(BASE_URI."?controller=accountancy/supplier&method=list&mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", Globals::$langs->trans("ToBind"), 2, Globals::$user->rights->accounting->bind->write);
|
|
| 1348 | + $newmenu->add(BASE_URI."?controller=accountancy/supplier&method=lines&mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier", Globals::$langs->trans("Binded"), 2, Globals::$user->rights->accounting->bind->write);
|
|
| 1349 | 1349 | } |
| 1350 | 1350 | } |
| 1351 | 1351 | |
| 1352 | 1352 | if (!empty(Globals::$conf->expensereport->enabled)) {
|
| 1353 | 1353 | //$newmenu->add("/accountancy/expensereport/index.php?leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", Globals::$langs->trans("ExpenseReportsVentilation"), 1, Globals::$user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_expensereport');
|
| 1354 | - $newmenu->add(BASE_URI . "?controller=accountancy/expensereport&method=index&leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", Globals::$langs->trans("ExpenseReportsVentilation"), 1, Globals::$user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_expensereport');
|
|
| 1354 | + $newmenu->add(BASE_URI."?controller=accountancy/expensereport&method=index&leftmenu=accountancy_dispatch_expensereport&mainmenu=accountancy", Globals::$langs->trans("ExpenseReportsVentilation"), 1, Globals::$user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_expensereport');
|
|
| 1355 | 1355 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_dispatch_expensereport/', $leftmenu)) {
|
| 1356 | 1356 | //$newmenu->add("/accountancy/expensereport/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", Globals::$langs->trans("ToBind"), 2, Globals::$user->rights->accounting->bind->write);
|
| 1357 | 1357 | //$newmenu->add("/accountancy/expensereport/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", Globals::$langs->trans("Binded"), 2, Globals::$user->rights->accounting->bind->write);
|
| 1358 | - $newmenu->add(BASE_URI . "?controller=accountancy/expensereport&method=list&mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", Globals::$langs->trans("ToBind"), 2, Globals::$user->rights->accounting->bind->write);
|
|
| 1359 | - $newmenu->add(BASE_URI . "?controller=accountancy/expensereport&method=lines&mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", Globals::$langs->trans("Binded"), 2, Globals::$user->rights->accounting->bind->write);
|
|
| 1358 | + $newmenu->add(BASE_URI."?controller=accountancy/expensereport&method=list&mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", Globals::$langs->trans("ToBind"), 2, Globals::$user->rights->accounting->bind->write);
|
|
| 1359 | + $newmenu->add(BASE_URI."?controller=accountancy/expensereport&method=lines&mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport", Globals::$langs->trans("Binded"), 2, Globals::$user->rights->accounting->bind->write);
|
|
| 1360 | 1360 | } |
| 1361 | 1361 | } |
| 1362 | 1362 | |
@@ -1366,8 +1366,8 @@ discard block |
||
| 1366 | 1366 | |
| 1367 | 1367 | // Multi journal |
| 1368 | 1368 | $sql = "SELECT rowid, code, label, nature"; |
| 1369 | - $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_journal"; |
|
| 1370 | - $sql .= " WHERE entity = " . Globals::$conf->entity; |
|
| 1369 | + $sql .= " FROM ".MAIN_DB_PREFIX."accounting_journal"; |
|
| 1370 | + $sql .= " WHERE entity = ".Globals::$conf->entity; |
|
| 1371 | 1371 | $sql .= " AND active = 1"; |
| 1372 | 1372 | $sql .= " ORDER BY label DESC"; |
| 1373 | 1373 | |
@@ -1408,7 +1408,7 @@ discard block |
||
| 1408 | 1408 | Globals::$langs->load('accountancy');
|
| 1409 | 1409 | $journallabel = Globals::$langs->transnoentities($objp->label); // Labels in this table are set by loading llx_accounting_abc.sql. Label can be 'ACCOUNTING_SELL_JOURNAL', 'InventoryJournal', ... |
| 1410 | 1410 | //$newmenu->add('/accountancy/journal/' . $nature . 'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=' . $objp->rowid, $journallabel, 2, Globals::$user->rights->accounting->comptarapport->lire);
|
| 1411 | - $newmenu->add(BASE_URI . '?controller=accountancy/journal&method=' . $nature . 'journal&mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=' . $objp->rowid, $journallabel, 2, Globals::$user->rights->accounting->comptarapport->lire); |
|
| 1411 | + $newmenu->add(BASE_URI.'?controller=accountancy/journal&method='.$nature.'journal&mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $journallabel, 2, Globals::$user->rights->accounting->comptarapport->lire); |
|
| 1412 | 1412 | } |
| 1413 | 1413 | $i++; |
| 1414 | 1414 | } |
@@ -1423,31 +1423,31 @@ discard block |
||
| 1423 | 1423 | |
| 1424 | 1424 | // General Ledger |
| 1425 | 1425 | //$newmenu->add("/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_generalledger", Globals::$langs->trans("Bookkeeping"), 1, Globals::$user->rights->accounting->mouvements->lire);
|
| 1426 | - $newmenu->add(BASE_URI . "?controller=accountancy/bookkeeping&method=list&mainmenu=accountancy&leftmenu=accountancy_generalledger", Globals::$langs->trans("Bookkeeping"), 1, Globals::$user->rights->accounting->mouvements->lire);
|
|
| 1426 | + $newmenu->add(BASE_URI."?controller=accountancy/bookkeeping&method=list&mainmenu=accountancy&leftmenu=accountancy_generalledger", Globals::$langs->trans("Bookkeeping"), 1, Globals::$user->rights->accounting->mouvements->lire);
|
|
| 1427 | 1427 | |
| 1428 | 1428 | // Balance |
| 1429 | 1429 | //$newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_balance", Globals::$langs->trans("AccountBalance"), 1, Globals::$user->rights->accounting->mouvements->lire);
|
| 1430 | - $newmenu->add(BASE_URI . "?controller=accountancy/bookkeeping&method=balance&mainmenu=accountancy&leftmenu=accountancy_balance", Globals::$langs->trans("AccountBalance"), 1, Globals::$user->rights->accounting->mouvements->lire);
|
|
| 1430 | + $newmenu->add(BASE_URI."?controller=accountancy/bookkeeping&method=balance&mainmenu=accountancy&leftmenu=accountancy_balance", Globals::$langs->trans("AccountBalance"), 1, Globals::$user->rights->accounting->mouvements->lire);
|
|
| 1431 | 1431 | |
| 1432 | 1432 | // Files |
| 1433 | 1433 | if (!empty(Globals::$conf->global->MAIN_FEATURES_LEVEL) && Globals::$conf->global->MAIN_FEATURES_LEVEL > 2) {
|
| 1434 | 1434 | //$newmenu->add("/compta/compta-files.php?mainmenu=accountancy&leftmenu=accountancy_files", Globals::$langs->trans("AccountantFiles"), 1, Globals::$user->rights->accounting->mouvements->lire);
|
| 1435 | - $newmenu->add(BASE_URI . "?controller=compta&method=compta-files&mainmenu=accountancy&leftmenu=accountancy_files", Globals::$langs->trans("AccountantFiles"), 1, Globals::$user->rights->accounting->mouvements->lire);
|
|
| 1435 | + $newmenu->add(BASE_URI."?controller=compta&method=compta-files&mainmenu=accountancy&leftmenu=accountancy_files", Globals::$langs->trans("AccountantFiles"), 1, Globals::$user->rights->accounting->mouvements->lire);
|
|
| 1436 | 1436 | } |
| 1437 | 1437 | |
| 1438 | 1438 | // Reports |
| 1439 | 1439 | Globals::$langs->load("compta");
|
| 1440 | 1440 | |
| 1441 | 1441 | //$newmenu->add("/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report", Globals::$langs->trans("Reportings"), 1, Globals::$user->rights->accounting->comptarapport->lire, '', $mainmenu, 'ca');
|
| 1442 | - $newmenu->add(BASE_URI . "?controller=compta/resultat&method=index&mainmenu=accountancy&leftmenu=accountancy_report", Globals::$langs->trans("Reportings"), 1, Globals::$user->rights->accounting->comptarapport->lire, '', $mainmenu, 'ca');
|
|
| 1442 | + $newmenu->add(BASE_URI."?controller=compta/resultat&method=index&mainmenu=accountancy&leftmenu=accountancy_report", Globals::$langs->trans("Reportings"), 1, Globals::$user->rights->accounting->comptarapport->lire, '', $mainmenu, 'ca');
|
|
| 1443 | 1443 | |
| 1444 | 1444 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) {
|
| 1445 | 1445 | //$newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report", Globals::$langs->trans("MenuReportInOut"), 2, Globals::$user->rights->accounting->comptarapport->lire);
|
| 1446 | 1446 | //$newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report", Globals::$langs->trans("ByPredefinedAccountGroups"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
| 1447 | 1447 | //$newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report", Globals::$langs->trans("ByPersonalizedAccountGroups"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
| 1448 | - $newmenu->add(BASE_URI . "?controller=compta/resultat&method=index&leftmenu=accountancy_report", Globals::$langs->trans("MenuReportInOut"), 2, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1449 | - $newmenu->add(BASE_URI . "?controller=compta/resultat&method=clientfourn&leftmenu=accountancy_report", Globals::$langs->trans("ByPredefinedAccountGroups"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1450 | - $newmenu->add(BASE_URI . "?controller=compta/resultat&method=result&leftmenu=accountancy_report", Globals::$langs->trans("ByPersonalizedAccountGroups"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1448 | + $newmenu->add(BASE_URI."?controller=compta/resultat&method=index&leftmenu=accountancy_report", Globals::$langs->trans("MenuReportInOut"), 2, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1449 | + $newmenu->add(BASE_URI."?controller=compta/resultat&method=clientfourn&leftmenu=accountancy_report", Globals::$langs->trans("ByPredefinedAccountGroups"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1450 | + $newmenu->add(BASE_URI."?controller=compta/resultat&method=result&leftmenu=accountancy_report", Globals::$langs->trans("ByPersonalizedAccountGroups"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1451 | 1451 | } |
| 1452 | 1452 | |
| 1453 | 1453 | $modecompta = 'CREANCES-DETTES'; |
@@ -1462,11 +1462,11 @@ discard block |
||
| 1462 | 1462 | $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta = " . $modecompta, Globals::$langs->trans("ByProductsAndServices"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
| 1463 | 1463 | $newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta = " . $modecompta, Globals::$langs->trans("ByVatRate"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
| 1464 | 1464 | */ |
| 1465 | - $newmenu->add(BASE_URI . "?controller=compta/stats&method=index&leftmenu=accountancy_report&modecompta = " . $modecompta, Globals::$langs->trans("ReportTurnover"), 2, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1466 | - $newmenu->add(BASE_URI . "?controller=compta/stats&method=casoc&leftmenu=accountancy_report&modecompta = " . $modecompta, Globals::$langs->trans("ByCompanies"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1467 | - $newmenu->add(BASE_URI . "?controller=compta/stats&method=cabyuser&leftmenu=accountancy_report&modecompta = " . $modecompta, Globals::$langs->trans("ByUsers"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1468 | - $newmenu->add(BASE_URI . "?controller=compta/stats&method=cabyprodserv&leftmenu=accountancy_report&modecompta = " . $modecompta, Globals::$langs->trans("ByProductsAndServices"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1469 | - $newmenu->add(BASE_URI . "?controller=compta/stats&method=byratecountry&leftmenu=accountancy_report&modecompta = " . $modecompta, Globals::$langs->trans("ByVatRate"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1465 | + $newmenu->add(BASE_URI."?controller=compta/stats&method=index&leftmenu=accountancy_report&modecompta = ".$modecompta, Globals::$langs->trans("ReportTurnover"), 2, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1466 | + $newmenu->add(BASE_URI."?controller=compta/stats&method=casoc&leftmenu=accountancy_report&modecompta = ".$modecompta, Globals::$langs->trans("ByCompanies"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1467 | + $newmenu->add(BASE_URI."?controller=compta/stats&method=cabyuser&leftmenu=accountancy_report&modecompta = ".$modecompta, Globals::$langs->trans("ByUsers"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1468 | + $newmenu->add(BASE_URI."?controller=compta/stats&method=cabyprodserv&leftmenu=accountancy_report&modecompta = ".$modecompta, Globals::$langs->trans("ByProductsAndServices"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1469 | + $newmenu->add(BASE_URI."?controller=compta/stats&method=byratecountry&leftmenu=accountancy_report&modecompta = ".$modecompta, Globals::$langs->trans("ByVatRate"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1470 | 1470 | } |
| 1471 | 1471 | } |
| 1472 | 1472 | |
@@ -1477,9 +1477,9 @@ discard block |
||
| 1477 | 1477 | //$newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report&modecompta = " . $modecompta, Globals::$langs->trans("ReportTurnoverCollected"), 2, Globals::$user->rights->accounting->comptarapport->lire);
|
| 1478 | 1478 | //$newmenu->add("/compta/stats/casoc.php?leftmenu=accountancy_report&modecompta = " . $modecompta, Globals::$langs->trans("ByCompanies"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
| 1479 | 1479 | //$newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report&modecompta = " . $modecompta, Globals::$langs->trans("ByUsers"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
| 1480 | - $newmenu->add(BASE_URI . "?controller=compta/stats&method=index&leftmenu=accountancy_report&modecompta = " . $modecompta, Globals::$langs->trans("ReportTurnoverCollected"), 2, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1481 | - $newmenu->add(BASE_URI . "?controller=compta/stats&method=casoc&leftmenu=accountancy_report&modecompta = " . $modecompta, Globals::$langs->trans("ByCompanies"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1482 | - $newmenu->add(BASE_URI . "?controller=compta/stats&method=cabyuser&leftmenu=accountancy_report&modecompta = " . $modecompta, Globals::$langs->trans("ByUsers"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1480 | + $newmenu->add(BASE_URI."?controller=compta/stats&method=index&leftmenu=accountancy_report&modecompta = ".$modecompta, Globals::$langs->trans("ReportTurnoverCollected"), 2, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1481 | + $newmenu->add(BASE_URI."?controller=compta/stats&method=casoc&leftmenu=accountancy_report&modecompta = ".$modecompta, Globals::$langs->trans("ByCompanies"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1482 | + $newmenu->add(BASE_URI."?controller=compta/stats&method=cabyuser&leftmenu=accountancy_report&modecompta = ".$modecompta, Globals::$langs->trans("ByUsers"), 3, Globals::$user->rights->accounting->comptarapport->lire);
|
|
| 1483 | 1483 | //$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report&modecompta = ".$modecompta, Globals::$langs->trans("ByProductsAndServices"),3,Globals::$user->rights->accounting->comptarapport->lire);
|
| 1484 | 1484 | //$newmenu->add("/compta/stats/byratecountry.php?leftmenu=accountancy_report&modecompta = ".$modecompta, Globals::$langs->trans("ByVatRate"),3,Globals::$user->rights->accounting->comptarapport->lire);
|
| 1485 | 1485 | } |
@@ -1492,19 +1492,19 @@ discard block |
||
| 1492 | 1492 | |
| 1493 | 1493 | // Bilan, resultats |
| 1494 | 1494 | //$newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy", Globals::$langs->trans("Reportings"), 0, Globals::$user->rights->compta->resultat->lire, '', $mainmenu, 'ca');
|
| 1495 | - $newmenu->add(BASE_URI . "?controller=compta/resultat&method=index&leftmenu=report&mainmenu=accountancy", Globals::$langs->trans("Reportings"), 0, Globals::$user->rights->compta->resultat->lire, '', $mainmenu, 'ca');
|
|
| 1495 | + $newmenu->add(BASE_URI."?controller=compta/resultat&method=index&leftmenu=report&mainmenu=accountancy", Globals::$langs->trans("Reportings"), 0, Globals::$user->rights->compta->resultat->lire, '', $mainmenu, 'ca');
|
|
| 1496 | 1496 | |
| 1497 | 1497 | if ($usemenuhider || empty($leftmenu) || preg_match('/report/', $leftmenu)) {
|
| 1498 | 1498 | //$newmenu->add("/compta/resultat/index.php?leftmenu=report", Globals::$langs->trans("MenuReportInOut"), 1, Globals::$user->rights->compta->resultat->lire);
|
| 1499 | 1499 | //$newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report", Globals::$langs->trans("ByCompanies"), 2, Globals::$user->rights->compta->resultat->lire);
|
| 1500 | - $newmenu->add(BASE_URI . "?controller=compta/resultat&method=index&leftmenu=report", Globals::$langs->trans("MenuReportInOut"), 1, Globals::$user->rights->compta->resultat->lire);
|
|
| 1501 | - $newmenu->add(BASE_URI . "?controller=compta/resultat&method=clientfourn&leftmenu=report", Globals::$langs->trans("ByCompanies"), 2, Globals::$user->rights->compta->resultat->lire);
|
|
| 1500 | + $newmenu->add(BASE_URI."?controller=compta/resultat&method=index&leftmenu=report", Globals::$langs->trans("MenuReportInOut"), 1, Globals::$user->rights->compta->resultat->lire);
|
|
| 1501 | + $newmenu->add(BASE_URI."?controller=compta/resultat&method=clientfourn&leftmenu=report", Globals::$langs->trans("ByCompanies"), 2, Globals::$user->rights->compta->resultat->lire);
|
|
| 1502 | 1502 | /* On verra ca avec module compabilite expert |
| 1503 | 1503 | $newmenu->add("/compta/resultat/compteres.php?leftmenu=report","Compte de resultat",2,Globals::$user->rights->compta->resultat->lire);
|
| 1504 | 1504 | $newmenu->add("/compta/resultat/bilan.php?leftmenu=report","Bilan",2,Globals::$user->rights->compta->resultat->lire);
|
| 1505 | 1505 | */ |
| 1506 | 1506 | //$newmenu->add("/compta/stats/index.php?leftmenu=report", Globals::$langs->trans("ReportTurnover"), 1, Globals::$user->rights->compta->resultat->lire);
|
| 1507 | - $newmenu->add(BASE_URI . "?controller=compta/stats&method=index&leftmenu=report", Globals::$langs->trans("ReportTurnover"), 1, Globals::$user->rights->compta->resultat->lire);
|
|
| 1507 | + $newmenu->add(BASE_URI."?controller=compta/stats&method=index&leftmenu=report", Globals::$langs->trans("ReportTurnover"), 1, Globals::$user->rights->compta->resultat->lire);
|
|
| 1508 | 1508 | |
| 1509 | 1509 | /* |
| 1510 | 1510 | $newmenu->add("/compta/stats/cumul.php?leftmenu=report","Cumule",2,Globals::$user->rights->compta->resultat->lire);
|
@@ -1517,16 +1517,16 @@ discard block |
||
| 1517 | 1517 | //$newmenu->add("/compta/stats/cabyuser.php?leftmenu=report", Globals::$langs->trans("ByUsers"), 2, Globals::$user->rights->compta->resultat->lire);
|
| 1518 | 1518 | //$newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report", Globals::$langs->trans("ByProductsAndServices"), 2, Globals::$user->rights->compta->resultat->lire);
|
| 1519 | 1519 | //$newmenu->add("/compta/stats/byratecountry.php?leftmenu=report", Globals::$langs->trans("ByVatRate"), 2, Globals::$user->rights->compta->resultat->lire);
|
| 1520 | - $newmenu->add(BASE_URI . "?controller=compta/stats&method=casoc&leftmenu=report", Globals::$langs->trans("ByCompanies"), 2, Globals::$user->rights->compta->resultat->lire);
|
|
| 1521 | - $newmenu->add(BASE_URI . "?controller=compta/stats&method=cabyuser&leftmenu=report", Globals::$langs->trans("ByUsers"), 2, Globals::$user->rights->compta->resultat->lire);
|
|
| 1522 | - $newmenu->add(BASE_URI . "?controller=compta/stats&method=cabyprodserv&leftmenu=report", Globals::$langs->trans("ByProductsAndServices"), 2, Globals::$user->rights->compta->resultat->lire);
|
|
| 1523 | - $newmenu->add(BASE_URI . "?controller=compta/stats&method=byratecountry&leftmenu=report", Globals::$langs->trans("ByVatRate"), 2, Globals::$user->rights->compta->resultat->lire);
|
|
| 1520 | + $newmenu->add(BASE_URI."?controller=compta/stats&method=casoc&leftmenu=report", Globals::$langs->trans("ByCompanies"), 2, Globals::$user->rights->compta->resultat->lire);
|
|
| 1521 | + $newmenu->add(BASE_URI."?controller=compta/stats&method=cabyuser&leftmenu=report", Globals::$langs->trans("ByUsers"), 2, Globals::$user->rights->compta->resultat->lire);
|
|
| 1522 | + $newmenu->add(BASE_URI."?controller=compta/stats&method=cabyprodserv&leftmenu=report", Globals::$langs->trans("ByProductsAndServices"), 2, Globals::$user->rights->compta->resultat->lire);
|
|
| 1523 | + $newmenu->add(BASE_URI."?controller=compta/stats&method=byratecountry&leftmenu=report", Globals::$langs->trans("ByVatRate"), 2, Globals::$user->rights->compta->resultat->lire);
|
|
| 1524 | 1524 | |
| 1525 | 1525 | // Journaux |
| 1526 | 1526 | //$newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", Globals::$langs->trans("SellsJournal"), 1, Globals::$user->rights->compta->resultat->lire, '', '', '', 50);
|
| 1527 | 1527 | //$newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", Globals::$langs->trans("PurchasesJournal"), 1, Globals::$user->rights->compta->resultat->lire, '', '', '', 51);
|
| 1528 | - $newmenu->add(BASE_URI . "?controller=compta/journal&method=sellsjournal&leftmenu=report", Globals::$langs->trans("SellsJournal"), 1, Globals::$user->rights->compta->resultat->lire, '', '', '', 50);
|
|
| 1529 | - $newmenu->add(BASE_URI . "?controller=compta/journal&method=purchasesjournal&leftmenu=report", Globals::$langs->trans("PurchasesJournal"), 1, Globals::$user->rights->compta->resultat->lire, '', '', '', 51);
|
|
| 1528 | + $newmenu->add(BASE_URI."?controller=compta/journal&method=sellsjournal&leftmenu=report", Globals::$langs->trans("SellsJournal"), 1, Globals::$user->rights->compta->resultat->lire, '', '', '', 50);
|
|
| 1529 | + $newmenu->add(BASE_URI."?controller=compta/journal&method=purchasesjournal&leftmenu=report", Globals::$langs->trans("PurchasesJournal"), 1, Globals::$user->rights->compta->resultat->lire, '', '', '', 51);
|
|
| 1530 | 1530 | } |
| 1531 | 1531 | //if ($leftmenu=="ca") $newmenu->add("/compta/journaux/index.php?leftmenu=ca",Globals::$langs->trans("Journaux"),1,Globals::$user->rights->compta->resultat->lire||Globals::$user->rights->accounting->comptarapport->lire);
|
| 1532 | 1532 | } |
@@ -1538,15 +1538,15 @@ discard block |
||
| 1538 | 1538 | //$newmenu->add("/asset/card.php?action=create", Globals::$langs->trans("MenuNewAsset"), 1, Globals::$user->rights->asset->write);
|
| 1539 | 1539 | //$newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", Globals::$langs->trans("MenuListAssets"), 1, Globals::$user->rights->asset->read);
|
| 1540 | 1540 | //$newmenu->add("/asset/type.php?leftmenu=asset_type", Globals::$langs->trans("MenuTypeAssets"), 1, Globals::$user->rights->asset->read, '', $mainmenu, 'asset_type');
|
| 1541 | - $newmenu->add(BASE_URI . "?controller=asset&method=list&leftmenu=asset&mainmenu=accountancy", Globals::$langs->trans("MenuAssets"), 0, Globals::$user->rights->asset->read, '', $mainmenu, 'asset');
|
|
| 1542 | - $newmenu->add(BASE_URI . "?controller=asset&method=card&action=create", Globals::$langs->trans("MenuNewAsset"), 1, Globals::$user->rights->asset->write);
|
|
| 1543 | - $newmenu->add(BASE_URI . "?controller=asset&method=list&leftmenu=asset&mainmenu=accountancy", Globals::$langs->trans("MenuListAssets"), 1, Globals::$user->rights->asset->read);
|
|
| 1544 | - $newmenu->add(BASE_URI . "?controller=asset&method=type&leftmenu=asset_type", Globals::$langs->trans("MenuTypeAssets"), 1, Globals::$user->rights->asset->read, '', $mainmenu, 'asset_type');
|
|
| 1541 | + $newmenu->add(BASE_URI."?controller=asset&method=list&leftmenu=asset&mainmenu=accountancy", Globals::$langs->trans("MenuAssets"), 0, Globals::$user->rights->asset->read, '', $mainmenu, 'asset');
|
|
| 1542 | + $newmenu->add(BASE_URI."?controller=asset&method=card&action=create", Globals::$langs->trans("MenuNewAsset"), 1, Globals::$user->rights->asset->write);
|
|
| 1543 | + $newmenu->add(BASE_URI."?controller=asset&method=list&leftmenu=asset&mainmenu=accountancy", Globals::$langs->trans("MenuListAssets"), 1, Globals::$user->rights->asset->read);
|
|
| 1544 | + $newmenu->add(BASE_URI."?controller=asset&method=type&leftmenu=asset_type", Globals::$langs->trans("MenuTypeAssets"), 1, Globals::$user->rights->asset->read, '', $mainmenu, 'asset_type');
|
|
| 1545 | 1545 | if ($usemenuhider || empty($leftmenu) || preg_match('/asset_type/', $leftmenu)) {
|
| 1546 | 1546 | //$newmenu->add("/asset/type.php?leftmenu=asset_type&action=create", Globals::$langs->trans("MenuNewTypeAssets"), 2, Globals::$user->rights->asset->write);
|
| 1547 | 1547 | //$newmenu->add("/asset/type.php?leftmenu=asset_type", Globals::$langs->trans("MenuListTypeAssets"), 2, Globals::$user->rights->asset->read);
|
| 1548 | - $newmenu->add(BASE_URI . "?controller=asset&method=type&leftmenu=asset_type&action=create", Globals::$langs->trans("MenuNewTypeAssets"), 2, Globals::$user->rights->asset->write);
|
|
| 1549 | - $newmenu->add(BASE_URI . "?controller=asset&mtehod=type&leftmenu=asset_type", Globals::$langs->trans("MenuListTypeAssets"), 2, Globals::$user->rights->asset->read);
|
|
| 1548 | + $newmenu->add(BASE_URI."?controller=asset&method=type&leftmenu=asset_type&action=create", Globals::$langs->trans("MenuNewTypeAssets"), 2, Globals::$user->rights->asset->write);
|
|
| 1549 | + $newmenu->add(BASE_URI."?controller=asset&mtehod=type&leftmenu=asset_type", Globals::$langs->trans("MenuListTypeAssets"), 2, Globals::$user->rights->asset->read);
|
|
| 1550 | 1550 | } |
| 1551 | 1551 | } |
| 1552 | 1552 | } |
@@ -1571,28 +1571,28 @@ discard block |
||
| 1571 | 1571 | |
| 1572 | 1572 | $newmenu->add("/compta/bank/transfer.php", Globals::$langs->trans("MenuBankInternalTransfer"), 1, Globals::$user->rights->banque->transfer);
|
| 1573 | 1573 | */ |
| 1574 | - $newmenu->add(BASE_URI . "?controller=compta/bank&method=list&leftmenu=bank&mainmenu=bank", Globals::$langs->trans("MenuBankCash"), 0, Globals::$user->rights->banque->lire, '', $mainmenu, 'bank');
|
|
| 1574 | + $newmenu->add(BASE_URI."?controller=compta/bank&method=list&leftmenu=bank&mainmenu=bank", Globals::$langs->trans("MenuBankCash"), 0, Globals::$user->rights->banque->lire, '', $mainmenu, 'bank');
|
|
| 1575 | 1575 | |
| 1576 | - $newmenu->add(BASE_URI . "?controller=compta/bank&method=card&action=create", Globals::$langs->trans("MenuNewFinancialAccount"), 1, Globals::$user->rights->banque->configurer);
|
|
| 1577 | - $newmenu->add(BASE_URI . "?controller=compta/bank&method=list&leftmenu=bank&mainmenu=bank", Globals::$langs->trans("List"), 1, Globals::$user->rights->banque->lire, '', $mainmenu, 'bank');
|
|
| 1578 | - $newmenu->add(BASE_URI . "?controller=compta/bank&method=bankentries_list", Globals::$langs->trans("ListTransactions"), 1, Globals::$user->rights->banque->lire);
|
|
| 1579 | - $newmenu->add(BASE_URI . "?controller=compta/bank&method=budget", Globals::$langs->trans("ListTransactionsByCategory"), 1, Globals::$user->rights->banque->lire);
|
|
| 1576 | + $newmenu->add(BASE_URI."?controller=compta/bank&method=card&action=create", Globals::$langs->trans("MenuNewFinancialAccount"), 1, Globals::$user->rights->banque->configurer);
|
|
| 1577 | + $newmenu->add(BASE_URI."?controller=compta/bank&method=list&leftmenu=bank&mainmenu=bank", Globals::$langs->trans("List"), 1, Globals::$user->rights->banque->lire, '', $mainmenu, 'bank');
|
|
| 1578 | + $newmenu->add(BASE_URI."?controller=compta/bank&method=bankentries_list", Globals::$langs->trans("ListTransactions"), 1, Globals::$user->rights->banque->lire);
|
|
| 1579 | + $newmenu->add(BASE_URI."?controller=compta/bank&method=budget", Globals::$langs->trans("ListTransactionsByCategory"), 1, Globals::$user->rights->banque->lire);
|
|
| 1580 | 1580 | |
| 1581 | - $newmenu->add(BASE_URI . "?controller=compta/bank&method=transfer", Globals::$langs->trans("MenuBankInternalTransfer"), 1, Globals::$user->rights->banque->transfer);
|
|
| 1581 | + $newmenu->add(BASE_URI."?controller=compta/bank&method=transfer", Globals::$langs->trans("MenuBankInternalTransfer"), 1, Globals::$user->rights->banque->transfer);
|
|
| 1582 | 1582 | } |
| 1583 | 1583 | |
| 1584 | 1584 | if (!empty(Globals::$conf->categorie->enabled)) {
|
| 1585 | 1585 | Globals::$langs->load("categories");
|
| 1586 | 1586 | //$newmenu->add("/categories/index.php?type = 5", Globals::$langs->trans("Rubriques"), 1, Globals::$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
| 1587 | 1587 | //$newmenu->add("/compta/bank/categ.php", Globals::$langs->trans("RubriquesTransactions"), 1, Globals::$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
| 1588 | - $newmenu->add(BASE_URI . "?controller=categories&method=index&type=5", Globals::$langs->trans("Rubriques"), 1, Globals::$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
|
| 1589 | - $newmenu->add(BASE_URI . "?controller=compta/bank&method=categ", Globals::$langs->trans("RubriquesTransactions"), 1, Globals::$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
|
| 1588 | + $newmenu->add(BASE_URI."?controller=categories&method=index&type=5", Globals::$langs->trans("Rubriques"), 1, Globals::$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
|
| 1589 | + $newmenu->add(BASE_URI."?controller=compta/bank&method=categ", Globals::$langs->trans("RubriquesTransactions"), 1, Globals::$user->rights->categorie->creer, '', $mainmenu, 'tags');
|
|
| 1590 | 1590 | } |
| 1591 | 1591 | |
| 1592 | 1592 | // Prelevements |
| 1593 | 1593 | if (!empty(Globals::$conf->prelevement->enabled)) {
|
| 1594 | 1594 | //$newmenu->add("/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank", Globals::$langs->trans("StandingOrders"), 0, Globals::$user->rights->prelevement->bons->lire, '', $mainmenu, 'withdraw');
|
| 1595 | - $newmenu->add(BASE_URI . "?controller=compta/prelevement&method=index&leftmenu=withdraw&mainmenu=bank", Globals::$langs->trans("StandingOrders"), 0, Globals::$user->rights->prelevement->bons->lire, '', $mainmenu, 'withdraw');
|
|
| 1595 | + $newmenu->add(BASE_URI."?controller=compta/prelevement&method=index&leftmenu=withdraw&mainmenu=bank", Globals::$langs->trans("StandingOrders"), 0, Globals::$user->rights->prelevement->bons->lire, '', $mainmenu, 'withdraw');
|
|
| 1596 | 1596 | |
| 1597 | 1597 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "withdraw") {
|
| 1598 | 1598 | //$newmenu->add("/compta/prelevement/demandes.php?status = 0&mainmenu=bank",Globals::$langs->trans("StandingOrderToProcess"),1,Globals::$user->rights->prelevement->bons->lire);
|
@@ -1605,26 +1605,26 @@ discard block |
||
| 1605 | 1605 | $newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank", Globals::$langs->trans("Rejects"), 1, Globals::$user->rights->prelevement->bons->lire);
|
| 1606 | 1606 | $newmenu->add("/compta/prelevement/stats.php?mainmenu=bank", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->prelevement->bons->lire);
|
| 1607 | 1607 | */ |
| 1608 | - $newmenu->add(BASE_URI . "?controller=compta/prelevement&method=create&mainmenu=bank", Globals::$langs->trans("NewStandingOrder"), 1, Globals::$user->rights->prelevement->bons->creer);
|
|
| 1608 | + $newmenu->add(BASE_URI."?controller=compta/prelevement&method=create&mainmenu=bank", Globals::$langs->trans("NewStandingOrder"), 1, Globals::$user->rights->prelevement->bons->creer);
|
|
| 1609 | 1609 | |
| 1610 | - $newmenu->add(BASE_URI . "?controller=compta/prelevement&method=bons&mainmenu=bank", Globals::$langs->trans("WithdrawalsReceipts"), 1, Globals::$user->rights->prelevement->bons->lire);
|
|
| 1611 | - $newmenu->add(BASE_URI . "?controller=compta/prelevement&method=list&mainmenu=bank", Globals::$langs->trans("WithdrawalsLines"), 1, Globals::$user->rights->prelevement->bons->lire);
|
|
| 1612 | - $newmenu->add(BASE_URI . "?controller=compta/prelevement&method=rejets&mainmenu=bank", Globals::$langs->trans("Rejects"), 1, Globals::$user->rights->prelevement->bons->lire);
|
|
| 1613 | - $newmenu->add(BASE_URI . "?controller=compta/prelevement&method=stats&mainmenu=bank", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->prelevement->bons->lire);
|
|
| 1610 | + $newmenu->add(BASE_URI."?controller=compta/prelevement&method=bons&mainmenu=bank", Globals::$langs->trans("WithdrawalsReceipts"), 1, Globals::$user->rights->prelevement->bons->lire);
|
|
| 1611 | + $newmenu->add(BASE_URI."?controller=compta/prelevement&method=list&mainmenu=bank", Globals::$langs->trans("WithdrawalsLines"), 1, Globals::$user->rights->prelevement->bons->lire);
|
|
| 1612 | + $newmenu->add(BASE_URI."?controller=compta/prelevement&method=rejets&mainmenu=bank", Globals::$langs->trans("Rejects"), 1, Globals::$user->rights->prelevement->bons->lire);
|
|
| 1613 | + $newmenu->add(BASE_URI."?controller=compta/prelevement&method=stats&mainmenu=bank", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->prelevement->bons->lire);
|
|
| 1614 | 1614 | |
| 1615 | 1615 | //$newmenu->add("/compta/prelevement/config.php",Globals::$langs->trans("Setup"),1,Globals::$user->rights->prelevement->bons->configurer);
|
| 1616 | 1616 | } |
| 1617 | 1617 | } |
| 1618 | 1618 | |
| 1619 | 1619 | // Gestion cheques |
| 1620 | - if (empty(Globals::$conf->global->BANK_DISABLE_CHECK_DEPOSIT) &&!empty(Globals::$conf->banque->enabled) && (!empty(Globals::$conf->facture->enabled) ||!empty(Globals::$conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))) {
|
|
| 1620 | + if (empty(Globals::$conf->global->BANK_DISABLE_CHECK_DEPOSIT) && !empty(Globals::$conf->banque->enabled) && (!empty(Globals::$conf->facture->enabled) || !empty(Globals::$conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))) {
|
|
| 1621 | 1621 | //$newmenu->add("/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank", Globals::$langs->trans("MenuChequeDeposits"), 0, Globals::$user->rights->banque->cheque, '', $mainmenu, 'checks');
|
| 1622 | - $newmenu->add(BASE_URI . "?controller=compta/paiement/cheque&method=index&leftmenu=checks&mainmenu=bank", Globals::$langs->trans("MenuChequeDeposits"), 0, Globals::$user->rights->banque->cheque, '', $mainmenu, 'checks');
|
|
| 1622 | + $newmenu->add(BASE_URI."?controller=compta/paiement/cheque&method=index&leftmenu=checks&mainmenu=bank", Globals::$langs->trans("MenuChequeDeposits"), 0, Globals::$user->rights->banque->cheque, '', $mainmenu, 'checks');
|
|
| 1623 | 1623 | if (preg_match('/checks/', $leftmenu)) {
|
| 1624 | 1624 | //$newmenu->add("/compta/paiement/cheque/card.php?leftmenu=checks_bis&action=new&mainmenu=bank", Globals::$langs->trans("NewChequeDeposit"), 1, Globals::$user->rights->banque->cheque);
|
| 1625 | 1625 | //$newmenu->add("/compta/paiement/cheque/list.php?leftmenu=checks_bis&mainmenu=bank", Globals::$langs->trans("List"), 1, Globals::$user->rights->banque->cheque);
|
| 1626 | - $newmenu->add(BASE_URI . "?controller=compta/paiement/cheque&method=card&leftmenu=checks_bis&action=new&mainmenu=bank", Globals::$langs->trans("NewChequeDeposit"), 1, Globals::$user->rights->banque->cheque);
|
|
| 1627 | - $newmenu->add(BASE_URI . "?controller=compta/paiement/cheque&method=list&leftmenu=checks_bis&mainmenu=bank", Globals::$langs->trans("List"), 1, Globals::$user->rights->banque->cheque);
|
|
| 1626 | + $newmenu->add(BASE_URI."?controller=compta/paiement/cheque&method=card&leftmenu=checks_bis&action=new&mainmenu=bank", Globals::$langs->trans("NewChequeDeposit"), 1, Globals::$user->rights->banque->cheque);
|
|
| 1627 | + $newmenu->add(BASE_URI."?controller=compta/paiement/cheque&method=list&leftmenu=checks_bis&mainmenu=bank", Globals::$langs->trans("List"), 1, Globals::$user->rights->banque->cheque);
|
|
| 1628 | 1628 | } |
| 1629 | 1629 | } |
| 1630 | 1630 | |
@@ -1634,9 +1634,9 @@ discard block |
||
| 1634 | 1634 | //$newmenu->add("/compta/cashcontrol/cashcontrol_list.php?action=list", Globals::$langs->trans("POS"), 0, $permtomakecashfence, '', $mainmenu, 'cashcontrol');
|
| 1635 | 1635 | //$newmenu->add("/compta/cashcontrol/cashcontrol_card.php?action=create", Globals::$langs->trans("NewCashFence"), 1, $permtomakecashfence);
|
| 1636 | 1636 | //$newmenu->add("/compta/cashcontrol/cashcontrol_list.php?action=list", Globals::$langs->trans("List"), 1, $permtomakecashfence);
|
| 1637 | - $newmenu->add(BASE_URI . "?controller=compta/cashcontrol&method=cashcontrol_list&action=list", Globals::$langs->trans("POS"), 0, $permtomakecashfence, '', $mainmenu, 'cashcontrol');
|
|
| 1638 | - $newmenu->add(BASE_URI . "?controller=compta/cashcontrol&method=cashcontrol_card&action=create", Globals::$langs->trans("NewCashFence"), 1, $permtomakecashfence);
|
|
| 1639 | - $newmenu->add(BASE_URI . "?controller=compta/cashcontrol&method=cashcontrol_list&action=list", Globals::$langs->trans("List"), 1, $permtomakecashfence);
|
|
| 1637 | + $newmenu->add(BASE_URI."?controller=compta/cashcontrol&method=cashcontrol_list&action=list", Globals::$langs->trans("POS"), 0, $permtomakecashfence, '', $mainmenu, 'cashcontrol');
|
|
| 1638 | + $newmenu->add(BASE_URI."?controller=compta/cashcontrol&method=cashcontrol_card&action=create", Globals::$langs->trans("NewCashFence"), 1, $permtomakecashfence);
|
|
| 1639 | + $newmenu->add(BASE_URI."?controller=compta/cashcontrol&method=cashcontrol_list&action=list", Globals::$langs->trans("List"), 1, $permtomakecashfence);
|
|
| 1640 | 1640 | } |
| 1641 | 1641 | } |
| 1642 | 1642 | |
@@ -1649,34 +1649,34 @@ discard block |
||
| 1649 | 1649 | //$newmenu->add("/product/index.php?leftmenu=product&type=0", Globals::$langs->trans("Products"), 0, Globals::$user->rights->produit->lire, '', $mainmenu, 'product');
|
| 1650 | 1650 | //$newmenu->add("/product/card.php?leftmenu=product&action=create&type=0", Globals::$langs->trans("NewProduct"), 1, Globals::$user->rights->produit->creer);
|
| 1651 | 1651 | //$newmenu->add("/product/list.php?leftmenu=product&type=0", Globals::$langs->trans("List"), 1, Globals::$user->rights->produit->lire);
|
| 1652 | - $newmenu->add(BASE_URI . "?controller=product&method=index&leftmenu=product&type=0", Globals::$langs->trans("Products"), 0, Globals::$user->rights->produit->lire, '', $mainmenu, 'product');
|
|
| 1653 | - $newmenu->add(BASE_URI . "?controller=product&method=card&leftmenu=product&action=create&type=0", Globals::$langs->trans("NewProduct"), 1, Globals::$user->rights->produit->creer);
|
|
| 1654 | - $newmenu->add(BASE_URI . "?controller=product&method=list&leftmenu=product&type=0", Globals::$langs->trans("List"), 1, Globals::$user->rights->produit->lire);
|
|
| 1652 | + $newmenu->add(BASE_URI."?controller=product&method=index&leftmenu=product&type=0", Globals::$langs->trans("Products"), 0, Globals::$user->rights->produit->lire, '', $mainmenu, 'product');
|
|
| 1653 | + $newmenu->add(BASE_URI."?controller=product&method=card&leftmenu=product&action=create&type=0", Globals::$langs->trans("NewProduct"), 1, Globals::$user->rights->produit->creer);
|
|
| 1654 | + $newmenu->add(BASE_URI."?controller=product&method=list&leftmenu=product&type=0", Globals::$langs->trans("List"), 1, Globals::$user->rights->produit->lire);
|
|
| 1655 | 1655 | if (!empty(Globals::$conf->stock->enabled)) {
|
| 1656 | 1656 | //$newmenu->add("/product/reassort.php?type = 0", Globals::$langs->trans("Stocks"), 1, Globals::$user->rights->produit->lire && Globals::$user->rights->stock->lire);
|
| 1657 | - $newmenu->add(BASE_URI . "?controller=product&method=reassort&type=0", Globals::$langs->trans("Stocks"), 1, Globals::$user->rights->produit->lire && Globals::$user->rights->stock->lire);
|
|
| 1657 | + $newmenu->add(BASE_URI."?controller=product&method=reassort&type=0", Globals::$langs->trans("Stocks"), 1, Globals::$user->rights->produit->lire && Globals::$user->rights->stock->lire);
|
|
| 1658 | 1658 | } |
| 1659 | 1659 | if (!empty(Globals::$conf->productbatch->enabled)) {
|
| 1660 | 1660 | Globals::$langs->load("stocks");
|
| 1661 | 1661 | //$newmenu->add("/product/reassortlot.php?type = 0", Globals::$langs->trans("StocksByLotSerial"), 1, Globals::$user->rights->produit->lire && Globals::$user->rights->stock->lire);
|
| 1662 | 1662 | //$newmenu->add("/product/stock/productlot_list.php", Globals::$langs->trans("LotSerial"), 1, Globals::$user->rights->produit->lire && Globals::$user->rights->stock->lire);
|
| 1663 | - $newmenu->add(BASE_URI . "?controller=product&method=reassortlot&type=0", Globals::$langs->trans("StocksByLotSerial"), 1, Globals::$user->rights->produit->lire && Globals::$user->rights->stock->lire);
|
|
| 1664 | - $newmenu->add(BASE_URI . "?controller=product/stock&method=productlot_list", Globals::$langs->trans("LotSerial"), 1, Globals::$user->rights->produit->lire && Globals::$user->rights->stock->lire);
|
|
| 1663 | + $newmenu->add(BASE_URI."?controller=product&method=reassortlot&type=0", Globals::$langs->trans("StocksByLotSerial"), 1, Globals::$user->rights->produit->lire && Globals::$user->rights->stock->lire);
|
|
| 1664 | + $newmenu->add(BASE_URI."?controller=product/stock&method=productlot_list", Globals::$langs->trans("LotSerial"), 1, Globals::$user->rights->produit->lire && Globals::$user->rights->stock->lire);
|
|
| 1665 | 1665 | } |
| 1666 | 1666 | if (!empty(Globals::$conf->variants->enabled)) {
|
| 1667 | 1667 | //$newmenu->add("/variants/list.php", Globals::$langs->trans("VariantAttributes"), 1, Globals::$user->rights->produit->lire);
|
| 1668 | - $newmenu->add(BASE_URI . "?controller=variants&method=list", Globals::$langs->trans("VariantAttributes"), 1, Globals::$user->rights->produit->lire);
|
|
| 1668 | + $newmenu->add(BASE_URI."?controller=variants&method=list", Globals::$langs->trans("VariantAttributes"), 1, Globals::$user->rights->produit->lire);
|
|
| 1669 | 1669 | } |
| 1670 | 1670 | if (!empty(Globals::$conf->propal->enabled) || !empty(Globals::$conf->commande->enabled) || !empty(Globals::$conf->facture->enabled) || !empty(Globals::$conf->fournisseur->enabled) || !empty(Globals::$conf->supplier_proposal->enabled)) {
|
| 1671 | 1671 | // $newmenu->add("/product/stats/card.php?id = all&leftmenu=stats&type=0", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->produit->lire && Globals::$user->rights->propale->lire);
|
| 1672 | - $newmenu->add(BASE_URI . "?controller=product/stats&method=card&id=all&leftmenu=stats&type=0", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->produit->lire && Globals::$user->rights->propale->lire);
|
|
| 1672 | + $newmenu->add(BASE_URI."?controller=product/stats&method=card&id=all&leftmenu=stats&type=0", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->produit->lire && Globals::$user->rights->propale->lire);
|
|
| 1673 | 1673 | } |
| 1674 | 1674 | |
| 1675 | 1675 | // Categories |
| 1676 | 1676 | if (!empty(Globals::$conf->categorie->enabled)) {
|
| 1677 | 1677 | Globals::$langs->load("categories");
|
| 1678 | 1678 | //$newmenu->add("/categories/index.php?leftmenu=cat&type=0", Globals::$langs->trans("Categories"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
| 1679 | - $newmenu->add(BASE_URI . "?controller=categories&method=index&leftmenu=cat&type=0", Globals::$langs->trans("Categories"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
|
| 1679 | + $newmenu->add(BASE_URI."?controller=categories&method=index&leftmenu=cat&type=0", Globals::$langs->trans("Categories"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
|
| 1680 | 1680 | //if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", Globals::$langs->trans("List"), 1, Globals::$user->rights->categorie->lire);
|
| 1681 | 1681 | } |
| 1682 | 1682 | } |
@@ -1686,18 +1686,18 @@ discard block |
||
| 1686 | 1686 | //$newmenu->add("/product/index.php?leftmenu=service&type=1", Globals::$langs->trans("Services"), 0, Globals::$user->rights->service->lire, '', $mainmenu, 'service');
|
| 1687 | 1687 | //$newmenu->add("/product/card.php?leftmenu=service&action=create&type=1", Globals::$langs->trans("NewService"), 1, Globals::$user->rights->service->creer);
|
| 1688 | 1688 | //$newmenu->add("/product/list.php?leftmenu=service&type=1", Globals::$langs->trans("List"), 1, Globals::$user->rights->service->lire);
|
| 1689 | - $newmenu->add(BASE_URI . "?controller=product&method=index&leftmenu=service&type=1", Globals::$langs->trans("Services"), 0, Globals::$user->rights->service->lire, '', $mainmenu, 'service');
|
|
| 1690 | - $newmenu->add(BASE_URI . "?controller=product&method=card&leftmenu=service&action=create&type=1", Globals::$langs->trans("NewService"), 1, Globals::$user->rights->service->creer);
|
|
| 1691 | - $newmenu->add(BASE_URI . "?controller=product&method=list&leftmenu=service&type=1", Globals::$langs->trans("List"), 1, Globals::$user->rights->service->lire);
|
|
| 1689 | + $newmenu->add(BASE_URI."?controller=product&method=index&leftmenu=service&type=1", Globals::$langs->trans("Services"), 0, Globals::$user->rights->service->lire, '', $mainmenu, 'service');
|
|
| 1690 | + $newmenu->add(BASE_URI."?controller=product&method=card&leftmenu=service&action=create&type=1", Globals::$langs->trans("NewService"), 1, Globals::$user->rights->service->creer);
|
|
| 1691 | + $newmenu->add(BASE_URI."?controller=product&method=list&leftmenu=service&type=1", Globals::$langs->trans("List"), 1, Globals::$user->rights->service->lire);
|
|
| 1692 | 1692 | if (!empty(Globals::$conf->propal->enabled) || !empty(Globals::$conf->commande->enabled) || !empty(Globals::$conf->facture->enabled) || !empty(Globals::$conf->fournisseur->enabled) || !empty(Globals::$conf->supplier_proposal->enabled)) {
|
| 1693 | 1693 | //$newmenu->add("/product/stats/card.php?id = all&leftmenu=stats&type=1", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->service->lire && Globals::$user->rights->propale->lire);
|
| 1694 | - $newmenu->add(BASE_URI . "?controller=product/stats&method=card&id=all&leftmenu=stats&type=1", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->service->lire && Globals::$user->rights->propale->lire);
|
|
| 1694 | + $newmenu->add(BASE_URI."?controller=product/stats&method=card&id=all&leftmenu=stats&type=1", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->service->lire && Globals::$user->rights->propale->lire);
|
|
| 1695 | 1695 | } |
| 1696 | 1696 | // Categories |
| 1697 | 1697 | if (!empty(Globals::$conf->categorie->enabled)) {
|
| 1698 | 1698 | Globals::$langs->load("categories");
|
| 1699 | 1699 | //$newmenu->add("/categories/index.php?leftmenu=cat&type=0", Globals::$langs->trans("Categories"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
| 1700 | - $newmenu->add(BASE_URI . "?controller=categories&method=index&leftmenu=cat&type=0", Globals::$langs->trans("Categories"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
|
| 1700 | + $newmenu->add(BASE_URI."?controller=categories&method=index&leftmenu=cat&type=0", Globals::$langs->trans("Categories"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
|
| 1701 | 1701 | //if ($usemenuhider || empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", Globals::$langs->trans("List"), 1, Globals::$user->rights->categorie->lire);
|
| 1702 | 1702 | } |
| 1703 | 1703 | } |
@@ -1713,15 +1713,15 @@ discard block |
||
| 1713 | 1713 | |
| 1714 | 1714 | $newmenu->add("/product/stock/massstockmove.php", Globals::$langs->trans("MassStockTransferShort"), 1, Globals::$user->rights->stock->mouvement->creer);
|
| 1715 | 1715 | */ |
| 1716 | - $newmenu->add(BASE_URI . "?controller=product/stock&method=index&leftmenu=stock", Globals::$langs->trans("Warehouses"), 0, Globals::$user->rights->stock->lire, '', $mainmenu, 'stock');
|
|
| 1717 | - $newmenu->add(BASE_URI . "?controller=product/stock&method=card&action=create", Globals::$langs->trans("MenuNewWarehouse"), 1, Globals::$user->rights->stock->creer);
|
|
| 1718 | - $newmenu->add(BASE_URI . "?controller=product/stock&method=list", Globals::$langs->trans("List"), 1, Globals::$user->rights->stock->lire);
|
|
| 1719 | - $newmenu->add(BASE_URI . "?controller=product/stock&method=movement_list", Globals::$langs->trans("Movements"), 1, Globals::$user->rights->stock->mouvement->lire);
|
|
| 1716 | + $newmenu->add(BASE_URI."?controller=product/stock&method=index&leftmenu=stock", Globals::$langs->trans("Warehouses"), 0, Globals::$user->rights->stock->lire, '', $mainmenu, 'stock');
|
|
| 1717 | + $newmenu->add(BASE_URI."?controller=product/stock&method=card&action=create", Globals::$langs->trans("MenuNewWarehouse"), 1, Globals::$user->rights->stock->creer);
|
|
| 1718 | + $newmenu->add(BASE_URI."?controller=product/stock&method=list", Globals::$langs->trans("List"), 1, Globals::$user->rights->stock->lire);
|
|
| 1719 | + $newmenu->add(BASE_URI."?controller=product/stock&method=movement_list", Globals::$langs->trans("Movements"), 1, Globals::$user->rights->stock->mouvement->lire);
|
|
| 1720 | 1720 | |
| 1721 | - $newmenu->add(BASE_URI . "?controller=product/stock&method=massstockmove", Globals::$langs->trans("MassStockTransferShort"), 1, Globals::$user->rights->stock->mouvement->creer);
|
|
| 1721 | + $newmenu->add(BASE_URI."?controller=product/stock&method=massstockmove", Globals::$langs->trans("MassStockTransferShort"), 1, Globals::$user->rights->stock->mouvement->creer);
|
|
| 1722 | 1722 | if (Globals::$conf->supplier_order->enabled) {
|
| 1723 | 1723 | //$newmenu->add("/product/stock/replenish.php", Globals::$langs->trans("Replenishment"), 1, Globals::$user->rights->stock->mouvement->creer && Globals::$user->rights->fournisseur->lire);
|
| 1724 | - $newmenu->add(BASE_URI . "?controller=product/stock&method=replenish", Globals::$langs->trans("Replenishment"), 1, Globals::$user->rights->stock->mouvement->creer && Globals::$user->rights->fournisseur->lire);
|
|
| 1724 | + $newmenu->add(BASE_URI."?controller=product/stock&method=replenish", Globals::$langs->trans("Replenishment"), 1, Globals::$user->rights->stock->mouvement->creer && Globals::$user->rights->fournisseur->lire);
|
|
| 1725 | 1725 | } |
| 1726 | 1726 | } |
| 1727 | 1727 | |
@@ -1733,16 +1733,16 @@ discard block |
||
| 1733 | 1733 | //$newmenu->add("/product/inventory/list.php?leftmenu=stock", Globals::$langs->trans("Inventory"), 0, Globals::$user->rights->stock->lire, '', $mainmenu, 'stock');
|
| 1734 | 1734 | //$newmenu->add("/product/inventory/card.php?action=create", Globals::$langs->trans("NewInventory"), 1, Globals::$user->rights->stock->creer);
|
| 1735 | 1735 | //$newmenu->add("/product/inventory/list.php", Globals::$langs->trans("List"), 1, Globals::$user->rights->stock->lire);
|
| 1736 | - $newmenu->add(BASE_URI . "?controller=product/inventory&method=list&leftmenu=stock", Globals::$langs->trans("Inventory"), 0, Globals::$user->rights->stock->lire, '', $mainmenu, 'stock');
|
|
| 1737 | - $newmenu->add(BASE_URI . "?controller=product/inventory&method=card&action=create", Globals::$langs->trans("NewInventory"), 1, Globals::$user->rights->stock->creer);
|
|
| 1738 | - $newmenu->add(BASE_URI . "?controller=product/inventory&method=list", Globals::$langs->trans("List"), 1, Globals::$user->rights->stock->lire);
|
|
| 1736 | + $newmenu->add(BASE_URI."?controller=product/inventory&method=list&leftmenu=stock", Globals::$langs->trans("Inventory"), 0, Globals::$user->rights->stock->lire, '', $mainmenu, 'stock');
|
|
| 1737 | + $newmenu->add(BASE_URI."?controller=product/inventory&method=card&action=create", Globals::$langs->trans("NewInventory"), 1, Globals::$user->rights->stock->creer);
|
|
| 1738 | + $newmenu->add(BASE_URI."?controller=product/inventory&method=list", Globals::$langs->trans("List"), 1, Globals::$user->rights->stock->lire);
|
|
| 1739 | 1739 | } else {
|
| 1740 | 1740 | //$newmenu->add("/product/inventory/list.php?leftmenu=stock", Globals::$langs->trans("Inventory"), 0, Globals::$user->rights->stock->inventory_advance->read, '', $mainmenu, 'stock');
|
| 1741 | 1741 | //$newmenu->add("/product/inventory/card.php?action=create", Globals::$langs->trans("NewInventory"), 1, Globals::$user->rights->stock->inventory_advance->write);
|
| 1742 | 1742 | //$newmenu->add("/product/inventory/list.php", Globals::$langs->trans("List"), 1, Globals::$user->rights->stock->inventory_advance->read);
|
| 1743 | - $newmenu->add(BASE_URI . "?controller=product/inventory&method=list&leftmenu=stock", Globals::$langs->trans("Inventory"), 0, Globals::$user->rights->stock->inventory_advance->read, '', $mainmenu, 'stock');
|
|
| 1744 | - $newmenu->add(BASE_URI . "?controller=product/inventory&method=card&action=create", Globals::$langs->trans("NewInventory"), 1, Globals::$user->rights->stock->inventory_advance->write);
|
|
| 1745 | - $newmenu->add(BASE_URI . "?controller=product/inventory&method=list", Globals::$langs->trans("List"), 1, Globals::$user->rights->stock->inventory_advance->read);
|
|
| 1743 | + $newmenu->add(BASE_URI."?controller=product/inventory&method=list&leftmenu=stock", Globals::$langs->trans("Inventory"), 0, Globals::$user->rights->stock->inventory_advance->read, '', $mainmenu, 'stock');
|
|
| 1744 | + $newmenu->add(BASE_URI."?controller=product/inventory&method=card&action=create", Globals::$langs->trans("NewInventory"), 1, Globals::$user->rights->stock->inventory_advance->write);
|
|
| 1745 | + $newmenu->add(BASE_URI."?controller=product/inventory&method=list", Globals::$langs->trans("List"), 1, Globals::$user->rights->stock->inventory_advance->read);
|
|
| 1746 | 1746 | } |
| 1747 | 1747 | } |
| 1748 | 1748 | } |
@@ -1753,19 +1753,19 @@ discard block |
||
| 1753 | 1753 | //$newmenu->add("/expedition/index.php?leftmenu=sendings", Globals::$langs->trans("Shipments"), 0, Globals::$user->rights->expedition->lire, '', $mainmenu, 'sendings');
|
| 1754 | 1754 | //$newmenu->add("/expedition/card.php?action=create2&leftmenu=sendings", Globals::$langs->trans("NewSending"), 1, Globals::$user->rights->expedition->creer);
|
| 1755 | 1755 | //$newmenu->add("/expedition/list.php?leftmenu=sendings", Globals::$langs->trans("List"), 1, Globals::$user->rights->expedition->lire);
|
| 1756 | - $newmenu->add(BASE_URI . "?controller=expedition&method=index&leftmenu=sendings", Globals::$langs->trans("Shipments"), 0, Globals::$user->rights->expedition->lire, '', $mainmenu, 'sendings');
|
|
| 1757 | - $newmenu->add(BASE_URI . "?controller=expedition&method=card&action=create2&leftmenu=sendings", Globals::$langs->trans("NewSending"), 1, Globals::$user->rights->expedition->creer);
|
|
| 1758 | - $newmenu->add(BASE_URI . "?controller=expedition&method=list&leftmenu=sendings", Globals::$langs->trans("List"), 1, Globals::$user->rights->expedition->lire);
|
|
| 1756 | + $newmenu->add(BASE_URI."?controller=expedition&method=index&leftmenu=sendings", Globals::$langs->trans("Shipments"), 0, Globals::$user->rights->expedition->lire, '', $mainmenu, 'sendings');
|
|
| 1757 | + $newmenu->add(BASE_URI."?controller=expedition&method=card&action=create2&leftmenu=sendings", Globals::$langs->trans("NewSending"), 1, Globals::$user->rights->expedition->creer);
|
|
| 1758 | + $newmenu->add(BASE_URI."?controller=expedition&method=list&leftmenu=sendings", Globals::$langs->trans("List"), 1, Globals::$user->rights->expedition->lire);
|
|
| 1759 | 1759 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "sendings") {
|
| 1760 | 1760 | //$newmenu->add("/expedition/list.php?leftmenu=sendings&viewstatut=0", Globals::$langs->trans("StatusSendingDraftShort"), 2, Globals::$user->rights->expedition->lire);
|
| 1761 | 1761 | //$newmenu->add("/expedition/list.php?leftmenu=sendings&viewstatut=1", Globals::$langs->trans("StatusSendingValidatedShort"), 2, Globals::$user->rights->expedition->lire);
|
| 1762 | 1762 | //$newmenu->add("/expedition/list.php?leftmenu=sendings&viewstatut=2", Globals::$langs->trans("StatusSendingProcessedShort"), 2, Globals::$user->rights->expedition->lire);
|
| 1763 | - $newmenu->add(BASE_URI . "?controller=expedition&method=list&leftmenu=sendings&viewstatut=0", Globals::$langs->trans("StatusSendingDraftShort"), 2, Globals::$user->rights->expedition->lire);
|
|
| 1764 | - $newmenu->add(BASE_URI . "?controller=expedition&method=list&leftmenu=sendings&viewstatut=1", Globals::$langs->trans("StatusSendingValidatedShort"), 2, Globals::$user->rights->expedition->lire);
|
|
| 1765 | - $newmenu->add(BASE_URI . "?controller=expedition&method=list&leftmenu=sendings&viewstatut=2", Globals::$langs->trans("StatusSendingProcessedShort"), 2, Globals::$user->rights->expedition->lire);
|
|
| 1763 | + $newmenu->add(BASE_URI."?controller=expedition&method=list&leftmenu=sendings&viewstatut=0", Globals::$langs->trans("StatusSendingDraftShort"), 2, Globals::$user->rights->expedition->lire);
|
|
| 1764 | + $newmenu->add(BASE_URI."?controller=expedition&method=list&leftmenu=sendings&viewstatut=1", Globals::$langs->trans("StatusSendingValidatedShort"), 2, Globals::$user->rights->expedition->lire);
|
|
| 1765 | + $newmenu->add(BASE_URI."?controller=expedition&method=list&leftmenu=sendings&viewstatut=2", Globals::$langs->trans("StatusSendingProcessedShort"), 2, Globals::$user->rights->expedition->lire);
|
|
| 1766 | 1766 | } |
| 1767 | 1767 | //$newmenu->add("/expedition/stats/index.php?leftmenu=sendings", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->expedition->lire);
|
| 1768 | - $newmenu->add(BASE_URI . "?controller=expedition/stats&method=index&leftmenu=sendings", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->expedition->lire);
|
|
| 1768 | + $newmenu->add(BASE_URI."?controller=expedition/stats&method=index&leftmenu=sendings", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->expedition->lire);
|
|
| 1769 | 1769 | } |
| 1770 | 1770 | |
| 1771 | 1771 | // Receptions |
@@ -1774,23 +1774,23 @@ discard block |
||
| 1774 | 1774 | //$newmenu->add("/reception/index.php?leftmenu=receptions", Globals::$langs->trans("Receptions"), 0, Globals::$user->rights->reception->lire, '', $mainmenu, 'receptions');
|
| 1775 | 1775 | //$newmenu->add("/reception/card.php?action=create2&leftmenu=receptions", Globals::$langs->trans("NewReception"), 1, Globals::$user->rights->reception->creer);
|
| 1776 | 1776 | //$newmenu->add("/reception/list.php?leftmenu=receptions", Globals::$langs->trans("List"), 1, Globals::$user->rights->reception->lire);
|
| 1777 | - $newmenu->add(BASE_URI . "?controller=reception&method=index&leftmenu=receptions", Globals::$langs->trans("Receptions"), 0, Globals::$user->rights->reception->lire, '', $mainmenu, 'receptions');
|
|
| 1778 | - $newmenu->add(BASE_URI . "?controller=reception&method=card&action=create2&leftmenu=receptions", Globals::$langs->trans("NewReception"), 1, Globals::$user->rights->reception->creer);
|
|
| 1779 | - $newmenu->add(BASE_URI . "?controller=reception&method=list&leftmenu=receptions", Globals::$langs->trans("List"), 1, Globals::$user->rights->reception->lire);
|
|
| 1777 | + $newmenu->add(BASE_URI."?controller=reception&method=index&leftmenu=receptions", Globals::$langs->trans("Receptions"), 0, Globals::$user->rights->reception->lire, '', $mainmenu, 'receptions');
|
|
| 1778 | + $newmenu->add(BASE_URI."?controller=reception&method=card&action=create2&leftmenu=receptions", Globals::$langs->trans("NewReception"), 1, Globals::$user->rights->reception->creer);
|
|
| 1779 | + $newmenu->add(BASE_URI."?controller=reception&method=list&leftmenu=receptions", Globals::$langs->trans("List"), 1, Globals::$user->rights->reception->lire);
|
|
| 1780 | 1780 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") {
|
| 1781 | 1781 | //$newmenu->add("/reception/list.php?leftmenu=receptions&viewstatut=0", Globals::$langs->trans("StatusReceptionDraftShort"), 2, Globals::$user->rights->reception->lire);
|
| 1782 | - $newmenu->add(BASE_URI . "?controller=reception&method=list&leftmenu=receptions&viewstatut=0", Globals::$langs->trans("StatusReceptionDraftShort"), 2, Globals::$user->rights->reception->lire);
|
|
| 1782 | + $newmenu->add(BASE_URI."?controller=reception&method=list&leftmenu=receptions&viewstatut=0", Globals::$langs->trans("StatusReceptionDraftShort"), 2, Globals::$user->rights->reception->lire);
|
|
| 1783 | 1783 | } |
| 1784 | 1784 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") {
|
| 1785 | 1785 | //$newmenu->add("/reception/list.php?leftmenu=receptions&viewstatut=1", Globals::$langs->trans("StatusReceptionValidatedShort"), 2, Globals::$user->rights->reception->lire);
|
| 1786 | - $newmenu->add(BASE_URI . "?controller=reception&method=list&leftmenu=receptions&viewstatut=1", Globals::$langs->trans("StatusReceptionValidatedShort"), 2, Globals::$user->rights->reception->lire);
|
|
| 1786 | + $newmenu->add(BASE_URI."?controller=reception&method=list&leftmenu=receptions&viewstatut=1", Globals::$langs->trans("StatusReceptionValidatedShort"), 2, Globals::$user->rights->reception->lire);
|
|
| 1787 | 1787 | } |
| 1788 | 1788 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "receptions") {
|
| 1789 | 1789 | //$newmenu->add("/reception/list.php?leftmenu=receptions&viewstatut=2", Globals::$langs->trans("StatusReceptionProcessedShort"), 2, Globals::$user->rights->reception->lire);
|
| 1790 | - $newmenu->add(BASE_URI . "?controller=reception&method=list&leftmenu=receptions&viewstatut=2", Globals::$langs->trans("StatusReceptionProcessedShort"), 2, Globals::$user->rights->reception->lire);
|
|
| 1790 | + $newmenu->add(BASE_URI."?controller=reception&method=list&leftmenu=receptions&viewstatut=2", Globals::$langs->trans("StatusReceptionProcessedShort"), 2, Globals::$user->rights->reception->lire);
|
|
| 1791 | 1791 | } |
| 1792 | 1792 | //$newmenu->add("/reception/stats/index.php?leftmenu=receptions", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->reception->lire);
|
| 1793 | - $newmenu->add(BASE_URI . "?controller=reception/stats&method=index&leftmenu=receptions", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->reception->lire);
|
|
| 1793 | + $newmenu->add(BASE_URI."?controller=reception/stats&method=index&leftmenu=receptions", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->reception->lire);
|
|
| 1794 | 1794 | } |
| 1795 | 1795 | } |
| 1796 | 1796 | |
@@ -1824,32 +1824,32 @@ discard block |
||
| 1824 | 1824 | // Project assigned to user |
| 1825 | 1825 | //$newmenu->add("/projet/index.php?leftmenu=projects" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), $titleboth, 0, Globals::$user->rights->projet->lire, '', $mainmenu, 'projects');
|
| 1826 | 1826 | //$newmenu->add("/projet/card.php?leftmenu=projects&action=create" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), $titlenew, 1, Globals::$user->rights->projet->creer);
|
| 1827 | - $newmenu->add(BASE_URI . "?controller=projet&method=index&leftmenu=projects" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), $titleboth, 0, Globals::$user->rights->projet->lire, '', $mainmenu, 'projects'); |
|
| 1828 | - $newmenu->add(BASE_URI . "?controller=projet&method=card&leftmenu=projects&action=create" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), $titlenew, 1, Globals::$user->rights->projet->creer); |
|
| 1827 | + $newmenu->add(BASE_URI."?controller=projet&method=index&leftmenu=projects".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titleboth, 0, Globals::$user->rights->projet->lire, '', $mainmenu, 'projects'); |
|
| 1828 | + $newmenu->add(BASE_URI."?controller=projet&method=card&leftmenu=projects&action=create".($search_project_user ? '&search_project_user='.$search_project_user : ''), $titlenew, 1, Globals::$user->rights->projet->creer); |
|
| 1829 | 1829 | |
| 1830 | 1830 | if (Globals::$conf->global->PROJECT_USE_OPPORTUNITIES == 0) {
|
| 1831 | 1831 | //$newmenu->add("/projet/list.php?leftmenu=projets" . ($search_project_user ? '&search_project_user=' . $search_project_user : '') . '&search_status=99', Globals::$langs->trans("List"), 1, $showmode, '', 'project', 'list');
|
| 1832 | - $newmenu->add(BASE_URI . "?controller=projet&method=list&leftmenu=projets" . ($search_project_user ? '&search_project_user=' . $search_project_user : '') . '&search_status=99', Globals::$langs->trans("List"), 1, $showmode, '', 'project', 'list');
|
|
| 1832 | + $newmenu->add(BASE_URI."?controller=projet&method=list&leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : '').'&search_status=99', Globals::$langs->trans("List"), 1, $showmode, '', 'project', 'list');
|
|
| 1833 | 1833 | } elseif (Globals::$conf->global->PROJECT_USE_OPPORTUNITIES == 1) {
|
| 1834 | 1834 | //$newmenu->add("/projet/list.php?leftmenu=projets" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), Globals::$langs->trans("List"), 1, $showmode, '', 'project', 'list');
|
| 1835 | 1835 | //$newmenu->add('/projet/list.php?mainmenu=project&leftmenu=list&search_opp_status=openedopp&search_status=99&contextpage=lead', Globals::$langs->trans("ListOpenLeads"), 2, $showmode);
|
| 1836 | 1836 | //$newmenu->add('/projet/list.php?mainmenu=project&leftmenu=list&search_opp_status=notopenedopp&search_status=99&contextpage=project', Globals::$langs->trans("ListOpenProjects"), 2, $showmode);
|
| 1837 | - $newmenu->add(BASE_URI . "?controller=projet&method=list&leftmenu=projets" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), Globals::$langs->trans("List"), 1, $showmode, '', 'project', 'list');
|
|
| 1838 | - $newmenu->add(BASE_URI . '?controller=projet&method=list&mainmenu=project&leftmenu=list&search_opp_status=openedopp&search_status=99&contextpage=lead', Globals::$langs->trans("ListOpenLeads"), 2, $showmode);
|
|
| 1839 | - $newmenu->add(BASE_URI . '?controller=projet&method=list&mainmenu=project&leftmenu=list&search_opp_status=notopenedopp&search_status=99&contextpage=project', Globals::$langs->trans("ListOpenProjects"), 2, $showmode);
|
|
| 1837 | + $newmenu->add(BASE_URI."?controller=projet&method=list&leftmenu=projets".($search_project_user ? '&search_project_user='.$search_project_user : ''), Globals::$langs->trans("List"), 1, $showmode, '', 'project', 'list');
|
|
| 1838 | + $newmenu->add(BASE_URI.'?controller=projet&method=list&mainmenu=project&leftmenu=list&search_opp_status=openedopp&search_status=99&contextpage=lead', Globals::$langs->trans("ListOpenLeads"), 2, $showmode);
|
|
| 1839 | + $newmenu->add(BASE_URI.'?controller=projet&method=list&mainmenu=project&leftmenu=list&search_opp_status=notopenedopp&search_status=99&contextpage=project', Globals::$langs->trans("ListOpenProjects"), 2, $showmode);
|
|
| 1840 | 1840 | } elseif (Globals::$conf->global->PROJECT_USE_OPPORTUNITIES == 2) { // 2 = leads only
|
| 1841 | 1841 | //$newmenu->add('/projet/list.php?mainmenu=project&leftmenu=list&search_opp_status=openedopp&search_status=99', Globals::$langs->trans("List"), 2, $showmode);
|
| 1842 | - $newmenu->add(BASE_URI . '?controller=projet&method=list&mainmenu=project&leftmenu=list&search_opp_status=openedopp&search_status=99', Globals::$langs->trans("List"), 2, $showmode);
|
|
| 1842 | + $newmenu->add(BASE_URI.'?controller=projet&method=list&mainmenu=project&leftmenu=list&search_opp_status=openedopp&search_status=99', Globals::$langs->trans("List"), 2, $showmode);
|
|
| 1843 | 1843 | } |
| 1844 | 1844 | |
| 1845 | 1845 | //$newmenu->add("/projet/stats/index.php?leftmenu=projects", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->projet->lire);
|
| 1846 | - $newmenu->add(BASE_URI . "?controller=projet/stats&method=index&leftmenu=projects", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->projet->lire);
|
|
| 1846 | + $newmenu->add(BASE_URI."?controller=projet/stats&method=index&leftmenu=projects", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->projet->lire);
|
|
| 1847 | 1847 | |
| 1848 | 1848 | // Categories |
| 1849 | 1849 | if (!empty(Globals::$conf->categorie->enabled)) {
|
| 1850 | 1850 | Globals::$langs->load("categories");
|
| 1851 | 1851 | //$newmenu->add("/categories/index.php?leftmenu=cat&type=6", Globals::$langs->trans("Categories"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
| 1852 | - $newmenu->add(BASE_URI . "?controller=categories&method=index&leftmenu=cat&type=6", Globals::$langs->trans("Categories"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
|
| 1852 | + $newmenu->add(BASE_URI."?controller=categories&method=index&leftmenu=cat&type=6", Globals::$langs->trans("Categories"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
|
| 1853 | 1853 | } |
| 1854 | 1854 | |
| 1855 | 1855 | if (empty(Globals::$conf->global->PROJECT_HIDE_TASKS)) {
|
@@ -1862,12 +1862,12 @@ discard block |
||
| 1862 | 1862 | |
| 1863 | 1863 | $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), Globals::$langs->trans("NewTimeSpent"), 0, Globals::$user->rights->projet->lire);
|
| 1864 | 1864 | */ |
| 1865 | - $newmenu->add(BASE_URI . "?controller=projet/activity&method=index&leftmenu=tasks" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), Globals::$langs->trans("Activities"), 0, Globals::$user->rights->projet->lire);
|
|
| 1866 | - $newmenu->add(BASE_URI . "?controller=projet&method=tasks&leftmenu=tasks&action=create", Globals::$langs->trans("NewTask"), 1, Globals::$user->rights->projet->creer);
|
|
| 1867 | - $newmenu->add(BASE_URI . "?controller=projet/tasks&method=list&leftmenu=tasks" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), Globals::$langs->trans("List"), 1, Globals::$user->rights->projet->lire);
|
|
| 1868 | - $newmenu->add(BASE_URI . "?controller=projet/tasks/stats&method=index&leftmenu=projects", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->projet->lire);
|
|
| 1865 | + $newmenu->add(BASE_URI."?controller=projet/activity&method=index&leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), Globals::$langs->trans("Activities"), 0, Globals::$user->rights->projet->lire);
|
|
| 1866 | + $newmenu->add(BASE_URI."?controller=projet&method=tasks&leftmenu=tasks&action=create", Globals::$langs->trans("NewTask"), 1, Globals::$user->rights->projet->creer);
|
|
| 1867 | + $newmenu->add(BASE_URI."?controller=projet/tasks&method=list&leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), Globals::$langs->trans("List"), 1, Globals::$user->rights->projet->lire);
|
|
| 1868 | + $newmenu->add(BASE_URI."?controller=projet/tasks/stats&method=index&leftmenu=projects", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->projet->lire);
|
|
| 1869 | 1869 | |
| 1870 | - $newmenu->add(BASE_URI . "?controller=projet/activity&method=perweek&leftmenu=tasks" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), Globals::$langs->trans("NewTimeSpent"), 0, Globals::$user->rights->projet->lire);
|
|
| 1870 | + $newmenu->add(BASE_URI."?controller=projet/activity&method=perweek&leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), Globals::$langs->trans("NewTimeSpent"), 0, Globals::$user->rights->projet->lire);
|
|
| 1871 | 1871 | } |
| 1872 | 1872 | } |
| 1873 | 1873 | } |
@@ -1883,9 +1883,9 @@ discard block |
||
| 1883 | 1883 | //$newmenu->add("/user/list.php?leftmenu=hrm&mode=employee", Globals::$langs->trans("Employees"), 0, Globals::$user->rights->hrm->employee->read, '', $mainmenu, 'hrm');
|
| 1884 | 1884 | //$newmenu->add("/user/card.php?action=create&employee = 1", Globals::$langs->trans("NewEmployee"), 1, Globals::$user->rights->hrm->employee->write);
|
| 1885 | 1885 | //$newmenu->add("/user/list.php?leftmenu=hrm&mode=employee&contextpage = employeelist", Globals::$langs->trans("List"), 1, Globals::$user->rights->hrm->employee->read);
|
| 1886 | - $newmenu->add(BASE_URI . "?controller=user&method=list&leftmenu=hrm&mode=employee", Globals::$langs->trans("Employees"), 0, Globals::$user->rights->hrm->employee->read, '', $mainmenu, 'hrm');
|
|
| 1887 | - $newmenu->add(BASE_URI . "?controller=user&method=card&action=create&employee = 1", Globals::$langs->trans("NewEmployee"), 1, Globals::$user->rights->hrm->employee->write);
|
|
| 1888 | - $newmenu->add(BASE_URI . "?controller=user&method=list&leftmenu=hrm&mode=employee&contextpage = employeelist", Globals::$langs->trans("List"), 1, Globals::$user->rights->hrm->employee->read);
|
|
| 1886 | + $newmenu->add(BASE_URI."?controller=user&method=list&leftmenu=hrm&mode=employee", Globals::$langs->trans("Employees"), 0, Globals::$user->rights->hrm->employee->read, '', $mainmenu, 'hrm');
|
|
| 1887 | + $newmenu->add(BASE_URI."?controller=user&method=card&action=create&employee = 1", Globals::$langs->trans("NewEmployee"), 1, Globals::$user->rights->hrm->employee->write);
|
|
| 1888 | + $newmenu->add(BASE_URI."?controller=user&method=list&leftmenu=hrm&mode=employee&contextpage = employeelist", Globals::$langs->trans("List"), 1, Globals::$user->rights->hrm->employee->read);
|
|
| 1889 | 1889 | } |
| 1890 | 1890 | |
| 1891 | 1891 | // Leave/Holiday/Vacation module |
@@ -1896,9 +1896,9 @@ discard block |
||
| 1896 | 1896 | //$newmenu->add("/holiday/list.php?leftmenu=hrm", Globals::$langs->trans("CPTitreMenu"), 0, Globals::$user->rights->holiday->read, '', $mainmenu, 'hrm');
|
| 1897 | 1897 | //$newmenu->add("/holiday/card.php?action=request", Globals::$langs->trans("New"), 1, Globals::$user->rights->holiday->write);
|
| 1898 | 1898 | //$newmenu->add("/holiday/list.php?leftmenu=hrm", Globals::$langs->trans("List"), 1, Globals::$user->rights->holiday->read);
|
| 1899 | - $newmenu->add(BASE_URI . "?controller=holiday&method=list&leftmenu=hrm", Globals::$langs->trans("CPTitreMenu"), 0, Globals::$user->rights->holiday->read, '', $mainmenu, 'hrm');
|
|
| 1900 | - $newmenu->add(BASE_URI . "?controller=holiday&method=card&action=request", Globals::$langs->trans("New"), 1, Globals::$user->rights->holiday->write);
|
|
| 1901 | - $newmenu->add(BASE_URI . "?controller=holiday&method=list&leftmenu=hrm", Globals::$langs->trans("List"), 1, Globals::$user->rights->holiday->read);
|
|
| 1899 | + $newmenu->add(BASE_URI."?controller=holiday&method=list&leftmenu=hrm", Globals::$langs->trans("CPTitreMenu"), 0, Globals::$user->rights->holiday->read, '', $mainmenu, 'hrm');
|
|
| 1900 | + $newmenu->add(BASE_URI."?controller=holiday&method=card&action=request", Globals::$langs->trans("New"), 1, Globals::$user->rights->holiday->write);
|
|
| 1901 | + $newmenu->add(BASE_URI."?controller=holiday&method=list&leftmenu=hrm", Globals::$langs->trans("List"), 1, Globals::$user->rights->holiday->read);
|
|
| 1902 | 1902 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "hrm") {
|
| 1903 | 1903 | /* |
| 1904 | 1904 | $newmenu->add("/holiday/list.php?search_statut = 1&leftmenu=hrm", Globals::$langs->trans("DraftCP"), 2, Globals::$user->rights->holiday->read);
|
@@ -1907,18 +1907,18 @@ discard block |
||
| 1907 | 1907 | $newmenu->add("/holiday/list.php?search_statut = 4&leftmenu=hrm", Globals::$langs->trans("CancelCP"), 2, Globals::$user->rights->holiday->read);
|
| 1908 | 1908 | $newmenu->add("/holiday/list.php?search_statut = 5&leftmenu=hrm", Globals::$langs->trans("RefuseCP"), 2, Globals::$user->rights->holiday->read);
|
| 1909 | 1909 | */ |
| 1910 | - $newmenu->add(BASE_URI . "?controller=holiday&method=list&search_statut=1&leftmenu=hrm", Globals::$langs->trans("DraftCP"), 2, Globals::$user->rights->holiday->read);
|
|
| 1911 | - $newmenu->add(BASE_URI . "?controller=holiday&method=list&search_statut=2&leftmenu=hrm", Globals::$langs->trans("ToReviewCP"), 2, Globals::$user->rights->holiday->read);
|
|
| 1912 | - $newmenu->add(BASE_URI . "?controller=holiday&method=list&search_statut=3&leftmenu=hrm", Globals::$langs->trans("ApprovedCP"), 2, Globals::$user->rights->holiday->read);
|
|
| 1913 | - $newmenu->add(BASE_URI . "?controller=holiday&method=list&search_statut=4&leftmenu=hrm", Globals::$langs->trans("CancelCP"), 2, Globals::$user->rights->holiday->read);
|
|
| 1914 | - $newmenu->add(BASE_URI . "?controller=holiday&method=list&search_statut=5&leftmenu=hrm", Globals::$langs->trans("RefuseCP"), 2, Globals::$user->rights->holiday->read);
|
|
| 1910 | + $newmenu->add(BASE_URI."?controller=holiday&method=list&search_statut=1&leftmenu=hrm", Globals::$langs->trans("DraftCP"), 2, Globals::$user->rights->holiday->read);
|
|
| 1911 | + $newmenu->add(BASE_URI."?controller=holiday&method=list&search_statut=2&leftmenu=hrm", Globals::$langs->trans("ToReviewCP"), 2, Globals::$user->rights->holiday->read);
|
|
| 1912 | + $newmenu->add(BASE_URI."?controller=holiday&method=list&search_statut=3&leftmenu=hrm", Globals::$langs->trans("ApprovedCP"), 2, Globals::$user->rights->holiday->read);
|
|
| 1913 | + $newmenu->add(BASE_URI."?controller=holiday&method=list&search_statut=4&leftmenu=hrm", Globals::$langs->trans("CancelCP"), 2, Globals::$user->rights->holiday->read);
|
|
| 1914 | + $newmenu->add(BASE_URI."?controller=holiday&method=list&search_statut=5&leftmenu=hrm", Globals::$langs->trans("RefuseCP"), 2, Globals::$user->rights->holiday->read);
|
|
| 1915 | 1915 | } |
| 1916 | 1916 | //$newmenu->add("/holiday/define_holiday.php?action=request", Globals::$langs->trans("MenuConfCP"), 1, Globals::$user->rights->holiday->read);
|
| 1917 | 1917 | //$newmenu->add("/holiday/month_report.php", Globals::$langs->trans("MenuReportMonth"), 1, Globals::$user->rights->holiday->read_all);
|
| 1918 | 1918 | //$newmenu->add("/holiday/view_log.php?action=request", Globals::$langs->trans("MenuLogCP"), 1, Globals::$user->rights->holiday->define_holiday);
|
| 1919 | - $newmenu->add(BASE_URI . "?controller=holiday&method=define_holiday&action=request", Globals::$langs->trans("MenuConfCP"), 1, Globals::$user->rights->holiday->read);
|
|
| 1920 | - $newmenu->add(BASE_URI . "?controller=holiday&method=month_report", Globals::$langs->trans("MenuReportMonth"), 1, Globals::$user->rights->holiday->read_all);
|
|
| 1921 | - $newmenu->add(BASE_URI . "?controller=holiday&method=view_log&action=request", Globals::$langs->trans("MenuLogCP"), 1, Globals::$user->rights->holiday->define_holiday);
|
|
| 1919 | + $newmenu->add(BASE_URI."?controller=holiday&method=define_holiday&action=request", Globals::$langs->trans("MenuConfCP"), 1, Globals::$user->rights->holiday->read);
|
|
| 1920 | + $newmenu->add(BASE_URI."?controller=holiday&method=month_report", Globals::$langs->trans("MenuReportMonth"), 1, Globals::$user->rights->holiday->read_all);
|
|
| 1921 | + $newmenu->add(BASE_URI."?controller=holiday&method=view_log&action=request", Globals::$langs->trans("MenuLogCP"), 1, Globals::$user->rights->holiday->define_holiday);
|
|
| 1922 | 1922 | } |
| 1923 | 1923 | |
| 1924 | 1924 | // Trips and expenses (old module) |
@@ -1930,10 +1930,10 @@ discard block |
||
| 1930 | 1930 | $newmenu->add("/compta/deplacement/list.php?leftmenu=tripsandexpenses&mainmenu=hrm", Globals::$langs->trans("List"), 1, Globals::$user->rights->deplacement->lire);
|
| 1931 | 1931 | $newmenu->add("/compta/deplacement/stats/index.php?leftmenu=tripsandexpenses&mainmenu=hrm", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->deplacement->lire);
|
| 1932 | 1932 | */ |
| 1933 | - $newmenu->add(BASE_URI . "?controller=compta/deplacement&method=index&leftmenu=tripsandexpenses&mainmenu=hrm", Globals::$langs->trans("TripsAndExpenses"), 0, Globals::$user->rights->deplacement->lire, '', $mainmenu, 'tripsandexpenses');
|
|
| 1934 | - $newmenu->add(BASE_URI . "?controller=compta/deplacement&method=card&action=create&leftmenu=tripsandexpenses&mainmenu=hrm", Globals::$langs->trans("New"), 1, Globals::$user->rights->deplacement->creer);
|
|
| 1935 | - $newmenu->add(BASE_URI . "?controller=compta/deplacement&method=list&leftmenu=tripsandexpenses&mainmenu=hrm", Globals::$langs->trans("List"), 1, Globals::$user->rights->deplacement->lire);
|
|
| 1936 | - $newmenu->add(BASE_URI . "?controller=compta/deplacement/stats&method=index&leftmenu=tripsandexpenses&mainmenu=hrm", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->deplacement->lire);
|
|
| 1933 | + $newmenu->add(BASE_URI."?controller=compta/deplacement&method=index&leftmenu=tripsandexpenses&mainmenu=hrm", Globals::$langs->trans("TripsAndExpenses"), 0, Globals::$user->rights->deplacement->lire, '', $mainmenu, 'tripsandexpenses');
|
|
| 1934 | + $newmenu->add(BASE_URI."?controller=compta/deplacement&method=card&action=create&leftmenu=tripsandexpenses&mainmenu=hrm", Globals::$langs->trans("New"), 1, Globals::$user->rights->deplacement->creer);
|
|
| 1935 | + $newmenu->add(BASE_URI."?controller=compta/deplacement&method=list&leftmenu=tripsandexpenses&mainmenu=hrm", Globals::$langs->trans("List"), 1, Globals::$user->rights->deplacement->lire);
|
|
| 1936 | + $newmenu->add(BASE_URI."?controller=compta/deplacement/stats&method=index&leftmenu=tripsandexpenses&mainmenu=hrm", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->deplacement->lire);
|
|
| 1937 | 1937 | } |
| 1938 | 1938 | |
| 1939 | 1939 | // Expense report |
@@ -1953,18 +1953,18 @@ discard block |
||
| 1953 | 1953 | } |
| 1954 | 1954 | $newmenu->add("/expensereport/stats/index.php?leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->expensereport->lire);
|
| 1955 | 1955 | */ |
| 1956 | - $newmenu->add(BASE_URI . "?controller=expensereport&method=index&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("TripsAndExpenses"), 0, Globals::$user->rights->expensereport->lire, '', $mainmenu, 'expensereport');
|
|
| 1957 | - $newmenu->add(BASE_URI . "?controller=expensereport&method=card&action=create&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("New"), 1, Globals::$user->rights->expensereport->creer);
|
|
| 1958 | - $newmenu->add(BASE_URI . "?controller=expensereport&method=list&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("List"), 1, Globals::$user->rights->expensereport->lire);
|
|
| 1956 | + $newmenu->add(BASE_URI."?controller=expensereport&method=index&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("TripsAndExpenses"), 0, Globals::$user->rights->expensereport->lire, '', $mainmenu, 'expensereport');
|
|
| 1957 | + $newmenu->add(BASE_URI."?controller=expensereport&method=card&action=create&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("New"), 1, Globals::$user->rights->expensereport->creer);
|
|
| 1958 | + $newmenu->add(BASE_URI."?controller=expensereport&method=list&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("List"), 1, Globals::$user->rights->expensereport->lire);
|
|
| 1959 | 1959 | if ($usemenuhider || empty($leftmenu) || $leftmenu == "expensereport") {
|
| 1960 | - $newmenu->add(BASE_URI . "?controller=expensereport&method=list&search_status=0&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Draft"), 2, Globals::$user->rights->expensereport->lire);
|
|
| 1961 | - $newmenu->add(BASE_URI . "?controller=expensereport&method=list&search_status=2&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Validated"), 2, Globals::$user->rights->expensereport->lire);
|
|
| 1962 | - $newmenu->add(BASE_URI . "?controller=expensereport&method=list&search_status=5&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Approved"), 2, Globals::$user->rights->expensereport->lire);
|
|
| 1963 | - $newmenu->add(BASE_URI . "?controller=expensereport&method=list&search_status=6&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Paid"), 2, Globals::$user->rights->expensereport->lire);
|
|
| 1964 | - $newmenu->add(BASE_URI . "?controller=expensereport&method=list&search_status=4&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Canceled"), 2, Globals::$user->rights->expensereport->lire);
|
|
| 1965 | - $newmenu->add(BASE_URI . "?controller=expensereport&method=list&search_status=99&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Refused"), 2, Globals::$user->rights->expensereport->lire);
|
|
| 1966 | - } |
|
| 1967 | - $newmenu->add(BASE_URI . "?controller=expensereport/stats&method=index&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->expensereport->lire);
|
|
| 1960 | + $newmenu->add(BASE_URI."?controller=expensereport&method=list&search_status=0&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Draft"), 2, Globals::$user->rights->expensereport->lire);
|
|
| 1961 | + $newmenu->add(BASE_URI."?controller=expensereport&method=list&search_status=2&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Validated"), 2, Globals::$user->rights->expensereport->lire);
|
|
| 1962 | + $newmenu->add(BASE_URI."?controller=expensereport&method=list&search_status=5&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Approved"), 2, Globals::$user->rights->expensereport->lire);
|
|
| 1963 | + $newmenu->add(BASE_URI."?controller=expensereport&method=list&search_status=6&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Paid"), 2, Globals::$user->rights->expensereport->lire);
|
|
| 1964 | + $newmenu->add(BASE_URI."?controller=expensereport&method=list&search_status=4&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Canceled"), 2, Globals::$user->rights->expensereport->lire);
|
|
| 1965 | + $newmenu->add(BASE_URI."?controller=expensereport&method=list&search_status=99&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Refused"), 2, Globals::$user->rights->expensereport->lire);
|
|
| 1966 | + } |
|
| 1967 | + $newmenu->add(BASE_URI."?controller=expensereport/stats&method=index&leftmenu=expensereport&mainmenu=hrm", Globals::$langs->trans("Statistics"), 1, Globals::$user->rights->expensereport->lire);
|
|
| 1968 | 1968 | } |
| 1969 | 1969 | |
| 1970 | 1970 | if (!empty(Globals::$conf->projet->enabled)) {
|
@@ -1974,7 +1974,7 @@ discard block |
||
| 1974 | 1974 | $search_project_user = DolUtils::GETPOST('search_project_user', 'int');
|
| 1975 | 1975 | |
| 1976 | 1976 | //$newmenu->add("/projet/activity/perweek.php?leftmenu=tasks" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), Globals::$langs->trans("NewTimeSpent"), 0, Globals::$user->rights->projet->lire);
|
| 1977 | - $newmenu->add(BASE_URI . "?controller=projet/activity&method=perweek&leftmenu=tasks" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), Globals::$langs->trans("NewTimeSpent"), 0, Globals::$user->rights->projet->lire);
|
|
| 1977 | + $newmenu->add(BASE_URI."?controller=projet/activity&method=perweek&leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), Globals::$langs->trans("NewTimeSpent"), 0, Globals::$user->rights->projet->lire);
|
|
| 1978 | 1978 | } |
| 1979 | 1979 | } |
| 1980 | 1980 | } |
@@ -1987,24 +1987,24 @@ discard block |
||
| 1987 | 1987 | if (empty(Globals::$user->socid)) { // limit to internal users
|
| 1988 | 1988 | Globals::$langs->load("mails");
|
| 1989 | 1989 | //$newmenu->add("/admin/mails_templates.php?leftmenu=email_templates", Globals::$langs->trans("EMailTemplates"), 0, 1, '', $mainmenu, 'email_templates');
|
| 1990 | - $newmenu->add(BASE_URI . "?controller=admin&method=mails_templates&leftmenu=email_templates", Globals::$langs->trans("EMailTemplates"), 0, 1, '', $mainmenu, 'email_templates');
|
|
| 1990 | + $newmenu->add(BASE_URI."?controller=admin&method=mails_templates&leftmenu=email_templates", Globals::$langs->trans("EMailTemplates"), 0, 1, '', $mainmenu, 'email_templates');
|
|
| 1991 | 1991 | } |
| 1992 | 1992 | |
| 1993 | 1993 | if (!empty(Globals::$conf->mailing->enabled)) {
|
| 1994 | 1994 | //$newmenu->add("/comm/mailing/index.php?leftmenu=mailing", Globals::$langs->trans("EMailings"), 0, Globals::$user->rights->mailing->lire, '', $mainmenu, 'mailing');
|
| 1995 | 1995 | //$newmenu->add("/comm/mailing/card.php?leftmenu=mailing&action=create", Globals::$langs->trans("NewMailing"), 1, Globals::$user->rights->mailing->creer);
|
| 1996 | 1996 | //$newmenu->add("/comm/mailing/list.php?leftmenu=mailing", Globals::$langs->trans("List"), 1, Globals::$user->rights->mailing->lire);
|
| 1997 | - $newmenu->add(BASE_URI . "?controller=comm/mailing&method=index&leftmenu=mailing", Globals::$langs->trans("EMailings"), 0, Globals::$user->rights->mailing->lire, '', $mainmenu, 'mailing');
|
|
| 1998 | - $newmenu->add(BASE_URI . "?controller=comm/mailing&method=card&leftmenu=mailing&action=create", Globals::$langs->trans("NewMailing"), 1, Globals::$user->rights->mailing->creer);
|
|
| 1999 | - $newmenu->add(BASE_URI . "?controller=comm/mailing&method=list&leftmenu=mailing", Globals::$langs->trans("List"), 1, Globals::$user->rights->mailing->lire);
|
|
| 1997 | + $newmenu->add(BASE_URI."?controller=comm/mailing&method=index&leftmenu=mailing", Globals::$langs->trans("EMailings"), 0, Globals::$user->rights->mailing->lire, '', $mainmenu, 'mailing');
|
|
| 1998 | + $newmenu->add(BASE_URI."?controller=comm/mailing&method=card&leftmenu=mailing&action=create", Globals::$langs->trans("NewMailing"), 1, Globals::$user->rights->mailing->creer);
|
|
| 1999 | + $newmenu->add(BASE_URI."?controller=comm/mailing&method=list&leftmenu=mailing", Globals::$langs->trans("List"), 1, Globals::$user->rights->mailing->lire);
|
|
| 2000 | 2000 | } |
| 2001 | 2001 | |
| 2002 | 2002 | if (!empty(Globals::$conf->export->enabled)) {
|
| 2003 | 2003 | Globals::$langs->load("exports");
|
| 2004 | 2004 | //$newmenu->add("/exports/index.php?leftmenu=export", Globals::$langs->trans("FormatedExport"), 0, Globals::$user->rights->export->lire, '', $mainmenu, 'export');
|
| 2005 | 2005 | //$newmenu->add("/exports/export.php?leftmenu=export", Globals::$langs->trans("NewExport"), 1, Globals::$user->rights->export->creer);
|
| 2006 | - $newmenu->add(BASE_URI . "?controller=exports&methodindex&leftmenu=export", Globals::$langs->trans("FormatedExport"), 0, Globals::$user->rights->export->lire, '', $mainmenu, 'export');
|
|
| 2007 | - $newmenu->add(BASE_URI . "?controller=exports&method=export&leftmenu=export", Globals::$langs->trans("NewExport"), 1, Globals::$user->rights->export->creer);
|
|
| 2006 | + $newmenu->add(BASE_URI."?controller=exports&methodindex&leftmenu=export", Globals::$langs->trans("FormatedExport"), 0, Globals::$user->rights->export->lire, '', $mainmenu, 'export');
|
|
| 2007 | + $newmenu->add(BASE_URI."?controller=exports&method=export&leftmenu=export", Globals::$langs->trans("NewExport"), 1, Globals::$user->rights->export->creer);
|
|
| 2008 | 2008 | //$newmenu->add("/exports/export.php?leftmenu=export",Globals::$langs->trans("List"),1, Globals::$user->rights->export->lire);
|
| 2009 | 2009 | } |
| 2010 | 2010 | |
@@ -2012,8 +2012,8 @@ discard block |
||
| 2012 | 2012 | Globals::$langs->load("exports");
|
| 2013 | 2013 | //$newmenu->add("/imports/index.php?leftmenu=import", Globals::$langs->trans("FormatedImport"), 0, Globals::$user->rights->import->run, '', $mainmenu, 'import');
|
| 2014 | 2014 | //$newmenu->add("/imports/import.php?leftmenu=import", Globals::$langs->trans("NewImport"), 1, Globals::$user->rights->import->run);
|
| 2015 | - $newmenu->add(BASE_URI . "?controller=imports&method=index&leftmenu=import", Globals::$langs->trans("FormatedImport"), 0, Globals::$user->rights->import->run, '', $mainmenu, 'import');
|
|
| 2016 | - $newmenu->add(BASE_URI . "?controller=imports&method=import&leftmenu=import", Globals::$langs->trans("NewImport"), 1, Globals::$user->rights->import->run);
|
|
| 2015 | + $newmenu->add(BASE_URI."?controller=imports&method=index&leftmenu=import", Globals::$langs->trans("FormatedImport"), 0, Globals::$user->rights->import->run, '', $mainmenu, 'import');
|
|
| 2016 | + $newmenu->add(BASE_URI."?controller=imports&method=import&leftmenu=import", Globals::$langs->trans("NewImport"), 1, Globals::$user->rights->import->run);
|
|
| 2017 | 2017 | } |
| 2018 | 2018 | } |
| 2019 | 2019 | |
@@ -2056,30 +2056,30 @@ discard block |
||
| 2056 | 2056 | $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members&action=create", Globals::$langs->trans("New"), 1, Globals::$user->rights->adherent->configurer);
|
| 2057 | 2057 | $newmenu->add("/adherents/type.php?leftmenu=setup&mainmenu=members", Globals::$langs->trans("List"), 1, Globals::$user->rights->adherent->configurer);
|
| 2058 | 2058 | */ |
| 2059 | - $newmenu->add(BASE_URI . "?controller=adherents&method=index&leftmenu=members&mainmenu=members", Globals::$langs->trans("Members"), 0, Globals::$user->rights->adherent->lire, '', $mainmenu, 'members');
|
|
| 2060 | - $newmenu->add(BASE_URI . "?controller=adherents&method=card&leftmenu=members&action=create", Globals::$langs->trans("NewMember"), 1, Globals::$user->rights->adherent->creer);
|
|
| 2061 | - $newmenu->add(BASE_URI . "?controller=adherents&method=list&leftmenu=members", Globals::$langs->trans("List"), 1, Globals::$user->rights->adherent->lire);
|
|
| 2062 | - $newmenu->add(BASE_URI . "?controller=adherents&method=list&leftmenu=members&statut=-1", Globals::$langs->trans("MenuMembersToValidate"), 2, Globals::$user->rights->adherent->lire);
|
|
| 2063 | - $newmenu->add(BASE_URI . "?controller=adherents&method=list&leftmenu=members&statut=1", Globals::$langs->trans("MenuMembersValidated"), 2, Globals::$user->rights->adherent->lire);
|
|
| 2064 | - $newmenu->add(BASE_URI . "?controller=adherents&method=list&leftmenu=members&statut=1&filter = uptodate", Globals::$langs->trans("MenuMembersUpToDate"), 2, Globals::$user->rights->adherent->lire);
|
|
| 2065 | - $newmenu->add(BASE_URI . "?controller=adherents&method=list&leftmenu=members&statut=1&filter = outofdate", Globals::$langs->trans("MenuMembersNotUpToDate"), 2, Globals::$user->rights->adherent->lire);
|
|
| 2066 | - $newmenu->add(BASE_URI . "?controller=adherents&method=list&leftmenu=members&statut=0", Globals::$langs->trans("MenuMembersResiliated"), 2, Globals::$user->rights->adherent->lire);
|
|
| 2067 | - $newmenu->add(BASE_URI . "?controller=adherents/stats&method=index&leftmenu=members", Globals::$langs->trans("MenuMembersStats"), 1, Globals::$user->rights->adherent->lire);
|
|
| 2068 | - $newmenu->add(BASE_URI . "?controller=adherents/cartes&method=carte&leftmenu=export", Globals::$langs->trans("MembersCards"), 1, Globals::$user->rights->adherent->export);
|
|
| 2059 | + $newmenu->add(BASE_URI."?controller=adherents&method=index&leftmenu=members&mainmenu=members", Globals::$langs->trans("Members"), 0, Globals::$user->rights->adherent->lire, '', $mainmenu, 'members');
|
|
| 2060 | + $newmenu->add(BASE_URI."?controller=adherents&method=card&leftmenu=members&action=create", Globals::$langs->trans("NewMember"), 1, Globals::$user->rights->adherent->creer);
|
|
| 2061 | + $newmenu->add(BASE_URI."?controller=adherents&method=list&leftmenu=members", Globals::$langs->trans("List"), 1, Globals::$user->rights->adherent->lire);
|
|
| 2062 | + $newmenu->add(BASE_URI."?controller=adherents&method=list&leftmenu=members&statut=-1", Globals::$langs->trans("MenuMembersToValidate"), 2, Globals::$user->rights->adherent->lire);
|
|
| 2063 | + $newmenu->add(BASE_URI."?controller=adherents&method=list&leftmenu=members&statut=1", Globals::$langs->trans("MenuMembersValidated"), 2, Globals::$user->rights->adherent->lire);
|
|
| 2064 | + $newmenu->add(BASE_URI."?controller=adherents&method=list&leftmenu=members&statut=1&filter = uptodate", Globals::$langs->trans("MenuMembersUpToDate"), 2, Globals::$user->rights->adherent->lire);
|
|
| 2065 | + $newmenu->add(BASE_URI."?controller=adherents&method=list&leftmenu=members&statut=1&filter = outofdate", Globals::$langs->trans("MenuMembersNotUpToDate"), 2, Globals::$user->rights->adherent->lire);
|
|
| 2066 | + $newmenu->add(BASE_URI."?controller=adherents&method=list&leftmenu=members&statut=0", Globals::$langs->trans("MenuMembersResiliated"), 2, Globals::$user->rights->adherent->lire);
|
|
| 2067 | + $newmenu->add(BASE_URI."?controller=adherents/stats&method=index&leftmenu=members", Globals::$langs->trans("MenuMembersStats"), 1, Globals::$user->rights->adherent->lire);
|
|
| 2068 | + $newmenu->add(BASE_URI."?controller=adherents/cartes&method=carte&leftmenu=export", Globals::$langs->trans("MembersCards"), 1, Globals::$user->rights->adherent->export);
|
|
| 2069 | 2069 | if (!empty(Globals::$conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && ($usemenuhider || empty($leftmenu) || $leftmenu == 'none' || $leftmenu == "members" || $leftmenu == "export")) {
|
| 2070 | - $newmenu->add(BASE_URI . "?controller=adherents&method=htpasswd&leftmenu=export", Globals::$langs->trans("Filehtpasswd"), 1, Globals::$user->rights->adherent->export);
|
|
| 2070 | + $newmenu->add(BASE_URI."?controller=adherents&method=htpasswd&leftmenu=export", Globals::$langs->trans("Filehtpasswd"), 1, Globals::$user->rights->adherent->export);
|
|
| 2071 | 2071 | } |
| 2072 | 2072 | if (!empty(Globals::$conf->categorie->enabled)) {
|
| 2073 | 2073 | Globals::$langs->load("categories");
|
| 2074 | - $newmenu->add(BASE_URI . "?controller=categories&method=index&leftmenu=cat&type=3", Globals::$langs->trans("Categories"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
|
| 2075 | - } |
|
| 2076 | - $newmenu->add(BASE_URI . "?controller=adherents&method=index&leftmenu=members&mainmenu=members", Globals::$langs->trans("Subscriptions"), 0, Globals::$user->rights->adherent->cotisation->lire);
|
|
| 2077 | - $newmenu->add(BASE_URI . "?controller=adherents&methodlist&leftmenu=members&statut=-1,1&mainmenu=members", Globals::$langs->trans("NewSubscription"), 1, Globals::$user->rights->adherent->cotisation->creer);
|
|
| 2078 | - $newmenu->add(BASE_URI . "?controller=adherents/subscription&method=list&leftmenu=members", Globals::$langs->trans("List"), 1, Globals::$user->rights->adherent->cotisation->lire);
|
|
| 2079 | - $newmenu->add(BASE_URI . "?controller=adherents/stats&method=index&leftmenu=members", Globals::$langs->trans("MenuMembersStats"), 1, Globals::$user->rights->adherent->lire);
|
|
| 2080 | - $newmenu->add(BASE_URI . "?controller=adherents&method=type&leftmenu=setup&mainmenu=members", Globals::$langs->trans("MembersTypes"), 0, Globals::$user->rights->adherent->configurer, '', $mainmenu, 'setup');
|
|
| 2081 | - $newmenu->add(BASE_URI . "?controller=adherents&method=type&leftmenu=setup&mainmenu=members&action=create", Globals::$langs->trans("New"), 1, Globals::$user->rights->adherent->configurer);
|
|
| 2082 | - $newmenu->add(BASE_URI . "?controller=adherents&method=type&leftmenu=setup&mainmenu=members", Globals::$langs->trans("List"), 1, Globals::$user->rights->adherent->configurer);
|
|
| 2074 | + $newmenu->add(BASE_URI."?controller=categories&method=index&leftmenu=cat&type=3", Globals::$langs->trans("Categories"), 1, Globals::$user->rights->categorie->lire, '', $mainmenu, 'cat');
|
|
| 2075 | + } |
|
| 2076 | + $newmenu->add(BASE_URI."?controller=adherents&method=index&leftmenu=members&mainmenu=members", Globals::$langs->trans("Subscriptions"), 0, Globals::$user->rights->adherent->cotisation->lire);
|
|
| 2077 | + $newmenu->add(BASE_URI."?controller=adherents&methodlist&leftmenu=members&statut=-1,1&mainmenu=members", Globals::$langs->trans("NewSubscription"), 1, Globals::$user->rights->adherent->cotisation->creer);
|
|
| 2078 | + $newmenu->add(BASE_URI."?controller=adherents/subscription&method=list&leftmenu=members", Globals::$langs->trans("List"), 1, Globals::$user->rights->adherent->cotisation->lire);
|
|
| 2079 | + $newmenu->add(BASE_URI."?controller=adherents/stats&method=index&leftmenu=members", Globals::$langs->trans("MenuMembersStats"), 1, Globals::$user->rights->adherent->lire);
|
|
| 2080 | + $newmenu->add(BASE_URI."?controller=adherents&method=type&leftmenu=setup&mainmenu=members", Globals::$langs->trans("MembersTypes"), 0, Globals::$user->rights->adherent->configurer, '', $mainmenu, 'setup');
|
|
| 2081 | + $newmenu->add(BASE_URI."?controller=adherents&method=type&leftmenu=setup&mainmenu=members&action=create", Globals::$langs->trans("New"), 1, Globals::$user->rights->adherent->configurer);
|
|
| 2082 | + $newmenu->add(BASE_URI."?controller=adherents&method=type&leftmenu=setup&mainmenu=members", Globals::$langs->trans("List"), 1, Globals::$user->rights->adherent->configurer);
|
|
| 2083 | 2083 | } |
| 2084 | 2084 | } |
| 2085 | 2085 | |
@@ -2090,11 +2090,11 @@ discard block |
||
| 2090 | 2090 | //var_dump($newmenu->liste); // |
| 2091 | 2091 | // We update newmenu for special dynamic menus |
| 2092 | 2092 | if (!empty(Globals::$user->rights->banque->lire) && $mainmenu == 'bank') { // Entry for each bank account
|
| 2093 | - require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php'; |
|
| 2093 | + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; |
|
| 2094 | 2094 | |
| 2095 | 2095 | $sql = "SELECT rowid, label, courant, rappro"; |
| 2096 | - $sql .= " FROM " . MAIN_DB_PREFIX . "bank_account"; |
|
| 2097 | - $sql .= " WHERE entity = " . Globals::$conf->entity; |
|
| 2096 | + $sql .= " FROM ".MAIN_DB_PREFIX."bank_account"; |
|
| 2097 | + $sql .= " WHERE entity = ".Globals::$conf->entity; |
|
| 2098 | 2098 | $sql .= " AND clos = 0"; |
| 2099 | 2099 | $sql .= " ORDER BY label"; |
| 2100 | 2100 | |
@@ -2105,16 +2105,16 @@ discard block |
||
| 2105 | 2105 | |
| 2106 | 2106 | if ($numr > 0) {
|
| 2107 | 2107 | //$newmenu->add('/compta/bank/list.php', Globals::$langs->trans("BankAccounts"), 0, Globals::$user->rights->banque->lire);
|
| 2108 | - $newmenu->add(BASE_URI . '?controller=compta/bank?method=list', Globals::$langs->trans("BankAccounts"), 0, Globals::$user->rights->banque->lire);
|
|
| 2108 | + $newmenu->add(BASE_URI.'?controller=compta/bank?method=list', Globals::$langs->trans("BankAccounts"), 0, Globals::$user->rights->banque->lire);
|
|
| 2109 | 2109 | } |
| 2110 | 2110 | |
| 2111 | 2111 | while ($i < $numr) {
|
| 2112 | 2112 | $objp = Config::$dbEngine->fetch_object($resql); |
| 2113 | 2113 | //$newmenu->add('/compta/bank/card.php?id=' . $objp->rowid, $objp->label, 1, Globals::$user->rights->banque->lire);
|
| 2114 | - $newmenu->add(BASE_URI . '?controller=compta/bank&method=card&id=' . $objp->rowid, $objp->label, 1, Globals::$user->rights->banque->lire); |
|
| 2114 | + $newmenu->add(BASE_URI.'?controller=compta/bank&method=card&id='.$objp->rowid, $objp->label, 1, Globals::$user->rights->banque->lire); |
|
| 2115 | 2115 | if ($objp->rappro && $objp->courant != Account::TYPE_CASH && empty($objp->clos)) { // If not cash account and not closed and can be reconciliate
|
| 2116 | 2116 | //$newmenu->add('/compta/bank/bankentries_list.php?action=reconcile&contextpage=banktransactionlist-' . $objp->rowid . '&account=' . $objp->rowid . '&id=' . $objp->rowid . '&search_conciliated=0', Globals::$langs->trans("Conciliate"), 2, Globals::$user->rights->banque->consolidate);
|
| 2117 | - $newmenu->add(BASE_URI . '?controller=compta/bank&method=bankentries_list&action=reconcile&contextpage=banktransactionlist-' . $objp->rowid . '&account=' . $objp->rowid . '&id=' . $objp->rowid . '&search_conciliated=0', Globals::$langs->trans("Conciliate"), 2, Globals::$user->rights->banque->consolidate);
|
|
| 2117 | + $newmenu->add(BASE_URI.'?controller=compta/bank&method=bankentries_list&action=reconcile&contextpage=banktransactionlist-'.$objp->rowid.'&account='.$objp->rowid.'&id='.$objp->rowid.'&search_conciliated=0', Globals::$langs->trans("Conciliate"), 2, Globals::$user->rights->banque->consolidate);
|
|
| 2118 | 2118 | } |
| 2119 | 2119 | $i++; |
| 2120 | 2120 | } |
@@ -2128,11 +2128,11 @@ discard block |
||
| 2128 | 2128 | $MAXFTP = 20; |
| 2129 | 2129 | $i = 1; |
| 2130 | 2130 | while ($i <= $MAXFTP) {
|
| 2131 | - $paramkey = 'FTP_NAME_' . $i; |
|
| 2131 | + $paramkey = 'FTP_NAME_'.$i; |
|
| 2132 | 2132 | //print $paramkey; |
| 2133 | 2133 | if (!empty(Globals::$conf->global->$paramkey)) {
|
| 2134 | 2134 | //$link = "/ftp/index.php?idmenu = " . $_SESSION["idmenu"] . "&numero_ftp = " . $i; |
| 2135 | - $link = BASE_URI . "?controller=ftp&method=index&idmenu=" . $_SESSION["idmenu"] . "&numero_ftp=" . $i; |
|
| 2135 | + $link = BASE_URI."?controller=ftp&method=index&idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i; |
|
| 2136 | 2136 | |
| 2137 | 2137 | $newmenu->add($link, dol_trunc(Globals::$conf->global->$paramkey, 24)); |
| 2138 | 2138 | } |
@@ -2193,9 +2193,9 @@ discard block |
||
| 2193 | 2193 | } |
| 2194 | 2194 | } |
| 2195 | 2195 | if ($altok % 2 == 0) {
|
| 2196 | - print '<div class="blockvmenu blockvmenuimpair' . $invert . ($lastopened ? ' blockvmenulast' : '') . ($altok == 1 ? ' blockvmenufirst' : '') . '">' . "\n"; |
|
| 2196 | + print '<div class="blockvmenu blockvmenuimpair'.$invert.($lastopened ? ' blockvmenulast' : '').($altok == 1 ? ' blockvmenufirst' : '').'">'."\n"; |
|
| 2197 | 2197 | } else {
|
| 2198 | - print '<div class="blockvmenu blockvmenupair' . $invert . ($lastopened ? ' blockvmenulast' : '') . ($altok == 1 ? ' blockvmenufirst' : '') . '">' . "\n"; |
|
| 2198 | + print '<div class="blockvmenu blockvmenupair'.$invert.($lastopened ? ' blockvmenulast' : '').($altok == 1 ? ' blockvmenufirst' : '').'">'."\n"; |
|
| 2199 | 2199 | } |
| 2200 | 2200 | } |
| 2201 | 2201 | |
@@ -2217,48 +2217,48 @@ discard block |
||
| 2217 | 2217 | if (!preg_match("/^(http:\/\/|https:\/\/)/i", $menu_array[$i]['url'])) {
|
| 2218 | 2218 | $tmp = explode('?', $menu_array[$i]['url'], 2);
|
| 2219 | 2219 | $url = $shorturl = $tmp[0]; |
| 2220 | - $param = (isset($tmp[1]) ? $tmp[1] : ''); // params in url of the menu link |
|
| 2220 | + $param = (isset($tmp[1]) ? $tmp[1] : ''); // params in url of the menu link |
|
| 2221 | 2221 | // Complete param to force leftmenu to '' to close open menu when we click on a link with no leftmenu defined. |
| 2222 | 2222 | if ((!preg_match('/mainmenu/i', $param)) && (!preg_match('/leftmenu/i', $param)) && !empty($menu_array[$i]['mainmenu'])) {
|
| 2223 | - $param .= ($param ? '&' : '') . 'mainmenu=' . $menu_array[$i]['mainmenu'] . '&leftmenu='; |
|
| 2223 | + $param .= ($param ? '&' : '').'mainmenu='.$menu_array[$i]['mainmenu'].'&leftmenu='; |
|
| 2224 | 2224 | } |
| 2225 | 2225 | if ((!preg_match('/mainmenu/i', $param)) && (!preg_match('/leftmenu/i', $param)) && empty($menu_array[$i]['mainmenu'])) {
|
| 2226 | - $param .= ($param ? '&' : '') . 'leftmenu='; |
|
| 2226 | + $param .= ($param ? '&' : '').'leftmenu='; |
|
| 2227 | 2227 | } |
| 2228 | 2228 | //$url.="idmenu = ".$menu_array[$i]['rowid']; // Already done by menuLoad |
| 2229 | - $url = DolUtils::dol_buildpath($url, 1) . ($param ? '?' . $param : ''); |
|
| 2229 | + $url = DolUtils::dol_buildpath($url, 1).($param ? '?'.$param : ''); |
|
| 2230 | 2230 | $shorturlwithoutparam = $shorturl; |
| 2231 | - $shorturl = $shorturl . ($param ? '?' . $param : ''); |
|
| 2231 | + $shorturl = $shorturl.($param ? '?'.$param : ''); |
|
| 2232 | 2232 | } |
| 2233 | 2233 | |
| 2234 | 2234 | |
| 2235 | - print '<!-- Process menu entry with mainmenu=' . $menu_array[$i]['mainmenu'] . ', leftmenu=' . $menu_array[$i]['leftmenu'] . ', level=' . $menu_array[$i]['level'] . ' enabled=' . $menu_array[$i]['enabled'] . ', position=' . $menu_array[$i]['position'] . ' -->' . "\n"; |
|
| 2235 | + print '<!-- Process menu entry with mainmenu='.$menu_array[$i]['mainmenu'].', leftmenu='.$menu_array[$i]['leftmenu'].', level='.$menu_array[$i]['level'].' enabled='.$menu_array[$i]['enabled'].', position='.$menu_array[$i]['position'].' -->'."\n"; |
|
| 2236 | 2236 | |
| 2237 | 2237 | // Menu level 0 |
| 2238 | 2238 | if ($menu_array[$i]['level'] == 0) {
|
| 2239 | 2239 | if ($menu_array[$i]['enabled']) { // Enabled so visible
|
| 2240 | - print '<div class="menu_titre">' . $tabstring; |
|
| 2240 | + print '<div class="menu_titre">'.$tabstring; |
|
| 2241 | 2241 | if ($shorturlwithoutparam) {
|
| 2242 | - print '<a class="vmenu" href="' . $url . '"' . ($menu_array[$i]['target'] ? ' target="' . $menu_array[$i]['target'] . '"' : '') . '>'; |
|
| 2242 | + print '<a class="vmenu" href="'.$url.'"'.($menu_array[$i]['target'] ? ' target="'.$menu_array[$i]['target'].'"' : '').'>'; |
|
| 2243 | 2243 | } else {
|
| 2244 | 2244 | print '<span class="vmenu">'; |
| 2245 | 2245 | } |
| 2246 | - print ($menu_array[$i]['prefix'] ? $menu_array[$i]['prefix'] : '') . $menu_array[$i]['titre']; |
|
| 2246 | + print ($menu_array[$i]['prefix'] ? $menu_array[$i]['prefix'] : '').$menu_array[$i]['titre']; |
|
| 2247 | 2247 | if ($shorturlwithoutparam) {
|
| 2248 | 2248 | print '</a>'; |
| 2249 | 2249 | } else {
|
| 2250 | 2250 | print '</span>'; |
| 2251 | 2251 | } |
| 2252 | - print '</div>' . "\n"; |
|
| 2252 | + print '</div>'."\n"; |
|
| 2253 | 2253 | $lastlevel0 = 'enabled'; |
| 2254 | 2254 | } else if ($showmenu) { // Not enabled but visible (so greyed)
|
| 2255 | - print '<div class="menu_titre">' . $tabstring . '<font class="vmenudisabled">' . $menu_array[$i]['titre'] . '</font></div>' . "\n"; |
|
| 2255 | + print '<div class="menu_titre">'.$tabstring.'<font class="vmenudisabled">'.$menu_array[$i]['titre'].'</font></div>'."\n"; |
|
| 2256 | 2256 | $lastlevel0 = 'greyed'; |
| 2257 | 2257 | } else {
|
| 2258 | 2258 | $lastlevel0 = 'hidden'; |
| 2259 | 2259 | } |
| 2260 | 2260 | if ($showmenu) {
|
| 2261 | - print '<div class="menu_top"></div>' . "\n"; |
|
| 2261 | + print '<div class="menu_top"></div>'."\n"; |
|
| 2262 | 2262 | } |
| 2263 | 2263 | } |
| 2264 | 2264 | |
@@ -2266,13 +2266,13 @@ discard block |
||
| 2266 | 2266 | if ($menu_array[$i]['level'] > 0) {
|
| 2267 | 2267 | $cssmenu = ''; |
| 2268 | 2268 | if ($menu_array[$i]['url']) {
|
| 2269 | - $cssmenu = ' menu_contenu' . DolUtils::dol_string_nospecial(preg_replace('/\.php.*$/', '', $menu_array[$i]['url']));
|
|
| 2269 | + $cssmenu = ' menu_contenu'.DolUtils::dol_string_nospecial(preg_replace('/\.php.*$/', '', $menu_array[$i]['url']));
|
|
| 2270 | 2270 | } |
| 2271 | 2271 | |
| 2272 | 2272 | if ($menu_array[$i]['enabled'] && $lastlevel0 == 'enabled') { // Enabled so visible, except if parent was not enabled.
|
| 2273 | - print '<div class="menu_contenu' . $cssmenu . '">' . $tabstring; |
|
| 2273 | + print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring; |
|
| 2274 | 2274 | if ($shorturlwithoutparam) {
|
| 2275 | - print '<a class="vsmenu" href="' . $url . '"' . ($menu_array[$i]['target'] ? ' target="' . $menu_array[$i]['target'] . '"' : '') . '>'; |
|
| 2275 | + print '<a class="vsmenu" href="'.$url.'"'.($menu_array[$i]['target'] ? ' target="'.$menu_array[$i]['target'].'"' : '').'>'; |
|
| 2276 | 2276 | } else {
|
| 2277 | 2277 | print '<span class="vsmenu">'; |
| 2278 | 2278 | } |
@@ -2286,26 +2286,26 @@ discard block |
||
| 2286 | 2286 | if (!strstr($menu_array[$i]['titre'], '<table')) {
|
| 2287 | 2287 | print '<br>'; |
| 2288 | 2288 | } |
| 2289 | - print '</div>' . "\n"; |
|
| 2289 | + print '</div>'."\n"; |
|
| 2290 | 2290 | } else if ($showmenu && $lastlevel0 == 'enabled') { // Not enabled but visible (so greyed), except if parent was not enabled.
|
| 2291 | - print '<div class="menu_contenu' . $cssmenu . '">' . $tabstring . '<font class="vsmenudisabled vsmenudisabledmargin">' . $menu_array[$i]['titre'] . '</font><br></div>' . "\n"; |
|
| 2291 | + print '<div class="menu_contenu'.$cssmenu.'">'.$tabstring.'<font class="vsmenudisabled vsmenudisabledmargin">'.$menu_array[$i]['titre'].'</font><br></div>'."\n"; |
|
| 2292 | 2292 | } |
| 2293 | 2293 | } |
| 2294 | 2294 | |
| 2295 | 2295 | // If next is a new block or if there is nothing after |
| 2296 | 2296 | if (empty($menu_array[$i + 1]['level'])) { // End menu block
|
| 2297 | 2297 | if ($showmenu) {
|
| 2298 | - print '<div class="menu_end"></div>' . "\n"; |
|
| 2298 | + print '<div class="menu_end"></div>'."\n"; |
|
| 2299 | 2299 | } |
| 2300 | 2300 | if ($blockvmenuopened) {
|
| 2301 | - print '</div>' . "\n"; |
|
| 2301 | + print '</div>'."\n"; |
|
| 2302 | 2302 | $blockvmenuopened = false; |
| 2303 | 2303 | } |
| 2304 | 2304 | } |
| 2305 | 2305 | } |
| 2306 | 2306 | |
| 2307 | 2307 | if ($altok) {
|
| 2308 | - print '<div class="blockvmenuend"></div>'; // End menu block |
|
| 2308 | + print '<div class="blockvmenuend"></div>'; // End menu block |
|
| 2309 | 2309 | } |
| 2310 | 2310 | } |
| 2311 | 2311 | |
@@ -303,8 +303,9 @@ discard block |
||
| 303 | 303 | if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "bank") {
|
| 304 | 304 | $classname = 'class="tmenusel"'; |
| 305 | 305 | $_SESSION['idmenu'] = ''; |
| 306 | - } else |
|
| 307 | - $classname = 'class="tmenu"'; |
|
| 306 | + } else { |
|
| 307 | + $classname = 'class="tmenu"'; |
|
| 308 | + } |
|
| 308 | 309 | $idsel = 'bank'; |
| 309 | 310 | |
| 310 | 311 | //$menu->add('/compta/bank/list.php?mainmenu=bank&leftmenu=', Globals::$langs->trans("MenuBankCash"), 0, $showmode, $atarget, "bank", '', 52, $id, $idsel, $classname);
|
@@ -1383,25 +1384,33 @@ discard block |
||
| 1383 | 1384 | $nature = ''; |
| 1384 | 1385 | |
| 1385 | 1386 | // Must match array $sourceList defined into journals_list.php |
| 1386 | - if ($objp->nature == 2 && !empty(Globals::$conf->facture->enabled)) |
|
| 1387 | - $nature = "sells"; |
|
| 1388 | - if ($objp->nature == 3 && !empty(Globals::$conf->fournisseur->enabled)) |
|
| 1389 | - $nature = "purchases"; |
|
| 1390 | - if ($objp->nature == 4 && !empty(Globals::$conf->banque->enabled)) |
|
| 1391 | - $nature = "bank"; |
|
| 1392 | - if ($objp->nature == 5 && !empty(Globals::$conf->expensereport->enabled)) |
|
| 1393 | - $nature = "expensereports"; |
|
| 1394 | - if ($objp->nature == 1) |
|
| 1395 | - $nature = "various"; |
|
| 1396 | - if ($objp->nature == 8) |
|
| 1397 | - $nature = "inventory"; |
|
| 1398 | - if ($objp->nature == 9) |
|
| 1399 | - $nature = "hasnew"; |
|
| 1387 | + if ($objp->nature == 2 && !empty(Globals::$conf->facture->enabled)) { |
|
| 1388 | + $nature = "sells"; |
|
| 1389 | + } |
|
| 1390 | + if ($objp->nature == 3 && !empty(Globals::$conf->fournisseur->enabled)) { |
|
| 1391 | + $nature = "purchases"; |
|
| 1392 | + } |
|
| 1393 | + if ($objp->nature == 4 && !empty(Globals::$conf->banque->enabled)) { |
|
| 1394 | + $nature = "bank"; |
|
| 1395 | + } |
|
| 1396 | + if ($objp->nature == 5 && !empty(Globals::$conf->expensereport->enabled)) { |
|
| 1397 | + $nature = "expensereports"; |
|
| 1398 | + } |
|
| 1399 | + if ($objp->nature == 1) { |
|
| 1400 | + $nature = "various"; |
|
| 1401 | + } |
|
| 1402 | + if ($objp->nature == 8) { |
|
| 1403 | + $nature = "inventory"; |
|
| 1404 | + } |
|
| 1405 | + if ($objp->nature == 9) { |
|
| 1406 | + $nature = "hasnew"; |
|
| 1407 | + } |
|
| 1400 | 1408 | |
| 1401 | 1409 | // To enable when page exists |
| 1402 | 1410 | if (empty(Globals::$conf->global->ACCOUNTANCY_SHOW_DEVELOP_JOURNAL)) {
|
| 1403 | - if ($nature == 'various' || $nature == 'hasnew' || $nature == 'inventory') |
|
| 1404 | - $nature = ''; |
|
| 1411 | + if ($nature == 'various' || $nature == 'hasnew' || $nature == 'inventory') { |
|
| 1412 | + $nature = ''; |
|
| 1413 | + } |
|
| 1405 | 1414 | } |
| 1406 | 1415 | |
| 1407 | 1416 | if ($nature) {
|
@@ -1416,8 +1425,9 @@ discard block |
||
| 1416 | 1425 | // Should not happend. Entries are added |
| 1417 | 1426 | $newmenu->add('', Globals::$langs->trans("NoJournalDefined"), 2, Globals::$user->rights->accounting->comptarapport->lire);
|
| 1418 | 1427 | } |
| 1419 | - } else |
|
| 1420 | - dol_print_error(Config::$dbEngine); |
|
| 1428 | + } else { |
|
| 1429 | + dol_print_error(Config::$dbEngine); |
|
| 1430 | + } |
|
| 1421 | 1431 | Config::$dbEngine->free($resql); |
| 1422 | 1432 | } |
| 1423 | 1433 | |
@@ -1451,8 +1461,10 @@ discard block |
||
| 1451 | 1461 | } |
| 1452 | 1462 | |
| 1453 | 1463 | $modecompta = 'CREANCES-DETTES'; |
| 1454 | - if (!empty(Globals::$conf->accounting->enabled) && !empty(Globals::$user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') |
|
| 1455 | - $modecompta = 'BOOKKEEPING'; // Not yet implemented. Should be BOOKKEEPINGCOLLECTED |
|
| 1464 | + if (!empty(Globals::$conf->accounting->enabled) && !empty(Globals::$user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') { |
|
| 1465 | + $modecompta = 'BOOKKEEPING'; |
|
| 1466 | + } |
|
| 1467 | + // Not yet implemented. Should be BOOKKEEPINGCOLLECTED |
|
| 1456 | 1468 | if ($modecompta) {
|
| 1457 | 1469 | if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/', $leftmenu)) {
|
| 1458 | 1470 | /* |
@@ -58,10 +58,10 @@ discard block |
||
| 58 | 58 | $db = getDoliDBInstance(Globals::$conf->db->type, Globals::$conf->db->host, Globals::$conf->db->user, Globals::$conf->db->pass, Globals::$conf->db->name, Globals::$conf->db->port); |
| 59 | 59 | |
| 60 | 60 | if ($db->error) |
| 61 | - {
|
|
| 62 | - dol_print_error($db, "host=" . Globals::$conf->db->host . ", port=" . Globals::$conf->db->port . ", user=" . Globals::$conf->db->user . ", databasename=" . Globals::$conf->db->name . ", " . $db->error); |
|
| 61 | + {
|
|
| 62 | + dol_print_error($db, "host=" . Globals::$conf->db->host . ", port=" . Globals::$conf->db->port . ", user=" . Globals::$conf->db->user . ", databasename=" . Globals::$conf->db->name . ", " . $db->error); |
|
| 63 | 63 | exit; |
| 64 | - } |
|
| 64 | + } |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | // Now database connexion is known, so we can forget password |
@@ -80,19 +80,19 @@ discard block |
||
| 80 | 80 | // By default conf->entity is 1, but we change this if we ask another value. |
| 81 | 81 | if (session_id() && ! empty($_SESSION["dol_entity"])) // Entity inside an opened session |
| 82 | 82 | {
|
| 83 | - Globals::$conf->entity = $_SESSION["dol_entity"]; |
|
| 83 | + Globals::$conf->entity = $_SESSION["dol_entity"]; |
|
| 84 | 84 | } |
| 85 | 85 | else if (! empty($_ENV["dol_entity"])) // Entity inside a CLI script |
| 86 | 86 | {
|
| 87 | - Globals::$conf->entity = $_ENV["dol_entity"]; |
|
| 87 | + Globals::$conf->entity = $_ENV["dol_entity"]; |
|
| 88 | 88 | } |
| 89 | 89 | else if (isset($_POST["loginfunction"]) && GETPOST("entity",'int')) // Just after a login page
|
| 90 | 90 | {
|
| 91 | - Globals::$conf->entity = GETPOST("entity", 'int');
|
|
| 91 | + Globals::$conf->entity = GETPOST("entity", 'int');
|
|
| 92 | 92 | } |
| 93 | 93 | else if (defined('DOLENTITY') && is_numeric(DOLENTITY)) // For public page with MultiCompany module
|
| 94 | 94 | {
|
| 95 | - Globals::$conf->entity = DOLENTITY; |
|
| 95 | + Globals::$conf->entity = DOLENTITY; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | // Sanitize entity |
@@ -101,14 +101,14 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | if (! defined('NOREQUIREDB'))
|
| 103 | 103 | {
|
| 104 | - //print "Will work with data into entity instance number '".Globals::$conf->entity."'"; |
|
| 104 | + //print "Will work with data into entity instance number '".Globals::$conf->entity."'"; |
|
| 105 | 105 | // Here we read database (llx_const table) and define Globals::$conf->global->XXX var. |
| 106 | 106 | Globals::$conf->setValues($db); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | // Overwrite database value |
| 110 | 110 | if (!empty(Globals::$conf->file->mailing_limit_sendbyweb)) {
|
| 111 | - Globals::$conf->global->MAILING_LIMIT_SENDBYWEB = Globals::$conf->file->mailing_limit_sendbyweb; |
|
| 111 | + Globals::$conf->global->MAILING_LIMIT_SENDBYWEB = Globals::$conf->file->mailing_limit_sendbyweb; |
|
| 112 | 112 | } |
| 113 | 113 | if (empty(Globals::$conf->global->MAILING_LIMIT_SENDBYWEB)) {
|
| 114 | 114 | Globals::$conf->global->MAILING_LIMIT_SENDBYWEB = 25; |
@@ -122,42 +122,42 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | // If software has been locked. Only login Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED is allowed. |
| 124 | 124 | if (!empty(Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED)) {
|
| 125 | - $ok=0; |
|
| 126 | - if ((! session_id() || ! isset($_SESSION["dol_login"])) && ! isset($_POST["username"]) && ! empty($_SERVER["GATEWAY_INTERFACE"])) $ok=1; // We let working pages if not logged and inside a web browser (login form, to allow login by admin) |
|
| 127 | - elseif (isset($_POST["username"]) && $_POST["username"] == Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) |
|
| 125 | + $ok=0; |
|
| 126 | + if ((! session_id() || ! isset($_SESSION["dol_login"])) && ! isset($_POST["username"]) && ! empty($_SERVER["GATEWAY_INTERFACE"])) $ok=1; // We let working pages if not logged and inside a web browser (login form, to allow login by admin) |
|
| 127 | + elseif (isset($_POST["username"]) && $_POST["username"] == Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) |
|
| 128 | 128 | $ok = 1; // We let working pages that is a login submission (login submit, to allow login by admin) |
| 129 | 129 | elseif (defined('NOREQUIREDB')) $ok=1; // We let working pages that don't need database access (xxx.css.php)
|
| 130 | - elseif (defined('EVEN_IF_ONLY_LOGIN_ALLOWED')) $ok=1; // We let working pages that ask to work even if only login enabled (logout.php)
|
|
| 131 | - elseif (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] == Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) |
|
| 130 | + elseif (defined('EVEN_IF_ONLY_LOGIN_ALLOWED')) $ok=1; // We let working pages that ask to work even if only login enabled (logout.php)
|
|
| 131 | + elseif (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] == Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) |
|
| 132 | 132 | $ok = 1; // We let working if user is allowed admin |
| 133 | 133 | if (! $ok) |
| 134 | - {
|
|
| 135 | - if (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] != Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) {
|
|
| 136 | - print 'Sorry, your application is offline.'."\n"; |
|
| 137 | - print 'You are logged with user "' . $_SESSION["dol_login"] . '" and only administrator user "' . Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED . '" is allowed to connect for the moment.' . "\n"; |
|
| 134 | + {
|
|
| 135 | + if (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] != Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) {
|
|
| 136 | + print 'Sorry, your application is offline.'."\n"; |
|
| 137 | + print 'You are logged with user "' . $_SESSION["dol_login"] . '" and only administrator user "' . Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED . '" is allowed to connect for the moment.' . "\n"; |
|
| 138 | 138 | $nexturl=DOL_URL_ROOT.'/user/logout.php'; |
| 139 | - print 'Please try later or <a href="'.$nexturl.'">click here to disconnect and change login user</a>...'."\n"; |
|
| 140 | - } |
|
| 141 | - else |
|
| 142 | - {
|
|
| 143 | - print 'Sorry, your application is offline. Only administrator user "' . Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED . '" is allowed to connect for the moment.' . "\n"; |
|
| 139 | + print 'Please try later or <a href="'.$nexturl.'">click here to disconnect and change login user</a>...'."\n"; |
|
| 140 | + } |
|
| 141 | + else |
|
| 142 | + {
|
|
| 143 | + print 'Sorry, your application is offline. Only administrator user "' . Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED . '" is allowed to connect for the moment.' . "\n"; |
|
| 144 | 144 | $nexturl=DOL_URL_ROOT.'/'; |
| 145 | - print 'Please try later or <a href="'.$nexturl.'">click here to change login user</a>...'."\n"; |
|
| 146 | - } |
|
| 147 | - exit; |
|
| 148 | - } |
|
| 145 | + print 'Please try later or <a href="'.$nexturl.'">click here to change login user</a>...'."\n"; |
|
| 146 | + } |
|
| 147 | + exit; |
|
| 148 | + } |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | // Create object $mysoc (A thirdparty object that contains properties of companies managed by Dolibarr. |
| 152 | 152 | if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC'))
|
| 153 | 153 | {
|
| 154 | - require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php'; |
|
| 154 | + require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php'; |
|
| 155 | 155 | |
| 156 | - $mysoc=new Societe($db); |
|
| 157 | - $mysoc->setMysoc($conf); |
|
| 156 | + $mysoc=new Societe($db); |
|
| 157 | + $mysoc->setMysoc($conf); |
|
| 158 | 158 | |
| 159 | - // For some countries, we need to invert our address with customer address |
|
| 160 | - if ($mysoc->country_code == 'DE' && !isset(Globals::$conf->global->MAIN_INVERT_SENDER_RECIPIENT)) |
|
| 159 | + // For some countries, we need to invert our address with customer address |
|
| 160 | + if ($mysoc->country_code == 'DE' && !isset(Globals::$conf->global->MAIN_INVERT_SENDER_RECIPIENT)) |
|
| 161 | 161 | Globals::$conf->global->MAIN_INVERT_SENDER_RECIPIENT = 1; |
| 162 | 162 | } |
| 163 | 163 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * This script reads the conf file, init $lang, $db and and empty $user |
| 33 | 33 | */ |
| 34 | 34 | |
| 35 | -require_once 'filefunc.inc.php'; // May have been already require by main.inc.php. But may not by scripts. |
|
| 35 | +require_once 'filefunc.inc.php'; // May have been already require by main.inc.php. But may not by scripts. |
|
| 36 | 36 | |
| 37 | 37 | |
| 38 | 38 | |
@@ -44,29 +44,29 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | |
| 46 | 46 | // Chargement des includes principaux de librairies communes |
| 47 | -if (! defined('NOREQUIREUSER')) require_once DOL_DOCUMENT_ROOT .'/user/class/user.class.php'; // Need 500ko memory
|
|
| 48 | -if (! defined('NOREQUIRETRAN')) require_once DOL_DOCUMENT_ROOT .'/core/class/translate.class.php';
|
|
| 49 | -if (! defined('NOREQUIRESOC')) require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php';
|
|
| 47 | +if (!defined('NOREQUIREUSER')) require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; // Need 500ko memory
|
|
| 48 | +if (!defined('NOREQUIRETRAN')) require_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php';
|
|
| 49 | +if (!defined('NOREQUIRESOC')) require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
|
| 50 | 50 | |
| 51 | 51 | |
| 52 | 52 | |
| 53 | 53 | /* |
| 54 | 54 | * Object $db |
| 55 | 55 | */ |
| 56 | -if (! defined('NOREQUIREDB'))
|
|
| 56 | +if (!defined('NOREQUIREDB'))
|
|
| 57 | 57 | {
|
| 58 | 58 | $db = getDoliDBInstance(Globals::$conf->db->type, Globals::$conf->db->host, Globals::$conf->db->user, Globals::$conf->db->pass, Globals::$conf->db->name, Globals::$conf->db->port); |
| 59 | 59 | |
| 60 | 60 | if ($db->error) |
| 61 | 61 | {
|
| 62 | - dol_print_error($db, "host=" . Globals::$conf->db->host . ", port=" . Globals::$conf->db->port . ", user=" . Globals::$conf->db->user . ", databasename=" . Globals::$conf->db->name . ", " . $db->error); |
|
| 62 | + dol_print_error($db, "host=".Globals::$conf->db->host.", port=".Globals::$conf->db->port.", user=".Globals::$conf->db->user.", databasename=".Globals::$conf->db->name.", ".$db->error); |
|
| 63 | 63 | exit; |
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | // Now database connexion is known, so we can forget password |
| 68 | 68 | //unset($dolibarr_main_db_pass); // We comment this because this constant is used in a lot of pages |
| 69 | -unset(Globals::$conf->db->pass); // This is to avoid password to be shown in memory/swap dump |
|
| 69 | +unset(Globals::$conf->db->pass); // This is to avoid password to be shown in memory/swap dump |
|
| 70 | 70 | |
| 71 | 71 | /* |
| 72 | 72 | * Object $user |
@@ -78,15 +78,15 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | |
| 80 | 80 | // By default conf->entity is 1, but we change this if we ask another value. |
| 81 | -if (session_id() && ! empty($_SESSION["dol_entity"])) // Entity inside an opened session |
|
| 81 | +if (session_id() && !empty($_SESSION["dol_entity"])) // Entity inside an opened session |
|
| 82 | 82 | {
|
| 83 | 83 | Globals::$conf->entity = $_SESSION["dol_entity"]; |
| 84 | 84 | } |
| 85 | -else if (! empty($_ENV["dol_entity"])) // Entity inside a CLI script |
|
| 85 | +else if (!empty($_ENV["dol_entity"])) // Entity inside a CLI script |
|
| 86 | 86 | {
|
| 87 | 87 | Globals::$conf->entity = $_ENV["dol_entity"]; |
| 88 | 88 | } |
| 89 | -else if (isset($_POST["loginfunction"]) && GETPOST("entity",'int')) // Just after a login page
|
|
| 89 | +else if (isset($_POST["loginfunction"]) && GETPOST("entity", 'int')) // Just after a login page
|
|
| 90 | 90 | {
|
| 91 | 91 | Globals::$conf->entity = GETPOST("entity", 'int');
|
| 92 | 92 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | if (!is_numeric(Globals::$conf->entity)) |
| 100 | 100 | Globals::$conf->entity = 1; |
| 101 | 101 | |
| 102 | -if (! defined('NOREQUIREDB'))
|
|
| 102 | +if (!defined('NOREQUIREDB'))
|
|
| 103 | 103 | {
|
| 104 | 104 | //print "Will work with data into entity instance number '".Globals::$conf->entity."'"; |
| 105 | 105 | // Here we read database (llx_const table) and define Globals::$conf->global->XXX var. |
@@ -122,26 +122,26 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | // If software has been locked. Only login Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED is allowed. |
| 124 | 124 | if (!empty(Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED)) {
|
| 125 | - $ok=0; |
|
| 126 | - if ((! session_id() || ! isset($_SESSION["dol_login"])) && ! isset($_POST["username"]) && ! empty($_SERVER["GATEWAY_INTERFACE"])) $ok=1; // We let working pages if not logged and inside a web browser (login form, to allow login by admin) |
|
| 125 | + $ok = 0; |
|
| 126 | + if ((!session_id() || !isset($_SESSION["dol_login"])) && !isset($_POST["username"]) && !empty($_SERVER["GATEWAY_INTERFACE"])) $ok = 1; // We let working pages if not logged and inside a web browser (login form, to allow login by admin) |
|
| 127 | 127 | elseif (isset($_POST["username"]) && $_POST["username"] == Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) |
| 128 | - $ok = 1; // We let working pages that is a login submission (login submit, to allow login by admin) |
|
| 129 | - elseif (defined('NOREQUIREDB')) $ok=1; // We let working pages that don't need database access (xxx.css.php)
|
|
| 130 | - elseif (defined('EVEN_IF_ONLY_LOGIN_ALLOWED')) $ok=1; // We let working pages that ask to work even if only login enabled (logout.php)
|
|
| 128 | + $ok = 1; // We let working pages that is a login submission (login submit, to allow login by admin) |
|
| 129 | + elseif (defined('NOREQUIREDB')) $ok = 1; // We let working pages that don't need database access (xxx.css.php)
|
|
| 130 | + elseif (defined('EVEN_IF_ONLY_LOGIN_ALLOWED')) $ok = 1; // We let working pages that ask to work even if only login enabled (logout.php)
|
|
| 131 | 131 | elseif (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] == Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) |
| 132 | 132 | $ok = 1; // We let working if user is allowed admin |
| 133 | - if (! $ok) |
|
| 133 | + if (!$ok) |
|
| 134 | 134 | {
|
| 135 | 135 | if (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] != Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) {
|
| 136 | 136 | print 'Sorry, your application is offline.'."\n"; |
| 137 | - print 'You are logged with user "' . $_SESSION["dol_login"] . '" and only administrator user "' . Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED . '" is allowed to connect for the moment.' . "\n"; |
|
| 138 | - $nexturl=DOL_URL_ROOT.'/user/logout.php'; |
|
| 137 | + print 'You are logged with user "'.$_SESSION["dol_login"].'" and only administrator user "'.Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED.'" is allowed to connect for the moment.'."\n"; |
|
| 138 | + $nexturl = DOL_URL_ROOT.'/user/logout.php'; |
|
| 139 | 139 | print 'Please try later or <a href="'.$nexturl.'">click here to disconnect and change login user</a>...'."\n"; |
| 140 | 140 | } |
| 141 | 141 | else |
| 142 | 142 | {
|
| 143 | - print 'Sorry, your application is offline. Only administrator user "' . Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED . '" is allowed to connect for the moment.' . "\n"; |
|
| 144 | - $nexturl=DOL_URL_ROOT.'/'; |
|
| 143 | + print 'Sorry, your application is offline. Only administrator user "'.Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED.'" is allowed to connect for the moment.'."\n"; |
|
| 144 | + $nexturl = DOL_URL_ROOT.'/'; |
|
| 145 | 145 | print 'Please try later or <a href="'.$nexturl.'">click here to change login user</a>...'."\n"; |
| 146 | 146 | } |
| 147 | 147 | exit; |
@@ -149,11 +149,11 @@ discard block |
||
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | // Create object $mysoc (A thirdparty object that contains properties of companies managed by Dolibarr. |
| 152 | -if (! defined('NOREQUIREDB') && ! defined('NOREQUIRESOC'))
|
|
| 152 | +if (!defined('NOREQUIREDB') && !defined('NOREQUIRESOC'))
|
|
| 153 | 153 | {
|
| 154 | - require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php'; |
|
| 154 | + require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; |
|
| 155 | 155 | |
| 156 | - $mysoc=new Societe($db); |
|
| 156 | + $mysoc = new Societe($db); |
|
| 157 | 157 | $mysoc->setMysoc($conf); |
| 158 | 158 | |
| 159 | 159 | // For some countries, we need to invert our address with customer address |
@@ -163,15 +163,15 @@ discard block |
||
| 163 | 163 | |
| 164 | 164 | |
| 165 | 165 | // Set default language (must be after the setValues setting global Globals::$conf->global->MAIN_LANG_DEFAULT. Page main.inc.php will overwrite langs->defaultlang with user value later) |
| 166 | -if (! defined('NOREQUIRETRAN'))
|
|
| 166 | +if (!defined('NOREQUIRETRAN'))
|
|
| 167 | 167 | {
|
| 168 | 168 | $langcode = (GETPOST('lang', 'aZ09') ? GETPOST('lang', 'aZ09', 1) : (empty(Globals::$conf->global->MAIN_LANG_DEFAULT) ? 'auto' : Globals::$conf->global->MAIN_LANG_DEFAULT));
|
| 169 | - if (defined('MAIN_LANG_DEFAULT')) $langcode=constant('MAIN_LANG_DEFAULT');
|
|
| 169 | + if (defined('MAIN_LANG_DEFAULT')) $langcode = constant('MAIN_LANG_DEFAULT');
|
|
| 170 | 170 | $langs->setDefaultLang($langcode); |
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | |
| 174 | 174 | |
| 175 | 175 | |
| 176 | -if (! defined('MAIN_LABEL_MENTION_NPR') ) define('MAIN_LABEL_MENTION_NPR','NPR');
|
|
| 176 | +if (!defined('MAIN_LABEL_MENTION_NPR')) define('MAIN_LABEL_MENTION_NPR', 'NPR');
|
|
| 177 | 177 | |
@@ -44,9 +44,16 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | |
| 46 | 46 | // Chargement des includes principaux de librairies communes |
| 47 | -if (! defined('NOREQUIREUSER')) require_once DOL_DOCUMENT_ROOT .'/user/class/user.class.php'; // Need 500ko memory
|
|
| 48 | -if (! defined('NOREQUIRETRAN')) require_once DOL_DOCUMENT_ROOT .'/core/class/translate.class.php';
|
|
| 49 | -if (! defined('NOREQUIRESOC')) require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php';
|
|
| 47 | +if (! defined('NOREQUIREUSER')) { |
|
| 48 | + require_once DOL_DOCUMENT_ROOT .'/user/class/user.class.php'; |
|
| 49 | +} |
|
| 50 | +// Need 500ko memory |
|
| 51 | +if (! defined('NOREQUIRETRAN')) { |
|
| 52 | + require_once DOL_DOCUMENT_ROOT .'/core/class/translate.class.php'; |
|
| 53 | +} |
|
| 54 | +if (! defined('NOREQUIRESOC')) { |
|
| 55 | + require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php'; |
|
| 56 | +} |
|
| 50 | 57 | |
| 51 | 58 | |
| 52 | 59 | |
@@ -78,26 +85,32 @@ discard block |
||
| 78 | 85 | */ |
| 79 | 86 | |
| 80 | 87 | // By default conf->entity is 1, but we change this if we ask another value. |
| 81 | -if (session_id() && ! empty($_SESSION["dol_entity"])) // Entity inside an opened session |
|
| 88 | +if (session_id() && ! empty($_SESSION["dol_entity"])) { |
|
| 89 | + // Entity inside an opened session |
|
| 82 | 90 | {
|
| 83 | - Globals::$conf->entity = $_SESSION["dol_entity"]; |
|
| 84 | -} |
|
| 85 | -else if (! empty($_ENV["dol_entity"])) // Entity inside a CLI script |
|
| 91 | + Globals::$conf->entity = $_SESSION["dol_entity"]; |
|
| 92 | +} |
|
| 93 | +} else if (! empty($_ENV["dol_entity"])) { |
|
| 94 | + // Entity inside a CLI script |
|
| 86 | 95 | {
|
| 87 | - Globals::$conf->entity = $_ENV["dol_entity"]; |
|
| 88 | -} |
|
| 89 | -else if (isset($_POST["loginfunction"]) && GETPOST("entity",'int')) // Just after a login page
|
|
| 96 | + Globals::$conf->entity = $_ENV["dol_entity"]; |
|
| 97 | +} |
|
| 98 | +} else if (isset($_POST["loginfunction"]) && GETPOST("entity",'int')) { |
|
| 99 | + // Just after a login page |
|
| 90 | 100 | {
|
| 91 | - Globals::$conf->entity = GETPOST("entity", 'int');
|
|
| 92 | -} |
|
| 93 | -else if (defined('DOLENTITY') && is_numeric(DOLENTITY)) // For public page with MultiCompany module
|
|
| 101 | + Globals::$conf->entity = GETPOST("entity", 'int'); |
|
| 102 | +} |
|
| 103 | +} else if (defined('DOLENTITY') && is_numeric(DOLENTITY)) { |
|
| 104 | + // For public page with MultiCompany module |
|
| 94 | 105 | {
|
| 95 | - Globals::$conf->entity = DOLENTITY; |
|
| 106 | + Globals::$conf->entity = DOLENTITY; |
|
| 107 | +} |
|
| 96 | 108 | } |
| 97 | 109 | |
| 98 | 110 | // Sanitize entity |
| 99 | -if (!is_numeric(Globals::$conf->entity)) |
|
| 100 | - Globals::$conf->entity = 1; |
|
| 111 | +if (!is_numeric(Globals::$conf->entity)) { |
|
| 112 | + Globals::$conf->entity = 1; |
|
| 113 | +} |
|
| 101 | 114 | |
| 102 | 115 | if (! defined('NOREQUIREDB'))
|
| 103 | 116 | {
|
@@ -123,13 +136,26 @@ discard block |
||
| 123 | 136 | // If software has been locked. Only login Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED is allowed. |
| 124 | 137 | if (!empty(Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED)) {
|
| 125 | 138 | $ok=0; |
| 126 | - if ((! session_id() || ! isset($_SESSION["dol_login"])) && ! isset($_POST["username"]) && ! empty($_SERVER["GATEWAY_INTERFACE"])) $ok=1; // We let working pages if not logged and inside a web browser (login form, to allow login by admin) |
|
| 127 | - elseif (isset($_POST["username"]) && $_POST["username"] == Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) |
|
| 128 | - $ok = 1; // We let working pages that is a login submission (login submit, to allow login by admin) |
|
| 129 | - elseif (defined('NOREQUIREDB')) $ok=1; // We let working pages that don't need database access (xxx.css.php)
|
|
| 130 | - elseif (defined('EVEN_IF_ONLY_LOGIN_ALLOWED')) $ok=1; // We let working pages that ask to work even if only login enabled (logout.php)
|
|
| 131 | - elseif (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] == Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) |
|
| 132 | - $ok = 1; // We let working if user is allowed admin |
|
| 139 | + if ((! session_id() || ! isset($_SESSION["dol_login"])) && ! isset($_POST["username"]) && ! empty($_SERVER["GATEWAY_INTERFACE"])) { |
|
| 140 | + $ok=1; |
|
| 141 | + } |
|
| 142 | + // We let working pages if not logged and inside a web browser (login form, to allow login by admin) |
|
| 143 | + elseif (isset($_POST["username"]) && $_POST["username"] == Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) { |
|
| 144 | + $ok = 1; |
|
| 145 | + } |
|
| 146 | + // We let working pages that is a login submission (login submit, to allow login by admin) |
|
| 147 | + elseif (defined('NOREQUIREDB')) { |
|
| 148 | + $ok=1; |
|
| 149 | + } |
|
| 150 | + // We let working pages that don't need database access (xxx.css.php) |
|
| 151 | + elseif (defined('EVEN_IF_ONLY_LOGIN_ALLOWED')) { |
|
| 152 | + $ok=1; |
|
| 153 | + } |
|
| 154 | + // We let working pages that ask to work even if only login enabled (logout.php) |
|
| 155 | + elseif (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] == Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) { |
|
| 156 | + $ok = 1; |
|
| 157 | + } |
|
| 158 | + // We let working if user is allowed admin |
|
| 133 | 159 | if (! $ok) |
| 134 | 160 | {
|
| 135 | 161 | if (session_id() && isset($_SESSION["dol_login"]) && $_SESSION["dol_login"] != Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED) {
|
@@ -137,8 +163,7 @@ discard block |
||
| 137 | 163 | print 'You are logged with user "' . $_SESSION["dol_login"] . '" and only administrator user "' . Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED . '" is allowed to connect for the moment.' . "\n"; |
| 138 | 164 | $nexturl=DOL_URL_ROOT.'/user/logout.php'; |
| 139 | 165 | print 'Please try later or <a href="'.$nexturl.'">click here to disconnect and change login user</a>...'."\n"; |
| 140 | - } |
|
| 141 | - else |
|
| 166 | + } else |
|
| 142 | 167 | {
|
| 143 | 168 | print 'Sorry, your application is offline. Only administrator user "' . Globals::$conf->global->MAIN_ONLY_LOGIN_ALLOWED . '" is allowed to connect for the moment.' . "\n"; |
| 144 | 169 | $nexturl=DOL_URL_ROOT.'/'; |
@@ -157,21 +182,26 @@ discard block |
||
| 157 | 182 | $mysoc->setMysoc($conf); |
| 158 | 183 | |
| 159 | 184 | // For some countries, we need to invert our address with customer address |
| 160 | - if ($mysoc->country_code == 'DE' && !isset(Globals::$conf->global->MAIN_INVERT_SENDER_RECIPIENT)) |
|
| 161 | - Globals::$conf->global->MAIN_INVERT_SENDER_RECIPIENT = 1; |
|
| 162 | -} |
|
| 185 | + if ($mysoc->country_code == 'DE' && !isset(Globals::$conf->global->MAIN_INVERT_SENDER_RECIPIENT)) { |
|
| 186 | + Globals::$conf->global->MAIN_INVERT_SENDER_RECIPIENT = 1; |
|
| 187 | + } |
|
| 188 | + } |
|
| 163 | 189 | |
| 164 | 190 | |
| 165 | 191 | // Set default language (must be after the setValues setting global Globals::$conf->global->MAIN_LANG_DEFAULT. Page main.inc.php will overwrite langs->defaultlang with user value later) |
| 166 | 192 | if (! defined('NOREQUIRETRAN'))
|
| 167 | 193 | {
|
| 168 | 194 | $langcode = (GETPOST('lang', 'aZ09') ? GETPOST('lang', 'aZ09', 1) : (empty(Globals::$conf->global->MAIN_LANG_DEFAULT) ? 'auto' : Globals::$conf->global->MAIN_LANG_DEFAULT));
|
| 169 | - if (defined('MAIN_LANG_DEFAULT')) $langcode=constant('MAIN_LANG_DEFAULT');
|
|
| 195 | + if (defined('MAIN_LANG_DEFAULT')) { |
|
| 196 | + $langcode=constant('MAIN_LANG_DEFAULT'); |
|
| 197 | + } |
|
| 170 | 198 | $langs->setDefaultLang($langcode); |
| 171 | 199 | } |
| 172 | 200 | |
| 173 | 201 | |
| 174 | 202 | |
| 175 | 203 | |
| 176 | -if (! defined('MAIN_LABEL_MENTION_NPR') ) define('MAIN_LABEL_MENTION_NPR','NPR');
|
|
| 204 | +if (! defined('MAIN_LABEL_MENTION_NPR') ) { |
|
| 205 | + define('MAIN_LABEL_MENTION_NPR','NPR'); |
|
| 206 | +} |
|
| 177 | 207 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $res = @include '../../main.inc.php'; |
| 35 | 35 | if ($res == 'ERROR_NOT_LOGGED') { |
| 36 | 36 | $langs->load("other"); |
| 37 | - $arrayresult['jumptologin'] = array('img' => 'object_generic', 'label' => $langs->trans("JumpToLogin"), 'text' => '<span class="fa fa-sign-in"></span> ' . $langs->trans("JumpToLogin"), 'url' => DOL_URL_ROOT . '/index.php'); |
|
| 37 | + $arrayresult['jumptologin'] = array('img' => 'object_generic', 'label' => $langs->trans("JumpToLogin"), 'text' => '<span class="fa fa-sign-in"></span> '.$langs->trans("JumpToLogin"), 'url' => DOL_URL_ROOT.'/index.php'); |
|
| 38 | 38 | print json_encode($arrayresult); |
| 39 | 39 | /* |
| 40 | 40 | if (is_object($db)) |
@@ -55,76 +55,76 @@ discard block |
||
| 55 | 55 | // Define $searchform |
| 56 | 56 | |
| 57 | 57 | if (!empty($conf->adherent->enabled) && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->rights->adherent->lire) { |
| 58 | - $arrayresult['searchintomember'] = array('position' => 8, 'shortcut' => 'M', 'img' => 'object_user', 'label' => $langs->trans("SearchIntoMembers", $search_boxvalue), 'text' => img_picto('', 'object_user') . ' ' . $langs->trans("SearchIntoMembers", $search_boxvalue), 'url' => DOL_URL_ROOT . '/adherents/list.php' . ($search_boxvalue ? '?sall=' . urlencode($search_boxvalue) : '')); |
|
| 58 | + $arrayresult['searchintomember'] = array('position' => 8, 'shortcut' => 'M', 'img' => 'object_user', 'label' => $langs->trans("SearchIntoMembers", $search_boxvalue), 'text' => img_picto('', 'object_user').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url' => DOL_URL_ROOT.'/adherents/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | if (((!empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || !empty($conf->fournisseur->enabled)) && empty($conf->global->MAIN_SEARCHFORM_SOCIETE_DISABLED) && $user->rights->societe->lire) { |
| 62 | - $arrayresult['searchintothirdparty'] = array('position' => 10, 'shortcut' => 'T', 'img' => 'object_company', 'label' => $langs->trans("SearchIntoThirdparties", $search_boxvalue), 'text' => img_picto('', 'object_company') . ' ' . $langs->trans("SearchIntoThirdparties", $search_boxvalue), 'url' => DOL_URL_ROOT . '/societe/list.php' . ($search_boxvalue ? '?sall=' . urlencode($search_boxvalue) : '')); |
|
| 62 | + $arrayresult['searchintothirdparty'] = array('position' => 10, 'shortcut' => 'T', 'img' => 'object_company', 'label' => $langs->trans("SearchIntoThirdparties", $search_boxvalue), 'text' => img_picto('', 'object_company').' '.$langs->trans("SearchIntoThirdparties", $search_boxvalue), 'url' => DOL_URL_ROOT.'/societe/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | if (!empty($conf->societe->enabled) && empty($conf->global->MAIN_SEARCHFORM_CONTACT_DISABLED) && $user->rights->societe->lire) { |
| 66 | - $arrayresult['searchintocontact'] = array('position' => 15, 'shortcut' => 'A', 'img' => 'object_contact', 'label' => $langs->trans("SearchIntoContacts", $search_boxvalue), 'text' => img_picto('', 'object_contact') . ' ' . $langs->trans("SearchIntoContacts", $search_boxvalue), 'url' => DOL_URL_ROOT . '/contact/list.php' . ($search_boxvalue ? '?sall=' . urlencode($search_boxvalue) : '')); |
|
| 66 | + $arrayresult['searchintocontact'] = array('position' => 15, 'shortcut' => 'A', 'img' => 'object_contact', 'label' => $langs->trans("SearchIntoContacts", $search_boxvalue), 'text' => img_picto('', 'object_contact').' '.$langs->trans("SearchIntoContacts", $search_boxvalue), 'url' => DOL_URL_ROOT.'/contact/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | if (((!empty($conf->product->enabled) && $user->rights->produit->lire) || (!empty($conf->service->enabled) && $user->rights->service->lire)) && empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE_DISABLED)) { |
| 70 | - $arrayresult['searchintoproduct'] = array('position' => 30, 'shortcut' => 'P', 'img' => 'object_product', 'label' => $langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'text' => img_picto('', 'object_product') . ' ' . $langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'url' => DOL_URL_ROOT . '/product/list.php' . ($search_boxvalue ? '?sall=' . urlencode($search_boxvalue) : '')); |
|
| 70 | + $arrayresult['searchintoproduct'] = array('position' => 30, 'shortcut' => 'P', 'img' => 'object_product', 'label' => $langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'text' => img_picto('', 'object_product').' '.$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'url' => DOL_URL_ROOT.'/product/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_PROJECT_DISABLED) && $user->rights->projet->lire) { |
| 74 | - $arrayresult['searchintoprojects'] = array('position' => 40, 'shortcut' => 'Q', 'img' => 'object_projectpub', 'label' => $langs->trans("SearchIntoProjects", $search_boxvalue), 'text' => img_picto('', 'object_projectpub') . ' ' . $langs->trans("SearchIntoProjects", $search_boxvalue), 'url' => DOL_URL_ROOT . '/projet/list.php' . ($search_boxvalue ? '?search_all=' . urlencode($search_boxvalue) : '')); |
|
| 74 | + $arrayresult['searchintoprojects'] = array('position' => 40, 'shortcut' => 'Q', 'img' => 'object_projectpub', 'label' => $langs->trans("SearchIntoProjects", $search_boxvalue), 'text' => img_picto('', 'object_projectpub').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url' => DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && $user->rights->projet->lire) { |
| 78 | - $arrayresult['searchintotasks'] = array('position' => 45, 'img' => 'object_task', 'label' => $langs->trans("SearchIntoTasks", $search_boxvalue), 'text' => img_picto('', 'object_task') . ' ' . $langs->trans("SearchIntoTasks", $search_boxvalue), 'url' => DOL_URL_ROOT . '/projet/tasks/list.php' . ($search_boxvalue ? '?search_all=' . urlencode($search_boxvalue) : '')); |
|
| 78 | + $arrayresult['searchintotasks'] = array('position' => 45, 'img' => 'object_task', 'label' => $langs->trans("SearchIntoTasks", $search_boxvalue), 'text' => img_picto('', 'object_task').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url' => DOL_URL_ROOT.'/projet/tasks/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | if (!empty($conf->propal->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_PROPAL_DISABLED) && $user->rights->propal->lire) { |
| 82 | - $arrayresult['searchintopropal'] = array('position' => 60, 'img' => 'object_propal', 'label' => $langs->trans("SearchIntoCustomerProposals", $search_boxvalue), 'text' => img_picto('', 'object_propal') . ' ' . $langs->trans("SearchIntoCustomerProposals", $search_boxvalue), 'url' => DOL_URL_ROOT . '/comm/propal/list.php' . ($search_boxvalue ? '?sall=' . urlencode($search_boxvalue) : '')); |
|
| 82 | + $arrayresult['searchintopropal'] = array('position' => 60, 'img' => 'object_propal', 'label' => $langs->trans("SearchIntoCustomerProposals", $search_boxvalue), 'text' => img_picto('', 'object_propal').' '.$langs->trans("SearchIntoCustomerProposals", $search_boxvalue), 'url' => DOL_URL_ROOT.'/comm/propal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | if (!empty($conf->commande->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_ORDER_DISABLED) && $user->rights->commande->lire) { |
| 86 | - $arrayresult['searchintoorder'] = array('position' => 70, 'img' => 'object_order', 'label' => $langs->trans("SearchIntoCustomerOrders", $search_boxvalue), 'text' => img_picto('', 'object_order') . ' ' . $langs->trans("SearchIntoCustomerOrders", $search_boxvalue), 'url' => DOL_URL_ROOT . '/commande/list.php' . ($search_boxvalue ? '?sall=' . urlencode($search_boxvalue) : '')); |
|
| 86 | + $arrayresult['searchintoorder'] = array('position' => 70, 'img' => 'object_order', 'label' => $langs->trans("SearchIntoCustomerOrders", $search_boxvalue), 'text' => img_picto('', 'object_order').' '.$langs->trans("SearchIntoCustomerOrders", $search_boxvalue), 'url' => DOL_URL_ROOT.'/commande/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | if (!empty($conf->expedition->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_SHIPMENT_DISABLED) && $user->rights->expedition->lire) { |
| 90 | - $arrayresult['searchintoshipment'] = array('position' => 80, 'img' => 'object_sending', 'label' => $langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'text' => img_picto('', 'object_sending') . ' ' . $langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'url' => DOL_URL_ROOT . '/expedition/list.php' . ($search_boxvalue ? '?sall=' . urlencode($search_boxvalue) : '')); |
|
| 90 | + $arrayresult['searchintoshipment'] = array('position' => 80, 'img' => 'object_sending', 'label' => $langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'text' => img_picto('', 'object_sending').' '.$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'url' => DOL_URL_ROOT.'/expedition/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | if (!empty($conf->facture->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_INVOICE_DISABLED) && $user->rights->facture->lire) { |
| 94 | - $arrayresult['searchintoinvoice'] = array('position' => 90, 'img' => 'object_bill', 'label' => $langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'text' => img_picto('', 'object_bill') . ' ' . $langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'url' => DOL_URL_ROOT . '/compta/facture/list.php' . ($search_boxvalue ? '?sall=' . urlencode($search_boxvalue) : '')); |
|
| 94 | + $arrayresult['searchintoinvoice'] = array('position' => 90, 'img' => 'object_bill', 'label' => $langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'text' => img_picto('', 'object_bill').' '.$langs->trans("SearchIntoCustomerInvoices", $search_boxvalue), 'url' => DOL_URL_ROOT.'/compta/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | if (!empty($conf->supplier_proposal->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->rights->supplier_proposal->lire) { |
| 98 | - $arrayresult['searchintosupplierpropal'] = array('position' => 100, 'img' => 'object_propal', 'label' => $langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text' => img_picto('', 'object_propal') . ' ' . $langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url' => DOL_URL_ROOT . '/supplier_proposal/list.php' . ($search_boxvalue ? '?sall=' . urlencode($search_boxvalue) : '')); |
|
| 98 | + $arrayresult['searchintosupplierpropal'] = array('position' => 100, 'img' => 'object_propal', 'label' => $langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text' => img_picto('', 'object_propal').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url' => DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED) && $user->rights->fournisseur->commande->lire) { |
| 102 | - $arrayresult['searchintosupplierorder'] = array('position' => 110, 'img' => 'object_order', 'label' => $langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text' => img_picto('', 'object_order') . ' ' . $langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url' => DOL_URL_ROOT . '/fourn/commande/list.php' . ($search_boxvalue ? '?search_all=' . urlencode($search_boxvalue) : '')); |
|
| 102 | + $arrayresult['searchintosupplierorder'] = array('position' => 110, 'img' => 'object_order', 'label' => $langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text' => img_picto('', 'object_order').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url' => DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED) && $user->rights->fournisseur->facture->lire) { |
| 106 | - $arrayresult['searchintosupplierinvoice'] = array('position' => 120, 'img' => 'object_bill', 'label' => $langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text' => img_picto('', 'object_bill') . ' ' . $langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url' => DOL_URL_ROOT . '/fourn/facture/list.php' . ($search_boxvalue ? '?sall=' . urlencode($search_boxvalue) : '')); |
|
| 106 | + $arrayresult['searchintosupplierinvoice'] = array('position' => 120, 'img' => 'object_bill', 'label' => $langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text' => img_picto('', 'object_bill').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url' => DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | if (!empty($conf->contrat->enabled) && empty($conf->global->MAIN_SEARCHFORM_CONTRACT_DISABLED) && $user->rights->contrat->lire) { |
| 110 | - $arrayresult['searchintocontract'] = array('position' => 130, 'img' => 'object_contract', 'label' => $langs->trans("SearchIntoContracts", $search_boxvalue), 'text' => img_picto('', 'object_contract') . ' ' . $langs->trans("SearchIntoContracts", $search_boxvalue), 'url' => DOL_URL_ROOT . '/contrat/list.php' . ($search_boxvalue ? '?sall=' . urlencode($search_boxvalue) : '')); |
|
| 110 | + $arrayresult['searchintocontract'] = array('position' => 130, 'img' => 'object_contract', 'label' => $langs->trans("SearchIntoContracts", $search_boxvalue), 'text' => img_picto('', 'object_contract').' '.$langs->trans("SearchIntoContracts", $search_boxvalue), 'url' => DOL_URL_ROOT.'/contrat/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | if (!empty($conf->ficheinter->enabled) && empty($conf->global->MAIN_SEARCHFORM_FICHINTER_DISABLED) && $user->rights->ficheinter->lire) { |
| 114 | - $arrayresult['searchintointervention'] = array('position' => 140, 'img' => 'object_intervention', 'label' => $langs->trans("SearchIntoInterventions", $search_boxvalue), 'text' => img_picto('', 'object_intervention') . ' ' . $langs->trans("SearchIntoInterventions", $search_boxvalue), 'url' => DOL_URL_ROOT . '/fichinter/list.php' . ($search_boxvalue ? '?sall=' . urlencode($search_boxvalue) : '')); |
|
| 114 | + $arrayresult['searchintointervention'] = array('position' => 140, 'img' => 'object_intervention', 'label' => $langs->trans("SearchIntoInterventions", $search_boxvalue), 'text' => img_picto('', 'object_intervention').' '.$langs->trans("SearchIntoInterventions", $search_boxvalue), 'url' => DOL_URL_ROOT.'/fichinter/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); |
|
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | // HR |
| 118 | 118 | if (!empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->rights->user->user->lire) { |
| 119 | - $arrayresult['searchintouser'] = array('position' => 200, 'shortcut' => 'U', 'img' => 'object_user', 'label' => $langs->trans("SearchIntoUsers", $search_boxvalue), 'text' => img_picto('', 'object_user') . ' ' . $langs->trans("SearchIntoUsers", $search_boxvalue), 'url' => DOL_URL_ROOT . '/user/list.php' . ($search_boxvalue ? '?sall=' . urlencode($search_boxvalue) : '')); |
|
| 119 | + $arrayresult['searchintouser'] = array('position' => 200, 'shortcut' => 'U', 'img' => 'object_user', 'label' => $langs->trans("SearchIntoUsers", $search_boxvalue), 'text' => img_picto('', 'object_user').' '.$langs->trans("SearchIntoUsers", $search_boxvalue), 'url' => DOL_URL_ROOT.'/user/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | if (!empty($conf->expensereport->enabled) && empty($conf->global->MAIN_SEARCHFORM_EXPENSEREPORT_DISABLED) && $user->rights->expensereport->lire) { |
| 123 | - $arrayresult['searchintoexpensereport'] = array('position' => 210, 'img' => 'object_trip', 'label' => $langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'text' => img_picto('', 'object_trip') . ' ' . $langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url' => DOL_URL_ROOT . '/expensereport/list.php?mainmenu=hrm' . ($search_boxvalue ? '&sall=' . urlencode($search_boxvalue) : '')); |
|
| 123 | + $arrayresult['searchintoexpensereport'] = array('position' => 210, 'img' => 'object_trip', 'label' => $langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'text' => img_picto('', 'object_trip').' '.$langs->trans("SearchIntoExpenseReports", $search_boxvalue), 'url' => DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | if (!empty($conf->holiday->enabled) && empty($conf->global->MAIN_SEARCHFORM_HOLIDAY_DISABLED) && $user->rights->holiday->read) { |
| 127 | - $arrayresult['searchintoleaves'] = array('position' => 220, 'img' => 'object_holiday', 'label' => $langs->trans("SearchIntoLeaves", $search_boxvalue), 'text' => img_picto('', 'object_holiday') . ' ' . $langs->trans("SearchIntoLeaves", $search_boxvalue), 'url' => DOL_URL_ROOT . '/holiday/list.php?mainmenu=hrm' . ($search_boxvalue ? '&sall=' . urlencode($search_boxvalue) : '')); |
|
| 127 | + $arrayresult['searchintoleaves'] = array('position' => 220, 'img' => 'object_holiday', 'label' => $langs->trans("SearchIntoLeaves", $search_boxvalue), 'text' => img_picto('', 'object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url' => DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | // This allow to keep a search entry to the top |
| 148 | 148 | if (!empty($conf->global->DEFAULT_SEARCH_INTO_MODULE)) { |
| 149 | - $key = 'searchinto' . $conf->global->DEFAULT_SEARCH_INTO_MODULE; |
|
| 149 | + $key = 'searchinto'.$conf->global->DEFAULT_SEARCH_INTO_MODULE; |
|
| 150 | 150 | if (array_key_exists($key, $arrayresult)) |
| 151 | 151 | $arrayresult[$key]['position'] = -10; |
| 152 | 152 | } |
@@ -141,14 +141,16 @@ |
||
| 141 | 141 | $reshook = Globals::$hookManager->executeHooks('addSearchEntry', $parameters); |
| 142 | 142 | if (empty($reshook)) { |
| 143 | 143 | $arrayresult = array_merge($arrayresult, Globals::$hookManager->resArray); |
| 144 | - } else |
|
| 145 | - $arrayresult = Globals::$hookManager->resArray; |
|
| 144 | + } else { |
|
| 145 | + $arrayresult = Globals::$hookManager->resArray; |
|
| 146 | + } |
|
| 146 | 147 | |
| 147 | 148 | // This allow to keep a search entry to the top |
| 148 | 149 | if (!empty($conf->global->DEFAULT_SEARCH_INTO_MODULE)) { |
| 149 | 150 | $key = 'searchinto' . $conf->global->DEFAULT_SEARCH_INTO_MODULE; |
| 150 | - if (array_key_exists($key, $arrayresult)) |
|
| 151 | - $arrayresult[$key]['position'] = -10; |
|
| 151 | + if (array_key_exists($key, $arrayresult)) { |
|
| 152 | + $arrayresult[$key]['position'] = -10; |
|
| 153 | + } |
|
| 152 | 154 | } |
| 153 | 155 | |
| 154 | 156 | // Sort on position |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | { |
| 41 | 41 | $t = '?'; |
| 42 | 42 | if ($mode == 'user') |
| 43 | - $t = getenv('APACHE_RUN_USER'); // $_ENV['APACHE_RUN_USER'] is empty |
|
| 43 | + $t = getenv('APACHE_RUN_USER'); // $_ENV['APACHE_RUN_USER'] is empty |
|
| 44 | 44 | if ($mode == 'group') |
| 45 | 45 | $t = getenv('APACHE_RUN_GROUP'); |
| 46 | 46 | return $t; |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $entitytotest = 1; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - DolUtils::dol_syslog("checkLoginPassEntity usertotest=" . $usertotest . " entitytotest=" . $entitytotest . " authmode=" . join(',', $authmode)); |
|
| 67 | + DolUtils::dol_syslog("checkLoginPassEntity usertotest=".$usertotest." entitytotest=".$entitytotest." authmode=".join(',', $authmode)); |
|
| 68 | 68 | $login = ''; |
| 69 | 69 | |
| 70 | 70 | // Validation of login/pass/entity with standard modules |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | if ($test && $mode && !$login) { |
| 75 | 75 | // Validation of login/pass/entity for mode $mode |
| 76 | 76 | $mode = trim($mode); |
| 77 | - $authfile = 'functions_' . $mode . '.php'; |
|
| 77 | + $authfile = 'functions_'.$mode.'.php'; |
|
| 78 | 78 | $fullauthfile = ''; |
| 79 | 79 | |
| 80 | 80 | /* |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | $dirlogin = array_merge(array("/Helpers/login"), (array) Globals::$conf->modules_parts['login']); |
| 94 | 94 | foreach ($dirlogin as $reldir) { |
| 95 | 95 | // Check if file found (do not use dol_is_file to avoid loading files.lib.php) |
| 96 | - $tmpnewauthfile = BASE_PATH . $reldir . '/' . $authfile; |
|
| 96 | + $tmpnewauthfile = BASE_PATH.$reldir.'/'.$authfile; |
|
| 97 | 97 | if (is_file($tmpnewauthfile)) { |
| 98 | 98 | $fullauthfile = $tmpnewauthfile; |
| 99 | 99 | } |
@@ -105,10 +105,10 @@ discard block |
||
| 105 | 105 | } |
| 106 | 106 | if ($fullauthfile && $result) { |
| 107 | 107 | // Call function to check user/password |
| 108 | - $function = 'check_user_password_' . $mode; |
|
| 108 | + $function = 'check_user_password_'.$mode; |
|
| 109 | 109 | $login = \call_user_func($function, $usertotest, $passwordtotest, $entitytotest); |
| 110 | 110 | if ($login) { // Login is successfull |
| 111 | - $test = false; // To stop once at first login success |
|
| 111 | + $test = false; // To stop once at first login success |
|
| 112 | 112 | Globals::$conf->authmode = $mode; // This properties is defined only when logged to say what mode was successfully used |
| 113 | 113 | $dol_tz = DolUtils::GETPOST('tz'); |
| 114 | 114 | $dol_dst = DolUtils::GETPOST('dst'); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $dol_screenheight = DolUtils::GETPOST('screenheight'); |
| 117 | 117 | } |
| 118 | 118 | } else { |
| 119 | - DolUtils::dol_syslog("Authentification ko - failed to load file '" . $authfile . "'", LOG_ERR); |
|
| 119 | + DolUtils::dol_syslog("Authentification ko - failed to load file '".$authfile."'", LOG_ERR); |
|
| 120 | 120 | sleep(1); |
| 121 | 121 | // Load translation files required by the page |
| 122 | 122 | Globals::$langs->loadLangs(array('other', 'main', 'errors')); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | // Title |
| 158 | 158 | $appli = constant('DOL_APPLICATION_TITLE'); |
| 159 | - $title = $appli . ' ' . constant('DOL_VERSION'); |
|
| 159 | + $title = $appli.' '.constant('DOL_VERSION'); |
|
| 160 | 160 | if (!empty(Globals::$conf->global->MAIN_APPLICATION_TITLE)) { |
| 161 | 161 | $title = Globals::$conf->global->MAIN_APPLICATION_TITLE; |
| 162 | 162 | } |
@@ -183,19 +183,19 @@ discard block |
||
| 183 | 183 | if (!empty(Globals::$conf->modules_parts['tpl'])) { // Using this feature slow down application |
| 184 | 184 | $dirtpls = array_merge(Globals::$conf->modules_parts['tpl'], array('/core/tpl/')); |
| 185 | 185 | foreach ($dirtpls as $reldir) { |
| 186 | - $tmp = DolUtils::dol_buildpath($reldir . 'login.tpl.php'); |
|
| 186 | + $tmp = DolUtils::dol_buildpath($reldir.'login.tpl.php'); |
|
| 187 | 187 | if (file_exists($tmp)) { |
| 188 | 188 | $template_dir = preg_replace('/login\.tpl\.php$/', '', $tmp); |
| 189 | 189 | break; |
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | } else { |
| 193 | - $template_dir = DOL_DOCUMENT_ROOT . "/core/tpl/"; |
|
| 193 | + $template_dir = DOL_DOCUMENT_ROOT."/core/tpl/"; |
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | // Set cookie for timeout management |
| 197 | 197 | $prefix = DolUtils::dol_getprefix(''); |
| 198 | - $sessiontimeout = 'DOLSESSTIMEOUT_' . $prefix; |
|
| 198 | + $sessiontimeout = 'DOLSESSTIMEOUT_'.$prefix; |
|
| 199 | 199 | if (!empty(Globals::$conf->global->MAIN_SESSION_TIMEOUT)) { |
| 200 | 200 | setcookie($sessiontimeout, Globals::$conf->global->MAIN_SESSION_TIMEOUT, 0, "/", null, false, true); |
| 201 | 201 | } |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | |
| 223 | 223 | // Execute hook getLoginPageOptions (for table) |
| 224 | 224 | $parameters = array('entity' => DolUtils::GETPOST('entity', 'int')); |
| 225 | - $reshook = Globals::$hookManager->executeHooks('getLoginPageOptions', $parameters); // Note that $action and $object may have been modified by some hooks. |
|
| 225 | + $reshook = Globals::$hookManager->executeHooks('getLoginPageOptions', $parameters); // Note that $action and $object may have been modified by some hooks. |
|
| 226 | 226 | if (is_array(Globals::$hookManager->resArray) && !empty(Globals::$hookManager->resArray)) { |
| 227 | 227 | $morelogincontent = Globals::$hookManager->resArray; // (deprecated) For compatibility |
| 228 | 228 | } else { |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | |
| 232 | 232 | // Execute hook getLoginPageExtraOptions (eg for js) |
| 233 | 233 | $parameters = array('entity' => DolUtils::GETPOST('entity', 'int')); |
| 234 | - $reshook = Globals::$hookManager->executeHooks('getLoginPageExtraOptions', $parameters); // Note that $action and $object may have been modified by some hooks. |
|
| 234 | + $reshook = Globals::$hookManager->executeHooks('getLoginPageExtraOptions', $parameters); // Note that $action and $object may have been modified by some hooks. |
|
| 235 | 235 | $moreloginextracontent = Globals::$hookManager->resPrint; |
| 236 | 236 | |
| 237 | 237 | // Login |
@@ -240,23 +240,23 @@ discard block |
||
| 240 | 240 | |
| 241 | 241 | // Show logo (search in order: small company logo, large company logo, theme logo, common logo) |
| 242 | 242 | $width = 0; |
| 243 | - $urllogo = DOL_BASE_URI . '/theme/login_logo.png'; |
|
| 243 | + $urllogo = DOL_BASE_URI.'/theme/login_logo.png'; |
|
| 244 | 244 | |
| 245 | - if (!empty($mysoc->logo_small) && is_readable(Globals::$conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_small)) { |
|
| 246 | - $urllogo = DOL_BASE_URI . '/viewimage.php?cache=1&modulepart=mycompany&file=' . urlencode('logos/thumbs/' . $mysoc->logo_small); |
|
| 247 | - } elseif (!empty($mysoc->logo) && is_readable(Globals::$conf->mycompany->dir_output . '/logos/' . $mysoc->logo)) { |
|
| 248 | - $urllogo = DOL_BASE_URI . '/viewimage.php?cache=1&modulepart=mycompany&file=' . urlencode('logos/' . $mysoc->logo); |
|
| 245 | + if (!empty($mysoc->logo_small) && is_readable(Globals::$conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { |
|
| 246 | + $urllogo = DOL_BASE_URI.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small); |
|
| 247 | + } elseif (!empty($mysoc->logo) && is_readable(Globals::$conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { |
|
| 248 | + $urllogo = DOL_BASE_URI.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); |
|
| 249 | 249 | $width = 128; |
| 250 | - } elseif (is_readable(DOL_BASE_URI . '/theme/' . Globals::$conf->theme . '/img/dolibarr_logo.png')) { |
|
| 251 | - $urllogo = DOL_BASE_URI . '/theme/' . Globals::$conf->theme . '/img/dolibarr_logo.png'; |
|
| 252 | - } elseif (is_readable(DOL_BASE_URI . '/theme/dolibarr_logo.png')) { |
|
| 253 | - $urllogo = DOL_BASE_URI . '/theme/dolibarr_logo.png'; |
|
| 250 | + } elseif (is_readable(DOL_BASE_URI.'/theme/'.Globals::$conf->theme.'/img/dolibarr_logo.png')) { |
|
| 251 | + $urllogo = DOL_BASE_URI.'/theme/'.Globals::$conf->theme.'/img/dolibarr_logo.png'; |
|
| 252 | + } elseif (is_readable(DOL_BASE_URI.'/theme/dolibarr_logo.png')) { |
|
| 253 | + $urllogo = DOL_BASE_URI.'/theme/dolibarr_logo.png'; |
|
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | // Security graphical code |
| 257 | 257 | $captcha = 0; |
| 258 | 258 | $captcha_refresh = ''; |
| 259 | - if (function_exists("imagecreatefrompng") &&!empty(Globals::$conf->global->MAIN_SECURITY_ENABLECAPTCHA)) { |
|
| 259 | + if (function_exists("imagecreatefrompng") && !empty(Globals::$conf->global->MAIN_SECURITY_ENABLECAPTCHA)) { |
|
| 260 | 260 | $captcha = 1; |
| 261 | 261 | $captcha_refresh = img_picto(Globals::$langs->trans("Refresh"), 'refresh', 'id="captcha_refresh_img"'); |
| 262 | 262 | } |
@@ -285,11 +285,11 @@ discard block |
||
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | // Google AD |
| 288 | - $main_google_ad_client = ((!empty(Globals::$conf->global->MAIN_GOOGLE_AD_CLIENT) &&!empty(Globals::$conf->global->MAIN_GOOGLE_AD_SLOT)) ? 1 : 0); |
|
| 288 | + $main_google_ad_client = ((!empty(Globals::$conf->global->MAIN_GOOGLE_AD_CLIENT) && !empty(Globals::$conf->global->MAIN_GOOGLE_AD_SLOT)) ? 1 : 0); |
|
| 289 | 289 | |
| 290 | 290 | // Set jquery theme |
| 291 | 291 | $dol_loginmesg = (!empty($_SESSION["dol_loginmesg"]) ? $_SESSION["dol_loginmesg"] : ''); |
| 292 | - $favicon = DolUtils::dol_buildpath('/theme/' . Globals::$conf->theme . '/img/favicon.ico', 1); |
|
| 292 | + $favicon = DolUtils::dol_buildpath('/theme/'.Globals::$conf->theme.'/img/favicon.ico', 1); |
|
| 293 | 293 | if (!empty(Globals::$conf->global->MAIN_FAVICON_URL)) { |
| 294 | 294 | $favicon = Globals::$conf->global->MAIN_FAVICON_URL; |
| 295 | 295 | } |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | */ |
| 323 | 323 | function makesalt($type = CRYPT_SALT_LENGTH) |
| 324 | 324 | { |
| 325 | - DolUtils::dol_syslog("makesalt type=" . $type); |
|
| 325 | + DolUtils::dol_syslog("makesalt type=".$type); |
|
| 326 | 326 | switch ($type) { |
| 327 | 327 | case 12: // 8 + 4 |
| 328 | 328 | $saltlen = 8; |
@@ -345,8 +345,8 @@ discard block |
||
| 345 | 345 | while (dol_strlen($salt) < $saltlen) |
| 346 | 346 | $salt .= chr(mt_rand(64, 126)); |
| 347 | 347 | |
| 348 | - $result = $saltprefix . $salt . $saltsuffix; |
|
| 349 | - DolUtils::dol_syslog("makesalt return=" . $result); |
|
| 348 | + $result = $saltprefix.$salt.$saltsuffix; |
|
| 349 | + DolUtils::dol_syslog("makesalt return=".$result); |
|
| 350 | 350 | return $result; |
| 351 | 351 | } |
| 352 | 352 | |
@@ -358,12 +358,12 @@ discard block |
||
| 358 | 358 | */ |
| 359 | 359 | function encodedecode_dbpassconf($level = 0) |
| 360 | 360 | { |
| 361 | - DolUtils::dol_syslog("encodedecode_dbpassconf level=" . $level, LOG_DEBUG); |
|
| 361 | + DolUtils::dol_syslog("encodedecode_dbpassconf level=".$level, LOG_DEBUG); |
|
| 362 | 362 | Globals::$config = ''; |
| 363 | 363 | $passwd = ''; |
| 364 | 364 | $passwd_crypted = ''; |
| 365 | 365 | |
| 366 | - if ($fp = fopen(DOL_DOCUMENT_ROOT . '/conf/conf.php', 'r')) { |
|
| 366 | + if ($fp = fopen(DOL_DOCUMENT_ROOT.'/conf/conf.php', 'r')) { |
|
| 367 | 367 | while (!feof($fp)) { |
| 368 | 368 | $buffer = fgets($fp, 4096); |
| 369 | 369 | |
@@ -400,10 +400,10 @@ discard block |
||
| 400 | 400 | if ($lineofpass) { |
| 401 | 401 | // Add value at end of file |
| 402 | 402 | if ($level == 0) { |
| 403 | - Globals::$config .= '$dolibarr_main_db_pass=\'' . $passwd . '\';' . "\n"; |
|
| 403 | + Globals::$config .= '$dolibarr_main_db_pass=\''.$passwd.'\';'."\n"; |
|
| 404 | 404 | } |
| 405 | 405 | if ($level == 1) { |
| 406 | - Globals::$config .= '$dolibarr_main_db_pass=\'crypted:' . $passwd_crypted . '\';' . "\n"; |
|
| 406 | + Globals::$config .= '$dolibarr_main_db_pass=\'crypted:'.$passwd_crypted.'\';'."\n"; |
|
| 407 | 407 | } |
| 408 | 408 | |
| 409 | 409 | //print 'passwd = '.$passwd.' - passwd_crypted = '.$passwd_crypted; |
@@ -415,7 +415,7 @@ discard block |
||
| 415 | 415 | fclose($fp); |
| 416 | 416 | |
| 417 | 417 | // Write new conf file |
| 418 | - $file = DOL_DOCUMENT_ROOT . '/conf/conf.php'; |
|
| 418 | + $file = DOL_DOCUMENT_ROOT.'/conf/conf.php'; |
|
| 419 | 419 | if ($fp = @fopen($file, 'w')) { |
| 420 | 420 | fputs($fp, Globals::$config); |
| 421 | 421 | fflush($fp); |
@@ -492,10 +492,10 @@ discard block |
||
| 492 | 492 | } |
| 493 | 493 | } else |
| 494 | 494 | if (!empty (Globals::$conf->global->USER_PASSWORD_GENERATED)) { |
| 495 | - $nomclass = "modGeneratePass" . ucfirst(Globals::$conf->global->USER_PASSWORD_GENERATED); |
|
| 496 | - $nomfichier = $nomclass . ".class.php"; |
|
| 495 | + $nomclass = "modGeneratePass".ucfirst(Globals::$conf->global->USER_PASSWORD_GENERATED); |
|
| 496 | + $nomfichier = $nomclass.".class.php"; |
|
| 497 | 497 | //print DOL_DOCUMENT_ROOT."/core/modules/security/generate/".$nomclass; |
| 498 | - require_once DOL_DOCUMENT_ROOT . "/core/modules/security/generate/" . $nomfichier; |
|
| 498 | + require_once DOL_DOCUMENT_ROOT."/core/modules/security/generate/".$nomfichier; |
|
| 499 | 499 | $genhandler = new $nomclass($db, Globals::$conf, Globals::$langs, $user); |
| 500 | 500 | $generated_password = $genhandler->getNewGeneratedPassword(); |
| 501 | 501 | unset($genhandler); |
@@ -88,19 +88,19 @@ discard block |
||
| 88 | 88 | $yearref = dol_print_date($gmtnow, '%Y'); |
| 89 | 89 | $monthref = dol_print_date($gmtnow, '%m'); |
| 90 | 90 | $dayref = dol_print_date($gmtnow, '%d'); |
| 91 | - if ($refgmtdate == 'now') |
|
| 92 | - $newrefgmtdate = $yearref . '-' . $monthref . '-' . $dayref; |
|
| 93 | - elseif ($refgmtdate == 'summer') |
|
| 94 | - $newrefgmtdate = $yearref . '-08-01'; |
|
| 95 | - else |
|
| 96 | - $newrefgmtdate = $yearref . '-01-01'; |
|
| 91 | + if ($refgmtdate == 'now') { |
|
| 92 | + $newrefgmtdate = $yearref . '-' . $monthref . '-' . $dayref; |
|
| 93 | + } elseif ($refgmtdate == 'summer') { |
|
| 94 | + $newrefgmtdate = $yearref . '-08-01'; |
|
| 95 | + } else { |
|
| 96 | + $newrefgmtdate = $yearref . '-01-01'; |
|
| 97 | + } |
|
| 97 | 98 | $newrefgmtdate .= 'T00:00:00+00:00'; |
| 98 | 99 | $localtz = new DateTimeZone(getServerTimeZoneString()); |
| 99 | 100 | $localdt = new DateTime($newrefgmtdate, $localtz); |
| 100 | 101 | $tmp = -1 * $localtz->getOffset($localdt); |
| 101 | 102 | //print $refgmtdate.'='.$tmp; |
| 102 | - } |
|
| 103 | - else {
|
|
| 103 | + } else {
|
|
| 104 | 104 | $tmp = 0; |
| 105 | 105 | dol_print_error('', 'PHP version must be 5.3+');
|
| 106 | 106 | } |
@@ -120,12 +120,15 @@ discard block |
||
| 120 | 120 | {
|
| 121 | 121 | global $conf; |
| 122 | 122 | |
| 123 | - if ($duration_value == 0) |
|
| 124 | - return $time; |
|
| 125 | - if ($duration_unit == 'h') |
|
| 126 | - return $time + (3600 * $duration_value); |
|
| 127 | - if ($duration_unit == 'w') |
|
| 128 | - return $time + (3600 * 24 * 7 * $duration_value); |
|
| 123 | + if ($duration_value == 0) { |
|
| 124 | + return $time; |
|
| 125 | + } |
|
| 126 | + if ($duration_unit == 'h') { |
|
| 127 | + return $time + (3600 * $duration_value); |
|
| 128 | + } |
|
| 129 | + if ($duration_unit == 'w') { |
|
| 130 | + return $time + (3600 * 24 * 7 * $duration_value); |
|
| 131 | + } |
|
| 129 | 132 | |
| 130 | 133 | $deltastring = 'P'; |
| 131 | 134 | |
@@ -148,15 +151,17 @@ discard block |
||
| 148 | 151 | } |
| 149 | 152 | |
| 150 | 153 | $date = new DateTime(); |
| 151 | - if (!empty(Globals::$conf->global->MAIN_DATE_IN_MEMORY_ARE_GMT)) |
|
| 152 | - $date->setTimezone(new DateTimeZone('UTC'));
|
|
| 154 | + if (!empty(Globals::$conf->global->MAIN_DATE_IN_MEMORY_ARE_GMT)) { |
|
| 155 | + $date->setTimezone(new DateTimeZone('UTC')); |
|
| 156 | + } |
|
| 153 | 157 | $date->setTimestamp($time); |
| 154 | 158 | $interval = new DateInterval($deltastring); |
| 155 | 159 | |
| 156 | - if ($sub) |
|
| 157 | - $date->sub($interval); |
|
| 158 | - else |
|
| 159 | - $date->add($interval); |
|
| 160 | + if ($sub) { |
|
| 161 | + $date->sub($interval); |
|
| 162 | + } else { |
|
| 163 | + $date->add($interval); |
|
| 164 | + } |
|
| 160 | 165 | |
| 161 | 166 | return $date->getTimestamp(); |
| 162 | 167 | } |
@@ -200,14 +205,20 @@ discard block |
||
| 200 | 205 | {
|
| 201 | 206 | global $langs; |
| 202 | 207 | |
| 203 | - if (empty($lengthOfDay)) |
|
| 204 | - $lengthOfDay = 86400; // 1 day = 24 hours |
|
| 205 | - if (empty($lengthOfWeek)) |
|
| 206 | - $lengthOfWeek = 7; // 1 week = 7 days |
|
| 208 | + if (empty($lengthOfDay)) { |
|
| 209 | + $lengthOfDay = 86400; |
|
| 210 | + } |
|
| 211 | + // 1 day = 24 hours |
|
| 212 | + if (empty($lengthOfWeek)) { |
|
| 213 | + $lengthOfWeek = 7; |
|
| 214 | + } |
|
| 215 | + // 1 week = 7 days |
|
| 207 | 216 | |
| 208 | 217 | if ($format == 'all' || $format == 'allwithouthour' || $format == 'allhour' || $format == 'allhourmin') {
|
| 209 | - if ((int) $iSecond === 0) |
|
| 210 | - return '0'; // This is to avoid having 0 return a 12:00 AM for en_US |
|
| 218 | + if ((int) $iSecond === 0) { |
|
| 219 | + return '0'; |
|
| 220 | + } |
|
| 221 | + // This is to avoid having 0 return a 12:00 AM for en_US |
|
| 211 | 222 | |
| 212 | 223 | $sTime = ''; |
| 213 | 224 | $sDay = 0; |
@@ -219,8 +230,9 @@ discard block |
||
| 219 | 230 | $iSecond -= $lengthOfDay; |
| 220 | 231 | } |
| 221 | 232 | $dayTranslate = $langs->trans("Day");
|
| 222 | - if ($iSecond >= ($lengthOfDay * 2)) |
|
| 223 | - $dayTranslate = $langs->trans("Days");
|
|
| 233 | + if ($iSecond >= ($lengthOfDay * 2)) { |
|
| 234 | + $dayTranslate = $langs->trans("Days"); |
|
| 235 | + } |
|
| 224 | 236 | } |
| 225 | 237 | |
| 226 | 238 | if ($lengthOfWeek < 7) {
|
@@ -229,16 +241,18 @@ discard block |
||
| 229 | 241 | $sWeek = (int) (($sDay - $sDay % $lengthOfWeek ) / $lengthOfWeek); |
| 230 | 242 | $sDay = $sDay % $lengthOfWeek; |
| 231 | 243 | $weekTranslate = $langs->trans("DurationWeek");
|
| 232 | - if ($sWeek >= 2) |
|
| 233 | - $weekTranslate = $langs->trans("DurationWeeks");
|
|
| 244 | + if ($sWeek >= 2) { |
|
| 245 | + $weekTranslate = $langs->trans("DurationWeeks"); |
|
| 246 | + } |
|
| 234 | 247 | $sTime .= $sWeek . ' ' . $weekTranslate . ' '; |
| 235 | 248 | } |
| 236 | 249 | } |
| 237 | 250 | } |
| 238 | 251 | if ($sDay > 0) {
|
| 239 | 252 | $dayTranslate = $langs->trans("Day");
|
| 240 | - if ($sDay > 1) |
|
| 241 | - $dayTranslate = $langs->trans("Days");
|
|
| 253 | + if ($sDay > 1) { |
|
| 254 | + $dayTranslate = $langs->trans("Days"); |
|
| 255 | + } |
|
| 242 | 256 | $sTime .= $sDay . ' ' . $dayTranslate . ' '; |
| 243 | 257 | } |
| 244 | 258 | |
@@ -294,8 +308,9 @@ discard block |
||
| 294 | 308 | } else if ($year_date > 0 && !empty($day_date)) {
|
| 295 | 309 | $sqldate .= " AND " . $datefield . " BETWEEN '" . $db->idate(dol_mktime(0, 0, 0, $month_date, $day_date, $year_date)); |
| 296 | 310 | $sqldate .= "' AND '" . $db->idate(dol_mktime(23, 59, 59, $month_date, $day_date, $year_date)) . "'"; |
| 297 | - } else |
|
| 298 | - $sqldate .= " AND date_format( " . $datefield . ", '%m') = '" . $db->escape($month_date) . "'"; |
|
| 311 | + } else { |
|
| 312 | + $sqldate .= " AND date_format( " . $datefield . ", '%m') = '" . $db->escape($month_date) . "'"; |
|
| 313 | + } |
|
| 299 | 314 | } else if ($year_date > 0) {
|
| 300 | 315 | $sqldate .= " AND " . $datefield . " BETWEEN '" . $db->idate(dol_get_first_day($year_date, 1, false)); |
| 301 | 316 | $sqldate .= "' AND '" . $db->idate(dol_get_last_day($year_date, 12, false)) . "'"; |
@@ -334,13 +349,14 @@ discard block |
||
| 334 | 349 | $shour = $reg[4]; |
| 335 | 350 | $smin = $reg[5]; |
| 336 | 351 | $ssec = $reg[6]; |
| 337 | - if ($syear < 50) |
|
| 338 | - $syear += 1900; |
|
| 339 | - if ($syear >= 50 && $syear < 100) |
|
| 340 | - $syear += 2000; |
|
| 352 | + if ($syear < 50) { |
|
| 353 | + $syear += 1900; |
|
| 354 | + } |
|
| 355 | + if ($syear >= 50 && $syear < 100) { |
|
| 356 | + $syear += 2000; |
|
| 357 | + } |
|
| 341 | 358 | $string = sprintf("%04d%02d%02d%02d%02d%02d", $syear, $smonth, $sday, $shour, $smin, $ssec);
|
| 342 | - } |
|
| 343 | - else if ( |
|
| 359 | + } else if ( |
|
| 344 | 360 | preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})Z$/i', $string, $reg) // Convert date with format YYYY-MM-DDTHH:MM:SSZ (RFC3339)
|
| 345 | 361 | || preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})$/i', $string, $reg) // Convert date with format YYYY-MM-DD HH:MM:SS
|
| 346 | 362 | || preg_match('/^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})Z$/i', $string, $reg) // Convert date with format YYYYMMDDTHHMMSSZ
|
@@ -474,8 +490,9 @@ discard block |
||
| 474 | 490 | */ |
| 475 | 491 | function dol_get_first_day($year, $month = 1, $gm = false) |
| 476 | 492 | {
|
| 477 | - if ($year > 9999) |
|
| 478 | - return ''; |
|
| 493 | + if ($year > 9999) { |
|
| 494 | + return ''; |
|
| 495 | + } |
|
| 479 | 496 | return dol_mktime(0, 0, 0, $month, 1, $year, $gm); |
| 480 | 497 | } |
| 481 | 498 | |
@@ -488,8 +505,9 @@ discard block |
||
| 488 | 505 | */ |
| 489 | 506 | function dol_get_last_day($year, $month = 12, $gm = false) |
| 490 | 507 | {
|
| 491 | - if ($year > 9999) |
|
| 492 | - return ''; |
|
| 508 | + if ($year > 9999) { |
|
| 509 | + return ''; |
|
| 510 | + } |
|
| 493 | 511 | if ($month == 12) {
|
| 494 | 512 | $month = 1; |
| 495 | 513 | $year += 1; |
@@ -525,8 +543,9 @@ discard block |
||
| 525 | 543 | $tmparray = dol_getdate($date, true); // detail of current day |
| 526 | 544 | //Calculate days = offset from current day |
| 527 | 545 | $days = $start_week - $tmparray['wday']; |
| 528 | - if ($days >= 1) |
|
| 529 | - $days = 7 - $days; |
|
| 546 | + if ($days >= 1) { |
|
| 547 | + $days = 7 - $days; |
|
| 548 | + } |
|
| 530 | 549 | $days = abs($days); |
| 531 | 550 | $seconds = $days * 24 * 60 * 60; |
| 532 | 551 | //print 'start_week='.$start_week.' tmparray[wday]='.$tmparray['wday'].' day offset='.$days.' seconds offset='.$seconds.'<br>'; |
@@ -590,8 +609,9 @@ discard block |
||
| 590 | 609 | $nbFerie = 0; |
| 591 | 610 | |
| 592 | 611 | // Check to ensure we use correct parameters |
| 593 | - if ((($timestampEnd - $timestampStart) % 86400) != 0) |
|
| 594 | - return 'ErrorDates must use same hours and must be GMT dates'; |
|
| 612 | + if ((($timestampEnd - $timestampStart) % 86400) != 0) { |
|
| 613 | + return 'ErrorDates must use same hours and must be GMT dates'; |
|
| 614 | + } |
|
| 595 | 615 | |
| 596 | 616 | $i = 0; |
| 597 | 617 | while (( ($lastday == 0 && $timestampStart < $timestampEnd) || ($lastday && $timestampStart <= $timestampEnd) ) && ($i < 50000)) { // Loop end when equals (Test on i is a security loop to avoid infinite loop)
|
@@ -610,12 +630,13 @@ discard block |
||
| 610 | 630 | foreach ($arrayofdaystring as $daystring) {
|
| 611 | 631 | $tmp = explode('-', $daystring);
|
| 612 | 632 | if ($tmp[2]) {
|
| 613 | - if ($tmp[0] == $annee && $tmp[1] == $mois && $tmp[2] == $jour) |
|
| 614 | - $ferie = true; |
|
| 615 | - } |
|
| 616 | - else {
|
|
| 617 | - if ($tmp[0] == $mois && $tmp[1] == $jour) |
|
| 618 | - $ferie = true; |
|
| 633 | + if ($tmp[0] == $annee && $tmp[1] == $mois && $tmp[2] == $jour) { |
|
| 634 | + $ferie = true; |
|
| 635 | + } |
|
| 636 | + } else {
|
|
| 637 | + if ($tmp[0] == $mois && $tmp[1] == $jour) { |
|
| 638 | + $ferie = true; |
|
| 639 | + } |
|
| 619 | 640 | } |
| 620 | 641 | } |
| 621 | 642 | } |
@@ -624,22 +645,38 @@ discard block |
||
| 624 | 645 | $countryfound = 1; |
| 625 | 646 | |
| 626 | 647 | // Definition of fixed working days |
| 627 | - if ($jour == 1 && $mois == 1) |
|
| 628 | - $ferie = true; // 1er january |
|
| 629 | - if ($jour == 1 && $mois == 5) |
|
| 630 | - $ferie = true; // 1er may |
|
| 631 | - if ($jour == 8 && $mois == 5) |
|
| 632 | - $ferie = true; // 5 may |
|
| 633 | - if ($jour == 14 && $mois == 7) |
|
| 634 | - $ferie = true; // 14 july |
|
| 635 | - if ($jour == 15 && $mois == 8) |
|
| 636 | - $ferie = true; // 15 august |
|
| 637 | - if ($jour == 1 && $mois == 11) |
|
| 638 | - $ferie = true; // 1 november |
|
| 639 | - if ($jour == 11 && $mois == 11) |
|
| 640 | - $ferie = true; // 11 november |
|
| 641 | - if ($jour == 25 && $mois == 12) |
|
| 642 | - $ferie = true; // 25 december |
|
| 648 | + if ($jour == 1 && $mois == 1) { |
|
| 649 | + $ferie = true; |
|
| 650 | + } |
|
| 651 | + // 1er january |
|
| 652 | + if ($jour == 1 && $mois == 5) { |
|
| 653 | + $ferie = true; |
|
| 654 | + } |
|
| 655 | + // 1er may |
|
| 656 | + if ($jour == 8 && $mois == 5) { |
|
| 657 | + $ferie = true; |
|
| 658 | + } |
|
| 659 | + // 5 may |
|
| 660 | + if ($jour == 14 && $mois == 7) { |
|
| 661 | + $ferie = true; |
|
| 662 | + } |
|
| 663 | + // 14 july |
|
| 664 | + if ($jour == 15 && $mois == 8) { |
|
| 665 | + $ferie = true; |
|
| 666 | + } |
|
| 667 | + // 15 august |
|
| 668 | + if ($jour == 1 && $mois == 11) { |
|
| 669 | + $ferie = true; |
|
| 670 | + } |
|
| 671 | + // 1 november |
|
| 672 | + if ($jour == 11 && $mois == 11) { |
|
| 673 | + $ferie = true; |
|
| 674 | + } |
|
| 675 | + // 11 november |
|
| 676 | + if ($jour == 25 && $mois == 12) { |
|
| 677 | + $ferie = true; |
|
| 678 | + } |
|
| 679 | + // 25 december |
|
| 643 | 680 | |
| 644 | 681 | |
| 645 | 682 | |
@@ -647,8 +684,9 @@ discard block |
||
| 647 | 684 | $date_paques = easter_date($annee); |
| 648 | 685 | $jour_paques = date("d", $date_paques);
|
| 649 | 686 | $mois_paques = date("m", $date_paques);
|
| 650 | - if ($jour_paques == $jour && $mois_paques == $mois) |
|
| 651 | - $ferie = true; |
|
| 687 | + if ($jour_paques == $jour && $mois_paques == $mois) { |
|
| 688 | + $ferie = true; |
|
| 689 | + } |
|
| 652 | 690 | // Pâques |
| 653 | 691 | // Calculation for the monday of easter date |
| 654 | 692 | $date_lundi_paques = mktime( |
@@ -656,8 +694,9 @@ discard block |
||
| 656 | 694 | ); |
| 657 | 695 | $jour_lundi_ascension = date("d", $date_lundi_paques);
|
| 658 | 696 | $mois_lundi_ascension = date("m", $date_lundi_paques);
|
| 659 | - if ($jour_lundi_ascension == $jour && $mois_lundi_ascension == $mois) |
|
| 660 | - $ferie = true; |
|
| 697 | + if ($jour_lundi_ascension == $jour && $mois_lundi_ascension == $mois) { |
|
| 698 | + $ferie = true; |
|
| 699 | + } |
|
| 661 | 700 | // Lundi de Pâques |
| 662 | 701 | // Calcul du jour de l'ascension (38 days after easter day) |
| 663 | 702 | $date_ascension = mktime( |
@@ -665,8 +704,9 @@ discard block |
||
| 665 | 704 | ); |
| 666 | 705 | $jour_ascension = date("d", $date_ascension);
|
| 667 | 706 | $mois_ascension = date("m", $date_ascension);
|
| 668 | - if ($jour_ascension == $jour && $mois_ascension == $mois) |
|
| 669 | - $ferie = true; |
|
| 707 | + if ($jour_ascension == $jour && $mois_ascension == $mois) { |
|
| 708 | + $ferie = true; |
|
| 709 | + } |
|
| 670 | 710 | // Ascension |
| 671 | 711 | // Calculation of "Pentecote" (11 days after easter day) |
| 672 | 712 | $date_pentecote = mktime( |
@@ -674,8 +714,9 @@ discard block |
||
| 674 | 714 | ); |
| 675 | 715 | $jour_pentecote = date("d", $date_pentecote);
|
| 676 | 716 | $mois_pentecote = date("m", $date_pentecote);
|
| 677 | - if ($jour_pentecote == $jour && $mois_pentecote == $mois) |
|
| 678 | - $ferie = true; |
|
| 717 | + if ($jour_pentecote == $jour && $mois_pentecote == $mois) { |
|
| 718 | + $ferie = true; |
|
| 719 | + } |
|
| 679 | 720 | // "Pentecote" |
| 680 | 721 | } |
| 681 | 722 | |
@@ -685,26 +726,46 @@ discard block |
||
| 685 | 726 | $countryfound = 1; |
| 686 | 727 | |
| 687 | 728 | // Definition des dates feriees fixes |
| 688 | - if ($jour == 1 && $mois == 1) |
|
| 689 | - $ferie = true; // Capodanno |
|
| 690 | - if ($jour == 6 && $mois == 1) |
|
| 691 | - $ferie = true; // Epifania |
|
| 692 | - if ($jour == 25 && $mois == 4) |
|
| 693 | - $ferie = true; // Anniversario Liberazione |
|
| 694 | - if ($jour == 1 && $mois == 5) |
|
| 695 | - $ferie = true; // Festa del Lavoro |
|
| 696 | - if ($jour == 2 && $mois == 6) |
|
| 697 | - $ferie = true; // Festa della Repubblica |
|
| 698 | - if ($jour == 15 && $mois == 8) |
|
| 699 | - $ferie = true; // Ferragosto |
|
| 700 | - if ($jour == 1 && $mois == 11) |
|
| 701 | - $ferie = true; // Tutti i Santi |
|
| 702 | - if ($jour == 8 && $mois == 12) |
|
| 703 | - $ferie = true; // Immacolata Concezione |
|
| 704 | - if ($jour == 25 && $mois == 12) |
|
| 705 | - $ferie = true; // 25 decembre |
|
| 706 | - if ($jour == 26 && $mois == 12) |
|
| 707 | - $ferie = true; // Santo Stefano |
|
| 729 | + if ($jour == 1 && $mois == 1) { |
|
| 730 | + $ferie = true; |
|
| 731 | + } |
|
| 732 | + // Capodanno |
|
| 733 | + if ($jour == 6 && $mois == 1) { |
|
| 734 | + $ferie = true; |
|
| 735 | + } |
|
| 736 | + // Epifania |
|
| 737 | + if ($jour == 25 && $mois == 4) { |
|
| 738 | + $ferie = true; |
|
| 739 | + } |
|
| 740 | + // Anniversario Liberazione |
|
| 741 | + if ($jour == 1 && $mois == 5) { |
|
| 742 | + $ferie = true; |
|
| 743 | + } |
|
| 744 | + // Festa del Lavoro |
|
| 745 | + if ($jour == 2 && $mois == 6) { |
|
| 746 | + $ferie = true; |
|
| 747 | + } |
|
| 748 | + // Festa della Repubblica |
|
| 749 | + if ($jour == 15 && $mois == 8) { |
|
| 750 | + $ferie = true; |
|
| 751 | + } |
|
| 752 | + // Ferragosto |
|
| 753 | + if ($jour == 1 && $mois == 11) { |
|
| 754 | + $ferie = true; |
|
| 755 | + } |
|
| 756 | + // Tutti i Santi |
|
| 757 | + if ($jour == 8 && $mois == 12) { |
|
| 758 | + $ferie = true; |
|
| 759 | + } |
|
| 760 | + // Immacolata Concezione |
|
| 761 | + if ($jour == 25 && $mois == 12) { |
|
| 762 | + $ferie = true; |
|
| 763 | + } |
|
| 764 | + // 25 decembre |
|
| 765 | + if ($jour == 26 && $mois == 12) { |
|
| 766 | + $ferie = true; |
|
| 767 | + } |
|
| 768 | + // Santo Stefano |
|
| 708 | 769 | |
| 709 | 770 | |
| 710 | 771 | |
@@ -712,50 +773,81 @@ discard block |
||
| 712 | 773 | $date_paques = easter_date($annee); |
| 713 | 774 | $jour_paques = date("d", $date_paques);
|
| 714 | 775 | $mois_paques = date("m", $date_paques);
|
| 715 | - if ($jour_paques == $jour && $mois_paques == $mois) |
|
| 716 | - $ferie = true; |
|
| 776 | + if ($jour_paques == $jour && $mois_paques == $mois) { |
|
| 777 | + $ferie = true; |
|
| 778 | + } |
|
| 717 | 779 | // Paques |
| 718 | 780 | } |
| 719 | 781 | |
| 720 | 782 | if ($countrycode == 'IN') {
|
| 721 | 783 | $countryfound = 1; |
| 722 | 784 | |
| 723 | - if ($jour == 1 && $mois == 1) |
|
| 724 | - $ferie = true; // New Year's Day |
|
| 725 | - if ($jour == 26 && $mois == 1) |
|
| 726 | - $ferie = true; // Republic Day |
|
| 727 | - if ($jour == 1 && $mois == 5) |
|
| 728 | - $ferie = true; // May Day |
|
| 729 | - if ($jour == 15 && $mois == 8) |
|
| 730 | - $ferie = true; // Independence Day |
|
| 731 | - if ($jour == 2 && $mois == 10) |
|
| 732 | - $ferie = true; // Gandhi Jayanti |
|
| 733 | - if ($jour == 25 && $mois == 12) |
|
| 734 | - $ferie = true; // Christmas |
|
| 785 | + if ($jour == 1 && $mois == 1) { |
|
| 786 | + $ferie = true; |
|
| 787 | + } |
|
| 788 | + // New Year's Day |
|
| 789 | + if ($jour == 26 && $mois == 1) { |
|
| 790 | + $ferie = true; |
|
| 791 | + } |
|
| 792 | + // Republic Day |
|
| 793 | + if ($jour == 1 && $mois == 5) { |
|
| 794 | + $ferie = true; |
|
| 795 | + } |
|
| 796 | + // May Day |
|
| 797 | + if ($jour == 15 && $mois == 8) { |
|
| 798 | + $ferie = true; |
|
| 799 | + } |
|
| 800 | + // Independence Day |
|
| 801 | + if ($jour == 2 && $mois == 10) { |
|
| 802 | + $ferie = true; |
|
| 803 | + } |
|
| 804 | + // Gandhi Jayanti |
|
| 805 | + if ($jour == 25 && $mois == 12) { |
|
| 806 | + $ferie = true; |
|
| 807 | + } |
|
| 808 | + // Christmas |
|
| 735 | 809 | } |
| 736 | 810 | |
| 737 | 811 | if ($countrycode == 'ES') {
|
| 738 | 812 | $countryfound = 1; |
| 739 | 813 | |
| 740 | 814 | // Definition des dates feriees fixes |
| 741 | - if ($jour == 1 && $mois == 1) |
|
| 742 | - $ferie = true; // Año nuevo |
|
| 743 | - if ($jour == 6 && $mois == 1) |
|
| 744 | - $ferie = true; // Día Reyes |
|
| 745 | - if ($jour == 1 && $mois == 5) |
|
| 746 | - $ferie = true; // 1 Mayo |
|
| 747 | - if ($jour == 15 && $mois == 8) |
|
| 748 | - $ferie = true; // 15 Agosto |
|
| 749 | - if ($jour == 12 && $mois == 10) |
|
| 750 | - $ferie = true; // Día Hispanidad |
|
| 751 | - if ($jour == 1 && $mois == 11) |
|
| 752 | - $ferie = true; // 1 noviembre |
|
| 753 | - if ($jour == 6 && $mois == 12) |
|
| 754 | - $ferie = true; // Constitución |
|
| 755 | - if ($jour == 8 && $mois == 12) |
|
| 756 | - $ferie = true; // Inmaculada |
|
| 757 | - if ($jour == 25 && $mois == 12) |
|
| 758 | - $ferie = true; // 25 diciembre |
|
| 815 | + if ($jour == 1 && $mois == 1) { |
|
| 816 | + $ferie = true; |
|
| 817 | + } |
|
| 818 | + // Año nuevo |
|
| 819 | + if ($jour == 6 && $mois == 1) { |
|
| 820 | + $ferie = true; |
|
| 821 | + } |
|
| 822 | + // Día Reyes |
|
| 823 | + if ($jour == 1 && $mois == 5) { |
|
| 824 | + $ferie = true; |
|
| 825 | + } |
|
| 826 | + // 1 Mayo |
|
| 827 | + if ($jour == 15 && $mois == 8) { |
|
| 828 | + $ferie = true; |
|
| 829 | + } |
|
| 830 | + // 15 Agosto |
|
| 831 | + if ($jour == 12 && $mois == 10) { |
|
| 832 | + $ferie = true; |
|
| 833 | + } |
|
| 834 | + // Día Hispanidad |
|
| 835 | + if ($jour == 1 && $mois == 11) { |
|
| 836 | + $ferie = true; |
|
| 837 | + } |
|
| 838 | + // 1 noviembre |
|
| 839 | + if ($jour == 6 && $mois == 12) { |
|
| 840 | + $ferie = true; |
|
| 841 | + } |
|
| 842 | + // Constitución |
|
| 843 | + if ($jour == 8 && $mois == 12) { |
|
| 844 | + $ferie = true; |
|
| 845 | + } |
|
| 846 | + // Inmaculada |
|
| 847 | + if ($jour == 25 && $mois == 12) { |
|
| 848 | + $ferie = true; |
|
| 849 | + } |
|
| 850 | + // 25 diciembre |
|
| 759 | 851 | |
| 760 | 852 | |
| 761 | 853 | |
@@ -763,8 +855,9 @@ discard block |
||
| 763 | 855 | $date_paques = easter_date($annee); |
| 764 | 856 | $jour_paques = date("d", $date_paques);
|
| 765 | 857 | $mois_paques = date("m", $date_paques);
|
| 766 | - if ($jour_paques == $jour && $mois_paques == $mois) |
|
| 767 | - $ferie = true; |
|
| 858 | + if ($jour_paques == $jour && $mois_paques == $mois) { |
|
| 859 | + $ferie = true; |
|
| 860 | + } |
|
| 768 | 861 | // Paques |
| 769 | 862 | // Viernes Santo |
| 770 | 863 | $date_viernes = mktime( |
@@ -772,8 +865,9 @@ discard block |
||
| 772 | 865 | ); |
| 773 | 866 | $jour_viernes = date("d", $date_viernes);
|
| 774 | 867 | $mois_viernes = date("m", $date_viernes);
|
| 775 | - if ($jour_viernes == $jour && $mois_viernes == $mois) |
|
| 776 | - $ferie = true; |
|
| 868 | + if ($jour_viernes == $jour && $mois_viernes == $mois) { |
|
| 869 | + $ferie = true; |
|
| 870 | + } |
|
| 777 | 871 | //Viernes Santo |
| 778 | 872 | } |
| 779 | 873 | |
@@ -781,28 +875,50 @@ discard block |
||
| 781 | 875 | $countryfound = 1; |
| 782 | 876 | |
| 783 | 877 | // Definition des dates feriees fixes |
| 784 | - if ($jour == 1 && $mois == 1) |
|
| 785 | - $ferie = true; // Neujahr |
|
| 786 | - if ($jour == 6 && $mois == 1) |
|
| 787 | - $ferie = true; // Hl. 3 Koenige |
|
| 788 | - if ($jour == 1 && $mois == 5) |
|
| 789 | - $ferie = true; // 1. Mai |
|
| 790 | - if ($jour == 15 && $mois == 8) |
|
| 791 | - $ferie = true; // Mariae Himmelfahrt |
|
| 792 | - if ($jour == 26 && $mois == 10) |
|
| 793 | - $ferie = true; // 26. Oktober |
|
| 794 | - if ($jour == 1 && $mois == 11) |
|
| 795 | - $ferie = true; // Allerheiligen |
|
| 796 | - if ($jour == 8 && $mois == 12) |
|
| 797 | - $ferie = true; // Mariae Empfaengnis |
|
| 798 | - if ($jour == 24 && $mois == 12) |
|
| 799 | - $ferie = true; // Heilig abend |
|
| 800 | - if ($jour == 25 && $mois == 12) |
|
| 801 | - $ferie = true; // Christtag |
|
| 802 | - if ($jour == 26 && $mois == 12) |
|
| 803 | - $ferie = true; // Stefanietag |
|
| 804 | - if ($jour == 31 && $mois == 12) |
|
| 805 | - $ferie = true; // Silvester |
|
| 878 | + if ($jour == 1 && $mois == 1) { |
|
| 879 | + $ferie = true; |
|
| 880 | + } |
|
| 881 | + // Neujahr |
|
| 882 | + if ($jour == 6 && $mois == 1) { |
|
| 883 | + $ferie = true; |
|
| 884 | + } |
|
| 885 | + // Hl. 3 Koenige |
|
| 886 | + if ($jour == 1 && $mois == 5) { |
|
| 887 | + $ferie = true; |
|
| 888 | + } |
|
| 889 | + // 1. Mai |
|
| 890 | + if ($jour == 15 && $mois == 8) { |
|
| 891 | + $ferie = true; |
|
| 892 | + } |
|
| 893 | + // Mariae Himmelfahrt |
|
| 894 | + if ($jour == 26 && $mois == 10) { |
|
| 895 | + $ferie = true; |
|
| 896 | + } |
|
| 897 | + // 26. Oktober |
|
| 898 | + if ($jour == 1 && $mois == 11) { |
|
| 899 | + $ferie = true; |
|
| 900 | + } |
|
| 901 | + // Allerheiligen |
|
| 902 | + if ($jour == 8 && $mois == 12) { |
|
| 903 | + $ferie = true; |
|
| 904 | + } |
|
| 905 | + // Mariae Empfaengnis |
|
| 906 | + if ($jour == 24 && $mois == 12) { |
|
| 907 | + $ferie = true; |
|
| 908 | + } |
|
| 909 | + // Heilig abend |
|
| 910 | + if ($jour == 25 && $mois == 12) { |
|
| 911 | + $ferie = true; |
|
| 912 | + } |
|
| 913 | + // Christtag |
|
| 914 | + if ($jour == 26 && $mois == 12) { |
|
| 915 | + $ferie = true; |
|
| 916 | + } |
|
| 917 | + // Stefanietag |
|
| 918 | + if ($jour == 31 && $mois == 12) { |
|
| 919 | + $ferie = true; |
|
| 920 | + } |
|
| 921 | + // Silvester |
|
| 806 | 922 | |
| 807 | 923 | |
| 808 | 924 | |
@@ -810,8 +926,9 @@ discard block |
||
| 810 | 926 | $date_paques = easter_date($annee); |
| 811 | 927 | $jour_paques = date("d", $date_paques);
|
| 812 | 928 | $mois_paques = date("m", $date_paques);
|
| 813 | - if ($jour_paques == $jour && $mois_paques == $mois) |
|
| 814 | - $ferie = true; |
|
| 929 | + if ($jour_paques == $jour && $mois_paques == $mois) { |
|
| 930 | + $ferie = true; |
|
| 931 | + } |
|
| 815 | 932 | // Easter sunday |
| 816 | 933 | // Monday after easter |
| 817 | 934 | $date_eastermonday = mktime( |
@@ -819,8 +936,9 @@ discard block |
||
| 819 | 936 | ); |
| 820 | 937 | $jour_eastermonday = date("d", $date_eastermonday);
|
| 821 | 938 | $mois_eastermonday = date("m", $date_eastermonday);
|
| 822 | - if ($jour_eastermonday == $jour && $mois_eastermonday == $mois) |
|
| 823 | - $ferie = true; |
|
| 939 | + if ($jour_eastermonday == $jour && $mois_eastermonday == $mois) { |
|
| 940 | + $ferie = true; |
|
| 941 | + } |
|
| 824 | 942 | // Easter monday |
| 825 | 943 | // Christi Himmelfahrt (39 days after easter sunday) |
| 826 | 944 | $date_ch = mktime( |
@@ -828,8 +946,9 @@ discard block |
||
| 828 | 946 | ); |
| 829 | 947 | $jour_ch = date("d", $date_ch);
|
| 830 | 948 | $mois_ch = date("m", $date_ch);
|
| 831 | - if ($jour_ch == $jour && $mois_ch == $mois) |
|
| 832 | - $ferie = true; |
|
| 949 | + if ($jour_ch == $jour && $mois_ch == $mois) { |
|
| 950 | + $ferie = true; |
|
| 951 | + } |
|
| 833 | 952 | // Christi Himmelfahrt |
| 834 | 953 | // Pfingsten (50 days after easter sunday) |
| 835 | 954 | $date_pentecote = mktime( |
@@ -837,8 +956,9 @@ discard block |
||
| 837 | 956 | ); |
| 838 | 957 | $jour_pentecote = date("d", $date_pentecote);
|
| 839 | 958 | $mois_pentecote = date("m", $date_pentecote);
|
| 840 | - if ($jour_pentecote == $jour && $mois_pentecote == $mois) |
|
| 841 | - $ferie = true; |
|
| 959 | + if ($jour_pentecote == $jour && $mois_pentecote == $mois) { |
|
| 960 | + $ferie = true; |
|
| 961 | + } |
|
| 842 | 962 | // Pfingsten |
| 843 | 963 | // Fronleichnam (60 days after easter sunday) |
| 844 | 964 | $date_fronleichnam = mktime( |
@@ -846,8 +966,9 @@ discard block |
||
| 846 | 966 | ); |
| 847 | 967 | $jour_fronleichnam = date("d", $date_fronleichnam);
|
| 848 | 968 | $mois_fronleichnam = date("m", $date_fronleichnam);
|
| 849 | - if ($jour_fronleichnam == $jour && $mois_fronleichnam == $mois) |
|
| 850 | - $ferie = true; |
|
| 969 | + if ($jour_fronleichnam == $jour && $mois_fronleichnam == $mois) { |
|
| 970 | + $ferie = true; |
|
| 971 | + } |
|
| 851 | 972 | // Fronleichnam |
| 852 | 973 | } |
| 853 | 974 | |
@@ -855,14 +976,16 @@ discard block |
||
| 855 | 976 | if ($includesaturdayandsunday) {
|
| 856 | 977 | $jour_julien = unixtojd($timestampStart); |
| 857 | 978 | $jour_semaine = jddayofweek($jour_julien, 0); |
| 858 | - if ($jour_semaine == 0 || $jour_semaine == 6) |
|
| 859 | - $ferie = true; |
|
| 979 | + if ($jour_semaine == 0 || $jour_semaine == 6) { |
|
| 980 | + $ferie = true; |
|
| 981 | + } |
|
| 860 | 982 | //Saturday (6) and Sunday (0) |
| 861 | 983 | } |
| 862 | 984 | |
| 863 | 985 | // On incremente compteur |
| 864 | - if ($ferie) |
|
| 865 | - $nbFerie++; |
|
| 986 | + if ($ferie) { |
|
| 987 | + $nbFerie++; |
|
| 988 | + } |
|
| 866 | 989 | |
| 867 | 990 | // Increase number of days (on go up into loop) |
| 868 | 991 | $timestampStart = dol_time_plus_duree($timestampStart, 1, 'd'); |
@@ -914,16 +1037,19 @@ discard block |
||
| 914 | 1037 | {
|
| 915 | 1038 | global $langs, $mysoc; |
| 916 | 1039 | |
| 917 | - if (empty($country_code)) |
|
| 918 | - $country_code = $mysoc->country_code; |
|
| 1040 | + if (empty($country_code)) { |
|
| 1041 | + $country_code = $mysoc->country_code; |
|
| 1042 | + } |
|
| 919 | 1043 | |
| 920 | 1044 | dol_syslog('num_open_day timestampStart=' . $timestampStart . ' timestampEnd=' . $timestampEnd . ' bit=' . $lastday . ' country_code=' . $country_code);
|
| 921 | 1045 | |
| 922 | 1046 | // Check parameters |
| 923 | - if (!is_int($timestampStart) && !is_float($timestampStart)) |
|
| 924 | - return 'ErrorBadParameter_num_open_day'; |
|
| 925 | - if (!is_int($timestampEnd) && !is_float($timestampEnd)) |
|
| 926 | - return 'ErrorBadParameter_num_open_day'; |
|
| 1047 | + if (!is_int($timestampStart) && !is_float($timestampStart)) { |
|
| 1048 | + return 'ErrorBadParameter_num_open_day'; |
|
| 1049 | + } |
|
| 1050 | + if (!is_int($timestampEnd) && !is_float($timestampEnd)) { |
|
| 1051 | + return 'ErrorBadParameter_num_open_day'; |
|
| 1052 | + } |
|
| 927 | 1053 | |
| 928 | 1054 | //print 'num_open_day timestampStart='.$timestampStart.' timestampEnd='.$timestampEnd.' bit='.$lastday; |
| 929 | 1055 | if ($timestampStart < $timestampEnd) {
|
@@ -931,17 +1057,17 @@ discard block |
||
| 931 | 1057 | $numholidays = num_public_holiday($timestampStart, $timestampEnd, $country_code, $lastday); |
| 932 | 1058 | $nbOpenDay = $numdays - $numholidays; |
| 933 | 1059 | $nbOpenDay .= " " . $langs->trans("Days");
|
| 934 | - if ($inhour == 1 && $nbOpenDay <= 3) |
|
| 935 | - $nbOpenDay = $nbOpenDay * 24 . $langs->trans("HourShort");
|
|
| 1060 | + if ($inhour == 1 && $nbOpenDay <= 3) { |
|
| 1061 | + $nbOpenDay = $nbOpenDay * 24 . $langs->trans("HourShort"); |
|
| 1062 | + } |
|
| 936 | 1063 | return $nbOpenDay - (($inhour == 1 ? 12 : 0.5) * abs($halfday)); |
| 937 | - } |
|
| 938 | - elseif ($timestampStart == $timestampEnd) {
|
|
| 1064 | + } elseif ($timestampStart == $timestampEnd) {
|
|
| 939 | 1065 | $nbOpenDay = $lastday; |
| 940 | - if ($inhour == 1) |
|
| 941 | - $nbOpenDay = $nbOpenDay * 24 . $langs->trans("HourShort");
|
|
| 1066 | + if ($inhour == 1) { |
|
| 1067 | + $nbOpenDay = $nbOpenDay * 24 . $langs->trans("HourShort"); |
|
| 1068 | + } |
|
| 942 | 1069 | return $nbOpenDay - (($inhour == 1 ? 12 : 0.5) * abs($halfday)); |
| 943 | - } |
|
| 944 | - else {
|
|
| 1070 | + } else {
|
|
| 945 | 1071 | return $langs->trans("Error");
|
| 946 | 1072 | } |
| 947 | 1073 | } |