From b2ae991501c090c5847133cbc06725e504a64b7c Mon Sep 17 00:00:00 2001 From: atm-thibaultf Date: Wed, 30 Aug 2023 17:08:57 +0200 Subject: [PATCH 01/40] NEW_hide_external_user_in_combobox --- htdocs/admin/user.php | 25 +++++++++++++++++++ .../html.formadvtargetemailing.class.php | 3 +++ htdocs/core/class/html.form.class.php | 3 +++ htdocs/core/class/html.formother.class.php | 6 +++++ htdocs/langs/en_US/admin.lang | 1 + htdocs/langs/fr_FR/admin.lang | 1 + test.php | 3 +++ 7 files changed, 42 insertions(+) create mode 100644 test.php diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index 20eb7a0c0b2..b6c0bcebbfd 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -116,6 +116,15 @@ if ($action == 'set_default') { } else { dol_print_error($db); } +} elseif ($action == 'sethideexternaluser') { + //Set hide external user into combox or select +$status = GETPOST('status', 'alpha'); + +if (dolibarr_set_const($db, "USER_HIDE_EXTERNAL_IN_COMBOBOX", $status, 'chaine', 0, '', $conf->entity) > 0) { + header("Location: ".$_SERVER["PHP_SELF"]); + exit; +} else { + dol_print_error($db); } @@ -184,6 +193,22 @@ if ($conf->use_javascript_ajax) { } print ''; +print ''; +print ''.$langs->trans("UserHideExternal").''; +print ' '; + +print ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('USER_HIDE_EXTERNAL_IN_COMBOBOX'); +} else { + if (empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX)) { + print ''.img_picto($langs->trans("Disabled"), 'off').''; + } else { + print ''.img_picto($langs->trans("Enabled"), 'on').''; + } +} +print ''; + print ''; print ''; diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php index 50169438baa..00d31aac368 100644 --- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php +++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php @@ -171,6 +171,9 @@ class FormAdvTargetEmailing extends Form if (!empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) { $sql_usr .= " AND u2.statut<>0 "; } + if (!empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX)) { + $sql_usr .= " AND u2.employee<>0 "; + } $sql_usr .= " ORDER BY name ASC"; // print $sql_usr;exit; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8f11af63f4a..117a56d42cd 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2050,6 +2050,9 @@ class Form if (!empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX) || $notdisabled) { $sql .= " AND u.statut <> 0"; } + if (!empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX) || $notdisabled) { + $sql .= " AND u.employee <> 0"; + } if (!empty($morefilter)) { $sql .= " " . $morefilter; } diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index cce5cf7819d..b87ecc60f71 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -512,6 +512,12 @@ class FormOther if (!empty($user->socid)) { $sql_usr .= " AND u.fk_soc = ".((int) $user->socid); } + if (!empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX)) { + $sql_usr .= " AND u.employee <> 0"; + } + if (!empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) { + $sql_usr .= " AND u.statut <> 0"; + } //Add hook to filter on user (for exemple on usergroup define in custom modules) if (!empty($reshook)) { diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 9c5d62fc38b..f809db92a95 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1416,6 +1416,7 @@ DisableForgetPasswordLinkOnLogonPage=Do not show the "Password Forgotten" link o UsersSetup=Users module setup UserMailRequired=Email required to create a new user UserHideInactive=Hide inactive users from all combo lists of users (Not recommended: this may means you won't be able to filter or search on old users on some pages) +UserHideExternal=Hide external users from all combo lists of users (Not recommended: this may means you won't be able to filter or search on external users on some pages) UsersDocModules=Document templates for documents generated from user record GroupsDocModules=Document templates for documents generated from a group record ##### HRM setup ##### diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 4fc55bfd30b..33a0314f83a 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1413,6 +1413,7 @@ DisableForgetPasswordLinkOnLogonPage=Cacher le lien "Mot de passe oublié" sur l UsersSetup=Configuration du module utilisateurs UserMailRequired=Email requis pour créer un nouvel utilisateur UserHideInactive=Masquer les utilisateurs inactifs sur toutes les listes déroulantes d'utilisateurs (non recommandé: cela peut signifier que vous ne pourrez pas filtrer ou rechercher les anciens utilisateurs sur certaines pages) +UserHideExternal=Masquer les utilisateurs externes (non salariés) sur toutes les listes déroulantes d'utilisateurs (non recommandé: cela peut signifier que vous ne pourrez pas filtrer ou rechercher les utilisateurs externes sur certaines pages) UsersDocModules=Modèles de documents pour les documents générés à partir de la fiche utilisateur GroupsDocModules=Modèles de documents pour les documents générés à partir de la fiche d'un groupe ##### HRM setup ##### diff --git a/test.php b/test.php new file mode 100644 index 00000000000..bacfe6c3edc --- /dev/null +++ b/test.php @@ -0,0 +1,3 @@ + From 81038fbfe744e5298dc471d92d0bfed3fdbec7f7 Mon Sep 17 00:00:00 2001 From: atm-thibaultf Date: Wed, 30 Aug 2023 17:30:40 +0200 Subject: [PATCH 02/40] Clean branch --- htdocs/admin/user.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index b6c0bcebbfd..16592f09dff 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -118,13 +118,13 @@ if ($action == 'set_default') { } } elseif ($action == 'sethideexternaluser') { //Set hide external user into combox or select -$status = GETPOST('status', 'alpha'); - -if (dolibarr_set_const($db, "USER_HIDE_EXTERNAL_IN_COMBOBOX", $status, 'chaine', 0, '', $conf->entity) > 0) { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; -} else { - dol_print_error($db); + $status = GETPOST('status', 'alpha'); + if (dolibarr_set_const($db, "USER_HIDE_EXTERNAL_IN_COMBOBOX", $status, 'chaine', 0, '', $conf->entity) > 0) { + header("Location: " . $_SERVER["PHP_SELF"]); + exit; + } else { + dol_print_error($db); + } } From 3fc49660da156717074d7a27482e557f6cbcf560 Mon Sep 17 00:00:00 2001 From: Thibault Fiacre <57494317+atm-thibaultf@users.noreply.github.com> Date: Wed, 30 Aug 2023 17:36:27 +0200 Subject: [PATCH 03/40] Delete test.php --- test.php | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 test.php diff --git a/test.php b/test.php deleted file mode 100644 index bacfe6c3edc..00000000000 --- a/test.php +++ /dev/null @@ -1,3 +0,0 @@ - From 199e5c1a467ed500b38d5f14563857806cc67877 Mon Sep 17 00:00:00 2001 From: atm-thibaultf Date: Tue, 5 Sep 2023 14:34:21 +0200 Subject: [PATCH 04/40] NEW hide external and non employee users in combobox --- htdocs/admin/user.php | 30 +++++++++++++++++++ .../html.formadvtargetemailing.class.php | 5 +++- htdocs/core/class/html.form.class.php | 5 +++- htdocs/core/class/html.formother.class.php | 5 +++- htdocs/langs/en_US/admin.lang | 3 +- htdocs/langs/fr_FR/admin.lang | 3 +- 6 files changed, 46 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index 16592f09dff..fa116202a1c 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -125,6 +125,16 @@ if ($action == 'set_default') { } else { dol_print_error($db); } +} elseif ($action == 'sethidenonemployeeuser') { + //Set hide non employee user into combox or select + $status = GETPOST('status', 'alpha'); + + if (dolibarr_set_const($db, "USER_HIDE_NONEMPLOYEE_IN_COMBOBOX", $status, 'chaine', 0, '', $conf->entity) > 0) { + header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } else { + dol_print_error($db); + } } @@ -193,6 +203,26 @@ if ($conf->use_javascript_ajax) { } print ''; +// user hide non employee + +print ''; +print ''.$langs->trans("UserHideNonEmployee").''; +print ' '; + +print ''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('USER_HIDE_NONEMPLOYEE_IN_COMBOBOX'); +} else { + if (empty($conf->global->USER_HIDE_NONEMPLOYEE_IN_COMBOBOX)) { + print ''.img_picto($langs->trans("Disabled"), 'off').''; + } else { + print ''.img_picto($langs->trans("Enabled"), 'on').''; + } +} +print ''; + +// user hide external + print ''; print ''.$langs->trans("UserHideExternal").''; print ' '; diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php index 00d31aac368..ab50676106d 100644 --- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php +++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php @@ -171,9 +171,12 @@ class FormAdvTargetEmailing extends Form if (!empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) { $sql_usr .= " AND u2.statut<>0 "; } - if (!empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX)) { + if (!empty($conf->global->USER_HIDE_NONEMPLOYEE_IN_COMBOBOX)) { $sql_usr .= " AND u2.employee<>0 "; } + if (!empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX)) { + $sql_usr .= " AND u2.fk_soc IS NULL "; + } $sql_usr .= " ORDER BY name ASC"; // print $sql_usr;exit; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8f17a927c2c..e7f8a24b91f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2082,9 +2082,12 @@ class Form if (!empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX) || $notdisabled) { $sql .= " AND u.statut <> 0"; } - if (!empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX) || $notdisabled) { + if (!empty($conf->global->USER_HIDE_NONEMPLOYEE_IN_COMBOBOX) || $notdisabled) { $sql .= " AND u.employee <> 0"; } + if (!empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX) || $notdisabled) { + $sql .= " AND u.fk_soc IS NULL"; + } if (!empty($morefilter)) { $sql .= " " . $morefilter; } diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 8ebb9538530..c6cfa14cf15 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -513,9 +513,12 @@ class FormOther if (!empty($user->socid)) { $sql_usr .= " AND u.fk_soc = ".((int) $user->socid); } - if (!empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX)) { + if (!empty($conf->global->USER_HIDE_NONEMPLOYEE_IN_COMBOBOX)) { $sql_usr .= " AND u.employee <> 0"; } + if (!empty($conf->global->USER_HIDE_EXTERNAL_IN_COMBOBOX)) { + $sql_usr .= " AND u.fk_soc IS NULL"; + } if (!empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) { $sql_usr .= " AND u.statut <> 0"; } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 0082c1a4e86..2e169294fde 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1419,7 +1419,8 @@ DisableForgetPasswordLinkOnLogonPage=Do not show the "Password Forgotten" link o UsersSetup=Users module setup UserMailRequired=Email required to create a new user UserHideInactive=Hide inactive users from all combo lists of users (Not recommended: this may means you won't be able to filter or search on old users on some pages) -UserHideExternal=Hide external users from all combo lists of users (Not recommended: this may means you won't be able to filter or search on external users on some pages) +UserHideExternal=Hide external users (not linked to a third party) from all combo lists of users (Not recommended: this may means you won't be able to filter or search on external users on some pages) +UserHideNonEmployee=Hide non employee users from all combo lists of users (Not recommended: this may means you won't be able to filter or search on non employee users on some pages) UsersDocModules=Document templates for documents generated from user record GroupsDocModules=Document templates for documents generated from a group record ##### HRM setup ##### diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 001c48bf5de..a84774cf925 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1419,7 +1419,8 @@ DisableForgetPasswordLinkOnLogonPage=Cacher le lien "Mot de passe oublié" sur l UsersSetup=Configuration du module utilisateurs UserMailRequired=Email requis pour créer un nouvel utilisateur UserHideInactive=Masquer les utilisateurs inactifs sur toutes les listes déroulantes d'utilisateurs (non recommandé: cela peut signifier que vous ne pourrez pas filtrer ou rechercher les anciens utilisateurs sur certaines pages) -UserHideExternal=Masquer les utilisateurs externes (non salariés) sur toutes les listes déroulantes d'utilisateurs (non recommandé: cela peut signifier que vous ne pourrez pas filtrer ou rechercher les utilisateurs externes sur certaines pages) +UserHideExternal=Masquer les utilisateurs externes (non liés à un tiers) sur toutes les listes déroulantes d'utilisateurs (non recommandé: cela peut signifier que vous ne pourrez pas filtrer ou rechercher les utilisateurs externes sur certaines pages) +UserHideNonEmployee=Masquer les utilisateurs externes (non salariés) sur toutes les listes déroulantes d'utilisateurs (non recommandé: cela peut signifier que vous ne pourrez pas filtrer ou rechercher les utilisateurs non salariés sur certaines pages) UsersDocModules=Modèles de documents pour les documents générés à partir de la fiche utilisateur GroupsDocModules=Modèles de documents pour les documents générés à partir de la fiche d'un groupe ##### HRM setup ##### From 28634dc860031a2b40a340fb7420a75a13342b2a Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Thu, 14 Dec 2023 12:25:05 +0100 Subject: [PATCH 05/40] add constant SUPPLIER_ORDER_MODE_OPTIONAL --- htdocs/fourn/commande/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 0d2d65416da..d99e9edacbe 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1057,7 +1057,7 @@ if (empty($reshook)) { if ($cancel) { $action = ''; - } elseif ($methodecommande <= 0) { + } elseif ($methodecommande <= 0 && !dolGetGlobalInt('SUPPLIER_ORDER_MODE_OPTIONAL')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("OrderMode")), null, 'errors'); $action = 'createorder'; } From 13e92bbc6cccdc10e295803d651b3a341f8a76d8 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Tue, 2 Jan 2024 09:13:33 +0100 Subject: [PATCH 06/40] fix getDolGlobalInt function name --- htdocs/fourn/commande/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index d99e9edacbe..adad08519f3 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1057,7 +1057,7 @@ if (empty($reshook)) { if ($cancel) { $action = ''; - } elseif ($methodecommande <= 0 && !dolGetGlobalInt('SUPPLIER_ORDER_MODE_OPTIONAL')) { + } elseif ($methodecommande <= 0 && !getDolGlobalInt('SUPPLIER_ORDER_MODE_OPTIONAL')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("OrderMode")), null, 'errors'); $action = 'createorder'; } From 13ddcb95527d68df15acc195d33bfe88f29f38fd Mon Sep 17 00:00:00 2001 From: HENRY Florian Date: Fri, 12 Jan 2024 18:04:00 +0100 Subject: [PATCH 07/40] fix: filter on date lost on sort (#27467) --- htdocs/comm/action/list.php | 48 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 3305b44af46..0b0c8cb496f 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -345,41 +345,41 @@ if ($search_title != '') { if ($search_note != '') { $param .= '&search_note='.urlencode($search_note); } -if (GETPOST('datestartday_dtstart', 'int')) { - $param .= '&datestartday_dtstart='.GETPOST('datestartday_dtstart', 'int'); +if (GETPOST('datestart_dtstartday', 'int')) { + $param .= '&datestart_dtstartday='.GETPOST('datestart_dtstartday', 'int'); } -if (GETPOST('datestartmonth_dtstart', 'int')) { - $param .= '&datestartmonth_dtstart='.GETPOST('datestartmonth_dtstart', 'int'); +if (GETPOST('datestart_dtstartmonth', 'int')) { + $param .= '&datestart_dtstartmonth='.GETPOST('datestart_dtstartmonth', 'int'); } -if (GETPOST('datestartyear_dtstart', 'int')) { - $param .= '&datestartyear_dtstart='.GETPOST('datestartyear_dtstart', 'int'); +if (GETPOST('datestart_dtstartyear', 'int')) { + $param .= '&datestart_dtstartyear='.GETPOST('datestart_dtstartyear', 'int'); } -if (GETPOST('datestartday_dtend', 'int')) { - $param .= '&datestartday_dtend='.GETPOST('datestartday_dtend', 'int'); +if (GETPOST('datestart_dtendday', 'int')) { + $param .= '&datestart_dtendday='.GETPOST('datestart_dtendday', 'int'); } -if (GETPOST('datestartmonth_dtend', 'int')) { - $param .= '&datestartmonth_dtend='.GETPOST('datestartmonth_dtend', 'int'); +if (GETPOST('datestart_dtendmonth', 'int')) { + $param .= '&datestart_dtendmonth='.GETPOST('datestart_dtendmonth', 'int'); } -if (GETPOST('datestartyear_dtend', 'int')) { - $param .= '&datestartyear_dtend='.GETPOST('datestartyear_dtend', 'int'); +if (GETPOST('datestart_dtendyear', 'int')) { + $param .= '&datestart_dtendyear='.GETPOST('datestart_dtendyear', 'int'); } -if (GETPOST('dateendday_dtstart', 'int')) { - $param .= '&dateendday_dtstart='.GETPOST('dateendday_dtstart', 'int'); +if (GETPOST('dateend_dtstartday', 'int')) { + $param .= '&dateend_dtstartday='.GETPOST('dateend_dtstartday', 'int'); } -if (GETPOST('dateendmonth_dtstart', 'int')) { - $param .= '&dateendmonth_dtstart='.GETPOST('dateendmonth_dtstart', 'int'); +if (GETPOST('dateend_dtstartmonth', 'int')) { + $param .= '&dateend_dtstartmonth='.GETPOST('dateend_dtstartmonth', 'int'); } -if (GETPOST('dateendyear_dtstart', 'int')) { - $param .= '&dateendyear_dtstart='.GETPOST('dateendyear_dtstart', 'int'); +if (GETPOST('dateend_dtstartyear', 'int')) { + $param .= '&dateend_dtstartyear='.GETPOST('dateend_dtstartyear', 'int'); } -if (GETPOST('dateendday_dtend', 'int')) { - $param .= '&dateendday_dtend='.GETPOST('dateendday_dtend', 'int'); +if (GETPOST('dateend_dtendday', 'int')) { + $param .= '&dateend_dtendday='.GETPOST('dateend_dtendday', 'int'); } -if (GETPOST('dateendmonth_dtend', 'int')) { - $param .= '&dateendmonth_dtend='.GETPOST('dateendmonth_dtend', 'int'); +if (GETPOST('dateend_dtendmonth', 'int')) { + $param .= '&dateend_dtendmonth='.GETPOST('dateend_dtendmonth', 'int'); } -if (GETPOST('dateendyear_dtend', 'int')) { - $param .= '&dateendyear_dtend='.GETPOST('dateendyear_dtend', 'int'); +if (GETPOST('dateend_dtendyear', 'int')) { + $param .= '&dateend_dtendyear='.GETPOST('dateend_dtendyear', 'int'); } if ($optioncss != '') { $param .= '&optioncss='.urlencode($optioncss); From 2de0c09e8ea60d370052f292855ab579cfcaf3ab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 13 Jan 2024 15:44:37 +0100 Subject: [PATCH 08/40] Try a better fix for #27477 --- htdocs/core/class/html.form.class.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c9c3e09f634..783f3afef74 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2247,7 +2247,7 @@ class Form * @param int|string $filtertype Filter on product type (''=nofilter, 0=product, 1=service) * @param int $limit Limit on number of returned lines * @param int $price_level Level of price to show - * @param int $status Sell status -1=Return all products, 0=Products not on sell, 1=Products on sell + * @param int $status Sell status: -1=No filter on sell status, 0=Products not on sell, 1=Products on sell * @param int $finished 2=all, 1=finished, 0=raw material * @param string $selected_input_value Value of preselected input text (for use with ajax) * @param int $hidelabel Hide label (0=no, 1=yes, 2=show search icon (before) and placeholder, 3 search icon after) @@ -2263,7 +2263,7 @@ class Form * 'warehouseinternal' = count products from warehouses for internal correct/transfer only * @param array $selected_combinations Selected combinations. Format: array([attrid] => attrval, [...]) * @param string $nooutput No print, return the output into a string - * @param int $status_purchase Purchase status -1=Return all products, 0=Products not on purchase, 1=Products on purchase + * @param int $status_purchase Purchase status: -1=No filter on purchase status, 0=Products not on purchase, 1=Products on purchase * @return void|string */ public function select_produits($selected = '', $htmlname = 'productid', $filtertype = '', $limit = 0, $price_level = 0, $status = 1, $finished = 2, $selected_input_value = '', $hidelabel = 0, $ajaxoptions = array(), $socid = 0, $showempty = '1', $forcecombo = 0, $morecss = '', $hidepriceinlabel = 0, $warehouseStatus = '', $selected_combinations = null, $nooutput = 0, $status_purchase = -1) @@ -2638,10 +2638,8 @@ class Form $sql .= " AND p.finished = ".((int) $finished); } elseif ($finished == 1) { $sql .= " AND p.finished = ".((int) $finished); - if ($status >= 0) { - $sql .= " AND p.tosell = ".((int) $status); - } - } elseif ($status >= 0) { + } + if ($status >= 0) { $sql .= " AND p.tosell = ".((int) $status); } if ($status_purchase >= 0) { From 6ac9b959d75045be41c687e0aa65f2b4e3c29657 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 13 Jan 2024 15:48:54 +0100 Subject: [PATCH 09/40] Accountancy - Add help url everywhere (#27480) Co-authored-by: Laurent Destailleur --- htdocs/accountancy/admin/account.php | 10 +++++---- htdocs/accountancy/admin/accountmodel.php | 6 +++-- htdocs/accountancy/admin/card.php | 4 ++-- htdocs/accountancy/admin/categories.php | 6 +++-- htdocs/accountancy/admin/categories_list.php | 8 ++++--- htdocs/accountancy/admin/closure.php | 8 +++++-- htdocs/accountancy/admin/defaultaccounts.php | 6 +++-- htdocs/accountancy/admin/export.php | 6 ++--- htdocs/accountancy/admin/fiscalyear.php | 4 ++-- htdocs/accountancy/admin/fiscalyear_card.php | 4 ++-- htdocs/accountancy/admin/fiscalyear_info.php | 4 ++-- htdocs/accountancy/admin/index.php | 22 +++++++++---------- htdocs/accountancy/admin/journals_list.php | 7 +++--- htdocs/accountancy/admin/productaccount.php | 16 +++++++------- htdocs/accountancy/admin/subaccount.php | 8 +++---- htdocs/accountancy/bookkeeping/balance.php | 6 +++-- htdocs/accountancy/bookkeeping/card.php | 6 ++--- htdocs/accountancy/bookkeeping/export.php | 5 +++-- htdocs/accountancy/bookkeeping/list.php | 6 ++--- .../accountancy/bookkeeping/listbyaccount.php | 6 ++--- htdocs/accountancy/closure/index.php | 2 +- htdocs/accountancy/customer/card.php | 9 ++++---- htdocs/accountancy/customer/index.php | 3 ++- htdocs/accountancy/customer/lines.php | 4 +++- htdocs/accountancy/customer/list.php | 6 +++-- htdocs/accountancy/expensereport/card.php | 18 ++++++++------- htdocs/accountancy/expensereport/index.php | 5 +++-- htdocs/accountancy/expensereport/lines.php | 6 +++-- htdocs/accountancy/expensereport/list.php | 8 ++++--- htdocs/accountancy/index.php | 2 +- htdocs/accountancy/supplier/card.php | 6 +++-- htdocs/accountancy/supplier/index.php | 11 +++++----- htdocs/accountancy/supplier/lines.php | 6 +++-- htdocs/accountancy/supplier/list.php | 8 ++++--- 34 files changed, 140 insertions(+), 102 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 6f36d04d7b9..8c878e1b162 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013-2023 Alexandre Spangaro - * Copyright (C) 2016-2018 Laurent Destailleur +/* Copyright (C) 2013-2016 Olivier Geffroy + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2016-2018 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -226,7 +226,9 @@ if (empty($reshook)) { $form = new Form($db); $formaccounting = new FormAccounting($db); -llxHeader('', $langs->trans("ListAccounts")); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $langs->trans("ListAccounts"), $help_url); if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$id, $langs->trans('DeleteAccount'), $langs->trans('ConfirmDeleteAccount'), 'confirm_delete', '', 0, 1); diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 456b1503ca7..2a0b1f5fca2 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2011-2016 Alexandre Spangaro + * Copyright (C) 2011-2024 Alexandre Spangaro * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud * @@ -401,7 +401,9 @@ if ($action == 'disable_favorite') { $form = new Form($db); $formadmin = new FormAdmin($db); -llxHeader(); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $langs->trans("Pcg_version"), $help_url); $titre = $langs->trans($tablib[$id]); $linkback = ''; diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 48d7d86e89f..2f7f90e84d0 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2020 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * * This program is free software; you can redistribute it and/or modify @@ -215,7 +215,7 @@ $accountsystem->fetch(getDolGlobalInt('CHARTOFACCOUNTS')); $title = $langs->trans('AccountAccounting')." - ".$langs->trans('Card'); -$help_url = 'EN:Category:Accounting'; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; llxheader('', $title, $help_url); diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index 014de28bcf3..abc45763361 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -1,6 +1,6 @@ - * Copyright (C) 2017-2022 Alexandre Spangaro + * Copyright (C) 2017-2024 Alexandre Spangaro * Copyright (C) 2022 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -113,7 +113,9 @@ if ($action == 'delete') { $form = new Form($db); $formaccounting = new FormAccounting($db); -llxheader('', $langs->trans('AccountingCategory')); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxheader('', $langs->trans('AccountingCategory'), $help_url); $linkback = ''.$langs->trans("BackToList").''; $titlepicto = 'setup'; diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 66f411c8cca..3fa664f5421 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011-2021 Alexandre Spangaro +/* Copyright (C) 2004-2023 Laurent Destailleur + * Copyright (C) 2011-2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -414,7 +414,9 @@ if ($action == 'disable_favorite') { $form = new Form($db); $formadmin = new FormAdmin($db); -llxHeader('', $langs->trans('DictionaryAccountancyCategory')); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $langs->trans('DictionaryAccountancyCategory'), $help_url); $titre = $langs->trans($tablib[$id]); $linkback = ''; diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php index faf5360c984..1979b666051 100644 --- a/htdocs/accountancy/admin/closure.php +++ b/htdocs/accountancy/admin/closure.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2019-2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -101,7 +101,11 @@ if ($action == 'update') { $form = new Form($db); $formaccounting = new FormAccounting($db); -llxHeader(); +$title = $langs->trans('Closure'); + +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $title, $help_url); $linkback = ''; print load_fiche_titre($langs->trans('MenuClosureAccounts'), $linkback, 'title_accountancy'); diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 48e4181b8e5..3eace908373 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent @@ -198,7 +198,9 @@ if ($action == 'setACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT') { $form = new Form($db); $formaccounting = new FormAccounting($db); -llxHeader(); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; + +llxHeader('', $langs->trans('MenuDefaultAccounts'), $help_url); $linkback = ''; print load_fiche_titre($langs->trans('MenuDefaultAccounts'), $linkback, 'title_accountancy'); diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 70dd216b7c9..902b184a48c 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2022 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent @@ -134,9 +134,9 @@ if ($action == 'update') { $form = new Form($db); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; $title = $langs->trans('ExportOptions'); -llxHeader('', $title); - +llxHeader('', $title, $help_url); $linkback = ''; // $linkback = '' . $langs->trans("BackToModuleList") . ''; diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 4cbb6045d74..cb142948096 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2013-2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -87,7 +87,7 @@ $fiscalyearstatic = new Fiscalyear($db); $title = $langs->trans('AccountingPeriods'); -$help_url = "EN:Module_Double_Entry_Accounting"; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 914bc34ccb6..ee587a31f96 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2024 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -181,7 +181,7 @@ if ($action == 'create') { $title = $langs->trans("NewFiscalYear"); } -$help_url = "EN:Module_Double_Entry_Accounting"; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index 918a5b22db1..39754c0345d 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -45,7 +45,7 @@ $id = GETPOST('id', 'int'); $title = $langs->trans("Fiscalyear")." - ".$langs->trans("Info"); -$help_url = "EN:Module_Double_Entry_Accounting"; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index acff0845286..636026e526c 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -1,13 +1,13 @@ - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro - * Copyright (C) 2014-2015 Ari Elbaz (elarifr) - * Copyright (C) 2014 Marcos García - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2017 Laurent Destailleur - * Copyright (C) 2021 Ferran Marcet +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2014-2015 Ari Elbaz (elarifr) + * Copyright (C) 2014 Marcos García + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2017 Laurent Destailleur + * Copyright (C) 2021 Ferran Marcet * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -275,8 +275,8 @@ if ($action == 'setenablevatreversecharge') { $form = new Form($db); $title = $langs->trans('ConfigAccountingExpert'); - -llxHeader('', $title); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; +llxHeader('', $title, $help_url); $linkback = ''; diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index c1ad8bdb0c5..5c739dbc2dd 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017-2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -351,7 +351,9 @@ if ($action == $acts[1]) { $form = new Form($db); $formadmin = new FormAdmin($db); -llxHeader(); +$title = $langs->trans('AccountingJournals'); +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; +llxHeader('', $title, $help_url); $titre = $langs->trans("DictionarySetup"); $linkback = ''; @@ -367,7 +369,6 @@ print load_fiche_titre($titre, $linkback, $titlepicto); if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); } -//var_dump($elementList); /* * Show a dictionary diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index ca5516547ec..903375f5920 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -1,10 +1,10 @@ - * Copyright (C) 2013-2022 Alexandre Spangaro - * Copyright (C) 2014 Florian Henry - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2015 Ari Elbaz (elarifr) - * Copyright (C) 2021 Gauthier VERDOL +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Ari Elbaz (elarifr) + * Copyright (C) 2021 Gauthier VERDOL * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -296,14 +296,14 @@ $aacompta_prodsell_export = getDolGlobalString('ACCOUNTING_PRODUCT_SOLD_EXPORT $title = $langs->trans("ProductsBinding"); -$helpurl = ''; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; $paramsCat = ''; foreach ($searchCategoryProductList as $searchCategoryProduct) { $paramsCat .= "&search_category_product_list[]=".urlencode($searchCategoryProduct); } -llxHeader('', $title, $helpurl, '', 0, 0, array(), array(), $paramsCat, ''); +llxHeader('', $title, $help_url, '', 0, 0, array(), array(), $paramsCat, ''); $pcgverid = getDolGlobalString('CHARTOFACCOUNTS'); $pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version'); diff --git a/htdocs/accountancy/admin/subaccount.php b/htdocs/accountancy/admin/subaccount.php index 69c2f458786..fb9a61e36d0 100644 --- a/htdocs/accountancy/admin/subaccount.php +++ b/htdocs/accountancy/admin/subaccount.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013-2020 Alexandre Spangaro - * Copyright (C) 2016-2018 Laurent Destailleur +/* Copyright (C) 2013-2016 Olivier Geffroy + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2016-2018 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -126,7 +126,7 @@ $form = new Form($db); // Page Header -$help_url = 'EN:Module_Double_Entry_Accounting#Setup'; +$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration'; $title = $langs->trans('ChartOfIndividualAccountsOfSubsidiaryLedger'); llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index aaba332d2ef..0a097d5a036 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Florian Henry - * Copyright (C) 2016-2023 Alexandre Spangaro + * Copyright (C) 2016-2024 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -248,7 +248,9 @@ if ($type == 'sub') { $title_page = $langs->trans("AccountBalance"); } -llxHeader('', $title_page); +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double'; + +llxHeader('', $title_page, $help_url); if ($action != 'export_csv') { diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 842059eadb0..7d42cb64a00 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2017 Florian Henry - * Copyright (C) 2013-2022 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2018-2020 Frédéric France * @@ -334,8 +334,8 @@ $form = new Form($db); $formaccounting = new FormAccounting($db); $title = $langs->trans("CreateMvts"); - -llxHeader('', $title); +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double'; +llxHeader('', $title, $help_url); // Confirmation to delete the command if ($action == 'delete') { diff --git a/htdocs/accountancy/bookkeeping/export.php b/htdocs/accountancy/bookkeeping/export.php index 0d4b02386e1..498a8ee2ed3 100644 --- a/htdocs/accountancy/bookkeeping/export.php +++ b/htdocs/accountancy/bookkeeping/export.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2022 Lionel Vessiller * Copyright (C) 2016-2017 Laurent Destailleur * Copyright (C) 2018-2021 Frédéric France @@ -708,8 +708,9 @@ $arrayofselected = is_array($toselect) ? $toselect : array(); // Output page // -------------------------------------------------------------------- +$help_url ='EN:Module_Double_Entry_Accounting#Exports|FR:Module_Comptabilité_en_Partie_Double#Exports'; -llxHeader('', $title_page); +llxHeader('', $title_page, $help_url); $formconfirm = ''; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 7a10c5d96d6..ed00a185230 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2022 Lionel Vessiller * Copyright (C) 2016-2017 Laurent Destailleur * Copyright (C) 2018-2021 Frédéric France @@ -711,8 +711,8 @@ $arrayofselected = is_array($toselect) ? $toselect : array(); // Output page // -------------------------------------------------------------------- - -llxHeader('', $title_page); +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double'; +llxHeader('', $title_page, $help_url); $formconfirm = ''; diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 51b37ce6651..e49424b71db 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -2,7 +2,7 @@ /* Copyright (C) 2016 Neil Orley * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2020 Florian Henry - * Copyright (C) 2013-2023 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -559,8 +559,8 @@ if ($type == 'sub') { $title_page .= $langs->trans("Bookkeeping"); } $title_page .= ')'; - -llxHeader('', $title_page); +$help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double'; +llxHeader('', $title_page, $help_url); // List $nbtotalofrecords = ''; diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 085c8a65e80..772d1672542 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -161,7 +161,7 @@ $formaccounting = new FormAccounting($db); $title = $langs->trans('Closure'); -$help_url ='EN:Module_Double_Entry_Accounting'; +$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Cl.C3.B4ture_annuelle'; llxHeader('', $title, $help_url); diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 4d29a60f1d9..3102b023015 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -1,7 +1,7 @@ - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2021 Alexandre Spangaro +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013-2024 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -84,8 +84,9 @@ if ($action == 'ventil' && $user->hasRight('accounting', 'bind', 'write')) { /* * View */ +$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; -llxHeader("", $langs->trans('FicheVentilation')); +llxHeader("", $langs->trans('FicheVentilation'), $help_url); if ($cancel == $langs->trans("Cancel")) { $action = ''; diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 3a9eced377c..018f222daf8 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -299,8 +299,9 @@ if ($action == 'validatehistory') { /* * View */ +$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; -llxHeader('', $langs->trans("CustomersVentilation")); +llxHeader('', $langs->trans("CustomersVentilation"), $help_url); $textprevyear = ''.img_previous().''; $textnextyear = ' '.img_next().''; diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 4929b45ac67..2a08eb3986c 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -175,7 +175,9 @@ if (GETPOST('sortfield') == 'f.datef, f.ref, fd.rowid') { $form = new Form($db); $formother = new FormOther($db); -llxHeader('', $langs->trans("CustomersVentilation").' - '.$langs->trans("Dispatched")); +$help_url ='EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; + +llxHeader('', $langs->trans("CustomersVentilation").' - '.$langs->trans("Dispatched"), $help_url); print '