From eafd3934585479301c33fca50d2e2f5555c4f121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rainer=20G=C3=BCmpelein?= Date: Wed, 23 Feb 2022 12:33:59 +0100 Subject: [PATCH] Kundendaten Formular failure messages --- copri4/main/src/Mod/APIfunc.pm | 2 +- copri4/main/src/Mod/KMLout.pm | 11 +++-- copri4/main/src/Mod/Payment.pm | 9 +++- copri4/shareeapp-operator/src/Tpl/FormEdit.pm | 41 ++++++++----------- 4 files changed, 33 insertions(+), 30 deletions(-) diff --git a/copri4/main/src/Mod/APIfunc.pm b/copri4/main/src/Mod/APIfunc.pm index 0ad8f45..c3ea07c 100755 --- a/copri4/main/src/Mod/APIfunc.pm +++ b/copri4/main/src/Mod/APIfunc.pm @@ -1120,7 +1120,7 @@ sub booking_update(){ if($q->param('voltage') && $q->param('voltage') =~ /(\d+)/){ $update_cc->{int14} = $1; - $self->service_automatic($q) if($1 <= 40); + $self->service_automatic($q) if($1 <= 50); } my $update_pos = { diff --git a/copri4/main/src/Mod/KMLout.pm b/copri4/main/src/Mod/KMLout.pm index 6308bb9..fd6617a 100755 --- a/copri4/main/src/Mod/KMLout.pm +++ b/copri4/main/src/Mod/KMLout.pm @@ -91,7 +91,12 @@ sub kmlGenerator { my $kmlfile = "sharee-$timestamp-$users_sharee->{c_id}.kml"; $bw->log("kmlGenerator with: ",$kmlfile,""); - my $uri_primary = $dbt->{primary}->{sharee_primary}->{primaryApp}; + #request primary will jsonclient loop_sharees + my $uri_request = $dbt->{primary}->{sharee_primary}->{primaryApp}; + + #detect DMS, because this will do it directly without loop_sharees + $uri_request = $dbt->{operator}->{$varenv->{dbname}}->{operatorApp} if($varenv->{dbname} ne "sharee_primary" && $varenv->{syshost} =~ /shareedms-/); + my $rest_stations = "request=stations_available&project=$project&authcookie=$authcookie->{authcookie}"; my $rest_bikes = "request=bikes_available&project=$project&authcookie=$authcookie->{authcookie}"; @@ -108,8 +113,8 @@ sub kmlGenerator { my %place_latitude; #reading shareejson - my $stations_json = fetch_primary_json("",$uri_primary,$rest_stations); - my $bikes_json = fetch_primary_json("",$uri_primary,$rest_bikes); + my $stations_json = fetch_primary_json("",$uri_request,$rest_stations); + my $bikes_json = fetch_primary_json("",$uri_request,$rest_bikes); open(XML,">$varenv->{basedir}/xml/$kmlfile") || die "$0 can not write $!"; diff --git a/copri4/main/src/Mod/Payment.pm b/copri4/main/src/Mod/Payment.pm index 0045fc5..8cf7017 100755 --- a/copri4/main/src/Mod/Payment.pm +++ b/copri4/main/src/Mod/Payment.pm @@ -453,8 +453,8 @@ sub rpc { my $update_adr = { table => "contentadr", - mtime => "now()", - owner => $owner + #mtime => "now()", + #owner => $owner }; my $update_ctt = { @@ -587,6 +587,11 @@ sub rpc { print FILE "payone RPC end\n\n" if($debug); close(FILE) if($debug); + #set contentadr owner and mtime only if Vde or error will be set by payone id's + if((($update_adr->{int12} && $update_adr->{int12} > 0) || $update_adr->{txt28}) && ($owner == 178 || $owner == 179)){ + $update_adr->{owner} = "$owner"; + $update_adr->{mtime} = "now()"; + } $dbt->update_record($dbh,$update_adr,$ctadr) if($ctadr->{c_id} > 0); $dbt->update_record($dbh,$update_ctt,$ctt) if($ctt->{c_id} > 0); return $payoneret; diff --git a/copri4/shareeapp-operator/src/Tpl/FormEdit.pm b/copri4/shareeapp-operator/src/Tpl/FormEdit.pm index fd4cd55..9daac33 100755 --- a/copri4/shareeapp-operator/src/Tpl/FormEdit.pm +++ b/copri4/shareeapp-operator/src/Tpl/FormEdit.pm @@ -487,15 +487,17 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg print $q->label({-for=>"$key",-style=>'padding-top:15px;'},"$label_des"),"\n"; print $but->selector_class("$key","form-control","","$ctrel->{$key}",@_valxx); - }elsif($key =~ /txt/ && !$R::confirm_success){ + #}elsif($key =~ /txt/ && !$R::confirm_success){ + }elsif($key =~ /txt/){ my $required="required"; + #start failure messages #Gutschein if($key =~ /txt16/ && $ctrel->{c_id}){ $required=""; $label_des = "$des"; } - if($key eq "txt07" && $R::failure && $R::failure =~ /conflict_txt07/){ + elsif($key eq "txt07" && $R::failure && $R::failure =~ /conflict_txt07/){ $autofocus = "autofocus"; my ($failkey,$failval) = split(/=/,$R::failure); $label_des = "Achtung, es existiert bereits ein Account mit der Telefon Nr.: $failval"; @@ -507,13 +509,15 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg $label_des = "Achtung, es existiert bereits ein Account mit der e-Mail Adresse: $failval"; $ctrel->{$key} = $R::conflict_txt08; } - #elsif($key eq "txt04" && $R::failure && $R::failure =~ /pwlazy_txt04/){ - # $autofocus = "autofocus"; - # $label_des = "Das Passwort ist zu kurz."; - #} + elsif(($R::failure && $R::failure =~ /^$key/) || ($ctrel->{txt31} && $ctrel->{txt31} =~ /$key/)){ + $autofocus = "autofocus"; + $label_des = "Bitte \"$des\" Angabe korrigieren"; + $label_des = "Für das \"$des\" liegt ein Fehler vor." if($key eq "txt04"); + $label_des = "Bitte mobile Telefon Nr. mit Ländervorwahl, Beispiel: +49 170 12345678" if($key eq "txt07"); + }#end failure messages - elsif($key eq "txt15"){ - if($R::failure){ + if($key eq "txt15"){ + if($R::failure =~ /^txt15/){ $autofocus = "autofocus"; $label_des = "Die Bonusnummer ist leider nicht vorhanden. Bei nicht vorhandener Nummer das Feld bitte leer lassen."; } @@ -534,22 +538,11 @@ Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weit } } - elsif($key eq "txt04" && $R::failure && $R::failure =~ /confirm_txt04/){ - $autofocus = "autofocus"; - $label_des = "Die Passwort Wiederholung ist fehlerhaft. Bitte korrigieren Sie Ihre Eingabe."; - } - elsif(($R::failure && $R::failure =~ /^$key/) || ($ctrel->{txt31} && $ctrel->{txt31} =~ /$key/)){ - $autofocus = "autofocus"; - $label_des = "Bitte \"$des\" Angabe korrigieren"; - $label_des = "Für das \"$des\" liegt ein Fehler vor." if($key eq "txt04"); - $label_des = "Bitte mobile Telefon Nr. mit Ländervorwahl, Beispiel: +49 170 12345678" if($key eq "txt07"); - } - #if($R::success eq $key){ - # $label_des = "Das hat geklappt. Der \"$des\" wurde erfolgreich hinzugefügt, s.u.."; - #} - - elsif($key eq "txt04"){ + if($R::failure && $R::failure =~ /confirm_txt04/){ + $autofocus = "autofocus"; + $label_des = "Die Passwort Wiederholung ist fehlerhaft. Bitte korrigieren Sie Ihre Eingabe."; + } my $pw = "xxxxxxxx"; $pw = "" if(!$ctrel->{c_id}); print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$label_des"),"\n"; @@ -562,7 +555,7 @@ Weitere Personen aus Ihrem Haushalt profitieren jedoch ebenfalls, falls Sie weit $required = "";# if($key =~ /txt09|txt16/); print $q->label({-for=>"$key", -style=>'padding-top:1.5em;'},"$label_des"),"\n"; print "\n"; - } + }#end $key =~ /txt/ #all int checkboxes disabled because of AGB downunder }elsif($key =~ /int/ && $size eq "checkbox"){