mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix : php 8.1 warnings
This commit is contained in:
parent
9a09e0f304
commit
14a3bc7360
|
|
@ -537,7 +537,7 @@ print '<input type="hidden" name="action" value="set_FICHINTER_PRINT_PRODUCTS">'
|
|||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("PrintProductsOnFichinter").' ('.$langs->trans("PrintProductsOnFichinterDetails").')</td>';
|
||||
print '<td align="center"><input type="checkbox" name="FICHINTER_PRINT_PRODUCTS" ';
|
||||
if ($conf->global->FICHINTER_PRINT_PRODUCTS) {
|
||||
if (getDolGlobalString("FICHINTER_PRINT_PRODUCTS")) {
|
||||
print 'checked ';
|
||||
}
|
||||
print '/>';
|
||||
|
|
@ -554,7 +554,7 @@ print '<td>';
|
|||
print $langs->trans("UseServicesDurationOnFichinter");
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print '<input type="checkbox" name="FICHINTER_USE_SERVICE_DURATION"'.($conf->global->FICHINTER_USE_SERVICE_DURATION ? ' checked' : '').'>';
|
||||
print '<input type="checkbox" name="FICHINTER_USE_SERVICE_DURATION"'.(getDolGlobalString("FICHINTER_USE_SERVICE_DURATION") ? ' checked' : '').'>';
|
||||
print '</td>';
|
||||
print '<td class="right">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
|
|
@ -570,7 +570,7 @@ print '<td>';
|
|||
print $langs->trans("UseDurationOnFichinter");
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print '<input type="checkbox" name="FICHINTER_WITHOUT_DURATION"'.($conf->global->FICHINTER_WITHOUT_DURATION ? ' checked' : '').'>';
|
||||
print '<input type="checkbox" name="FICHINTER_WITHOUT_DURATION"'.(getDolGlobalString("FICHINTER_WITHOUT_DURATION") ? ' checked' : '').'>';
|
||||
print '</td>';
|
||||
print '<td class="right">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
|
|
@ -586,7 +586,7 @@ print '<td>';
|
|||
print $langs->trans("UseDateWithoutHourOnFichinter");
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print '<input type="checkbox" name="FICHINTER_DATE_WITHOUT_HOUR"'.($conf->global->FICHINTER_DATE_WITHOUT_HOUR ? ' checked' : '').'>';
|
||||
print '<input type="checkbox" name="FICHINTER_DATE_WITHOUT_HOUR"'.(getDolGlobalString("FICHINTER_DATE_WITHOUT_HOUR") ? ' checked' : '').'>';
|
||||
print '</td>';
|
||||
print '<td class="right">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
|
|
|
|||
|
|
@ -624,7 +624,7 @@ if ($action == 'edit') {
|
|||
setEventMessages(null, $object->errors, "errors");
|
||||
}
|
||||
} else {
|
||||
print $conf->global->{$constname};
|
||||
print getDolGlobalString($constname);
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ foreach ($dirmodels as $reldir) {
|
|||
if ($conf->global->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).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmodel&token='.newToken().'&value='.urlencode($file).(!empty($module->scandir) ? '&scan_dir='.$module->scandir : '').(!empty($module->name) ? '&label='.urlencode($module->name) : '').'">';
|
||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||
print '</a>';
|
||||
}
|
||||
|
|
@ -344,10 +344,10 @@ foreach ($dirmodels as $reldir) {
|
|||
$module = new $classname($db);
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
|
||||
if (isset($module->version) && $module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
|
||||
if (isset($module->version) && $module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
// Default
|
||||
print '<td class="center">';
|
||||
if ($conf->global->INVOICE_SUPPLIER_ADDON_PDF == "$name") {
|
||||
if (getDolGlobalString("INVOICE_SUPPLIER_ADDON_PDF") == "$name") {
|
||||
//print img_picto($langs->trans("Default"),'on');
|
||||
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'&type=invoice_supplier"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||
|
|
|
|||
|
|
@ -1,63 +1,63 @@
|
|||
<?php
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/supplier_order.php
|
||||
* \ingroup fournisseur
|
||||
* \brief Page d'administration-configuration du module Fournisseur
|
||||
*/
|
||||
/**
|
||||
* \file htdocs/admin/supplier_order.php
|
||||
* \ingroup fournisseur
|
||||
* \brief Page d'administration-configuration du module Fournisseur
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin", "other", "orders", "stocks"));
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin", "other", "orders", "stocks"));
|
||||
|
||||
if (!$user->admin) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
$type = GETPOST('type', 'alpha');
|
||||
$value = GETPOST('value', 'alpha');
|
||||
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||
$type = GETPOST('type', 'alpha');
|
||||
$value = GETPOST('value', 'alpha');
|
||||
$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
|
||||
|
||||
$label = GETPOST('label', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$scandir = GETPOST('scan_dir', 'alpha');
|
||||
$label = GETPOST('label', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$scandir = GETPOST('scan_dir', 'alpha');
|
||||
|
||||
$specimenthirdparty = new Societe($db);
|
||||
$specimenthirdparty->initAsSpecimen();
|
||||
$specimenthirdparty = new Societe($db);
|
||||
$specimenthirdparty->initAsSpecimen();
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
|
||||
|
||||
if ($action == 'updateMask') {
|
||||
$maskconstorder = GETPOST('maskconstorder', 'alpha');
|
||||
|
|
@ -193,40 +193,40 @@ if ($action == 'updateMask') {
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$form = new Form($db);
|
||||
|
||||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
|
||||
llxHeader("", "");
|
||||
llxHeader("", "");
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup');
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("SuppliersSetup"), $linkback, 'title_setup');
|
||||
|
||||
print "<br>";
|
||||
print "<br>";
|
||||
|
||||
$head = supplierorder_admin_prepare_head();
|
||||
$head = supplierorder_admin_prepare_head();
|
||||
|
||||
print dol_get_fiche_head($head, 'order', $langs->trans("Suppliers"), -1, 'company');
|
||||
print dol_get_fiche_head($head, 'order', $langs->trans("Suppliers"), -1, 'company');
|
||||
|
||||
|
||||
// Supplier order numbering module
|
||||
// Supplier order numbering module
|
||||
|
||||
print load_fiche_titre($langs->trans("OrdersNumberingModules"), '', '');
|
||||
print load_fiche_titre($langs->trans("OrdersNumberingModules"), '', '');
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="100">'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td>'.$langs->trans("Example").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
||||
print "</tr>\n";
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td width="100">'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td>'.$langs->trans("Example").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
|
||||
print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
clearstatcache();
|
||||
|
||||
foreach ($dirmodels as $reldir) {
|
||||
$dir = dol_buildpath($reldir."core/modules/supplier_order/");
|
||||
|
|
@ -309,24 +309,24 @@ foreach ($dirmodels as $reldir) {
|
|||
}
|
||||
}
|
||||
|
||||
print '</table><br>';
|
||||
print '</table><br>';
|
||||
|
||||
|
||||
/*
|
||||
* Documents models for supplier orders
|
||||
*/
|
||||
/*
|
||||
* Documents models for supplier orders
|
||||
*/
|
||||
|
||||
print load_fiche_titre($langs->trans("OrdersModelModule"), '', '');
|
||||
print load_fiche_titre($langs->trans("OrdersModelModule"), '', '');
|
||||
|
||||
// Defini tableau def de modele
|
||||
$def = array();
|
||||
// Defini tableau def de modele
|
||||
$def = array();
|
||||
|
||||
$sql = "SELECT nom";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
|
||||
$sql .= " WHERE type = 'order_supplier'";
|
||||
$sql .= " AND entity = ".$conf->entity;
|
||||
$sql = "SELECT nom";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
|
||||
$sql .= " WHERE type = 'order_supplier'";
|
||||
$sql .= " AND entity = ".$conf->entity;
|
||||
|
||||
$resql = $db->query($sql);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$i = 0;
|
||||
$num_rows = $db->num_rows($resql);
|
||||
|
|
@ -339,17 +339,17 @@ if ($resql) {
|
|||
dol_print_error($db);
|
||||
}
|
||||
|
||||
print '<table class="noborder centpercent">'."\n";
|
||||
print '<tr class="liste_titre">'."\n";
|
||||
print '<td width="100">'.$langs->trans("Name").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("Description").'</td>'."\n";
|
||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>'."\n";
|
||||
print '<td align="center" width="60">'.$langs->trans("Default").'</td>'."\n";
|
||||
print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
|
||||
print '</tr>'."\n";
|
||||
print '<table class="noborder centpercent">'."\n";
|
||||
print '<tr class="liste_titre">'."\n";
|
||||
print '<td width="100">'.$langs->trans("Name").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("Description").'</td>'."\n";
|
||||
print '<td align="center" width="60">'.$langs->trans("Status").'</td>'."\n";
|
||||
print '<td align="center" width="60">'.$langs->trans("Default").'</td>'."\n";
|
||||
print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
clearstatcache();
|
||||
clearstatcache();
|
||||
|
||||
foreach ($dirmodels as $reldir) {
|
||||
$realpath = $reldir."core/modules/supplier_order/doc";
|
||||
|
|
@ -434,76 +434,76 @@ foreach ($dirmodels as $reldir) {
|
|||
}
|
||||
}
|
||||
|
||||
print '</table><br>';
|
||||
print '</table><br>';
|
||||
|
||||
/*
|
||||
* Other options
|
||||
*/
|
||||
/*
|
||||
* Other options
|
||||
*/
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="set_SUPPLIER_ORDER_OTHER">';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="set_SUPPLIER_ORDER_OTHER">';
|
||||
|
||||
print load_fiche_titre($langs->trans("OtherOptions"), '', '');
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
print load_fiche_titre($langs->trans("OtherOptions"), '', '');
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("UseDoubleApproval"), $langs->trans("Use3StepsApproval"), 1, 'help').'<br>';
|
||||
print $langs->trans("IfSetToYesDontForgetPermission");
|
||||
print '</td><td>';
|
||||
print '<input type="text" size="6" name="SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED" value="'.$conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED.'">';
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("UseDoubleApproval"), $langs->trans("Use3StepsApproval"), 1, 'help').'<br>';
|
||||
print $langs->trans("IfSetToYesDontForgetPermission");
|
||||
print '</td><td>';
|
||||
print '<input type="text" size="6" name="SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED" value="'.getDolGlobalString("SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED").'">';
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
||||
// Ask for payment bank during supplier order
|
||||
/* Kept as hidden for the moment
|
||||
if (isModEnabled('banque')) {
|
||||
// Ask for payment bank during supplier order
|
||||
/* Kept as hidden for the moment
|
||||
if (isModEnabled('banque')) {
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").'</td><td> </td><td align="center">';
|
||||
if (!empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER))
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER&token='.newToken().'&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER&token='.newToken().'&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").'</td><td> </td><td align="center">';
|
||||
if (!empty($conf->use_javascript_ajax))
|
||||
{
|
||||
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER');
|
||||
}
|
||||
else
|
||||
{
|
||||
if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER))
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER&token='.newToken().'&value=1">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER&token='.newToken().'&value=0">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
||||
}
|
||||
*/
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").'</td><td> </td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
|
||||
}
|
||||
*/
|
||||
|
||||
$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
|
||||
$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
|
||||
$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
|
||||
$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
|
||||
$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
|
||||
$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
|
||||
foreach ($substitutionarray as $key => $val) {
|
||||
$htmltext .= $key.'<br>';
|
||||
}
|
||||
$htmltext .= '</i>';
|
||||
$htmltext .= '</i>';
|
||||
|
||||
print '<tr class="oddeven"><td colspan="2">';
|
||||
print $form->textwithpicto($langs->trans("FreeLegalTextOnOrders"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
|
||||
$variablename = 'SUPPLIER_ORDER_FREE_TEXT';
|
||||
print '<tr class="oddeven"><td colspan="2">';
|
||||
print $form->textwithpicto($langs->trans("FreeLegalTextOnOrders"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
|
||||
$variablename = 'SUPPLIER_ORDER_FREE_TEXT';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
|
||||
} else {
|
||||
|
|
@ -511,15 +511,15 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
|
|||
$doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
// Option to add a quality/validation step, on products, after reception.
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("UseDispatchStatus").'</td>';
|
||||
print '<td></td>';
|
||||
print '<td class="center">';
|
||||
// Option to add a quality/validation step, on products, after reception.
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("UseDispatchStatus").'</td>';
|
||||
print '<td></td>';
|
||||
print '<td class="center">';
|
||||
if (isModEnabled('reception')) {
|
||||
print '<span class="opacitymedium">'.$langs->trans("FeatureNotAvailableWithReceptionModule").'</span>';
|
||||
} else {
|
||||
|
|
@ -530,33 +530,33 @@ if (isModEnabled('reception')) {
|
|||
print $form->selectarray("SUPPLIER_ORDER_USE_DISPATCH_STATUS", $arrval, $conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS);
|
||||
}
|
||||
}
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
print "</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
print '</table><br>';
|
||||
print '</table><br>';
|
||||
|
||||
print '</form>';
|
||||
print '</form>';
|
||||
|
||||
|
||||
/*
|
||||
* Notifications
|
||||
*/
|
||||
/*
|
||||
* Notifications
|
||||
*/
|
||||
|
||||
print load_fiche_titre($langs->trans("Notifications"), '', '');
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="center" width="60"></td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
print load_fiche_titre($langs->trans("Notifications"), '', '');
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td>';
|
||||
print '<td align="center" width="60"></td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven"><td colspan="2">';
|
||||
print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'<br>';
|
||||
print '</td><td class="right">';
|
||||
print "</td></tr>\n";
|
||||
print '<tr class="oddeven"><td colspan="2">';
|
||||
print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'<br>';
|
||||
print '</td><td class="right">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '</table>';
|
||||
print '</table>';
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ if ($action == 'updateMask') {
|
|||
} 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, 'SUPPLIER_PAYMENT_ADDON_PDF', $conf->entity);
|
||||
}
|
||||
}
|
||||
|
|
@ -262,7 +262,7 @@ foreach ($dirmodels as $reldir) {
|
|||
if ($conf->global->SUPPLIER_PAYMENT_ADDON == $file || $conf->global->SUPPLIER_PAYMENT_ADDON.'.php' == $file) {
|
||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||
} else {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.preg_replace('/\.php$/', '', $file).'&scandir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.preg_replace('/\.php$/', '', $file).(!empty($module->scandir) ? '&scandir='.$module->scandir : '').'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
|
@ -288,7 +288,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
|
||||
if ($conf->global->PAYMENT_ADDON.'.php' == $file) { // If module is the one used, we show existing errors
|
||||
if (getDolGlobalString("PAYMENT_ADDON").'.php' == $file) { // If module is the one used, we show existing errors
|
||||
if (!empty($module->error)) {
|
||||
dol_htmloutput_mesg($module->error, '', 'error', 1);
|
||||
}
|
||||
|
|
@ -350,7 +350,7 @@ foreach ($dirmodels as $reldir) {
|
|||
print "</td>\n";
|
||||
print "<td>\n";
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db, $specimenthirdparty);
|
||||
$module = new $classname($db, new Societe($db));
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
} else {
|
||||
|
|
@ -382,7 +382,7 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
// Default
|
||||
print '<td class="center">';
|
||||
if ($conf->global->SUPPLIER_PAYMENT_ADDON_PDF == "$name") {
|
||||
if (getDolGlobalString("SUPPLIER_PAYMENT_ADDON_PDF") == "$name") {
|
||||
//print img_picto($langs->trans("Default"),'on');
|
||||
// Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=unsetdoc&token='.newToken().'&value='.urlencode($name).'&scandir='.urlencode($module->scandir).'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||
|
|
@ -441,7 +441,7 @@ print "</tr>\n";
|
|||
print '<tr class="oddeven"><td>';
|
||||
print $langs->trans("GroupPaymentsByModOnReports");
|
||||
print '</td><td width="60" align="center">';
|
||||
print $form->selectyesno("PAYMENTS_FOURN_REPORT_GROUP_BY_MOD", $conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD, 1);
|
||||
print $form->selectyesno("PAYMENTS_FOURN_REPORT_GROUP_BY_MOD", getDolGlobalString("PAYMENTS_FOURN_REPORT_GROUP_BY_MOD"), 1);
|
||||
print '</td><td class="right">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -428,7 +428,7 @@ foreach ($dirmodels as $reldir) {
|
|||
|
||||
// Default
|
||||
print '<td class="center">';
|
||||
if ($conf->global->TICKET_ADDON_PDF == $name) {
|
||||
if (getDolGlobalString("TICKET_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>';
|
||||
|
|
@ -540,9 +540,10 @@ print '</td>';
|
|||
print '</tr>';
|
||||
|
||||
if (isModEnabled('product')) {
|
||||
$htmlname = "product_category_id";
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("TicketChooseProductCategory").'</td>';
|
||||
print '<td class="left">';
|
||||
$formcategory->selectProductCategory($conf->global->TICKET_PRODUCT_CATEGORY, 'product_category_id');
|
||||
$formcategory->selectProductCategory($conf->global->TICKET_PRODUCT_CATEGORY, $htmlname);
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_combobox('select_'.$htmlname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -381,10 +381,10 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) {
|
|||
}
|
||||
|
||||
// Interface topic
|
||||
$url_interface = $conf->global->TICKET_PUBLIC_INTERFACE_TOPIC;
|
||||
$url_interface = getDolGlobalString("TICKET_PUBLIC_INTERFACE_TOPIC");
|
||||
print '<tr><td>'.$langs->trans("TicketPublicInterfaceTopicLabelAdmin").'</label>';
|
||||
print '</td><td>';
|
||||
print '<input type="text" name="TICKET_PUBLIC_INTERFACE_TOPIC" value="'.$conf->global->TICKET_PUBLIC_INTERFACE_TOPIC.'" size="40" ></td>';
|
||||
print '<input type="text" name="TICKET_PUBLIC_INTERFACE_TOPIC" value="'.$url_interface.'" size="40" ></td>';
|
||||
print '</td>';
|
||||
print '<td class="center width75">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketPublicInterfaceTopicHelp"), 1, 'help');
|
||||
|
|
@ -403,7 +403,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) {
|
|||
print '</td></tr>';
|
||||
|
||||
// Text to help to enter a ticket
|
||||
$public_text_help_message = $conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE ? $conf->global->TICKET_PUBLIC_TEXT_HELP_MESSAGE : $langs->trans('TicketPublicPleaseBeAccuratelyDescribe');
|
||||
$public_text_help_message = getDolGlobalString("TICKET_PUBLIC_TEXT_HELP_MESSAGE", $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'));
|
||||
print '<tr><td>'.$langs->trans("TicketPublicInterfaceTextHelpMessageLabelAdmin").'</label>';
|
||||
print '</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
|
|
@ -415,10 +415,10 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) {
|
|||
print '</td></tr>';
|
||||
|
||||
// Url public interface
|
||||
$url_interface = $conf->global->TICKET_URL_PUBLIC_INTERFACE;
|
||||
$url_interface = getDolGlobalString("TICKET_URL_PUBLIC_INTERFACE");
|
||||
print '<tr><td>'.$langs->trans("TicketUrlPublicInterfaceLabelAdmin").'</label>';
|
||||
print '</td><td>';
|
||||
print '<input type="text" class="minwidth500" name="TICKET_URL_PUBLIC_INTERFACE" value="'.$conf->global->TICKET_URL_PUBLIC_INTERFACE.'"></td>';
|
||||
print '<input type="text" class="minwidth500" name="TICKET_URL_PUBLIC_INTERFACE" value="'.$url_interface.'"></td>';
|
||||
print '</td>';
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $langs->trans("TicketUrlPublicInterfaceHelpAdmin"), 1, 'help');
|
||||
|
|
@ -448,7 +448,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) {
|
|||
print '</tr>';
|
||||
|
||||
// Text of email after creatio of a ticket
|
||||
$mail_mesg_new = $conf->global->TICKET_MESSAGE_MAIL_NEW ? $conf->global->TICKET_MESSAGE_MAIL_NEW : $langs->trans('TicketNewEmailBody');
|
||||
$mail_mesg_new = getDolGlobalString("TICKET_MESSAGE_MAIL_NEW", $langs->trans('TicketNewEmailBody'));
|
||||
print '<tr><td>';
|
||||
print $form->textwithpicto($langs->trans("TicketNewEmailBodyLabel"), $langs->trans("TicketNewEmailBodyHelp"), 1, 'help');
|
||||
print '</label>';
|
||||
|
|
@ -468,7 +468,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) {
|
|||
print ajax_constantonoff('TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_ENABLED');
|
||||
} else {
|
||||
$arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes"));
|
||||
print $form->selectarray("TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_ENABLED", $arrval, $conf->global->TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_ENABLED);
|
||||
print $form->selectarray("TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_ENABLED", $arrval, getDolGlobalString("TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_ENABLED"));
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
|
@ -477,7 +477,7 @@ if (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) {
|
|||
print '<tr><td>';
|
||||
print $form->textwithpicto($langs->trans("TicketPublicNotificationNewMessageDefaultEmail"), $langs->trans("TicketPublicNotificationNewMessageDefaultEmailHelp"), 1, 'help');
|
||||
print '</td><td>';
|
||||
print '<input type="text" name="TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL" value="'.$conf->global->TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL.'" size="40" ></td>';
|
||||
print '<input type="text" name="TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL" value="'.getDolGlobalString("TICKET_PUBLIC_NOTIFICATION_NEW_MESSAGE_DEFAULT_EMAIL").'" size="40" ></td>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
|
|
|||
|
|
@ -421,7 +421,7 @@ class DoliDBMysqli extends DoliDB
|
|||
if (!is_object($resultset)) {
|
||||
$resultset = $this->_results;
|
||||
}
|
||||
return $resultset->num_rows;
|
||||
return isset($resultset->num_rows) ? $resultset->num_rows : 0;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes
|
|||
|
||||
// Parametrage du prefix
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskorder" value="'.$conf->global->COMMANDE_SAPHIR_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskorder" value="'.getDolGlobalString("COMMANDE_SAPHIR_MASK").'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
// We get cursor rule
|
||||
$mask = $conf->global->COMMANDE_SAPHIR_MASK;
|
||||
$mask = getDolGlobalString("COMMANDE_SAPHIR_MASK");
|
||||
|
||||
if (!$mask) {
|
||||
$this->error = 'NotConfigured';
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class mod_contract_magre extends ModelNumRefContracts
|
|||
$tooltip .= $langs->trans("GenericMaskCodes5");
|
||||
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskcontract" value="'.$conf->global->CONTRACT_MAGRE_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskcontract" value="'.getDolGlobalString("CONTRACT_MAGRE_MASK").'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
||||
$texte .= '</tr>';
|
||||
$texte .= '</table>';
|
||||
|
|
@ -127,7 +127,7 @@ class mod_contract_magre extends ModelNumRefContracts
|
|||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
$mask = $conf->global->CONTRACT_MAGRE_MASK;
|
||||
$mask = getDolGlobalString("CONTRACT_MAGRE_MASK");
|
||||
|
||||
if (!$mask) {
|
||||
$this->error = 'NotConfigured';
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class mod_arctic extends ModeleNumRefFicheinter
|
|||
|
||||
// Setting the prefix
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskvalue" value="'.$conf->global->FICHINTER_ARTIC_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskvalue" value="'.getDolGlobalString("FICHINTER_ARTIC_MASK").'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button" value="'.$langs->trans("Modify").'"></td>';
|
||||
|
||||
|
|
@ -130,7 +130,7 @@ class mod_arctic extends ModeleNumRefFicheinter
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
// We define the search criteria of the counter
|
||||
$mask = $conf->global->FICHINTER_ARTIC_MASK;
|
||||
$mask = getDolGlobalString("FICHINTER_ARTIC_MASK");
|
||||
|
||||
if (!$mask) {
|
||||
$this->error = 'NotConfigured';
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||
$texte .= '<input type="hidden" name="page_y" value="">';
|
||||
$texte .= '<input type="hidden" name="action" value="setModuleOptions">';
|
||||
$texte .= '<input type="hidden" name="param1" value="PROPALE_ADDON_PDF_ODT_PATH">';
|
||||
if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) {
|
||||
if (getDolGlobalInt("MAIN_PROPAL_CHOOSE_ODT_DOCUMENT") > 0) {
|
||||
$texte .= '<input type="hidden" name="param2" value="PROPALE_ADDON_PDF_ODT_DEFAULT">';
|
||||
$texte .= '<input type="hidden" name="param3" value="PROPALE_ADDON_PDF_ODT_TOBILL">';
|
||||
$texte .= '<input type="hidden" name="param4" value="PROPALE_ADDON_PDF_ODT_CLOSED">';
|
||||
|
|
@ -187,7 +187,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||
$texte .= '</div>';
|
||||
|
||||
// Set default template for different status of proposal
|
||||
if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) {
|
||||
if (getDolGlobalInt("MAIN_PROPAL_CHOOSE_ODT_DOCUMENT") > 0) {
|
||||
// Model for creation
|
||||
$list = ModelePDFPropales::liste_modeles($this->db);
|
||||
$texte .= '<table width="50%;">';
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class mod_reception_moonstone extends ModelNumRefReception
|
|||
$tooltip .= $langs->trans("GenericMaskCodes5");
|
||||
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskreception" value="'.$conf->global->RECEPTION_MOONSTONE_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskreception" value="'.getDolGlobalString("RECEPTION_MOONSTONE_MASK").'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button" value="'.$langs->trans("Modify").'"></td>';
|
||||
$texte .= '</tr>';
|
||||
$texte .= '</table>';
|
||||
|
|
@ -106,7 +106,7 @@ class mod_reception_moonstone extends ModelNumRefReception
|
|||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
$mask = $conf->global->RECEPTION_MOONSTONE_MASK;
|
||||
$mask = getDolGlobalString("RECEPTION_MOONSTONE_MASK");
|
||||
|
||||
if (!$mask) {
|
||||
$this->error = 'NotConfigured';
|
||||
|
|
|
|||
|
|
@ -67,12 +67,12 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices
|
|||
*/
|
||||
public function info()
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf, $langs, $db;
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("bills", "admin"));
|
||||
|
||||
$form = new Form($this->db);
|
||||
$form = new Form($db);
|
||||
|
||||
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
|
||||
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
|
@ -93,7 +93,7 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices
|
|||
// Setting the prefix
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").')';
|
||||
$texte .= ':</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskinvoice" value="'.$conf->global->SUPPLIER_INVOICE_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskinvoice" value="'.getDolGlobalString("SUPPLIER_INVOICE_TULIP_MASK").'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
||||
|
||||
|
|
@ -101,19 +101,19 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices
|
|||
|
||||
// Prefix setting of credit note
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskcredit" value="'.$conf->global->SUPPLIER_CREDIT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskcredit" value="'.getDolGlobalString("SUPPLIER_CREDIT_TULIP_MASK").'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '</tr>';
|
||||
|
||||
if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
|
||||
// Parametrage du prefix des replacement
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskreplacement" value="'.$conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskreplacement" value="'.getDolGlobalString("SUPPLIER_REPLACEMENT_TULIP_MASK").'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '</tr>';
|
||||
}
|
||||
|
||||
// Prefix setting of deposit
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskdeposit" value="'.$conf->global->SUPPLIER_DEPOSIT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskdeposit" value="'.getDolGlobalString("SUPPLIER_DEPOSIT_TULIP_MASK").'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '</tr>';
|
||||
|
||||
$texte .= '</table>';
|
||||
|
|
@ -159,16 +159,16 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices
|
|||
// Get Mask value
|
||||
$mask = '';
|
||||
if (is_object($object) && $object->type == 1) {
|
||||
$mask = $conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK;
|
||||
$mask = getDolGlobalString("SUPPLIER_REPLACEMENT_TULIP_MASK");
|
||||
if (!$mask) {
|
||||
$mask = $conf->global->SUPPLIER_INVOICE_TULIP_MASK;
|
||||
$mask = getDolGlobalString("SUPPLIER_INVOICE_TULIP_MASK");
|
||||
}
|
||||
} elseif (is_object($object) && $object->type == 2) {
|
||||
$mask = $conf->global->SUPPLIER_CREDIT_TULIP_MASK;
|
||||
$mask = getDolGlobalString("SUPPLIER_CREDIT_TULIP_MASK");
|
||||
} elseif (is_object($object) && $object->type == 3) {
|
||||
$mask = $conf->global->SUPPLIER_DEPOSIT_TULIP_MASK;
|
||||
$mask = getDolGlobalString("SUPPLIER_DEPOSIT_TULIP_MASK");
|
||||
} else {
|
||||
$mask = $conf->global->SUPPLIER_INVOICE_TULIP_MASK;
|
||||
$mask = getDolGlobalString("SUPPLIER_INVOICE_TULIP_MASK");
|
||||
}
|
||||
if (!$mask) {
|
||||
$this->error = 'NotConfigured';
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
|
|||
|
||||
// Parametrage du prefix
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskorder" value="'.$conf->global->COMMANDE_FOURNISSEUR_ORCHIDEE_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskorder" value="'.getDolGlobalString("COMMANDE_FOURNISSEUR_ORCHIDEE_MASK").'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
// On defini critere recherche compteur
|
||||
$mask = $conf->global->COMMANDE_FOURNISSEUR_ORCHIDEE_MASK;
|
||||
$mask = getDolGlobalString("COMMANDE_FOURNISSEUR_ORCHIDEE_MASK");
|
||||
|
||||
if (!$mask) {
|
||||
$this->error = 'NotConfigured';
|
||||
|
|
|
|||
|
|
@ -61,11 +61,11 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
|
|||
*/
|
||||
public function info()
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf, $langs, $db;
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
$form = new Form($this->db);
|
||||
$form = new Form($db);
|
||||
|
||||
$texte = $langs->trans('GenericNumRefModelDesc')."<br>\n";
|
||||
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
|
|
@ -82,7 +82,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
|
|||
|
||||
// Parametrage du prefix
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="masksupplierpayment" value="'.$conf->global->SUPPLIER_PAYMENT_BRODATOR_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="masksupplierpayment" value="'.getDolGlobalString("SUPPLIER_PAYMENT_BRODATOR_MASK").'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
// We get cursor rule
|
||||
$mask = $conf->global->SUPPLIER_PAYMENT_BRODATOR_MASK;
|
||||
$mask = getDolGlobalString("SUPPLIER_PAYMENT_BRODATOR_MASK");
|
||||
|
||||
if (!$mask) {
|
||||
$this->error = 'NotConfigured';
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ class mod_ticket_universal extends ModeleNumRefTicket
|
|||
|
||||
// Parametrage du prefix
|
||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskticket" value="'.$conf->global->TICKET_UNIVERSAL_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskticket" value="'.getDolGlobalString("TICKET_UNIVERSAL_MASK").'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
||||
|
||||
|
|
@ -127,7 +127,7 @@ class mod_ticket_universal extends ModeleNumRefTicket
|
|||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
// On defini critere recherche compteur
|
||||
$mask = $conf->global->TICKET_UNIVERSAL_MASK;
|
||||
$mask = getDolGlobalString("TICKET_UNIVERSAL_MASK");
|
||||
|
||||
if (!$mask) {
|
||||
$this->error = 'NotConfigured';
|
||||
|
|
|
|||
|
|
@ -53,10 +53,10 @@ if (empty($page) || $page == -1) {
|
|||
$page = 0;
|
||||
}
|
||||
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ if ($action == 'create') {
|
|||
}
|
||||
|
||||
// Part to edit record
|
||||
if (($id || $ref) && $action == 'edit') {
|
||||
if ((!empty($id) || !empty($ref)) && $action == 'edit') {
|
||||
$result = $object->fetch($id);
|
||||
if ($result > 0) {
|
||||
$head = establishment_prepare_head($object);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user