Skip to content

Commit

Permalink
FIX TakePOS receipt preview in admin
Browse files Browse the repository at this point in the history
Receipt preview in admin shows header and footer repeating themselves because in preview, $constFreeText equals TAKEPOS_HEADER (as there is no $_SESSION['takeposterminal'] defined).

Back compatibility for Dolibarr#25648
  • Loading branch information
Max13 committed Aug 19, 2023
1 parent aa159c7 commit 1f1e59a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/takepos/receipt.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<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);
Expand Down Expand Up @@ -336,7 +336,7 @@
<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);
Expand Down

0 comments on commit 1f1e59a

Please sign in to comment.