counting position on delete and agb

This commit is contained in:
ragu 2022-05-19 16:00:41 +02:00
parent 7a6f57a2ef
commit d1badd0dca
6 changed files with 54 additions and 22 deletions

View file

@ -866,6 +866,7 @@ sub fetch_bike_tariff {
#2022-04-05 refactored bike reservation
sub booking_request(){
my $self = shift;
my $q = shift;
my $varenv = shift;
my $auth = shift;#app API auth
my $bike = shift || "";#app API request
@ -875,13 +876,17 @@ sub booking_request(){
my $gps = shift || "";
my $sig_book = shift || {};
my $state = $q->escapeHTML($q->param('state')) || "";
my $lock_state = $q->escapeHTML($q->param('lock_state')) || "";
my $dbh = "";
my $pos_id="";
my $now_dt = strftime "%Y-%m-%d %H:%M", localtime;
my $response_state = "OK";
my $response_text = "";
$bw->log("booking_request bike $bike, auth $auth->{c_id}, tarif $ct_tariff->{barcode}, requested bike:",$bike,"");
#state and lock_state is only defined if requestes incl. occupied
$bw->log("booking_request bike to state $bike $state $lock_state, auth $auth->{c_id}, tarif $ct_tariff->{barcode}, bike:",$bike,"");
my $update_adr = {
table => "contentadr",