Skip to content

Commit

Permalink
double check for rent form
Browse files Browse the repository at this point in the history
  • Loading branch information
sveneld committed Jun 30, 2024
1 parent becbb49 commit 0ddf7f5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions actions-qrcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ function showrentform($userId,$bike)

$stand = $db->query("SELECT s.* FROM bikes b JOIN stands s ON b.currentStand=s.standId WHERE bikeNum=$bike")->fetchAssoc();

if (empty($stand)) {
response(_('Bike') . ' ' . $bike . ' ' . _('is already rented') . '.', 1);
}

$result = $db->query("SELECT note FROM notes WHERE bikeNum='$bike' AND deleted IS NULL ORDER BY time DESC");
$note = '';
while ($row = $result->fetchAssoc()) {
Expand Down

0 comments on commit 0ddf7f5

Please sign in to comment.