diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php
index 28e587b3576..9e872dcfb8a 100644
--- a/htdocs/product/fournisseurs.php
+++ b/htdocs/product/fournisseurs.php
@@ -521,7 +521,7 @@ if ($id > 0 || $ref) {
print '';
// Availability
- if (!empty($conf->global->FOURN_PRODUCT_AVAILABILITY)) {
+ if (getDolGlobalInt('FOURN_PRODUCT_AVAILABILITY')) {
$langs->load("propal");
print '
| '.$langs->trans("Availability").' | ';
$form->selectAvailabilityDelay($object->fk_availability, "oselDispo", 1);
@@ -907,16 +907,16 @@ END;
$arrayfields = array(
'pfp.datec'=>array('label'=>$langs->trans("AppliedPricesFrom"), 'checked'=>1, 'position'=>1),
's.nom'=>array('label'=>$langs->trans("Suppliers"), 'checked'=>1, 'position'=>2),
- 'pfp.fk_availability'=>array('label'=>$langs->trans("Availability"), 'enabled' => !empty($conf->global->FOURN_PRODUCT_AVAILABILITY), 'checked'=>0, 'position'=>4),
+ 'pfp.fk_availability'=>array('label'=>$langs->trans("Availability"), 'enabled' => getDolGlobalInt('FOURN_PRODUCT_AVAILABILITY'), 'checked'=>0, 'position'=>4),
'pfp.quantity'=>array('label'=>$langs->trans("QtyMin"), 'checked'=>1, 'position'=>5),
'pfp.unitprice'=>array('label'=>$langs->trans("UnitPriceHT"), 'checked'=>1, 'position'=>9),
- 'pfp.multicurrency_unitprice'=>array('label'=>$langs->trans("UnitPriceHTCurrency"), 'enabled' => (!empty($conf->multicurrency->enabled)), 'checked'=>0, 'position'=>10),
+ 'pfp.multicurrency_unitprice'=>array('label'=>$langs->trans("UnitPriceHTCurrency"), 'enabled' => isModEnabled('multicurrency'), 'checked'=>0, 'position'=>10),
'pfp.delivery_time_days'=>array('label'=>$langs->trans("NbDaysToDelivery"), 'checked'=>1, 'position'=>13),
'pfp.supplier_reputation'=>array('label'=>$langs->trans("ReputationForThisProduct"), 'checked'=>1, 'position'=>14),
- 'pfp.fk_barcode_type'=>array('label'=>$langs->trans("BarcodeType"), 'enabled' => $conf->barcode->enabled, 'checked'=>0, 'position'=>15),
- 'pfp.barcode'=>array('label'=>$langs->trans("BarcodeValue"), 'enabled' => $conf->barcode->enabled, 'checked'=>0, 'position'=>16),
- 'pfp.packaging'=>array('label'=>$langs->trans("PackagingForThisProduct"), 'enabled' => !empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING), 'checked'=>0, 'position'=>17),
- 'pfp.tms'=>array('label'=>$langs->trans("DateModification"), 'enabled' => $conf->barcode->enabled, 'checked'=>1, 'position'=>18),
+ 'pfp.fk_barcode_type'=>array('label'=>$langs->trans("BarcodeType"), 'enabled' => isModEnabled('barcode'), 'checked'=>0, 'position'=>15),
+ 'pfp.barcode'=>array('label'=>$langs->trans("BarcodeValue"), 'enabled' => isModEnabled('barcode'), 'checked'=>0, 'position'=>16),
+ 'pfp.packaging'=>array('label'=>$langs->trans("PackagingForThisProduct"), 'enabled' => getDolGlobalInt('PRODUCT_USE_SUPPLIER_PACKAGING'), 'checked'=>0, 'position'=>17),
+ 'pfp.tms'=>array('label'=>$langs->trans("DateModification"), 'enabled' => isModEnabled('barcode'), 'checked'=>1, 'position'=>18),
);
// fetch optionals attributes and labels
diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php
index 757027253d4..635ce443683 100644
--- a/htdocs/salaries/card.php
+++ b/htdocs/salaries/card.php
@@ -992,7 +992,7 @@ if ($id) {
print $bankaccountstatic->getNomUrl(1, 'transactions');
print ' | ';
}
- print ''.price($objp->amount)." | \n";
+ print ''.price($objp->amount)." | \n";
print "
";
$totalpaid += $objp->amount;
$i++;
@@ -1003,14 +1003,14 @@ if ($id) {
print '';
}
- print '| '.$langs->trans("AlreadyPaid")." : | ".price($totalpaid)." |
\n";
- print '| '.$langs->trans("AmountExpected")." : | ".price($object->amount)." |
\n";
+ print '| '.$langs->trans("AlreadyPaid")." : | ".price($totalpaid)." |
\n";
+ print '| '.$langs->trans("AmountExpected")." : | ".price($object->amount)." |
\n";
$resteapayer = $object->amount - $totalpaid;
$cssforamountpaymentcomplete = 'amountpaymentcomplete';
print '| '.$langs->trans("RemainderToPay")." : | ";
- print ''.price($resteapayer)." |
\n";
+ print ''.price($resteapayer)." | \n";
print "";
print '';
diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php
index 122e8894095..4645f5d9cf2 100644
--- a/htdocs/takepos/admin/terminal.php
+++ b/htdocs/takepos/admin/terminal.php
@@ -239,11 +239,11 @@ if (isModEnabled('stock')) {
}
}
-if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" || $conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") {
+if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
// Select printer to use with terminal
require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php';
$printer = new dolReceiptPrinter($db);
- if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") {
+ if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "receiptprinter") {
$printer->listprinters();
$printers = array();
foreach ($printer->listprinters as $key => $value) {
@@ -251,20 +251,20 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" || $conf->global->TA
}
print '| '.$langs->trans("MainPrinterToUse").' | ';
print '';
- print $form->selectarray('TAKEPOS_PRINTER_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$terminal}), 1);
+ print $form->selectarray('TAKEPOS_PRINTER_TO_USE'.$terminal, $printers, getDolGlobalInt('TAKEPOS_PRINTER_TO_USE'.$terminal), 1);
print ' |
';
- if ($conf->global->TAKEPOS_ORDER_PRINTERS) {
+ if (getDolGlobalInt('TAKEPOS_ORDER_PRINTERS')) {
print '| '.$langs->trans("OrderPrinterToUse").' - '.$langs->trans("Printer").' 1 | ';
print '';
- print $form->selectarray('TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminal}), 1);
+ print $form->selectarray('TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminal, $printers, getDolGlobalInt('TAKEPOS_ORDER_PRINTER1_TO_USE'.$terminal), 1);
print ' |
';
print '| '.$langs->trans("OrderPrinterToUse").' - '.$langs->trans("Printer").' 2 | ';
print '';
- print $form->selectarray('TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal}), 1);
+ print $form->selectarray('TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal, $printers, getDolGlobalInt('TAKEPOS_ORDER_PRINTER2_TO_USE'.$terminal), 1);
print ' |
';
print '| '.$langs->trans("OrderPrinterToUse").' - '.$langs->trans("Printer").' 3 | ';
print '';
- print $form->selectarray('TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminal, $printers, (empty($conf->global->{'TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminal}), 1);
+ print $form->selectarray('TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminal, $printers, getDolGlobalInt('TAKEPOS_ORDER_PRINTER3_TO_USE'.$terminal), 1);
print ' |
';
}
}
@@ -275,12 +275,12 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter" || $conf->global->TA
}
print '| '.$langs->trans("MainTemplateToUse").' ('.$langs->trans("SetupReceiptTemplate").') | ';
print '';
- print $form->selectarray('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminal, $templates, (empty($conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminal}), 1);
+ print $form->selectarray('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminal, $templates, getDolGlobalInt('TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$terminal), 1);
print ' |
';
- if ($conf->global->TAKEPOS_ORDER_PRINTERS) {
+ if (getDolGlobalInt('TAKEPOS_ORDER_PRINTERS')) {
print '| '.$langs->trans("OrderTemplateToUse").' | ';
print '';
- print $form->selectarray('TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminal, $templates, (empty($conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminal}) ? '0' : $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminal}), 1);
+ print $form->selectarray('TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminal, $templates, getDolGlobalInt('TAKEPOS_TEMPLATE_TO_USE_FOR_ORDERS'.$terminal), 1);
print ' |
';
}
}
@@ -376,7 +376,7 @@ print $form->textwithpicto($langs->trans('Header'), $htmltext, 1, 'help', '', 0,
print '';
print '';
$variablename = 'TAKEPOS_HEADER'.$terminaltouse;
-if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
+if (!getDolGlobalInt('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
@@ -392,7 +392,7 @@ print $form->textwithpicto($langs->trans('Footer'), $htmltext, 1, 'help', '', 0,
print ' | ';
print '';
$variablename = 'TAKEPOS_FOOTER'.$terminaltouse;
-if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
+if (!getDolGlobalInt('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php
index 16ac171b2ef..004ce45c459 100644
--- a/htdocs/takepos/index.php
+++ b/htdocs/takepos/index.php
@@ -58,7 +58,7 @@ $setterminal = GETPOST('setterminal', 'int');
$setcurrency = GETPOST('setcurrency', 'aZ09');
if (empty($_SESSION["takeposterminal"])) {
- if ($conf->global->TAKEPOS_NUM_TERMINALS == "1") {
+ if (getDolGlobalInt('TAKEPOS_NUM_TERMINALS') == 1) {
$_SESSION["takeposterminal"] = 1; // Use terminal 1 if there is only 1 terminal
} elseif (!empty($_COOKIE["takeposterminal"])) {
$_SESSION["takeposterminal"] = preg_replace('/[^a-zA-Z0-9_\-]/', '', $_COOKIE["takeposterminal"]); // Restore takeposterminal from previous session
|