mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 15:16:38 +02:00
changing rental freed_time to once a day and A-A message
This commit is contained in:
parent
63380dfbe0
commit
94fcafaff3
7 changed files with 82 additions and 37 deletions
|
@ -221,10 +221,10 @@ elsif($q->param('request') eq "booking_request"){
|
|||
|
||||
#check count of occcupied/requested bikes
|
||||
my $record = $apif->user_bikes_occupied($dbh,$authraw,"");
|
||||
my $count=0;
|
||||
my $rental_count=0;
|
||||
my $still_requested = 0;
|
||||
foreach my $id (keys(%$record)){
|
||||
$count++;
|
||||
$rental_count++;
|
||||
if($bike_id && $bike_id == $record->{$id}->{barcode}){
|
||||
$still_requested = 1;
|
||||
$response->{response_state} = "OK, bike " . $bike . " already requested or occupied";
|
||||
|
@ -234,7 +234,7 @@ elsif($q->param('request') eq "booking_request"){
|
|||
|
||||
if(!$still_requested){
|
||||
#only if not App debuglevel defined
|
||||
if(!$authraw->{int11} && $count >= 3){
|
||||
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";
|
||||
}else{
|
||||
|
@ -282,7 +282,7 @@ elsif($q->param('request') eq "booking_request"){
|
|||
$sig_book->{bikeId} = "$ct_bike->{txt22}";
|
||||
$sig_book->{rentalId} = "$R::rentalId" if($R::rentalId);#only for cmd tests
|
||||
}
|
||||
$response_book = $apif->booking_request($q,\%varenv,$authraw,$bike,$ct_bike,$ct_tariff,$aowner,$gps,$sig_book);
|
||||
$response_book = $apif->booking_request($q,\%varenv,$authraw,$bike,$ct_bike,$ct_tariff,$sig_book,$aowner);
|
||||
$apif->stations_caching($q,\%varenv,$authraw);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue