mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-05-15 08:06:27 +02:00
alarm trigger fix, warning_state concept
This commit is contained in:
parent
b63e00e982
commit
38a72a3eed
11 changed files with 77 additions and 49 deletions
|
@ -665,7 +665,7 @@ elsif($q->param('request') eq "stations_available"){
|
|||
$user_agent_subversion = $3 if($user_agent =~ /3\.0\.(\d+)/);
|
||||
|
||||
#for tests only contributors with service-tour defined
|
||||
if($user_agent_subversion <= 348 && $authraw->{txt18} && $authraw->{c_id} =~ /$dbt->{copri_conf}->{contributors}/){
|
||||
if($user_agent_subversion <= 398 && $authraw->{txt18} && $authraw->{c_id} =~ /$dbt->{copri_conf}->{contributors}/){
|
||||
my $pref_ctu = {
|
||||
table => "contentuser",
|
||||
fetch => "one",
|
||||
|
@ -675,7 +675,8 @@ elsif($q->param('request') eq "stations_available"){
|
|||
$uadr = $dbt->fetch_tablerecord($dbh,$pref_ctu);
|
||||
$response->{merchant_message} = $uadr->{txt01};
|
||||
$response->{merchant_message} = $uadr->{txt02} if($q->param('lang') eq "en");
|
||||
#$response->{merchant_message} .= " ($user_agent)";
|
||||
$response->{merchant_message} .= "\n\nWill be disabled --> debug contributor App version ($user_agent)";
|
||||
$response->{merchant_message} .= "\n\nWill be disabled --> debug contributor user_device (" . $q->param('user_device') . ")";
|
||||
}
|
||||
|
||||
$response = { %$response, %$auth };
|
||||
|
|
|
@ -75,7 +75,7 @@ print<<EOF
|
|||
</script>
|
||||
EOF
|
||||
;
|
||||
print $q->div({-id=>'retm'},"$feedb->{message} $debug"),"\n" if($feedb->{message} && $feedb->{message} =~ /[a-z]/);
|
||||
print $q->div({-id=>'retm'},"$feedb->{message} $debug"),"\n" if($feedb->{message} && $feedb->{message} =~ /[a-z]/ && $feedb->{message} !~ /failure::/);
|
||||
print $q->div({-id=>'retm'},"$node_meta->{node_name} angelegt $debug"),"\n" if($feedb->{i_rows});
|
||||
print $q->div({-id=>'retm'},"$node_meta->{node_name} aktualisiert $debug"),"\n" if($feedb->{u_rows});
|
||||
print $q->div({-id=>'retm'},"$node_meta->{node_name} gelöscht $debug"),"\n" if($feedb->{d_rows});
|
||||
|
|
|
@ -1187,13 +1187,16 @@ sub collect_theftpos {
|
|||
|
||||
my $where = "where 1=1";
|
||||
foreach my $key (keys (%$search)){
|
||||
$search->{$key} =~ s/\s//g;
|
||||
if($search->{$key} =~ /::/ && $key =~ /int\d+/){
|
||||
$search->{$key} =~ s/\s//g;
|
||||
my $op = "=";
|
||||
my $value = $search->{$key};
|
||||
($op, $value) = split(/::/, $search->{$key});
|
||||
$where .= " and $key $op $value";
|
||||
}elsif($key eq "speedORmeter"){
|
||||
$where .= " and $search->{$key}";
|
||||
}else{
|
||||
$search->{$key} =~ s/\s//g;
|
||||
$where .= " and cp.c_id = $search->{$key}" if($key eq "cttpos_id" && $search->{$key});
|
||||
$where .= " and cp.end_time >= '$search->{$key}'" if($key eq "start_date_time");
|
||||
$where .= " and cp.end_time <= '$search->{$key}'" if($key eq "end_date_time");
|
||||
|
|
|
@ -725,7 +725,7 @@ sub payone_capture(){
|
|||
my $topdf = "$varenv->{basedir}/src/wkhtmltopdf-amd64";
|
||||
my $exit_code = 1;
|
||||
my $print_return = "";
|
||||
$print_return = `$topdf --page-size A4 "$varenv->{wwwhost}/Printpreview?printer_id=PDF\&mandant_main_id=$mandant_id\&main_id=$main_id\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$ctt->{c_id}\&u_id=$owner\&pkey=$apikeyconf{pdfprinter}->{pkey}" $varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf 2>&1`;
|
||||
$print_return = `$topdf --page-size A4 "$varenv->{wwwhost}/Printpreview?printer_id=PDF\&mandant_main_id=$mandant_id\&main_id=$main_id\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$ctt->{c_id}\&u_id=$owner\&pkey=$apikeyconf{pdfprinter}->{pkey}" "$varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf" 2>&1`;
|
||||
$exit_code = $?;
|
||||
sleep 2;
|
||||
|
||||
|
|
|
@ -140,7 +140,24 @@ sub save_text2contenttrans {
|
|||
my $valxx = $q->escapeHTML("$val");
|
||||
my @val = $q->param($_);
|
||||
$valxx = $q->escapeHTML("@val");
|
||||
if($_ =~ /txt|int|state|time/){
|
||||
|
||||
#Set formular title if Mahnung
|
||||
if($_ eq "int06"){
|
||||
my $s_hash = {};
|
||||
$s_hash = $dbt->{shareedms_conf}->{warning_state};
|
||||
if($valxx > 0){
|
||||
foreach my $s_key (sort keys (%{ $s_hash })) {
|
||||
if($valxx eq $s_key){
|
||||
$update_ctt->{txt00} = $s_hash->{$s_key} if($s_hash->{$s_key} =~ /Mahnung/);
|
||||
$update_ctt->{$_} = "$valxx";
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$update_ctt->{txt00} = "Rechnung";
|
||||
$update_ctt->{$_} = "$valxx";
|
||||
}
|
||||
}
|
||||
elsif($_ =~ /txt|int|state|time/){
|
||||
$update_ctt->{$_} = "$valxx";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -684,7 +684,7 @@ sub preinit(){
|
|||
|
||||
if("$R::printer_id" =~ /PDF/){
|
||||
#without system() because we have to wait until PDF is ready
|
||||
$print_return = `$topdf --page-size $psize "$varenv{wwwhost}$script/Printpreview?printer_id=$R::printer_id\&mandant_main_id=$mandant_main_id\&main_id=$node->{main_id}\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$c_id4print\&u_id=$users_dms->{u_id}\&pkey=$apikeyconf{pdfprinter}->{pkey}" $varenv{pdf}/$praefix-$ctt->{ct_name}.pdf 2>&1`;
|
||||
$print_return = `$topdf --page-size $psize "$varenv{wwwhost}$script/Printpreview?printer_id=$R::printer_id\&mandant_main_id=$mandant_main_id\&main_id=$node->{main_id}\&ct_name2print=$ctt->{ct_name}\&c_id4trans=$c_id4print\&u_id=$users_dms->{u_id}\&pkey=$apikeyconf{pdfprinter}->{pkey}" "$varenv{pdf}/$praefix-$ctt->{ct_name}.pdf" 2>&1`;
|
||||
$exit_code = $?;
|
||||
|
||||
if(1==1){#debugging
|
||||
|
@ -697,11 +697,9 @@ sub preinit(){
|
|||
|
||||
if($R::set_state ne "buchen"){#no redirect if buchen incl. print_pdf
|
||||
if( -f "$varenv{basedir}/pdf/$praefix-$ctt->{ct_name}.pdf"){
|
||||
#print redirect("$varenv{wwwhost}/pdf/$praefix-$ctt->{ct_name}.pdf");
|
||||
#exit 0;
|
||||
print "<script type=\"text/javascript\">window.open('$varenv{wwwhost}$script/pdf/$praefix-$ctt->{ct_name}.pdf');</script>";
|
||||
print "<script type=\"text/javascript\">window.open('$varenv{wwwhost}/FileOut?file=$praefix-$ctt->{ct_name}.pdf');</script>";
|
||||
}else{
|
||||
return "failure::PDF konnte nicht generiert werden, bitte Info an: info\@gnu-systems.de\n $varenv{wwwhost}/pdf/$praefix-$ctt->{ct_name}.pdf";
|
||||
return "failure::PDF konnte nicht generiert werden, bitte Info an: admin\@sharee.bike\n $varenv{wwwhost}/pdf/$praefix-$ctt->{ct_name}.pdf";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue