Fix TakePOS receipt preview in admin
Receipt preview in admin shows header and footer repeating themselves because in preview, `$constFreeText` equals `TAKEPOS_HEADER` (as there is no `$_SESSION['takeposterminal']` defined).
This commit is contained in:
parent
126634229f
commit
e2f587dd80
1 changed files with 2 additions and 2 deletions
|
|
@ -111,7 +111,7 @@ if (!empty($hookmanager->resPrint)) {
|
|||
<br>
|
||||
<p class="left">
|
||||
<?php
|
||||
$constFreeText = 'TAKEPOS_HEADER'.$_SESSION['takeposterminal'];
|
||||
$constFreeText = 'TAKEPOS_HEADER'.($_SESSION['takeposterminal'] ?? '0');
|
||||
if (!empty($conf->global->TAKEPOS_HEADER) || getDolGlobalString($constFreeText)) {
|
||||
$newfreetext = '';
|
||||
$substitutionarray = getCommonSubstitutionArray($langs);
|
||||
|
|
@ -352,7 +352,7 @@ if (getDolGlobalString('TAKEPOS_PRINT_PAYMENT_METHOD')) {
|
|||
<br>
|
||||
<br>
|
||||
<?php
|
||||
$constFreeText = 'TAKEPOS_FOOTER'.$_SESSION['takeposterminal'];
|
||||
$constFreeText = 'TAKEPOS_FOOTER'.($_SESSION['takeposterminal'] ?? '0');
|
||||
if (!empty($conf->global->TAKEPOS_FOOTER) || !empty($conf->global->{$constFreeText})) {
|
||||
$newfreetext = '';
|
||||
$substitutionarray = getCommonSubstitutionArray($langs);
|
||||
|
|
|
|||
Loading…
Reference in a new issue