From 6d18dd6ef95d92457aa71e1b2cb0babd4dfa2ae6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 26 Jun 2023 13:29:40 +0200 Subject: [PATCH] Fix php8 --- htdocs/takepos/receipt.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; }