diff --git a/htdocs/takepos/admin/receipt.php b/htdocs/takepos/admin/receipt.php
index a4c2efa03e9..bcf0a853705 100644
--- a/htdocs/takepos/admin/receipt.php
+++ b/htdocs/takepos/admin/receipt.php
@@ -39,6 +39,7 @@ if (!$user->admin) {
$langs->loadLangs(array("admin", "cashdesk", "commercial"));
+
/*
* Actions
*/
@@ -68,7 +69,7 @@ if (GETPOST('action', 'alpha') == 'set') {
} elseif (GETPOST('action', 'alpha') == 'setmethod') {
dolibarr_set_const($db, "TAKEPOS_PRINT_METHOD", GETPOST('value', 'alpha'), 'chaine', 0, '', $conf->entity);
// TakePOS connector require ReceiptPrinter module
- if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && !isModEnabled('receiptprinter')) {
+ if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector" && !isModEnabled('receiptprinter')) {
activateModule("modReceiptPrinter");
}
}
@@ -106,7 +107,7 @@ print $langs->trans('Browser');
print '
';
print $langs->trans('BrowserMethodDescription');
print ' | ';
-if ($conf->global->TAKEPOS_PRINT_METHOD == "browser") {
+if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "browser") {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print ''.img_picto($langs->trans("Disabled"), 'switch_off').'';
@@ -144,14 +145,14 @@ print "TakePOS Connector";
print ' | ';
print $langs->trans('TakeposConnectorMethodDescription');
-if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") {
+if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
print ' ';
print $langs->trans("URL")." / ".$langs->trans("IPAddress").' ('.$langs->trans("TakeposConnectorNecesary").')';
print ' ';
}
print ' | ';
-if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") {
+if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print ''.img_picto($langs->trans("Disabled"), 'switch_off').'';
@@ -174,10 +175,9 @@ print ' | | ';
print $langs->trans('TicketVatGrouped');
print ' | ';
print ajax_constantonoff("TAKEPOS_TICKET_VAT_GROUPPED", array(), $conf->entity, 0, 0, 1, 0);
-//print $form->selectyesno("TAKEPOS_TICKET_VAT_GROUPPED", $conf->global->TAKEPOS_TICKET_VAT_GROUPPED, 1);
print " |
\n";
-if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") {
+if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "browser" || getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector") {
$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
$htmltext = ''.$langs->trans("AvailableVariables").':
';
@@ -190,7 +190,7 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_P
print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Header"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
';
print '';
$variablename = 'TAKEPOS_HEADER';
- if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
+ if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
@@ -203,7 +203,7 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_P
print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Footer"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').' ';
print ' | ';
$variablename = 'TAKEPOS_FOOTER';
- if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
+ if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
print '';
} else {
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
@@ -213,7 +213,7 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "browser" || $conf->global->TAKEPOS_P
print " | \n";
print ' | ';
- print '';
+ print '';
print ' |
';
// Customer information
@@ -254,7 +254,7 @@ if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector" && filter_v
print "\n";
}
-if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && filter_var(getDolGlobalString('TAKEPOS_PRINT_SERVER'), FILTER_VALIDATE_URL) == true) {
+if (getDolGlobalString('TAKEPOS_PRINT_METHOD') == "takeposconnector" && filter_var(getDolGlobalString('TAKEPOS_PRINT_SERVER'), FILTER_VALIDATE_URL) == true) {
print '| ';
print $langs->trans('CustomerDisplay');
print ' | ';
@@ -268,7 +268,7 @@ print $langs->trans('PrintWithoutDetailsButton');
print ' | ';
print ajax_constantonoff('TAKEPOS_PRINT_WITHOUT_DETAILS', array(), $conf->entity, 0, 0, 1, 0);
print " |
\n";
-if (!empty($conf->global->TAKEPOS_PRINT_WITHOUT_DETAILS)) {
+if (getDolGlobalString('TAKEPOS_PRINT_WITHOUT_DETAILS')) {
print '| ';
print $langs->trans('PrintWithoutDetailsLabelDefault');
print ' | ';
|