payone_cron refactoring with max_sum and timerange

This commit is contained in:
Rainer Gümpelein 2022-02-15 13:17:10 +01:00
parent 43dbaba064
commit d2ef211f68
3 changed files with 7 additions and 5 deletions

View file

@ -78,7 +78,7 @@ sub mail_transport(){
$attachBinaryFile = "$sendref->{attachment}";
}
if($dbt->{copri_conf}->{stage} eq "test"){
if($dbt->{copri_conf}->{stage} ne "live"){
$mail_to = $mailxconf->{$sendref->{mailxcfg}}->{mail_to};
$subject = "* offline Test * " . $sendref->{subject};
}

View file

@ -874,7 +874,7 @@ sub tpl(){
my $ny="";
if($table eq "contentadr" && ($ct4rel->{$id}->{int12} || !$ct4rel->{$id}->{int04} || !$ct4rel->{$id}->{int13})){
print $q->td({-class=>'tdicon',-style=>"$set_style color:red;"},"&bull;","\n") if($ecol <= "2");
}elsif($table eq "contenttrans" && (($ct4rel->{$id}->{txt28} && $ct4rel->{$id}->{txt28} =~ /error/i) || ($ct4rel->{$id}->{int14} && $ct4rel->{$id}->{int14} == 1))){
}elsif($table eq "contenttrans" && (($ct4rel->{$id}->{txt28} && $ct4rel->{$id}->{txt28} =~ /error/i) || ($ct4rel->{$id}->{int14} && $ct4rel->{$id}->{int14} >= 1))){
print $q->td({-class=>'tdicon',-style=>"$set_style color:red;"},"&bull;","\n") if($ecol <= "2");
}elsif($table eq "content" && $ct4rel->{$id}->{template_id} == 227){
my $dir_thumb = "$varenv{data}/$node_meta->{main_id}-thumb/$ct4rel->{$id}->{c_id}";
@ -1003,7 +1003,7 @@ sub tpl(){
$order_state = "$ct4rel->{$id}->{txt22}" if($ct4rel->{$id}->{txt22});
$order_state = "$ct4rel->{$id}->{txt22},<br />" if($ct4rel->{$id}->{txt22} && $ct4rel->{$id}->{$key});
my $capture_state = "<span>$ct4rel->{$id}->{$key}</span>";
$capture_state = "<span style='color:red;'>$ct4rel->{$id}->{$key}</span>" if($ct4rel->{$id}->{$key} =~ /payone/ && $ct4rel->{$id}->{int14} == 1);
$capture_state = "<span style='color:red;'>$ct4rel->{$id}->{$key}</span>" if($ct4rel->{$id}->{$key} =~ /payone/ && $ct4rel->{$id}->{int14} >= 1);
print $q->td({-class=>'tdint',-style=>"$txtstyle $set_style"},"$order_state $capture_state"),"\n";
}elsif($ct4rel->{$id}->{template_id} =~ /205|225/ && $key eq "int10"){#bike_state
my $colorize = "";

View file

@ -161,8 +161,8 @@ EOF
my $diff19 = 100 + 19;
my $sum_umst19=0;
my $i=0;
my $accounting_start;
my $accounting_end;
my $accounting_start = "";
my $accounting_end = "";
#foreach my $id (sort { $cttpos->{$b}->{$scol} <=> $cttpos->{$a}->{$scol} } keys(%$cttpos)){
foreach my $id (sort { $cttpos->{$b}->{$scol} cmp $cttpos->{$a}->{$scol} } keys(%$cttpos)){
@ -179,6 +179,8 @@ EOF
#print "$i (($id: $cttpos_timestamp <= $max_timestamp) && ($sum_parts19 <= $max_sum))<br>";
if($i==1){
$accounting_end = "$3.$2.$1" if($cttpos->{$id}->{itime} =~ /(\d+)\-(\d+)\-(\d+)/);
$accounting_end = "$3.$2.$1" if($cttpos->{$id}->{end_time} =~ /(\d+)\-(\d+)\-(\d+)/);
$accounting_start = $accounting_end;
}else{
$accounting_start = "$3.$2.$1" if($cttpos->{$id}->{itime} =~ /(\d+)\-(\d+)\-(\d+)/);
}