mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-02-22 19:56:29 +01:00
sig miniquery fix and counter edit
This commit is contained in:
parent
15e266fa19
commit
ac2e93923b
6 changed files with 18 additions and 13 deletions
|
@ -1716,10 +1716,10 @@ sub rentals(){
|
||||||
if($record->{$id}->{int28} && $record->{$id}->{int28} == 3){
|
if($record->{$id}->{int28} && $record->{$id}->{int28} == 3){
|
||||||
|
|
||||||
#only for project=Bayern and developer enabled
|
#only for project=Bayern and developer enabled
|
||||||
if(($dbt->{operator}->{$varenv{dbname}}->{project} eq "Bayern" && $auth->{int23} < 4) || ($auth->{c_id} == 1842 || $auth->{c_id} == 5781 || $auth->{c_id} == 11765 || $auth->{c_id} == 1843 || $auth->{c_id} == 38883)){
|
if($dbt->{operator}->{$varenv{dbname}}->{project} eq "Bayern" && $auth->{int23} < 4){
|
||||||
|
|
||||||
$bw->log("user_miniquery via $varenv{dbname} user ID $auth->{c_id} exist count:",$auth->{int23},"");
|
$bw->log("user_miniquery via $varenv{dbname} user ID $auth->{c_id} exist count:",$auth->{int23},"");
|
||||||
$return->{user_miniquery} = $dbt->evaluationsfragen($dbh);
|
$return->{$id}->{user_miniquery} = $dbt->evaluationsfragen($dbh);
|
||||||
|
|
||||||
#user_miniquest_count
|
#user_miniquest_count
|
||||||
my $user_miniquest_count = $auth->{int23} || 0;
|
my $user_miniquest_count = $auth->{int23} || 0;
|
||||||
|
|
|
@ -397,7 +397,7 @@ elsif($q->param('request') eq "booking_cancel" || $q->param('request') eq "booki
|
||||||
#keep in mind, it works on operator dependency
|
#keep in mind, it works on operator dependency
|
||||||
#only for project=Bayern and developer enabled
|
#only for project=Bayern and developer enabled
|
||||||
#redundant code in APIfunc sub rentals for sig user_miniquery
|
#redundant code in APIfunc sub rentals for sig user_miniquery
|
||||||
if($booking_values->{state} eq "available" && (($dbt->{operator}->{$varenv{dbname}}->{project} eq "Bayern" && $authraw->{int23} < 4) || ($authraw->{c_id} == 1842 || $authraw->{c_id} == 5781 || $authraw->{c_id} == 11765 || $authraw->{c_id} == 1843 || $authraw->{c_id} == 38883))){
|
if($booking_values->{state} eq "available" && ($dbt->{operator}->{$varenv{dbname}}->{project} eq "Bayern" && $authraw->{int23} < 4)){
|
||||||
|
|
||||||
$bw->log("user_miniquery via $varenv{dbname} user ID $authraw->{c_id} exist count:",$authraw->{int23},"");
|
$bw->log("user_miniquery via $varenv{dbname} user ID $authraw->{c_id} exist count:",$authraw->{int23},"");
|
||||||
$response->{user_miniquery} = $dbt->evaluationsfragen($dbh);
|
$response->{user_miniquery} = $dbt->evaluationsfragen($dbh);
|
||||||
|
|
|
@ -1095,7 +1095,7 @@ sub collect_transpos {
|
||||||
foreach my $key (keys (%$search)){
|
foreach my $key (keys (%$search)){
|
||||||
$search->{$key} =~ s/^\s//g;
|
$search->{$key} =~ s/^\s//g;
|
||||||
$search->{$key} =~ s/\s$//g;
|
$search->{$key} =~ s/\s$//g;
|
||||||
$where .= " and cp.c_id = $search->{$key}" if($key eq "cttpos_id" && $search->{$key});
|
$where .= " and cp.c_id = $search->{$key}" if(($key eq "c_id" || $key eq "cttpos_id") && $search->{$key});
|
||||||
if($key eq "start_time_interval"){
|
if($key eq "start_time_interval"){
|
||||||
$where .= " and cp.start_time <= $search->{$key}";
|
$where .= " and cp.start_time <= $search->{$key}";
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,9 +232,9 @@ sub save_account(){
|
||||||
}
|
}
|
||||||
$u_rows = $dbt->update_one($dbh,$update_primary,"txt17='@operators'");
|
$u_rows = $dbt->update_one($dbh,$update_primary,"txt17='@operators'");
|
||||||
}
|
}
|
||||||
#Web-Login|Rabatt|Vde|payone cron-intervall|Ilockit-Admin
|
#Web-Login|Rabatt|Vde|payone cron-intervall|Ilockit-Admin|miniq
|
||||||
#elsif($_ =~ /int05|int07|int16|int19/){
|
#elsif($_ =~ /int05|int07|int16|int19/){
|
||||||
elsif($_ =~ /int05|int07|int16|int19/){
|
elsif($_ =~ /int05|int07|int16|int19|int23/){
|
||||||
$u_rows = $dbt->update_one("",$update_primary,"$_=$valxx");
|
$u_rows = $dbt->update_one("",$update_primary,"$_=$valxx");
|
||||||
}
|
}
|
||||||
#user_tour
|
#user_tour
|
||||||
|
|
|
@ -192,6 +192,8 @@ sub tpl(){
|
||||||
end_date_time => "$end_date_time",
|
end_date_time => "$end_date_time",
|
||||||
} if(!$R::cttpos_id);
|
} if(!$R::cttpos_id);
|
||||||
|
|
||||||
|
$search->{c_id} = $R::c_id if($R::base_edit eq "save_pos" && $R::c_id);
|
||||||
|
|
||||||
if(!$start_chck && !$end_chck){
|
if(!$start_chck && !$end_chck){
|
||||||
if($node_meta->{ct_table} eq "contenttranspos"){
|
if($node_meta->{ct_table} eq "contenttranspos"){
|
||||||
$cttpos = $dbt->collect_transpos($dbh,$search);
|
$cttpos = $dbt->collect_transpos($dbh,$search);
|
||||||
|
@ -239,40 +241,43 @@ sub tpl(){
|
||||||
foreach(@tpl_order){
|
foreach(@tpl_order){
|
||||||
#$h++;
|
#$h++;
|
||||||
my ($key,$des,$size) = split /=/,$_;
|
my ($key,$des,$size) = split /=/,$_;
|
||||||
|
my $valxx = $q->param("$_");
|
||||||
|
$valxx = "" if($R::base_edit eq "save_pos");#empty search fields
|
||||||
|
|
||||||
if($key =~ /time/){
|
if($key =~ /time/){
|
||||||
$size="10px";
|
$size="10px";
|
||||||
print $q->textfield(-id=>'datepicker1',-class=>'etxt',-name=>"start_$key",-override=>'1', -default=>"$start_date_time",-size=>"$size",-maxlength=>20), "-", $q->textfield(-id=>'datepicker2',-class=>'etxt',-name=>"end_$key",-override=>'1',-default=>"$end_date_time",-size=>"$size",-maxlength=>20),"\n";
|
print $q->textfield(-id=>'datepicker1',-class=>'etxt',-name=>"start_$key",-override=>'1', -default=>"$start_date_time",-size=>"$size",-maxlength=>20), "-", $q->textfield(-id=>'datepicker2',-class=>'etxt',-name=>"end_$key",-override=>'1',-default=>"$end_date_time",-size=>"$size",-maxlength=>20),"\n";
|
||||||
}
|
}
|
||||||
elsif($key =~ /owner/){
|
elsif($key =~ /owner/){
|
||||||
print $but->selector_class("$key","eselect","width:80px;",$R::owner,@_users),"\n";
|
print $but->selector_class("$key","eselect","width:80px;",$valxx,@_users),"\n";
|
||||||
}
|
}
|
||||||
elsif($key =~ /int10/ && "$size" eq "select"){# && $node_meta->{tpl_id} == 205){#bike_state
|
elsif($key =~ /int10/ && "$size" eq "select"){# && $node_meta->{tpl_id} == 205){#bike_state
|
||||||
my @_lock_valxx = (":$des");
|
my @_lock_valxx = (":$des");
|
||||||
while (my ($key, $value) = each %{ $dbt->{copri_conf}->{bike_state} }) {
|
while (my ($key, $value) = each %{ $dbt->{copri_conf}->{bike_state} }) {
|
||||||
push @_lock_valxx, "$key:$value";#[1:available] ...
|
push @_lock_valxx, "$key:$value";#[1:available] ...
|
||||||
}
|
}
|
||||||
print $but->selector_class("$key","eselect","",$R::int10,@_lock_valxx),"\n";
|
print $but->selector_class("$key","eselect","",$valxx,@_lock_valxx),"\n";
|
||||||
}
|
}
|
||||||
elsif($key =~ /int12/ && "$size" eq "select"){# && $node_meta->{tpl_id} == 210){#Flotte bike_group (bikenode.main_id)
|
elsif($key =~ /int12/ && "$size" eq "select"){# && $node_meta->{tpl_id} == 210){#Flotte bike_group (bikenode.main_id)
|
||||||
my @_valxx = (":$des");
|
my @_valxx = (":$des");
|
||||||
foreach my $rid (sort { $bike_nodes->{$a}->{node_name} cmp $bike_nodes->{$b}->{node_name} } keys (%$bike_nodes)){
|
foreach my $rid (sort { $bike_nodes->{$a}->{node_name} cmp $bike_nodes->{$b}->{node_name} } keys (%$bike_nodes)){
|
||||||
push (@_valxx, "$bike_nodes->{$rid}->{main_id}:$bike_nodes->{$rid}->{node_name} ($bike_nodes->{$rid}->{main_id})");
|
push (@_valxx, "$bike_nodes->{$rid}->{main_id}:$bike_nodes->{$rid}->{node_name} ($bike_nodes->{$rid}->{main_id})");
|
||||||
}
|
}
|
||||||
print $but->selector_class("$key","eselect","width:100px;",$R::int12,@_valxx),"\n";
|
print $but->selector_class("$key","eselect","width:100px;",$valxx,@_valxx),"\n";
|
||||||
}
|
}
|
||||||
elsif($key =~ /int20/ && "$size" eq "select"){# && $node_meta->{tpl_id} == 205){#lock_state locked/unlocked
|
elsif($key =~ /int20/ && "$size" eq "select"){# && $node_meta->{tpl_id} == 205){#lock_state locked/unlocked
|
||||||
my @_lock_valxx = (":$des");
|
my @_lock_valxx = (":$des");
|
||||||
while (my ($key, $value) = each %{ $dbt->{copri_conf}->{lock_state} }) {
|
while (my ($key, $value) = each %{ $dbt->{copri_conf}->{lock_state} }) {
|
||||||
push @_lock_valxx, "$key:$value";#[2:unlocked]
|
push @_lock_valxx, "$key:$value";#[2:unlocked]
|
||||||
}
|
}
|
||||||
print $but->selector_class("$key","eselect","width:100px;",$R::int20,@_lock_valxx),"\n";
|
print $but->selector_class("$key","eselect","width:100px;",$valxx,@_lock_valxx),"\n";
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$size="9px" if($key =~ /int/);
|
$size="9px" if($key =~ /int/);
|
||||||
if($key =~ /ct_name/){
|
if($key =~ /ct_name/){
|
||||||
print $q->textfield(-class=>'stxt2',-name=>"$key",-default=>"",-size=>"$size",-maxlength=>40, -placeholder=>"$des",-autofocus=>1),"\n";
|
print $q->textfield(-class=>'stxt2',-name=>"$key",-default=>"",-size=>"$size",-override=>'1',-maxlength=>40, -placeholder=>"$des",-autofocus=>1),"\n";
|
||||||
}else{
|
}else{
|
||||||
print $q->textfield(-class=>'stxt2',-name=>"$key",-default=>"",-size=>"$size",-maxlength=>40, -placeholder=>"$des"),"\n";
|
print $q->textfield(-class=>'stxt2',-name=>"$key",-default=>"",-size=>"$size",-override=>'1', -maxlength=>40, -placeholder=>"$des"),"\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -529,7 +529,7 @@ EOF
|
||||||
my $users_dms_primary = { u_id => 0 };
|
my $users_dms_primary = { u_id => 0 };
|
||||||
$users_dms_primary = $dbt->select_users($dbh_primary,$users_dms->{u_id},"and int03=2");
|
$users_dms_primary = $dbt->select_users($dbh_primary,$users_dms->{u_id},"and int03=2");
|
||||||
|
|
||||||
if($users_dms_primary->{int03} == 2 && !$ctt->{close_time} && $varenv{Zahlungsweise}){
|
if($users_dms_primary->{c_id} && $users_dms_primary->{int03} == 2 && !$ctt->{close_time} && $varenv{Zahlungsweise}){
|
||||||
my @_paymentstate = split(/\|/,$varenv{Zahlungsweise});
|
my @_paymentstate = split(/\|/,$varenv{Zahlungsweise});
|
||||||
push @_paymentstate, "";
|
push @_paymentstate, "";
|
||||||
my $kind_of_payment = "";
|
my $kind_of_payment = "";
|
||||||
|
|
Loading…
Add table
Reference in a new issue