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).

Following Dolibarr#25648
  • Loading branch information
Max13 committed Aug 19, 2023
1 parent 4b98108 commit db2b0d8
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 @@ -111,7 +111,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 @@ -352,7 +352,7 @@
<br>
<br>
<?php
$constFreeText = 'TAKEPOS_FOOTER'.$_SESSION['takeposterminal'];
$constFreeText = 'TAKEPOS_FOOTER'.($_SESSION['takeposterminal'] ?? '0');
if (!empty($conf->global->TAKEPOS_FOOTER) || getDolGlobalString($constFreeText)) {
$newfreetext = '';
$substitutionarray = getCommonSubstitutionArray($langs);
Expand Down

0 comments on commit db2b0d8

Please sign in to comment.