diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 6ee9d033e7b..5f600963093 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -6,7 +6,7 @@ * Copyright (C) 2016 Charlie Benke * Copyright (C) 2017 Open-DSI * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -170,7 +170,7 @@ if ($action == 'set') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->ACTION_EVENT_ADDON_PDF == "$value") { + if (getDolGlobalString('ACTION_EVENT_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'ACTION_EVENT_ADDON_PDF', $conf->entity); } } @@ -306,7 +306,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { // Default print ''; - if ($conf->global->ACTION_EVENT_ADDON_PDF == "$name") { + if (getDolGlobalString('ACTION_EVENT_ADDON_PDF') == "$name") { print img_picto($langs->trans("Default"), 'on'); } else { print 'scandir).'&label='.urlencode($module->name).'&type=action"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index a92f5cfb6c6..8dd7ed480f4 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -139,7 +139,7 @@ if ($action == 'set') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->ACTION_EVENT_ADDON_PDF == "$value") { + if (getDolGlobalString('ACTION_EVENT_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'ACTION_EVENT_ADDON_PDF', $conf->entity); } } diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index 3df9ef80fde..fe14d472141 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -4,7 +4,7 @@ * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -192,7 +192,7 @@ if ($action == 'set') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->BANKADDON_PDF == "$value") { + if (getDolGlobalString('BANKADDON_PDF') == "$value") { dolibarr_del_const($db, 'BANKADDON_PDF', $conf->entity); } } diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index ae657998bba..7162b746238 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -122,7 +122,7 @@ if ($action == 'updateMask') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->BOM_ADDON_PDF == "$value") { + if (getDolGlobalString('BOM_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'BOM_ADDON_PDF', $conf->entity); } } @@ -225,6 +225,7 @@ foreach ($dirmodels as $reldir) { $module = new $classname($db); '@phan-var-force ModeleNumRefBoms $module'; + /** @var ModeleNumRefBoms $module */ // Show modules according to features level if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -367,6 +368,7 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); '@phan-var-force ModelePDFBom $module'; + /** @var ModelePDFBom $module */ $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -402,7 +404,7 @@ foreach ($dirmodels as $reldir) { // Default print ''; - if ($conf->global->BOM_ADDON_PDF == $name) { + if (getDolGlobalString('BOM_ADDON_PDF') == $name) { print img_picto($langs->trans("Default"), 'on'); } else { print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index 12718d38608..1f14180077c 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -2,7 +2,7 @@ /* Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -127,7 +127,7 @@ if ($action == 'updateMask') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->CONTRACT_ADDON_PDF == "$value") { + if (getDolGlobalString('CONTRACT_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'CONTRACT_ADDON_PDF', $conf->entity); } } @@ -255,9 +255,8 @@ foreach ($dirmodels as $reldir) { $file = substr($file, 0, dol_strlen($file) - 4); require_once $dir.$file.'.php'; - /** @var ModelNumRefContracts $module */ $module = new $file($db); - + /** @var ModelNumRefContracts $module */ '@phan-var-force ModelNumRefContracts $module'; // Show modules according to features level @@ -287,7 +286,7 @@ foreach ($dirmodels as $reldir) { print ''."\n"; print ''; - if ($conf->global->CONTRACT_ADDON == "$file") { + if (getDolGlobalString('CONTRACT_ADDON') == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''; diff --git a/htdocs/admin/delivery.php b/htdocs/admin/delivery.php index 95ef16efbad..03969a9b3aa 100644 --- a/htdocs/admin/delivery.php +++ b/htdocs/admin/delivery.php @@ -9,7 +9,7 @@ * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2015 Claudio Aschieri * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -301,7 +301,7 @@ if (getDolGlobalString('MAIN_SUBMODULE_DELIVERY')) { print ''."\n"; print ''; - if ($conf->global->DELIVERY_ADDON_NUMBER == "$file") { + if (getDolGlobalString('DELIVERY_ADDON_NUMBER') == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index a85f726a8de..0530f56be04 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -8,7 +8,7 @@ * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -243,7 +243,7 @@ foreach ($dirmodels as $reldir) { print ''."\n"; print ''; - if ($conf->global->EXPEDITION_ADDON_NUMBER == "$file") { + if (getDolGlobalString('EXPEDITION_ADDON_NUMBER') == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print 'name).'">'; diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index e9d5c01acd8..a61300bcd53 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -8,7 +8,7 @@ * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2011-2022 Philippe Grand * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -132,7 +132,7 @@ if ($action == 'updateMask') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$value") { + if (getDolGlobalString('EXPENSEREPORT_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'EXPENSEREPORT_ADDON_PDF', $conf->entity); } } @@ -409,7 +409,7 @@ foreach ($dirmodels as $reldir) { // Default print ''; - if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$name") { + if (getDolGlobalString('EXPENSEREPORT_ADDON_PDF') == "$name") { print img_picto($langs->trans("Default"), 'on'); } else { print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 18c72b62051..113831ab650 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -8,7 +8,7 @@ * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -129,7 +129,7 @@ if ($action == 'updateMask') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->FICHEINTER_ADDON_PDF == "$value") { + if (getDolGlobalString('FICHEINTER_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'FICHEINTER_ADDON_PDF', $conf->entity); } } @@ -483,7 +483,7 @@ foreach ($dirmodels as $reldir) { // Default print ""; - if ($conf->global->FICHEINTER_ADDON_PDF == "$name") { + if (getDolGlobalString('FICHEINTER_ADDON_PDF') == "$name") { print img_picto($langs->trans("Default"), 'on'); } else { print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index 4eb9e2f5dbd..63842a44af3 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -2,7 +2,7 @@ /* Copyright (C) 2011-2019 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2018 Charlene Benke - * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -126,7 +126,7 @@ if ($action == 'updateMask') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->HOLIDAY_ADDON_PDF == "$value") { + if (getDolGlobalString('HOLIDAY_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'HOLIDAY_ADDON_PDF', $conf->entity); } } @@ -245,7 +245,7 @@ foreach ($dirmodels as $reldir) { print ''."\n"; print ''; - if ($conf->global->HOLIDAY_ADDON == "$file") { + if (getDolGlobalString('HOLIDAY_ADDON') == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''; diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php index 9f75b7efa18..215d9012b74 100644 --- a/htdocs/admin/mrp.php +++ b/htdocs/admin/mrp.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -123,7 +123,7 @@ if ($action == 'updateMask') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->MRP_MO_ADDON_PDF == "$value") { + if (getDolGlobalString('MRP_MO_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'MRP_MO_ADDON_PDF', $conf->entity); } } @@ -252,7 +252,7 @@ foreach ($dirmodels as $reldir) { print ''."\n"; print ''; - if ($conf->global->MRP_MO_ADDON == $file) { + if (getDolGlobalString('MRP_MO_ADDON') == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''; diff --git a/htdocs/admin/order.php b/htdocs/admin/order.php index 27e6f623a62..92019b44e41 100644 --- a/htdocs/admin/order.php +++ b/htdocs/admin/order.php @@ -9,7 +9,7 @@ * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2011-2016 Philippe Grand * Copyright (C) 2013 Florian Henry - * Copyright (C) 2021-2024 Frédéric France + * Copyright (C) 2021-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -337,7 +337,7 @@ foreach ($dirmodels as $reldir) { print ''."\n"; print ''; - if ($conf->global->COMMANDE_ADDON == $file) { + if (getDolGlobalString('COMMANDE_ADDON') == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''; @@ -580,7 +580,7 @@ if (!isModEnabled('invoice')) { $row = $db->fetch_row($resql); print ''; $i++; @@ -620,7 +620,7 @@ if (!isModEnabled('invoice')) { $row = $db->fetch_row($resql); print ''; $i++; diff --git a/htdocs/admin/paymentbybanktransfer.php b/htdocs/admin/paymentbybanktransfer.php index 41c160581f9..c3390a8978d 100644 --- a/htdocs/admin/paymentbybanktransfer.php +++ b/htdocs/admin/paymentbybanktransfer.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2019 Markus Welters - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -326,7 +326,7 @@ foreach ($dirmodels as $reldir) // Default print ''; - if ($conf->global->PAYMENTORDER_ADDON_PDF == $name) + if (getDolGlobalString('PAYMENTORDER_ADDON_PDF') == $name) { print img_picto($langs->trans("Default"),'on'); } diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index e5429985826..4bfa1f240fe 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2019 Markus Welters - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -339,7 +339,7 @@ foreach ($dirmodels as $reldir) // Default print ''; - if ($conf->global->PAYMENTORDER_ADDON_PDF == $name) + if (getDolGlobalString('PAYMENTORDER_ADDON_PDF') == $name) { print img_picto($langs->trans("Default"),'on'); } diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 6c75c77d8c5..cf8c0e7b96d 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -8,7 +8,7 @@ * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2025 William Mead * * This program is free software; you can redistribute it and/or modify @@ -186,7 +186,7 @@ if ($action == 'updateMask') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->PROPALE_ADDON_PDF == "$value") { + if (getDolGlobalString('PROPALE_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'PROPALE_ADDON_PDF', $conf->entity); } } @@ -317,7 +317,7 @@ foreach ($dirmodels as $reldir) { print ''."\n"; print ''; - if ($conf->global->PROPALE_ADDON == "$file") { + if (getDolGlobalString('PROPALE_ADDON') == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''; @@ -461,7 +461,7 @@ foreach ($dirmodels as $reldir) { // Default print ""; - if ($conf->global->PROPALE_ADDON_PDF == "$name") { + if (getDolGlobalString('PROPALE_ADDON_PDF') == "$name") { print img_picto($langs->trans("Default"), 'on'); } else { print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; @@ -556,7 +556,7 @@ if (!isModEnabled('invoice')) { $row = $db->fetch_row($resql); print ''; $i++; @@ -596,7 +596,7 @@ if (!isModEnabled('invoice')) { $row = $db->fetch_row($resql); print ''; $i++; diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index b783d9e07df..f80dc486b67 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -149,7 +149,7 @@ if ($action == 'updateMask') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->RECEPTION_ADDON_PDF == "$value") { + if (getDolGlobalString('RECEPTION_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'RECEPTION_ADDON_PDF', $conf->entity); } } @@ -250,7 +250,7 @@ foreach ($dirmodels as $reldir) { print ''."\n"; print ''; - if ($conf->global->RECEPTION_ADDON_NUMBER == "$file") { + if (getDolGlobalString('RECEPTION_ADDON_NUMBER') == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print 'name) ? '&label='.urlencode($module->name) : '').'">'; @@ -398,7 +398,7 @@ foreach ($dirmodels as $reldir) { // Default print ''; - if ($conf->global->RECEPTION_ADDON_PDF == $name) { + if (getDolGlobalString('RECEPTION_ADDON_PDF') == $name) { print img_picto($langs->trans("Default"), 'on'); } else { print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 9c89f55c0ad..35abc2e742d 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2013-2015 Juanjo Menent * Copyright (C) 2024 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -271,7 +271,7 @@ foreach ($arrayhandler as $key => $module) { print ''."\n"; print ''; - if ($conf->global->USER_PASSWORD_GENERATED == $key) { + if (getDolGlobalString('USER_PASSWORD_GENERATED') == $key) { //print img_picto('', 'tick'); print img_picto($langs->trans("Enabled"), 'switch_on'); } else { diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index b0c05b8bbea..00769bb2c5e 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -7,7 +7,7 @@ * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -146,7 +146,7 @@ if ($action == 'specimen') { // For invoices } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF == "$value") { + if (getDolGlobalString('INVOICE_SUPPLIER_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'INVOICE_SUPPLIER_ADDON_PDF', $conf->entity); } } @@ -276,7 +276,7 @@ foreach ($dirmodels as $reldir) { print ''."\n"; print ''; - if ($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER == "$file") { + if (getDolGlobalString('INVOICE_SUPPLIER_ADDON_NUMBER') == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index c10d59f2939..6dfb07564c9 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -7,7 +7,7 @@ * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2011-2018 Philippe Grand * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -137,7 +137,7 @@ if ($action == 'specimen') { // For orders } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$value") { + if (getDolGlobalString('COMMANDE_SUPPLIER_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'COMMANDE_SUPPLIER_ADDON_PDF', $conf->entity); } } @@ -293,7 +293,7 @@ foreach ($dirmodels as $reldir) { print ''."\n"; print ''; - if ($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER == "$file") { + if (getDolGlobalString('COMMANDE_SUPPLIER_ADDON_NUMBER') == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; @@ -428,7 +428,7 @@ foreach ($dirmodels as $reldir) { // Default print ''; - if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name") { + if (getDolGlobalString('COMMANDE_SUPPLIER_ADDON_PDF') == "$name") { print 'scandir).'&label='.urlencode($module->name).'&type=order_supplier" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').''; } else { print 'scandir).'&label='.urlencode($module->name).'&type=order_supplier" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index c642ff20383..b6bbb24be1f 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -9,7 +9,7 @@ * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -174,7 +174,7 @@ if ($action == 'set') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$value") { + if (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'SUPPLIER_PROPOSAL_ADDON_PDF', $conf->entity); } } @@ -307,7 +307,7 @@ foreach ($dirmodels as $reldir) { print ''."\n"; print ''; - if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file") { + if (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''; @@ -449,7 +449,7 @@ foreach ($dirmodels as $reldir) { // Default print ''; - if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$name") { + if (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON_PDF') == "$name") { print img_picto($langs->trans("Default"), 'on'); } else { print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index 0112dad48b1..5e663b5373b 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -4,7 +4,7 @@ * Copyright (C) 2022-2023 Udo Tamm * Copyright (C) 2023 Alexandre Spangaro * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 Frédéric France * Copyright (C) 2024-2025 Benjamin Falière * * This program is free software: you can redistribute it and/or modify @@ -114,7 +114,7 @@ if ($action == 'updateMask') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->TICKET_ADDON_PDF == "$value") { + if (getDolGlobalString('TICKET_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'TICKET_ADDON_PDF', $conf->entity); } } diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index 05ef5100f98..d4ba1fd6799 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -6,7 +6,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2011 Regis Houssin * Copyright (C) 2015 Juanjo Menent - * Copyright (C) 2020-2024 Frédéric France + * Copyright (C) 2020-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -260,6 +260,7 @@ foreach ($dirmodels as $reldir) { require_once $dir.'/'.$file; $module = new $classname($db); '@phan-var-force ModelePDFUser $module'; + /** @var ModelePDFUser $module */ $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php index 2ff203be61b..2c757a31d37 100644 --- a/htdocs/core/modules/printing/printgcp.modules.php +++ b/htdocs/core/modules/printing/printgcp.modules.php @@ -1,6 +1,6 @@ + * Copyright (C) 2014-2025 Frédéric France * Copyright (C) 2024-2025 MDW * * This program is free software; you can redistribute it and/or modify @@ -242,7 +242,7 @@ class printing_printgcp extends PrintingDriver $html .= ''.$langs->trans('TYPE_'.$printer_det['type']).''; // Default $html .= ''; - if ($conf->global->PRINTING_GCP_DEFAULT == $printer_det['id']) { + if (getDolGlobalString('PRINTING_GCP_DEFAULT') == $printer_det['id']) { $html .= img_picto($langs->trans("Default"), 'on'); } else { $html .= ''.img_picto($langs->trans("Disabled"), 'off').''; diff --git a/htdocs/core/modules/printing/printipp.modules.php b/htdocs/core/modules/printing/printipp.modules.php index 2ea6a82d57d..f51d105f650 100644 --- a/htdocs/core/modules/printing/printipp.modules.php +++ b/htdocs/core/modules/printing/printipp.modules.php @@ -1,6 +1,6 @@ + * Copyright (C) 2014-2025 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -225,7 +225,7 @@ class printing_printipp extends PrintingDriver $html .= ''.$langs->trans('MEDIA_IPP_'.$printer_det->media_type_supported->_value1).''; // Default $html .= ''; - if ($conf->global->PRINTIPP_URI_DEFAULT == $value) { + if (getDolGlobalString('PRINTIPP_URI_DEFAULT') == $value) { $html .= img_picto($langs->trans("Default"), 'on'); } else { $html .= ''.img_picto($langs->trans("Disabled"), 'off').''; diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index ef2af45fedb..2dd223d0d9a 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -6,7 +6,7 @@ * Copyright (C) 2015 Benoit Bruchard * Copyright (C) 2019 Thibault FOUCART * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -110,7 +110,7 @@ if ($action == 'specimen') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->DON_ADDON_MODEL == "$value") { + if (getDolGlobalString('DON_ADDON_MODEL') == "$value") { dolibarr_del_const($db, 'DON_ADDON_MODEL', $conf->entity); } } @@ -262,7 +262,7 @@ if (is_resource($handle)) { // Active if (in_array($name, $def)) { - if ($conf->global->DON_ADDON_MODEL == $name) { + if (getDolGlobalString('DON_ADDON_MODEL') == $name) { print "\n"; print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; @@ -278,7 +278,7 @@ if (is_resource($handle)) { } // Default - if ($conf->global->DON_ADDON_MODEL == "$name") { + if (getDolGlobalString('DON_ADDON_MODEL') == "$name") { print ""; print img_picto($langs->trans("Default"), 'on'); print ''; diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php index 77b16d06800..99756a828ac 100644 --- a/htdocs/product/admin/product_lot.php +++ b/htdocs/product/admin/product_lot.php @@ -1,7 +1,7 @@ * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -113,7 +113,7 @@ if ($action == 'updateMaskLot') { } elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->FACTURE_ADDON_PDF == "$value") { + if (getDolGlobalString('FACTURE_ADDON_PDF') == "$value") { dolibarr_del_const($db, 'FACTURE_ADDON_PDF', $conf->entity); } } @@ -251,7 +251,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { print ''."\n"; print ''; - if ($conf->global->PRODUCTBATCH_LOT_ADDON == $file) { + if (getDolGlobalString('PRODUCTBATCH_LOT_ADDON') == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''; @@ -353,7 +353,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { print ''."\n"; print ''; - if ($conf->global->PRODUCTBATCH_SN_ADDON == $file) { + if (getDolGlobalString('PRODUCTBATCH_SN_ADDON') == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); } else { print ''; diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index 7b8808f84db..80ea0caa199 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -515,7 +515,7 @@ foreach ($arrayofmodules as $file => $modCodeCompta) { print ''; print ''.$modCodeCompta->getExample($langs)."\n"; - if ($conf->global->SOCIETE_CODECOMPTA_ADDON == "$file") { + if (getDolGlobalString('SOCIETE_CODECOMPTA_ADDON') == "$file") { print ''; print img_picto($langs->trans("Activated"), 'switch_on'); print ''; diff --git a/htdocs/webservices/server_invoice.php b/htdocs/webservices/server_invoice.php index b23ef74ff1e..572b209631d 100644 --- a/htdocs/webservices/server_invoice.php +++ b/htdocs/webservices/server_invoice.php @@ -2,7 +2,7 @@ /* Copyright (C) 2006-2016 Laurent Destailleur * Copyright (C) 2016 Juanjo Menent * Copyright (C) 2024-2025 MDW - * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024-2025 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 @@ -348,19 +348,19 @@ function getInvoice($authentication, $id = 0, $ref = '', $ref_ext = '') $linesresp[] = array( 'id' => $line->id, 'type' => $line->product_type, - 'desc' => dol_htmlcleanlastbr($line->desc), - 'total_net' => $line->total_ht, - 'total_vat' => $line->total_tva, - 'total' => $line->total_ttc, - 'vat_rate' => $line->tva_tx, - 'qty' => $line->qty, - 'unitprice' => $line->subprice, - 'date_start' => $line->date_start ? dol_print_date($line->date_start, 'dayrfc') : '', - 'date_end' => $line->date_end ? dol_print_date($line->date_end, 'dayrfc') : '', - 'product_id' => $line->fk_product, - 'product_ref' => $line->product_ref, - 'product_label' => $line->product_label, - 'product_desc' => $line->product_desc, + 'desc' => dol_htmlcleanlastbr($line->desc), + 'total_net' => $line->total_ht, + 'total_vat' => $line->total_tva, + 'total' => $line->total_ttc, + 'vat_rate' => $line->tva_tx, + 'qty' => $line->qty, + 'unitprice' => $line->subprice, + 'date_start' => $line->date_start ? dol_print_date($line->date_start, 'dayrfc') : '', + 'date_end' => $line->date_end ? dol_print_date($line->date_end, 'dayrfc') : '', + 'product_id' => $line->fk_product, + 'product_ref' => $line->product_ref, + 'product_label' => $line->product_label, + 'product_desc' => $line->product_desc, ); $i++; } @@ -589,7 +589,7 @@ function createInvoice($authentication, $invoice) $new_invoice->date = dol_stringtotime($invoice['date'], 'dayrfc'); $new_invoice->note_private = $invoice['note_private']; $new_invoice->note_public = $invoice['note_public']; - $new_invoice->statut = Facture::STATUS_DRAFT; // We start with status draft + $new_invoice->status = Facture::STATUS_DRAFT; // We start with status draft $new_invoice->fk_project = (int) $invoice['project_id']; $new_invoice->date_creation = $now;