Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
ldestailleur
2025-08-06 20:21:31 +02:00
28 changed files with 96 additions and 94 deletions

View File

@@ -6,7 +6,7 @@
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
* Copyright (C) 2017 Open-DSI <support@open-dsi.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '<td class="center">';
if ($conf->global->ACTION_EVENT_ADDON_PDF == "$name") {
if (getDolGlobalString('ACTION_EVENT_ADDON_PDF') == "$name") {
print img_picto($langs->trans("Default"), 'on');
} else {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&amp;scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&amp;type=action"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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);
}
}

View File

@@ -4,7 +4,7 @@
* Copyright (C) 2013-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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);
}
}

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '<td class="center">';
if ($conf->global->BOM_ADDON_PDF == $name) {
if (getDolGlobalString('BOM_ADDON_PDF') == $name) {
print img_picto($langs->trans("Default"), 'on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '</td>'."\n";
print '<td class="center">';
if ($conf->global->CONTRACT_ADDON == "$file") {
if (getDolGlobalString('CONTRACT_ADDON') == "$file") {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';

View File

@@ -9,7 +9,7 @@
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '</td>'."\n";
print '<td class="center">';
if ($conf->global->DELIVERY_ADDON_NUMBER == "$file") {
if (getDolGlobalString('DELIVERY_ADDON_NUMBER') == "$file") {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';

View File

@@ -8,7 +8,7 @@
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '</td>'."\n";
print '<td class="center">';
if ($conf->global->EXPEDITION_ADDON_NUMBER == "$file") {
if (getDolGlobalString('EXPEDITION_ADDON_NUMBER') == "$file") {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodel&token='.newToken().'&value='.urlencode($file).'&label='.urlencode($module->name).'">';

View File

@@ -8,7 +8,7 @@
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2022 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '<td class="center">';
if ($conf->global->EXPENSEREPORT_ADDON_PDF == "$name") {
if (getDolGlobalString('EXPENSEREPORT_ADDON_PDF') == "$name") {
print img_picto($langs->trans("Default"), 'on');
} else {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';

View File

@@ -8,7 +8,7 @@
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 "<td align=\"center\">";
if ($conf->global->FICHEINTER_ADDON_PDF == "$name") {
if (getDolGlobalString('FICHEINTER_ADDON_PDF') == "$name") {
print img_picto($langs->trans("Default"), 'on');
} else {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2011-2019 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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 '</td>'."\n";
print '<td class="center">';
if ($conf->global->HOLIDAY_ADDON == "$file") {
if (getDolGlobalString('HOLIDAY_ADDON') == "$file") {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '</td>'."\n";
print '<td class="center">';
if ($conf->global->MRP_MO_ADDON == $file) {
if (getDolGlobalString('MRP_MO_ADDON') == $file) {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';

View File

@@ -9,7 +9,7 @@
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2016 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2021-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -337,7 +337,7 @@ foreach ($dirmodels as $reldir) {
print '</td>'."\n";
print '<td class="center">';
if ($conf->global->COMMANDE_ADDON == $file) {
if (getDolGlobalString('COMMANDE_ADDON') == $file) {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
@@ -580,7 +580,7 @@ if (!isModEnabled('invoice')) {
$row = $db->fetch_row($resql);
print '<option value="'.$row[0].'"';
print $conf->global->FACTURE_RIB_NUMBER == $row[0] ? ' selected' : '';
print getDolGlobalString('FACTURE_RIB_NUMBER') == $row[0] ? ' selected' : '';
print '>'.$row[1].'</option>';
$i++;
@@ -620,7 +620,7 @@ if (!isModEnabled('invoice')) {
$row = $db->fetch_row($resql);
print '<option value="'.$row[0].'"';
print $conf->global->FACTURE_CHQ_NUMBER == $row[0] ? ' selected' : '';
print getDolGlobalString('FACTURE_CHQ_NUMBER') == $row[0] ? ' selected' : '';
print '>'.$langs->trans("OwnerOfBankAccount", $row[1]).'</option>';
$i++;

View File

@@ -4,7 +4,7 @@
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2019 Markus Welters <markus@welters.de>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -326,7 +326,7 @@ foreach ($dirmodels as $reldir)
// Default
print '<td class="center">';
if ($conf->global->PAYMENTORDER_ADDON_PDF == $name)
if (getDolGlobalString('PAYMENTORDER_ADDON_PDF') == $name)
{
print img_picto($langs->trans("Default"),'on');
}

View File

@@ -4,7 +4,7 @@
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2019 Markus Welters <markus@welters.de>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -339,7 +339,7 @@ foreach ($dirmodels as $reldir)
// Default
print '<td class="center">';
if ($conf->global->PAYMENTORDER_ADDON_PDF == $name)
if (getDolGlobalString('PAYMENTORDER_ADDON_PDF') == $name)
{
print img_picto($langs->trans("Default"),'on');
}

View File

@@ -8,7 +8,7 @@
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 William Mead <william@m34d.com>
*
* 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 '</td>'."\n";
print '<td class="center">';
if ($conf->global->PROPALE_ADDON == "$file") {
if (getDolGlobalString('PROPALE_ADDON') == "$file") {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
@@ -461,7 +461,7 @@ foreach ($dirmodels as $reldir) {
// Default
print "<td align=\"center\">";
if ($conf->global->PROPALE_ADDON_PDF == "$name") {
if (getDolGlobalString('PROPALE_ADDON_PDF') == "$name") {
print img_picto($langs->trans("Default"), 'on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
@@ -556,7 +556,7 @@ if (!isModEnabled('invoice')) {
$row = $db->fetch_row($resql);
print '<option value="'.$row[0].'"';
print $conf->global->FACTURE_RIB_NUMBER == $row[0] ? ' selected' : '';
print getDolGlobalString('FACTURE_RIB_NUMBER') == $row[0] ? ' selected' : '';
print '>'.$row[1].'</option>';
$i++;
@@ -596,7 +596,7 @@ if (!isModEnabled('invoice')) {
$row = $db->fetch_row($resql);
print '<option value="'.$row[0].'"';
print $conf->global->FACTURE_CHQ_NUMBER == $row[0] ? ' selected' : '';
print getDolGlobalString('FACTURE_CHQ_NUMBER') == $row[0] ? ' selected' : '';
print '>'.$langs->trans("OwnerOfBankAccount", $row[1]).'</option>';
$i++;

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '</td>'."\n";
print '<td class="center">';
if ($conf->global->RECEPTION_ADDON_NUMBER == "$file") {
if (getDolGlobalString('RECEPTION_ADDON_NUMBER') == "$file") {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodel&token='.newToken().'&value='.urlencode($file).(!empty($module->name) ? '&label='.urlencode($module->name) : '').'">';
@@ -398,7 +398,7 @@ foreach ($dirmodels as $reldir) {
// Default
print '<td class="center">';
if ($conf->global->RECEPTION_ADDON_PDF == $name) {
if (getDolGlobalString('RECEPTION_ADDON_PDF') == $name) {
print img_picto($langs->trans("Default"), 'on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&amp;label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';

View File

@@ -3,7 +3,7 @@
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2013-2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '</td>'."\n";
print '<td class="center">';
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 {

View File

@@ -7,7 +7,7 @@
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '</td>'."\n";
print '<td class="center">';
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 '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';

View File

@@ -7,7 +7,7 @@
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '</td>'."\n";
print '<td class="center">';
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 '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
@@ -428,7 +428,7 @@ foreach ($dirmodels as $reldir) {
// Default
print '<td class="center">';
if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name") {
if (getDolGlobalString('COMMANDE_SUPPLIER_ADDON_PDF') == "$name") {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=order_supplier" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';

View File

@@ -9,7 +9,7 @@
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '</td>'."\n";
print '<td class="center">';
if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file") {
if (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON') == "$file") {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
@@ -449,7 +449,7 @@ foreach ($dirmodels as $reldir) {
// Default
print '<td align="center">';
if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$name") {
if (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON_PDF') == "$name") {
print img_picto($langs->trans("Default"), 'on');
} else {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';

View File

@@ -4,7 +4,7 @@
* Copyright (C) 2022-2023 Udo Tamm <dev@dolibit.de>
* Copyright (C) 2023 Alexandre Spangaro <aspangaro@easya.solutions>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Benjamin Falière <benjamin.faliere@altairis.fr>
*
* 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);
}
}

View File

@@ -6,7 +6,7 @@
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2020-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2020-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* 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) {

View File

@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2014-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2014-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -242,7 +242,7 @@ class printing_printgcp extends PrintingDriver
$html .= '<td>'.$langs->trans('TYPE_'.$printer_det['type']).'</td>';
// Default
$html .= '<td class="center">';
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 .= '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&token='.newToken().'&mode=test&varname=PRINTING_GCP_DEFAULT&driver=printgcp&value='.urlencode($printer_det['id']).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';

View File

@@ -1,6 +1,6 @@
<?php
/*
* Copyright (C) 2014-2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2014-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
@@ -225,7 +225,7 @@ class printing_printipp extends PrintingDriver
$html .= '<td>'.$langs->trans('MEDIA_IPP_'.$printer_det->media_type_supported->_value1).'</td>';
// Default
$html .= '<td class="center">';
if ($conf->global->PRINTIPP_URI_DEFAULT == $value) {
if (getDolGlobalString('PRINTIPP_URI_DEFAULT') == $value) {
$html .= img_picto($langs->trans("Default"), 'on');
} else {
$html .= '<a href="'.$_SERVER["PHP_SELF"].'?action=setvalue&token='.newToken().'&mode=test&varname=PRINTIPP_URI_DEFAULT&driver=printipp&value='.urlencode($value).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';

View File

@@ -6,7 +6,7 @@
* Copyright (C) 2015 Benoit Bruchard <benoitb21@gmail.com>
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 "<td class=\"center\">\n";
print img_picto($langs->trans("Enabled"), 'switch_on');
print '</td>';
@@ -278,7 +278,7 @@ if (is_resource($handle)) {
}
// Default
if ($conf->global->DON_ADDON_MODEL == "$name") {
if (getDolGlobalString('DON_ADDON_MODEL') == "$name") {
print "<td class=\"center\">";
print img_picto($langs->trans("Default"), 'on');
print '</td>';

View File

@@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2021 Christophe Battarel <christophe.battarel@altairis.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '</td>'."\n";
print '<td class="center">';
if ($conf->global->PRODUCTBATCH_LOT_ADDON == $file) {
if (getDolGlobalString('PRODUCTBATCH_LOT_ADDON') == $file) {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodlot&token='.newToken().'&value='.urlencode($file).'">';
@@ -353,7 +353,7 @@ if (getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
print '</td>'."\n";
print '<td class="center">';
if ($conf->global->PRODUCTBATCH_SN_ADDON == $file) {
if (getDolGlobalString('PRODUCTBATCH_SN_ADDON') == $file) {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodsn&token='.newToken().'&value='.urlencode($file).'">';

View File

@@ -5,7 +5,7 @@
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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 '</td>';
print '<td class="nowrap">'.$modCodeCompta->getExample($langs)."</td>\n";
if ($conf->global->SOCIETE_CODECOMPTA_ADDON == "$file") {
if (getDolGlobalString('SOCIETE_CODECOMPTA_ADDON') == "$file") {
print '<td class="center">';
print img_picto($langs->trans("Activated"), 'switch_on');
print '</td>';

View File

@@ -2,7 +2,7 @@
/* Copyright (C) 2006-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2016 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
*
* 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;