mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 15:16:38 +02:00
rental freed_time and some service staff coding
This commit is contained in:
parent
9213ca6a70
commit
b92f2c6b5c
8 changed files with 91 additions and 47 deletions
|
@ -241,6 +241,8 @@ elsif($q->param('request') eq "booking_request"){
|
|||
|
||||
#check count of occcupied/requested bikes
|
||||
my $record = $apif->user_bikes_occupied($dbh,$authraw,"");
|
||||
my $max_rental_count = 3;
|
||||
$max_rental_count = 10 if($authraw->{int09});
|
||||
my $rental_count=0;
|
||||
my $still_requested = 0;
|
||||
foreach my $id (keys(%$record)){
|
||||
|
@ -253,10 +255,9 @@ elsif($q->param('request') eq "booking_request"){
|
|||
}
|
||||
|
||||
if(!$still_requested){
|
||||
#only if not App debuglevel defined
|
||||
if(!$authraw->{int11} && $rental_count >= 3){
|
||||
$response->{response_state} = "Failure: booking_request declined. max count of 3 occupied bikes has been reached";
|
||||
$response->{response_text} = "Die maximale Anzahl von 3 Reservierungen wurde erreicht";
|
||||
if($rental_count >= $max_rental_count){
|
||||
$response->{response_state} = "Failure: booking_request declined. max count of $rental_count occupied bikes has been reached";
|
||||
$response->{response_text} = "Die maximale Anzahl von $rental_count Reservierungen wurde erreicht";
|
||||
}else{
|
||||
my $gps = "";
|
||||
my $latitude = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue