diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index 3041c6f680e..2240632b1ef 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -111,14 +111,14 @@ if (!empty($hookmanager->resPrint)) {
global->TAKEPOS_HEADER) || !empty($conf->global->{$constFreeText})) {
+if (!empty($conf->global->TAKEPOS_HEADER) || getDolGlobalString($constFreeText)) {
$newfreetext = '';
$substitutionarray = getCommonSubstitutionArray($langs);
if (!empty($conf->global->TAKEPOS_HEADER)) {
$newfreetext .= make_substitutions($conf->global->TAKEPOS_HEADER, $substitutionarray);
}
- if (!empty($conf->global->{$constFreeText})) {
- $newfreetext .= make_substitutions($conf->global->{$constFreeText}, $substitutionarray);
+ if (getDolGlobalString($constFreeText)) {
+ $newfreetext .= make_substitutions(getDolGlobalString($constFreeText), $substitutionarray);
}
print nl2br($newfreetext);
}
@@ -136,12 +136,12 @@ if ($object->statut == Facture::STATUS_DRAFT) {
print $object->ref;
}
if ($conf->global->TAKEPOS_SHOW_CUSTOMER) {
- if ($object->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}) {
+ if ($object->socid != getDolGlobalInt('CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"])) {
$soc = new Societe($db);
if ($object->socid > 0) {
$soc->fetch($object->socid);
} else {
- $soc->fetch($conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]});
+ $soc->fetch(getDolGlobalInt('CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]));
}
print "
".$langs->trans("Customer").': '.$soc->name;
}