From df19863a86d1f22588d3e9fc4a03a95d01eab383 Mon Sep 17 00:00:00 2001 From: ragu Date: Mon, 4 Jul 2022 15:30:17 +0200 Subject: [PATCH] operator access to customer --- copri4/main/css/local_style_2.css | 2 +- copri4/main/src/Mod/APIfunc.pm | 5 +++-- copri4/main/src/Tpl/BaseEdit.pm | 2 +- copri4/main/src/Tpl/Calorin.pm | 4 ++-- copri4/shareedms-operator/src/Lib/Mlogic.pm | 14 ++++++++------ 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/copri4/main/css/local_style_2.css b/copri4/main/css/local_style_2.css index bc9c110..e5cf4be 100755 --- a/copri4/main/css/local_style_2.css +++ b/copri4/main/css/local_style_2.css @@ -578,7 +578,7 @@ div#Headerlogo { padding:4px 10px; height:48px; margin: -18px -12px !important; - width:300px; + width:350px; text-align:left; } diff --git a/copri4/main/src/Mod/APIfunc.pm b/copri4/main/src/Mod/APIfunc.pm index 83e870b..42e97be 100755 --- a/copri4/main/src/Mod/APIfunc.pm +++ b/copri4/main/src/Mod/APIfunc.pm @@ -505,6 +505,7 @@ sub service_update(){ "ct.close_time" => "is::null", int10 => "1", int28 => "3", + end_time => ">=::(now() - interval '5 min')", }; my $ctpos = { c_id => 0 }; @@ -553,7 +554,7 @@ sub service_update(){ table_pos => "contenttranspos", fetch => "one", ca_id => "$auth->{c_id}", - #end_time => ">=::(now() - interval '10 minutes')", + end_time => ">=::(now() - interval '5 min')", }; my $post_record = { c_id => 0 }; $post_record = $dbt->collect_post($dbh_operator,$postref); @@ -1749,7 +1750,7 @@ sub rental_to_feedback{ int10 => "1", int11 => "3",#sig system int28 => "3",#set count on sig rental_end - #end_time => ">=::(now() - interval '5 min')", + end_time => ">=::(now() - interval '5 min')", }; my $ctpos = { c_id => 0 }; $ctpos = $dbt->collect_post($dbh,$pref); diff --git a/copri4/main/src/Tpl/BaseEdit.pm b/copri4/main/src/Tpl/BaseEdit.pm index 44e0db1..77c2ce3 100755 --- a/copri4/main/src/Tpl/BaseEdit.pm +++ b/copri4/main/src/Tpl/BaseEdit.pm @@ -104,7 +104,7 @@ sub tpl(){ $save_key = "save_adr"; $edit_template = "$ctrel->{template_id}" . "000"; $tpl = $db->get_tpl($edit_template); - }elsif($node_meta->{ct_table} eq "users" && $u_id){ + }elsif($node_meta->{ct_table} eq "users" && $node_meta->{tpl_id} == 198 && $u_id){ my $ref = { table => "$node_meta->{ct_table}", fetch => "one", diff --git a/copri4/main/src/Tpl/Calorin.pm b/copri4/main/src/Tpl/Calorin.pm index 9d8d0ed..1d37db0 100755 --- a/copri4/main/src/Tpl/Calorin.pm +++ b/copri4/main/src/Tpl/Calorin.pm @@ -125,7 +125,7 @@ sub tpl(){ print $q->end_form; print $q->start_form(); - print "
\n"; + print "
\n"; my $start_date_time = $R::start_date_time; my $end_date_time = $R::end_date_time; @@ -278,7 +278,7 @@ sub tpl(){ } else{ $size="9px" if($key =~ /int/); - if($key =~ /ct_name/){ + if($key =~ /ct_name|barcode/){ print $q->textfield(-class=>'stxt2',-name=>"$key",-default=>"$valxx",-size=>"$size",-override=>'1',-maxlength=>40, -placeholder=>"$des",-autofocus=>1),"\n"; }else{ print $q->textfield(-class=>'stxt2',-name=>"$key",-default=>"$valxx",-size=>"$size",-override=>'1', -maxlength=>40, -placeholder=>"$des"),"\n"; diff --git a/copri4/shareedms-operator/src/Lib/Mlogic.pm b/copri4/shareedms-operator/src/Lib/Mlogic.pm index 175221c..49111c6 100755 --- a/copri4/shareedms-operator/src/Lib/Mlogic.pm +++ b/copri4/shareedms-operator/src/Lib/Mlogic.pm @@ -142,6 +142,14 @@ sub tpl(){ if($main_id >= "100000"){ my $mstyle=""; + my $dbh_primary = $dbt->dbconnect_extern("sharee_primary"); + my $users_dms_primary = { u_id => 0 }; + $users_dms_primary = $dbt->select_users($dbh_primary,$users_dms->{u_id},"and int02=2"); + #print Dumper($users_dms_primary); + + my $mod_active = "$dbt->{shareedms_conf}->{mod_active}"; + $mod_active .= "|Kunden|Faktura" if($users_dms_primary->{u_id} && $users_dms_primary->{int02} == 2); + ###Top Menu #bootstrap menue print "