From 697a29b97d399c501ebe33419f831127c054099f Mon Sep 17 00:00:00 2001 From: ragu Date: Thu, 23 Feb 2023 12:35:53 +0100 Subject: [PATCH] cpdate_check and mailing --- copri4/main/src/Mod/DBtank.pm | 8 ++++++-- copri4/main/src/Mod/Indexsharee.pm | 6 +++--- copri4/main/src/Mod/Prelib.pm | 2 +- copri4/main/src/Tpl/BaseEdit.pm | 7 +++++-- copri4/main/src/scripts/cpdate_check.pl | 1 + copri4/shareeapp-operator/src/Tpl/FormEdit.pm | 15 +++++++-------- 6 files changed, 23 insertions(+), 16 deletions(-) create mode 120000 copri4/main/src/scripts/cpdate_check.pl diff --git a/copri4/main/src/Mod/DBtank.pm b/copri4/main/src/Mod/DBtank.pm index 9936f37..d3755f6 100755 --- a/copri4/main/src/Mod/DBtank.pm +++ b/copri4/main/src/Mod/DBtank.pm @@ -282,10 +282,12 @@ sub channel_map(){ 169 => "sigo connector", 172 => "reserve timeout", #173 => "merchant fallback",#mig + 174 => "cronjob bonus", + 175 => "cronjob cpdate", 176 => "Mein konrad App",#mig 177 => "LastenradBay App",#mig - 179 => "cronjob", 178 => "payone API", + 179 => "cronjob payone", #181 => "SMS API", #182 => "velofactur API", 183 => "Ilockit API", @@ -796,7 +798,9 @@ sub fetch_tablerecord(){ if($key =~ /ct_name/ && $value =~ /CAST/){#CAST(c_id AS text) $where .= " and $key $op $value"; }elsif($key =~ /^(ct_name$|txt\d+|uri\d+|state)$/ && $value){ - if($value eq "null"){ + if($value =~ /length\($key\)/){ + $where .= " and $value"; + }elsif($value eq "null"){ $where .= " and $key $op $value"; }elsif($op eq "IN"){ $where .= " and $key $op $value"; diff --git a/copri4/main/src/Mod/Indexsharee.pm b/copri4/main/src/Mod/Indexsharee.pm index d77e4d0..c3b92d0 100755 --- a/copri4/main/src/Mod/Indexsharee.pm +++ b/copri4/main/src/Mod/Indexsharee.pm @@ -485,7 +485,7 @@ sub handler { $update_adr->{ct_name} = $q->escapeHTML($R::pseudocardpan); $update_adr->{txt27} = $q->escapeHTML($R::status); $update_adr->{txt28} = $now_dt . " pseudocardpan\n" . $q->escapeHTML($payone_return); - $update_adr->{int12} = 0; + $update_adr->{int12} = 0 if($users_sharee->{int12} != 2);#Vde hard set by fibu $update_adr->{int03} = 2; $dbt->update_record($dbh,$update_adr,$users_sharee) if($users_sharee->{c_id} > 0); ($api_return,$users_sharee) = $apif->auth_verify($q,$coo,""); @@ -613,8 +613,8 @@ sub handler { ($api_return,$users_sharee) = $apif->auth_verify($q,"",$users_sharee->{c_id}) if($users_sharee->{c_id}); - if($users_sharee->{int12} != 2 && $users_sharee->{int04} && $users_sharee->{int13}){ - #2023-01-17 disabled because of should only be set by payment check + if($users_sharee->{int04} && $users_sharee->{int13}){ + #2023-01-17 disabled because of should only be set by pseudocardpan ajax #my $row = $db->updater("contentadr","c_id","$users_sharee->{c_id}","int12","0");#Vde $dbt->update_operatorsloop($varenv{dbname},$users_sharee->{c_id},"update"); }else{ diff --git a/copri4/main/src/Mod/Prelib.pm b/copri4/main/src/Mod/Prelib.pm index 37cb543..165afbe 100755 --- a/copri4/main/src/Mod/Prelib.pm +++ b/copri4/main/src/Mod/Prelib.pm @@ -165,7 +165,7 @@ sub save_text2contenttrans { if($ctt->{c_id}){ $u_rows += $dbt->update_record($dbh,$update_ctt,$ctt); #empty warn_time if warnstate not set - if(!$R::int06 && $R::txt00 eq "Rechnung"){ + if(!$R::int06 || !$R::warn_time){ $dbt->update_one($dbh,$update_ctt,"warn_time=null",$c_id); } if($R::txt22 && $R::txt22 eq "Zahlungseingang"){ diff --git a/copri4/main/src/Tpl/BaseEdit.pm b/copri4/main/src/Tpl/BaseEdit.pm index f9cb558..07194f9 100755 --- a/copri4/main/src/Tpl/BaseEdit.pm +++ b/copri4/main/src/Tpl/BaseEdit.pm @@ -513,8 +513,6 @@ EOF my $seldes = $des; $des .= " ($key)" if($users_dms->{u_id} eq $varenv{superu_id}); - #$ctrel->{$key} = $q->unescapeHTML("$ctrel->{$key}"); - #$ctrel->{$key} = $lb->newline($ctrel->{$key},"",1); if($key =~ /c_id|ct_name|barcode|txt/ && $size eq "readonly"){ print $q->Tr(); print $q->td({-class=>'left_italic_cms'},"$des"),"\n"; @@ -776,12 +774,17 @@ EOF } } elsif($key =~ /txt/ && $size =~ /area$/){ + $ctrel->{$key} = $q->unescapeHTML("$ctrel->{$key}"); + $ctrel->{$key} = $lb->newline($ctrel->{$key},"",1); my $h= 5;# if($size =~ /area(\d+)/); print $q->Tr(); print $q->td({-class=>'left_italic_cms',-colspan=>1},"$des"),"\n"; print $q->td({-class=>'content1_cms', -colspan=>'3'},$q->textarea(-class=>"etxt", -style=>'border: 1px solid silver;',-rows=>"$h",-cols=>'35em;', -name=>"$key", -override=>'1',-default=>"$ctrel->{$key}")),"\n"; } elsif($key =~ /txt/ && $size =~ /area(\d+)/){ + $ctrel->{$key} = $q->unescapeHTML("$ctrel->{$key}"); + $ctrel->{$key} = $lb->newline($ctrel->{$key},"",1); + #my $h= $1 if($size =~ /area(\d+)/); my $h= "height:" . $1 . "em;"; my $w = "width:25em;"; diff --git a/copri4/main/src/scripts/cpdate_check.pl b/copri4/main/src/scripts/cpdate_check.pl new file mode 120000 index 0000000..b72d90e --- /dev/null +++ b/copri4/main/src/scripts/cpdate_check.pl @@ -0,0 +1 @@ +../../../../../sharee.bike/copri-bike/main/src/scripts/cpdate_check.pl \ No newline at end of file diff --git a/copri4/shareeapp-operator/src/Tpl/FormEdit.pm b/copri4/shareeapp-operator/src/Tpl/FormEdit.pm index 43c098c..9f8d751 100755 --- a/copri4/shareeapp-operator/src/Tpl/FormEdit.pm +++ b/copri4/shareeapp-operator/src/Tpl/FormEdit.pm @@ -333,9 +333,9 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg if(1==1){ if($key =~ /ct_name/){ if($ctrel->{int12}){ - print $q->div({-class=>'content2', -style=>'color:#c83434;'}, "Herzlich Willkommen. Wir mussten Ihren Zugang zu den Mieträdern sperren weil ein Problem mit Ihren Zahlungsdaten vorliegt. Bitte aktualisieren Sie Ihre Zahlungsdaten und kontaktieren Sie uns damit wir den Vorfall klären können."),"\n"; + print $q->div({-class=>'content2', -style=>'color:#c83434;'}, "Hinweis: Wir mussten Ihren Zugang zu den Mieträdern sperren, da ein Problem mit Ihren Zahlungsdaten vorliegt. Bitte aktualisieren Sie Ihre Zahlungsdaten.
Bei Rückfragen zur Registrierung oder Freischaltung wenden Sie sich bitte an hotline\@sharee.bike ."),"\n"; }else{ - print $q->div({-class=>'content2'}, "Herzlich Willkommen. Sie können nach erfolgreicher Anmeldung unter dem Menue \"Fahrradstandortkarte\" ein Leihrad mieten."),"\n"; + print $q->div({-class=>'content2'}, "Herzlich Willkommen. Sie können nach erfolgreicher Anmeldung unter dem Menue \"Radstandorte\" ein Leihrad mieten."),"\n"; } print $q->div({-class=>'content2'}, "Nach der Mietradnutzung haben Sie hier die Möglichkeit die Mietvorgänge einzusehen und gebuchte Rechnungen als PDF herunterzuladen."),"\n"; print $q->div({-class=>'content2'}, "$bonus_ak"),"\n" if($R::success && $R::success eq "txt15"); @@ -382,10 +382,10 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg $cttpos->{$id}->{$key} =~ s/\
/;   /g; print "$cttpos->{$id}->{$key}
\n"; } - if($cttpos->{$id}->{start_time} && $cttpos->{$id}->{end_time}){ - $cttpos->{$id}->{start_time} = $lb->time4de($cttpos->{$id}->{start_time},"1"); - $cttpos->{$id}->{end_time} = $lb->time4de($cttpos->{$id}->{end_time},"1"); - print $q->span("→ $cttpos->{$id}->{start_time}
← $cttpos->{$id}->{end_time}"); + if($pricing->{start_time} && $pricing->{end_time}){ + $pricing->{start_time} = $lb->time4de($pricing->{start_time},"1"); + $pricing->{end_time} = $lb->time4de($pricing->{end_time},"1"); + print $q->span("→ $pricing->{start_time}
← $pricing->{end_time}"); } print "\n"; }elsif($key =~ /int04/){ @@ -669,8 +669,7 @@ Nach Abschluss der Registrierung erhalten Sie sowohl auf die von Ihnen hinterleg }#ende e-Mail iif - #print $q->div({-class=>'content2'}, "Bei Problemen während der Registrierung bitte unsere Account-hotline hotline\@sharee.bike kontaktieren."),"\n" if($project eq "Bayern" && $path =~ /$varenv->{accounting_1}|$varenv->{accounting_3}/); - print $q->div({-class=>'content2', -style=>'margin-top:2em;'}, "Bei Problemen während der Registrierung bitte unsere Account-hotline hotline\@sharee.bike kontaktieren."),"\n" if($project eq "Bayern" && $path =~ /$varenv->{accounting_1}|$varenv->{accounting_3}/); + print $q->div({-class=>'content2', -style=>'margin-top:2em;'}, "Bei Rückfragen zur Registrierung oder Freischaltung wenden Sie sich bitte an hotline\@sharee.bike ."),"\n" if($path =~ /$varenv->{accounting_1}|$varenv->{accounting_3}/); print "\n"; print $q->end_form,"\n";