Skip to content

Commit bc4f531

Browse files
author
Dolicraft
committed
Fix Dolibarr#34927 allow returning to floor 0 in TakePOS Bar/Restaurant
floors.php hid the previous-floor arrow as soon as floor was 1 ("if ($floor > 1)"), and the click-handler also fell back to 1 instead of decrementing past it, so users could never get back to floor 0 once they navigated away. Lower both thresholds to "$floor > 0" so the arrow stays visible at floor 1 and decrements to 0. Signed-off-by: Dolicraft <contact@dolicraft.com>
1 parent 13f21da commit bc4f531

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

htdocs/takepos/floors.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,13 @@ function LoadPlace(place){
238238
<div style="position: absolute; left: 25%; bottom: 8%; width:50%; height:3%;">
239239
<center>
240240
<h1>
241-
<?php if ($floor > 1) { ?>
242-
<img class="valignmiddle" src="./img/arrow-prev.png" width="5%" onclick="location.href='floors.php?floor=<?php if ($floor > 1) {
241+
<?php if ($floor > 0) { ?>
242+
<img class="valignmiddle" src="./img/arrow-prev.png" width="5%" onclick="location.href='floors.php?floor=<?php if ($floor > 0) {
243243
$floor--;
244244
echo $floor;
245245
$floor++;
246246
} else {
247-
echo "1";
247+
echo "0";
248248
} ?>';">
249249
<?php } ?>
250250
<span class="valignmiddle"><?php echo $langs->trans("Floor")." ".$floor; ?></span>

0 commit comments

Comments
 (0)