diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index a4b757ef958..4c4be8bb0b0 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -1,11 +1,11 @@ - * Copyright (C) 2013-2024 Alexandre Spangaro - * Copyright (C) 2014-2015 Ari Elbaz (elarifr) - * Copyright (C) 2013-2021 Florian Henry - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2016 Laurent Destailleur - * Copyright (C) 2021 Gauthier VERDOL +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2014-2015 Ari Elbaz (elarifr) + * Copyright (C) 2013-2021 Florian Henry + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2016 Laurent Destailleur + * 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 @@ -232,7 +232,7 @@ $formother = new FormOther($db); $help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; -llxHeader('', $langs->trans("CustomersVentilation"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-customer page-list'); +llxHeader('', $langs->trans("CustomersVentilation"), $help_url, '', 0, 0, '', '', '', 'bodyforlist mod-accountancy accountancy-customer page-list'); if (empty($chartaccountcode)) { print $langs->trans("ErrorChartOfAccountSystemNotSelected"); diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 667a20347df..c729802eaf2 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -1,11 +1,11 @@ - * Copyright (C) 2013-2024 Alexandre Spangaro - * Copyright (C) 2014-2015 Ari Elbaz (elarifr) - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2016 Laurent Destailleur - * Copyright (C) 2024 Frédéric France +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2014-2015 Ari Elbaz (elarifr) + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2016 Laurent Destailleur + * Copyright (C) 2024 Frédéric France * * 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 @@ -225,7 +225,7 @@ $formother = new FormOther($db); $help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; -llxHeader('', $langs->trans("ExpenseReportsVentilation"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-expensereport page-list'); +llxHeader('', $langs->trans("ExpenseReportsVentilation"), $help_url, '', 0, 0, '', '', '', 'bodyforlist mod-accountancy accountancy-expensereport page-list'); if (empty($chartaccountcode)) { print $langs->trans("ErrorChartOfAccountSystemNotSelected"); diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index b2262067683..66f87389533 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -1,11 +1,11 @@ - * Copyright (C) 2013-2024 Alexandre Spangaro - * Copyright (C) 2014-2015 Ari Elbaz (elarifr) - * Copyright (C) 2013-2021 Florian Henry - * Copyright (C) 2021 Gauthier VERDOL - * Copyright (C) 2014 Juanjo Menent s - * Copyright (C) 2016 Laurent Destailleur +/* Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2014-2015 Ari Elbaz (elarifr) + * Copyright (C) 2013-2021 Florian Henry + * Copyright (C) 2021 Gauthier VERDOL + * Copyright (C) 2014 Juanjo Menent s + * Copyright (C) 2016 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 @@ -234,7 +234,7 @@ $formother = new FormOther($db); $help_url = 'EN:Module_Double_Entry_Accounting|FR:Module_Comptabilité_en_Partie_Double#Liaisons_comptables'; -llxHeader('', $langs->trans("SuppliersVentilation"), $help_url, '', 0, 0, '', '', '', 'mod-accountancy accountancy-supplier page-list'); +llxHeader('', $langs->trans("SuppliersVentilation"), $help_url, '', 0, 0, '', '', '', 'bodyforlist mod-accountancy accountancy-supplier page-list'); if (empty($chartaccountcode)) { print $langs->trans("ErrorChartOfAccountSystemNotSelected"); diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 2795204a3f8..586b34b05b6 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -203,7 +203,7 @@ foreach ($object->fields as $key => $val) { $arrayfields[$tableprefix.'.'.$key] = array( 'label' => $val['label'], 'checked' => (($visible < 0) ? 0 : 1), - 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), + 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), 'position' => $val['position'], 'help' => isset($val['help']) ? $val['help'] : '' ); diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 6da96055b98..52bf9210940 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -293,7 +293,7 @@ if (!empty($date_select)) { } $help_url = 'EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder'; -llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-subscription-list'); +llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-member page-subscription-list bodyforlist'); $arrayofselected = is_array($toselect) ? $toselect : array(); diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index baf017ecfe6..bca5eaf1536 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2007-2017 Laurent Destailleur + * Copyright (C) 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 @@ -119,11 +120,11 @@ foreach ($object->fields as $key => $val) { if (!empty($val['visible'])) { $visible = (int) dol_eval($val['visible'], 1); $arrayfields['t.'.$key] = array( - 'label'=>$val['label'], - 'checked'=>(($visible < 0) ? 0 : 1), - 'enabled'=>(abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), - 'position'=>$val['position'], - 'help'=> isset($val['help']) ? $val['help'] : '' + 'label' => $val['label'], + 'checked' => (($visible < 0) ? 0 : 1), + 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), + 'position' => $val['position'], + 'help' => isset($val['help']) ? $val['help'] : '' ); } } @@ -309,7 +310,7 @@ if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $s // Output page // -------------------------------------------------------------------- -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-user page-emailcollector_list'); +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist mod-user page-emailcollector_list'); $linkback = ''.$langs->trans("BackToModuleList").''; diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index 2976bf969ff..31dcb7533a1 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -110,7 +110,7 @@ foreach ($object->fields as $key => $val) { $arrayfields['t.'.$key] = array( 'label' => $val['label'], 'checked' => (($visible < 0) ? 0 : 1), - 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), + 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), 'position' => $val['position'], 'help' => isset($val['help']) ? $val['help'] : '' ); diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index e06bc80ff60..8c2a8b8b800 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -1,7 +1,7 @@ - * Copyright (C) 2018 Alexandre Spangaro - * Copyright (C) 2018 Ferran Marcet +/* Copyright (C) 2007-2017 Laurent Destailleur + * Copyright (C) 2018-2024 Alexandre Spangaro + * Copyright (C) 2018 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 @@ -109,7 +109,7 @@ foreach ($object->fields as $key => $val) { $arrayfields['t.'.$key] = array( 'label'=>$val['label'], 'checked'=>(($visible < 0) ? 0 : 1), - 'enabled'=>(abs($visible) != 3 && dol_eval($val['enabled'], 1)), + 'enabled'=>(abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), 'position'=>$val['position'], 'help'=> isset($val['help']) ? $val['help'] : '' ); @@ -354,7 +354,7 @@ if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $s // Output page // -------------------------------------------------------------------- -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-asset page-list'); +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist mod-asset page-list'); $arrayofselected = is_array($toselect) ? $toselect : array(); diff --git a/htdocs/asset/model/list.php b/htdocs/asset/model/list.php index 42ebf0f158c..4f0c9355907 100644 --- a/htdocs/asset/model/list.php +++ b/htdocs/asset/model/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Alexandre Spangaro +/* Copyright (C) 2007-2017 Laurent Destailleur + * Copyright (C) 2018-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 @@ -109,7 +109,7 @@ foreach ($object->fields as $key => $val) { $arrayfields['t.'.$key] = array( 'label'=>$val['label'], 'checked'=>(($visible < 0) ? 0 : 1), - 'enabled'=>(abs($visible) != 3 && dol_eval($val['enabled'], 1)), + 'enabled'=>(abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), 'position'=>$val['position'], 'help'=> isset($val['help']) ? $val['help'] : '' ); @@ -357,7 +357,7 @@ if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $s // Output page // -------------------------------------------------------------------- -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-asset page-model-list'); +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist mod-asset page-model-list'); $arrayofselected = is_array($toselect) ? $toselect : array(); diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 30c979dd830..86af171516d 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -1,8 +1,9 @@ - * Copyright (C) 2017-2018 Laurent Destailleur - * Copyright (C) 2018 Frédéric France +/* Copyright (C) 2017 ATM Consulting + * Copyright (C) 2017-2018 Laurent Destailleur + * Copyright (C) 2018 Frédéric France * Copyright (C) 2024 MDW + * Copyright (C) 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 @@ -306,7 +307,7 @@ if (GETPOST('withtab', 'alpha')) { } $help_url = "EN:Module_Unalterable_Archives_-_Logs|FR:Module_Archives_-_Logs_Inaltérable"; -llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-blockedlog page-admin_blockedlog_list'); +llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'bodyforlist mod-blockedlog page-admin_blockedlog_list'); $MAXLINES = 10000; diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index e0bc390b5c6..0d46d2ffa19 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -112,7 +112,7 @@ foreach ($object->fields as $key => $val) { $arrayfields['t.'.$key] = array( 'label' => $val['label'], 'checked' => (($visible < 0) ? 0 : 1), - 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), + 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), 'position' => $val['position'], 'help' => isset($val['help']) ? $val['help'] : '' ); diff --git a/htdocs/bookcal/availabilities_list.php b/htdocs/bookcal/availabilities_list.php index e3565ce9da3..d9d4bedf525 100644 --- a/htdocs/bookcal/availabilities_list.php +++ b/htdocs/bookcal/availabilities_list.php @@ -132,7 +132,7 @@ foreach ($object->fields as $key => $val) { $arrayfields['t.'.$key] = array( 'label' => $val['label'], 'checked' => (($visible < 0) ? 0 : 1), - 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), + 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), 'position' => $val['position'], 'help' => isset($val['help']) ? $val['help'] : '' ); diff --git a/htdocs/bookcal/calendar_list.php b/htdocs/bookcal/calendar_list.php index 6d70a8cf159..7fb13145b0b 100644 --- a/htdocs/bookcal/calendar_list.php +++ b/htdocs/bookcal/calendar_list.php @@ -128,7 +128,7 @@ foreach ($object->fields as $key => $val) { $arrayfields['t.'.$key] = array( 'label' => $val['label'], 'checked' => (($visible < 0) ? 0 : 1), - 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), + 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), 'position' => $val['position'], 'help' => isset($val['help']) ? $val['help'] : '' ); diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index ac4b4fc3d8c..8d9896433df 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2005-2022 Laurent Destailleur + * Copyright (C) 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 @@ -213,7 +214,7 @@ $num = $db->num_rows($resql); // Output page // -------------------------------------------------------------------- -llxHeader('', $title, '', '', 0, 0, '', '', '', 'mod-bookmarks page-list'); +llxHeader('', $title, '', '', 0, 0, '', '', '', 'bodyforlist mod-bookmarks page-list'); $arrayofselected = is_array($toselect) ? $toselect : array(); diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 55df5382b7f..545bd9b3306 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -1,13 +1,14 @@ - * Copyright (C) 2006-2020 Laurent Destailleur - * Copyright (C) 2007 Patrick Raguin - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2015 Raphaël Doursenaud - * Copyright (C) 2020 Tobias Sekan - * Copyright (C) 2020 Josep Lluís Amador +/* Copyright (C) 2005 Matthieu Valleton + * Copyright (C) 2006-2020 Laurent Destailleur + * Copyright (C) 2007 Patrick Raguin + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2015 Raphaël Doursenaud + * Copyright (C) 2020 Tobias Sekan + * Copyright (C) 2020 Josep Lluís Amador * Copyright (C) 2024 MDW * Copyright (C) 2024 Frédéric France + * Copyright (C) 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 @@ -540,7 +541,7 @@ if ($type == Categorie::TYPE_PRODUCT) { $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($prods); $nbtotalofrecords = ''; - $newcardbutton = dolGetButtonTitle($langs->trans("AddProduct"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&categories[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer); + $newcardbutton = dolGetButtonTitle($langs->trans("AddProduct"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/product/card.php?action=create&categories[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->hasRight('societe', 'creer')); // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("ProductsAndServices"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'products', 0, $newcardbutton, '', $limit); @@ -629,7 +630,7 @@ if ($type == Categorie::TYPE_CUSTOMER) { $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($socs); $nbtotalofrecords = ''; - $newcardbutton = dolGetButtonTitle($langs->trans("AddThirdParty"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/societe/card.php?action=create&client=3&custcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer); + $newcardbutton = dolGetButtonTitle($langs->trans("AddThirdParty"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/societe/card.php?action=create&client=3&custcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->hasRight('societe', 'creer')); // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Customers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'companies', 0, $newcardbutton, '', $limit); @@ -717,7 +718,7 @@ if ($type == Categorie::TYPE_SUPPLIER) { $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($socs); $nbtotalofrecords = ''; - $newcardbutton = dolGetButtonTitle($langs->trans("AddSupplier"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/societe/card.php?action=create&fournisseur=1&suppcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer); + $newcardbutton = dolGetButtonTitle($langs->trans("AddSupplier"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/societe/card.php?action=create&fournisseur=1&suppcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->hasRight('societe', 'creer')); // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Suppliers"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'companies', 0, $newcardbutton, '', $limit); @@ -895,7 +896,7 @@ if ($type == Categorie::TYPE_CONTACT) { $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($contacts); $nbtotalofrecords = ''; - $newcardbutton = dolGetButtonTitle($langs->trans("AddContact"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create&contcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->rights->societe->creer); + $newcardbutton = dolGetButtonTitle($langs->trans("AddContact"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create&contcats[]='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id), '', $user->hasRight('societe', 'creer')); // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Contact"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'contact', 0, $newcardbutton, '', $limit); @@ -1284,7 +1285,7 @@ if ($type == Categorie::TYPE_WAREHOUSE) { // List of tickets if ($type == Categorie::TYPE_TICKET) { if ($user->hasRight("ticket", "read")) { - $permission = ($user->rights->categorie->creer || $user->rights->categorie->creer); + $permission = $user->hasRight('categorie', 'creer'); $tickets = $object->getObjectsInCateg($type, 0, $limit, $offset); if ($tickets < 0) { diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 7faf66f0f2d..9bd9600d1c0 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -1,12 +1,13 @@ - * Copyright (C) 2003 Eric Seigne - * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2017 Open-DSI - * Copyright (C) 2018-2024 Frédéric France - * Copyright (C) 2020 Tobias Sekan +/* Copyright (C) 2001-2004 Rodolphe Quiedeville + * Copyright (C) 2003 Eric Seigne + * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2017 Open-DSI + * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2020 Tobias Sekan * Copyright (C) 2024 MDW + * Copyright (C) 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 @@ -295,7 +296,7 @@ $now = dol_now(); $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda|DE:Modul_Terminplanung'; $title = $langs->trans("Agenda"); -llxHeader('', $title, $help_url); +llxHeader('', $title, $help_url, 0, 0, '', '', '', 'bodyforlist'); // Define list of all external calendars $listofextcals = array(); diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index d317f33e8b0..aa713ed13cb 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -1,7 +1,8 @@ - * Copyright (C) 2005-2010 Regis Houssin +/* Copyright (C) 2005-2023 Laurent Destailleur + * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2024 MDW + * Copyright (C) 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 @@ -268,7 +269,7 @@ if ($filteremail) { $title .= ' ('.$langs->trans("SentTo", $filteremail).')'; } -llxHeader('', $title, $help_url); +llxHeader('', $title, $help_url, 0, 0, '', '', '', 'bodyforlist'); $arrayofselected = is_array($toselect) ? $toselect : array(); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index ef52235ec00..103b025b1ad 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1,22 +1,22 @@ - * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2011 Juanjo Menent - * Copyright (C) 2010-2022 Philippe Grand - * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2016-2021 Ferran Marcet - * Copyright (C) 2017-2023 Charlene Benke - * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2019-2021 Alexandre Spangaro - * Copyright (C) 2021 Anthony Berton - * Copyright (C) 2021-2024 Frédéric France - * Copyright (C) 2022 Josep Lluís Amador +/* Copyright (C) 2001-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2013 Regis Houssin + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2010-2022 Philippe Grand + * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2016-2021 Ferran Marcet + * Copyright (C) 2017-2023 Charlene Benke + * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2019-2024 Alexandre Spangaro + * Copyright (C) 2021 Anthony Berton + * Copyright (C) 2021-2024 Frédéric France + * Copyright (C) 2022 Josep Lluís Amador * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -272,7 +272,7 @@ foreach ($object->fields as $key => $val) { $arrayfields['t.'.$key] = array( 'label'=>$val['label'], 'checked'=>(($visible < 0) ? 0 : 1), - 'enabled'=>(abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), + 'enabled'=>(abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), 'position'=>$val['position'], 'help'=> isset($val['help']) ? $val['help'] : '' ); @@ -876,7 +876,7 @@ if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $s } $help_url = 'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'; -llxHeader('', $title, $help_url); +llxHeader('', $title, $help_url, 0, 0, '', '', '', 'bodyforlist'); $param = '&search_status='.urlencode($search_status); if (!empty($mode)) { diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index e280fcb49e0..31c69233ada 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1,20 +1,21 @@ - * Copyright (C) 2004-2019 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012 Juanjo Menent - * Copyright (C) 2013 Christophe Battarel - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015-2024 Frédéric France - * Copyright (C) 2015 Marcos García - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2016-2023 Ferran Marcet - * Copyright (C) 2018-2023 Charlene Benke - * Copyright (C) 2021-2024 Anthony Berton - * Copyright (C) 2024 MDW - * Copyright (C) 2024 Noé Cendrier - * Copyright (C) 2024 Benjamin Falière +/* Copyright (C) 2001-2005 Rodolphe Quiedeville + * Copyright (C) 2004-2019 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2013 Christophe Battarel + * Copyright (C) 2013 Cédric Salvado + * Copyright (C) 2015-2024 Frédéric France + * Copyright (C) 2015 Marcos García + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2016-2023 Ferran Marcet + * Copyright (C) 2018-2023 Charlene Benke + * Copyright (C) 2021-2024 Anthony Berton + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Noé Cendrier + * Copyright (C) 2024 Benjamin Falière + * Copyright (C) 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 @@ -1216,7 +1217,7 @@ if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $s // Output page // -------------------------------------------------------------------- -llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-order page-list'); +llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'bodyforlist mod-order page-list'); $arrayofselected = is_array($toselect) ? $toselect : array(); diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index 03350ec8936..2abf61b537a 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -1,18 +1,19 @@ - * Copyright (C) 2004-2019 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012 Juanjo Menent - * Copyright (C) 2013 Christophe Battarel - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015-2024 Frédéric France - * Copyright (C) 2015 Marcos García - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2016-2021 Ferran Marcet - * Copyright (C) 2018-2023 Charlene Benke - * Copyright (C) 2021-2023 Anthony Berton +/* Copyright (C) 2001-2005 Rodolphe Quiedeville + * Copyright (C) 2004-2019 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2013 Christophe Battarel + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2015-2024 Frédéric France + * Copyright (C) 2015 Marcos García + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2016-2021 Ferran Marcet + * Copyright (C) 2018-2023 Charlene Benke + * Copyright (C) 2021-2023 Anthony Berton * Copyright (C) 2024 MDW + * Copyright (C) 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 @@ -29,7 +30,7 @@ */ /** - * \file htdocs/commande/list.php + * \file htdocs/commande/list_det.php * \ingroup order * \brief Page to list orders */ @@ -213,10 +214,10 @@ $arrayfields = array( 'c.fk_warehouse' => array('label' => 'Warehouse', 'checked' => 0, 'enabled' => (!isModEnabled('stock') && !getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER') ? 0 : 1), 'position' => 110), 'u.login' => array('label' => "Author", 'checked' => 1, 'position' => 115), 'sale_representative' => array('label' => "SaleRepresentativesOfThirdParty", 'checked' => 0, 'position' => 116), - 'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous ? 0 : 1)), - 'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous ? 0 : 1)), - 'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous || !getDolGlobalString('DISPLAY_MARGIN_RATES') ? 0 : 1)), - 'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->rights->margins->liretous || !getDolGlobalString('DISPLAY_MARK_RATES') ? 0 : 1)), + 'total_pa' => array('label' => (getDolGlobalString('MARGIN_TYPE') == '1' ? 'BuyingPrice' : 'CostPrice'), 'checked' => 0, 'position' => 300, 'enabled' => (!isModEnabled('margin') || !$user->hasRight('margins', 'liretous') ? 0 : 1)), + 'total_margin' => array('label' => 'Margin', 'checked' => 0, 'position' => 301, 'enabled' => (!isModEnabled('margin') || !$user->hasRight('margins', 'liretous') ? 0 : 1)), + 'total_margin_rate' => array('label' => 'MarginRate', 'checked' => 0, 'position' => 302, 'enabled' => (!isModEnabled('margin') || !$user->hasRight('margins', 'liretous') || !getDolGlobalString('DISPLAY_MARGIN_RATES') ? 0 : 1)), + 'total_mark_rate' => array('label' => 'MarkRate', 'checked' => 0, 'position' => 303, 'enabled' => (!isModEnabled('margin') || !$user->hasRight('margins', 'liretous') || !getDolGlobalString('DISPLAY_MARK_RATES') ? 0 : 1)), 'c.datec' => array('label' => "DateCreation", 'checked' => 0, 'position' => 120), 'c.tms' => array('label' => "DateModificationShort", 'checked' => 0, 'position' => 125), 'c.date_cloture' => array('label' => "DateClosing", 'checked' => 0, 'position' => 130), diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index b1bb5851e89..0102a6215e4 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -1,11 +1,12 @@ - * Copyright (C) 2004-2019 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2018 Ferran Marcet - * Copyright (C) 2020 Tobias Sekan +/* Copyright (C) 2001-2005 Rodolphe Quiedeville + * Copyright (C) 2004-2019 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2018 Ferran Marcet + * Copyright (C) 2020 Tobias Sekan * Copyright (C) 2024 MDW + * Copyright (C) 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 @@ -307,7 +308,7 @@ if ($resql) { -llxHeader('', $title, $help_url); +llxHeader('', $title, $help_url, 0, 0, '', '', '', 'bodyforlist'); $arrayofselected = is_array($toselect) ? $toselect : array(); diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index f264fd9b0b6..e9fab5a8e38 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -1,8 +1,8 @@ - * Copyright (C) 2017 Laurent Destailleur - * Copyright (C) 2018 Frédéric France - * Copyright (C) 2020 Tobias Sekan +/* Copyright (C) 2017-2024 Alexandre Spangaro + * Copyright (C) 2017 Laurent Destailleur + * Copyright (C) 2018 Frédéric France + * Copyright (C) 2020 Tobias Sekan * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -368,7 +368,7 @@ if ($num == 1 && getDolGlobalInt('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $sear // Output page // -------------------------------------------------------------------- -llxHeader('', $title, $help_url); +llxHeader('', $title, $help_url, 0, 0, '', '', '', 'bodyforlist'); $arrayofselected = is_array($toselect) ? $toselect : array(); diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index d5cdc5bc832..ec21da52ca6 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -110,7 +110,7 @@ foreach ($object->fields as $key => $val) { $arrayfields['t.'.$key] = array( 'label'=>$val['label'], 'checked'=>(($visible < 0) ? 0 : 1), - 'enabled'=>(abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), + 'enabled'=>(abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), 'position'=>$val['position'], 'help'=> isset($val['help']) ? $val['help'] : '' ); diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 22ccb88cdfd..faac43d02e5 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1,24 +1,24 @@ - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2015 Regis Houssin - * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2010-2020 Juanjo Menent - * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2015-2022 Ferran Marcet - * Copyright (C) 2017 Josep Lluís Amador - * Copyright (C) 2018 Charlene Benke - * Copyright (C) 2019-2021 Alexandre Spangaro +/* Copyright (C) 2002-2006 Rodolphe Quiedeville + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2015 Regis Houssin + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2010-2020 Juanjo Menent + * Copyright (C) 2012 Christophe Battarel + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015-2022 Ferran Marcet + * Copyright (C) 2017 Josep Lluís Amador + * Copyright (C) 2018 Charlene Benke + * Copyright (C) 2019-2024 Alexandre Spangaro * Copyright (C) 2023 Nick Fragoulis - * Copyright (C) 2023 Joachim Kueter - * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France - * Copyright (C) 2021-2024 Anthony Berton + * Copyright (C) 2023 Joachim Kueter + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France + * Copyright (C) 2021-2024 Anthony Berton * * 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 @@ -287,7 +287,7 @@ foreach ($object->fields as $key => $val) { $arrayfields[$newkey] = array( 'label' => $val['label'], 'checked' => (($visible < 0) ? 0 : 1), - 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1, 1, '1')), + 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), 'position' => $val['position'], 'help' => empty($val['help']) ? '' : $val['help'], ); @@ -1010,7 +1010,7 @@ if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $s // Output page // -------------------------------------------------------------------- -llxHeader('', $title, $help_url); +llxHeader('', $title, $help_url, 0, 0, '', '', '', 'bodyforlist'); $param = '&socid='.urlencode((string) ($socid)); if (!empty($mode)) { diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 40e9c1e7dd8..d4350cac98c 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -1,9 +1,9 @@ - * Copyright (C) 2007-2016 Laurent Destailleur - * Copyright (C) 2009-2012 Regis Houssin - * Copyright (C) 2014 Alexandre Spangaro - * Copyright (C) 2016 Juanjo Menent +/* Copyright (C) 2006 Rodolphe Quiedeville + * Copyright (C) 2007-2016 Laurent Destailleur + * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2014-2024 Alexandre Spangaro + * Copyright (C) 2016 Juanjo Menent * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -141,7 +141,7 @@ if (empty($reshook)) { $form = new Form($db); -llxHeader('', $langs->trans("ChequeDeposits")); +llxHeader('', $langs->trans("ChequeDeposits"), '', 0, 0, '', '', '', 'bodyforlist'); $sql = "SELECT bc.rowid, bc.ref, bc.date_bordereau,"; $sql .= " bc.nbcheque, bc.amount, bc.statut, bc.type,"; diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 106fe1d56f4..ac0315ee660 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -1,14 +1,14 @@ - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2015 Juanjo Menent - * Copyright (C) 2017-2023 Alexandre Spangaro - * Copyright (C) 2018-2021 Ferran Marcet - * Copyright (C) 2018 Charlene Benke - * Copyright (C) 2020 Tobias Sekan +/* Copyright (C) 2001-2006 Rodolphe Quiedeville + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Juanjo Menent + * Copyright (C) 2017-2024 Alexandre Spangaro + * Copyright (C) 2018-2021 Ferran Marcet + * Copyright (C) 2018 Charlene Benke + * Copyright (C) 2020 Tobias Sekan * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -180,7 +180,7 @@ $accountstatic = new Account($db); $companystatic = new Societe($db); $bankline = new AccountLine($db); -llxHeader('', $langs->trans('ListPayment')); +llxHeader('', $langs->trans('ListPayment'), '', 0, 0, '', '', '', 'bodyforlist'); if (GETPOST("orphelins", "alpha")) { // Payments not linked to an invoice. Should not happen. For debug only. diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 8ac9dff407a..72ce59256d5 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -1,9 +1,9 @@ - * Copyright (C) 2005-2016 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2010-2018 Juanjo Menent - * Copyright (C) 2022 Alexandre Spangaro +/* Copyright (C) 2005 Rodolphe Quiedeville + * Copyright (C) 2005-2016 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2010-2018 Juanjo Menent + * Copyright (C) 2022-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 @@ -247,7 +247,7 @@ $num = $db->num_rows($resql); // Output page // -------------------------------------------------------------------- -llxHeader('', $title, $help_url); +llxHeader('', $title, $help_url, 0, 0, '', '', '', 'bodyforlist'); $arrayofselected = is_array($toselect) ? $toselect : array(); diff --git a/htdocs/compta/prelevement/orders_list.php b/htdocs/compta/prelevement/orders_list.php index fbf0519c6e8..c8da5cfdd48 100644 --- a/htdocs/compta/prelevement/orders_list.php +++ b/htdocs/compta/prelevement/orders_list.php @@ -1,8 +1,9 @@ - * Copyright (C) 2005-2017 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2010-2012 Juanjo Menent +/* Copyright (C) 2005 Rodolphe Quiedeville + * Copyright (C) 2005-2017 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2010-2012 Juanjo Menent + * Copyright (C) 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 @@ -231,7 +232,7 @@ $num = $db->num_rows($resql); // Output page // -------------------------------------------------------------------- -llxHeader('', $title, $help_url); +llxHeader('', $title, $help_url, 0, 0, '', '', '', 'bodyforlist'); $arrayofselected = is_array($toselect) ? $toselect : array(); $param = ''; diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index 2c1288ac2cc..654b9e1ec99 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -1,12 +1,12 @@ - * Copyright (C) 2004-2017 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2016 Frédéric France - * Copyright (C) 2020 Pierre Ardoin - * Copyright (C) 2020 Tobias Sekan - * Copyright (C) 2021 Gauthier VERDOL - * Copyright (C) 2021-2023 Alexandre Spangaro +/* Copyright (C) 2001-2003 Rodolphe Quiedeville + * Copyright (C) 2004-2017 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2016 Frédéric France + * Copyright (C) 2020 Pierre Ardoin + * Copyright (C) 2020 Tobias Sekan + * Copyright (C) 2021 Gauthier VERDOL + * Copyright (C) 2021-2024 Alexandre Spangaro * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -195,7 +195,7 @@ $formsocialcontrib = new FormSocialContrib($db); $chargesociale_static = new ChargeSociales($db); $projectstatic = new Project($db); -llxHeader('', $langs->trans("SocialContributions")); +llxHeader('', $langs->trans("SocialContributions"), '', 0, 0, '', '', '', 'bodyforlist'); $arrayofselected = is_array($toselect) ? $toselect : array(); diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 576d7db852a..01f69811fd3 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -1,10 +1,10 @@ - * Copyright (C) 2004-2020 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2011-2019 Alexandre Spangaro - * Copyright (C) 2020 Tobias Sekan - * Copyright (C) 2021 Gauthier VERDOL +/* Copyright (C) 2001-2003 Rodolphe Quiedeville + * Copyright (C) 2004-2020 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2011-2024 Alexandre Spangaro + * Copyright (C) 2020 Tobias Sekan + * Copyright (C) 2021 Gauthier VERDOL * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -259,7 +259,7 @@ $num = $db->num_rows($resql); // Output page // -------------------------------------------------------------------- -llxHeader('', $title, $help_url); +llxHeader('', $title, $help_url, 0, 0, '', '', '', 'bodyforlist'); $arrayofselected = is_array($toselect) ? $toselect : array(); diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 87504a63822..44dd60289f7 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -232,7 +232,7 @@ foreach ($object->fields as $key => $val) { $arrayfields['p.'.$key] = array( 'label' => $val['label'], 'checked' => (($visible < 0) ? 0 : 1), - 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), + 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), 'position' => $val['position'], 'help' => isset($val['help']) ? $val['help'] : '' ); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index eec04e92176..260b22cecef 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -814,6 +814,7 @@ if (empty($reshook)) { $result = $objectline->update($user); if ($result < 0) { $error++; + $action = 'editline'; setEventMessages($objectline->error, $objectline->errors, 'errors'); } } @@ -1665,17 +1666,17 @@ if ($action == 'create') { print ''; if ($user->hasRight('contrat', 'creer') && is_array($arrayothercontracts) && count($arrayothercontracts) && ($object->status >= 0)) { print ''; - print ''; + print ''; print img_picto($langs->trans("MoveToAnotherContract"), 'uparrow'); print ''; } - if ($user->hasRight('contrat', 'creer') && ($object->status >= 0)) { - print ''; + if ($user->hasRight('contrat', 'creer') && ($object->statut >= 0)) { + print ''; print img_edit(); print ''; } - if ($user->hasRight('contrat', 'creer') && ($object->status >= 0)) { - print ''; + if ($user->hasRight('contrat', 'creer') && ($object->statut >= 0)) { + print ''; print img_delete(); print ''; } @@ -1738,8 +1739,11 @@ if ($action == 'create') { // Ligne carac print ''; print ''; + $currentLineProductId=GETPOSTISSET('idprod')?GETPOST('idprod'):(!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0); if ($objp->fk_product > 0) { $canchangeproduct = 1; + + // TODO: As $canchangeproduct is set just before, in what usecase it can be empty ? if (empty($canchangeproduct)) { $productstatic->id = $objp->fk_product; $productstatic->type = $objp->ptype; @@ -1747,19 +1751,19 @@ if ($action == 'create') { $productstatic->entity = $objp->pentity; print $productstatic->getNomUrl(1, '', 32); print $objp->label ? ' - '.dol_trunc($objp->label, 32) : ''; - print ''; + print ''; } else { $senderissupplier = 0; if (empty($senderissupplier)) { - print $form->select_produits((!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0), 'idprod'); + print $form->select_produits($currentLineProductId, 'idprod'); } else { - $form->select_produits_fournisseurs((!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0), 'idprod'); + $form->select_produits_fournisseurs($currentLineProductId, 'idprod'); } } print '
'; } else { print $objp->label ? $objp->label.'
' : ''; - print ''; + print ''; } // editeur wysiwyg @@ -1768,19 +1772,18 @@ if ($action == 'create') { if (getDolGlobalString('MAIN_INPUT_DESC_HEIGHT')) { $nbrows = getDolGlobalString('MAIN_INPUT_DESC_HEIGHT'); } - $enable = (isset($conf->global->FCKEDITOR_ENABLE_DETAILS) ? $conf->global->FCKEDITOR_ENABLE_DETAILS : 0); - $doleditor = new DolEditor('product_desc', $objp->description, '', 92, 'dolibarr_details', '', false, true, $enable, $nbrows, '90%'); + $doleditor = new DolEditor('product_desc', (GETPOSTISSET('product_desc')?GETPOST('product_desc'):$objp->description), '', 92, 'dolibarr_details', '', false, true, getDolGlobalInt('FCKEDITOR_ENABLE_DETAILS'), $nbrows, '90%'); $doleditor->Create(); print ''; // VAT print ''; - print $form->load_tva("eltva_tx", $objp->tva_tx.($objp->vat_src_code ? (' ('.$objp->vat_src_code.')') : ''), $mysoc, $object->thirdparty, $objp->fk_product, $objp->info_bits, $objp->product_type, 0, 1); + print $form->load_tva("eltva_tx", $objp->tva_tx.($objp->vat_src_code ? (' ('.$objp->vat_src_code.')') : ''), $mysoc, $object->thirdparty, $currentLineProductId, $objp->info_bits, $objp->product_type, 0, 1); print ''; // Price - print ''; + print ''; // Price multicurrency /*if (isModEnabled("multicurrency")) { @@ -1788,24 +1791,24 @@ if ($action == 'create') { }*/ // Quantity - print ''; + print ''; // Unit if (getDolGlobalInt('PRODUCT_USE_UNITS')) { print ''; - print $form->selectUnits($objp->fk_unit, "unit"); + print $form->selectUnits((GETPOSTISSET('unit')?GETPOST('unit'):$objp->fk_unit), "unit"); print ''; } // Discount - print '%'; + print '%'; if (!empty($usemargins)) { print ''; if ($objp->fk_product) { print ''; } - print ''; + print ''; } print ''; print ''; @@ -2316,8 +2319,9 @@ llxFooter(); $db->close(); + +// TODO Why this on the page when editing margin for contracts ? if (isModEnabled('margin') && $action == 'editline') { - // TODO Why this ? To manage margin on contracts ? print "\n".'