mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-13 23:26:29 +02:00
Mietpreis refactoring
This commit is contained in:
parent
e6ca75a66a
commit
74ecbbd2a8
11 changed files with 169 additions and 242 deletions
|
@ -1087,8 +1087,6 @@ sub booking_update(){
|
|||
$gps = "$latitude,$longitude" if($latitude && $longitude);
|
||||
}
|
||||
|
||||
my $Ilockit_GUID = "";
|
||||
$Ilockit_GUID = $q->escapeHTML($q->param('Ilockit_GUID')) if($q->param('Ilockit_GUID') && $q->param('Ilockit_GUID') =~ /\w+-\w+-\w+-\w+$/);
|
||||
my $gps_age = 0;
|
||||
my $gps_age_minutes = 60;
|
||||
$gps_age = $q->escapeHTML($1) if($q->param('gps_age') =~ /^(\d+)/);#in milli-sec
|
||||
|
@ -1130,8 +1128,6 @@ sub booking_update(){
|
|||
}
|
||||
}else{
|
||||
|
||||
$update_pos->{txt17} = $Ilockit_GUID if($Ilockit_GUID);
|
||||
|
||||
|
||||
#prevent reset occupied values OR only if genkey defined
|
||||
#if(($state eq "occupied" && $record_pos->{txt10} =~ /requested/) || ($state eq "occupied" && $record_pos->{txt10} =~ /occupied/ && $q->param('genkey') eq "1"))
|
||||
|
@ -1168,6 +1164,7 @@ sub booking_update(){
|
|||
#my $pricing = $pri->sharee_pricing($record_pos,"calc_price");
|
||||
#new sharee_pricing
|
||||
my ($pricing,$counting) = $pri->counting_rental(\%varenv,$record_pos,"calc_price");
|
||||
#int03 only used for tarif counting backwards compatibility
|
||||
$update_pos->{int03} = "$pricing->{computed_hours}" if(looks_like_number($pricing->{computed_hours}));
|
||||
$update_pos->{int38} = "$counting->{int38}" if(looks_like_number($counting->{int38}));
|
||||
$update_pos->{int39} = "$counting->{int39}" if(looks_like_number($counting->{int39}));
|
||||
|
@ -1226,6 +1223,7 @@ sub booking_update(){
|
|||
#my $pricing = $pri->sharee_pricing($record_pos,"calc_price");
|
||||
#new sharee_pricing
|
||||
my ($pricing,$counting) = $pri->counting_rental(\%varenv,$record_pos,"calc_price");
|
||||
#int03 only used for tarif counting backwards compatibility
|
||||
$update_pos->{int03} = "$pricing->{computed_hours}" if(looks_like_number($pricing->{computed_hours}));
|
||||
$update_pos->{int38} = "$counting->{int38}" if(looks_like_number($counting->{int38}));
|
||||
$update_pos->{int39} = "$counting->{int39}" if(looks_like_number($counting->{int39}));
|
||||
|
@ -1262,6 +1260,7 @@ sub booking_update(){
|
|||
#my $pricing = $pri->sharee_pricing($record_pos,"calc_price");
|
||||
#new sharee_pricing
|
||||
my ($pricing,$counting) = $pri->counting_rental(\%varenv,$record_pos,"calc_price");
|
||||
#int03 only used for tarif counting backwards compatibility
|
||||
$update_pos->{int03} = "$pricing->{computed_hours}" if(looks_like_number($pricing->{computed_hours}));
|
||||
$update_pos->{int38} = "$counting->{int38}" if(looks_like_number($counting->{int38}));
|
||||
$update_pos->{int39} = "$counting->{int39}" if(looks_like_number($counting->{int39}));
|
||||
|
@ -1321,7 +1320,6 @@ sub booking_update(){
|
|||
#$self->service_automatic($q) if($1 <= 40);
|
||||
}
|
||||
$update_cc->{txt15} = $q->escapeHTML($q->param('firmware')) if($q->param('firmware'));
|
||||
$update_cc->{txt17} = $Ilockit_GUID if($Ilockit_GUID);
|
||||
|
||||
}
|
||||
#end Ilockit || sigo
|
||||
|
@ -1768,7 +1766,6 @@ sub bikes_available(){
|
|||
|
||||
if($record->{$id}->{int11} eq "2"){
|
||||
$return->{$id}->{system} = "Ilockit";
|
||||
$return->{$id}->{Ilockit_GUID} = "$record->{$id}->{txt17}";
|
||||
$return->{$id}->{Ilockit_ID} = "$record->{$id}->{txt18}";
|
||||
#if($users_serviceapp->{int09})
|
||||
#shareetool
|
||||
|
@ -1908,7 +1905,6 @@ sub bikes_all(){
|
|||
|
||||
if($record->{$id}->{int11} eq "2"){
|
||||
$return->{$id}->{system} = "Ilockit";
|
||||
$return->{$id}->{Ilockit_GUID} = "$record->{$id}->{txt17}";
|
||||
$return->{$id}->{Ilockit_ID} = "$record->{$id}->{txt18}";
|
||||
#shareetool
|
||||
if($q->param('authcookie') && $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{id} && $dbt->{merchant_ids}->{$varenv->{merchant_id}}->{id} == 187 && scalar(@{$user_tour} >= 1)){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue