payment operator reference

This commit is contained in:
Rainer Gümpelein 2022-02-04 15:42:58 +01:00
parent 2fca1ea00d
commit ba041a56b6
4 changed files with 20 additions and 21 deletions

View file

@ -117,7 +117,7 @@ sub preauthorizationSEPA_main {
my $pref = { my $pref = {
table => "contenttrans", table => "contenttrans",
fetch => "one", fetch => "one",
template_id => 205, template_id => 218,
c_id => $ctt->{c_id}, c_id => $ctt->{c_id},
}; };
my $ctt_up = $dbt->fetch_record($dbh,$pref); my $ctt_up = $dbt->fetch_record($dbh,$pref);
@ -133,9 +133,7 @@ sub preauthorizationSEPA_main {
$ctt->{ct_name} = "$ctt_up->{ct_name}-1"; $ctt->{ct_name} = "$ctt_up->{ct_name}-1";
} }
} }
if(!$ctt->{reference}){ $ctt->{reference} = $dbt->{operator}->{$varenv->{dbname}}->{oprefix} . "-S-" . $ctt->{ct_name};
$ctt->{reference} = $dbt->{operator}->{$varenv->{dbname}}->{oprefix} . "-" . $ctt->{ct_name};
}
#2019-05-18, makes only sense if int15 alias $sum_preauth > 0 #2019-05-18, makes only sense if int15 alias $sum_preauth > 0
if($ctadr->{c_id} && $ctt->{c_id} && $ctt->{int15} > 0){ if($ctadr->{c_id} && $ctt->{c_id} && $ctt->{int15} > 0){
@ -242,9 +240,7 @@ sub preauthorizationCC_main {
$ctt->{ct_name} = "$ctt_up->{ct_name}-1"; $ctt->{ct_name} = "$ctt_up->{ct_name}-1";
} }
} }
if(!$ctt->{reference}){ $ctt->{reference} = $dbt->{operator}->{$varenv->{dbname}}->{oprefix} . "-C-" . $ctt->{ct_name};
$ctt->{reference} = $dbt->{operator}->{$varenv->{dbname}}->{oprefix} . "-" . $ctt->{ct_name};
}
#2019-05-18, makes only sense if int15 alias $sum_preauth > 0 #2019-05-18, makes only sense if int15 alias $sum_preauth > 0
if($ctadr->{c_id} && $ctt->{c_id} && $ctt->{int15} > 0){ if($ctadr->{c_id} && $ctt->{c_id} && $ctt->{int15} > 0){
@ -687,11 +683,12 @@ sub payone_capture(){
my $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\&wc=$wc_line" $varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf 2>&1`; my $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\&wc=$wc_line" $varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf 2>&1`;
$return_text .= "$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\&wc=$wc_line\" $varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf\n"; $return_text .= "$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\&wc=$wc_line\" $varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf\n";
#FIXME to new mailTarnsport
#send_invoice infomail #send_invoice infomail
if(-f "$varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf"){ #if(-f "$varenv->{pdf}/$praefix-$ctt->{ct_name}.pdf"){
system(`$varenv->{basedir}/src/Mod/newsletter_tink.pl "$varenv->{basedir}" "$varenv->{wwwhost}" "send_invoice" "$ctadr->{c_id}" "$ctt->{ct_name}"`); # system(`$varenv->{basedir}/src/Mod/newsletter_tink.pl "$varenv->{basedir}" "$varenv->{wwwhost}" "send_invoice" "$ctadr->{c_id}" "$ctt->{ct_name}"`);
$return_text .= "---> Sent Invoice Info e-mail\n"; # $return_text .= "---> Sent Invoice Info e-mail\n";
} #}
} }
#TODO #TODO

View file

@ -1007,7 +1007,7 @@ sub preinit(){
} }
} }
if(-f "$varenv{basedir}/pdf/$praefix-$ctt->{ct_name}.pdf" && (($R::set_state eq "buchen" && $R::send_invoice) || ($ib_key eq "send_invoice_again"))){ if(-f "$varenv{basedir}/pdf/$praefix-$ctt->{ct_name}.pdf" && (($R::set_state eq "buchen" && $R::send_invoice && $ctt->{int01} && $ctt->{int01} != 0) || ($ib_key eq "send_invoice_again"))){
#sleep 3;#PDF invoice sending disabled because of partly empty invoices #sleep 3;#PDF invoice sending disabled because of partly empty invoices
# #
#my $key_pdf; #my $key_pdf;

View file

@ -229,7 +229,7 @@ td {
#2.seite #2.seite
if($site_all > 1){ if($site_all > 1){
#Alles horizontal absolut zum obersten Punkt ausrichten #Alles horizontal absolut zum obersten Punkt ausrichten
$h_top = $footer_top + 270;# second header top, depence from footer_top $h_top = $footer_top + 220;# second header top, depence from footer_top
&header_small($h_top,$mandant_main_id,$logo); &header_small($h_top,$mandant_main_id,$logo);
$h_top +=250; $h_top +=250;
&data_invoice($h_top,$vendor,$kd_nr,$mandat_nr,$ctt->{txt00},$ct_name2print,$mtime); &data_invoice($h_top,$vendor,$kd_nr,$mandat_nr,$ctt->{txt00},$ct_name2print,$mtime);
@ -273,7 +273,7 @@ td {
print $q->start_table({-width=>'100%',-border=>'0',-align=>'center', -cellpadding=>'3', -cellspacing=>'0'}),"\n"; print $q->start_table({-width=>'100%',-border=>'0',-align=>'center', -cellpadding=>'3', -cellspacing=>'0'}),"\n";
print "<tr>\n"; print "<tr>\n";
print "<td style='border:0px solid black;vertical-align:top;width:65%;height:250px;padding:0 0 0 2em;'>\n"; print "<td style='border:0px solid black;vertical-align:top;width:60%;height:250px;padding:0 0 0 2em;'>\n";
print $q->start_table({-width=>'100%',-border=>'0',-align=>'left', -cellpadding=>'3', -cellspacing=>'0'}),"\n"; print $q->start_table({-width=>'100%',-border=>'0',-align=>'left', -cellpadding=>'3', -cellspacing=>'0'}),"\n";
print $q->Tr(); print $q->Tr();
print $q->td({-class=>'tdpdf4', -style=>'padding-bottom:0.8em;text-decoration:underline;color:black;'}, "$ctf->{txt01} | $ctf->{txt02} | $ctf->{txt03}","\n"); print $q->td({-class=>'tdpdf4', -style=>'padding-bottom:0.8em;text-decoration:underline;color:black;'}, "$ctf->{txt01} | $ctf->{txt02} | $ctf->{txt03}","\n");
@ -295,8 +295,10 @@ td {
$txid = "Verwendungszweck TXID: $ctt->{txt16}" if($ctt->{txt16} && $ctt->{state} =~ /payone/i); $txid = "Verwendungszweck TXID: $ctt->{txt16}" if($ctt->{txt16} && $ctt->{state} =~ /payone/i);
my $mailaccount = ""; my $mailaccount = "";
$mailaccount = "Account: $ctt->{txt08}" if($ctt->{txt08}); $mailaccount = "Account: $ctt->{txt08}" if($ctt->{txt08});
my $invoice_period = "";
$invoice_period = "Leistungszeitraum: $ctt->{txt20}" if($ctt->{txt20});
print "<td style='width:35%;vertical-align:right;border:0px solid black;'>"; print "<td style='width:40%;vertical-align:right;border:0px solid black;'>";
print $q->start_table({-border=>'0',-align=>'right', -cellpadding=>'0', -cellspacing=>'0'}); print $q->start_table({-border=>'0',-align=>'right', -cellpadding=>'0', -cellspacing=>'0'});
print $q->Tr(); print $q->Tr();
print $q->td({-style=>'padding:2em 0;'},"&nbsp;"),"\n"; print $q->td({-style=>'padding:2em 0;'},"&nbsp;"),"\n";
@ -305,14 +307,12 @@ td {
print $q->Tr(); print $q->Tr();
print $q->td({-class=>'tdpdf5'}, "$mailaccount"),"\n"; print $q->td({-class=>'tdpdf5'}, "$mailaccount"),"\n";
print $q->Tr(); print $q->Tr();
print $q->td({-class=>'tdpdf5'}, "Leistungsdatum: $ctt->{txt20}"),"\n"; print $q->td({-class=>'tdpdf5'}, "$invoice_period"),"\n";
print $q->end_table; print $q->end_table;
print "</td>"; print "</td>";
print "</tr>"; print "</tr>";
print $q->end_table; print $q->end_table;
#print $q->div({-style=>"text-align:right;width:$width;font-size:1em;"},"Login: $ctt->{txt08}&nbsp;"),"\n";
#print $q->div({-style=>"text-align:right;width:$width;font-size:1em;"},"Leistungsdatum: $ctt->{txt20}&nbsp;"),"\n" if($ctt->{txt20});
} }
#end Adresse #end Adresse
@ -489,8 +489,8 @@ td {
if("$key" eq "ct_name"){ if("$key" eq "ct_name"){
my $ct_pos = ""; my $ct_pos = "";
if($cttpos->{$id}->{int09}){#if Tarif defined if($cttpos->{$id}->{int09}){#if Tarif defined
$ct_pos = "Endstation: $cttpos->{$id}->{int04} &nbsp;" if($cttpos->{$id}->{int04}); $ct_pos = "Endstation: $cttpos->{$id}->{txt13}$cttpos->{$id}->{int04}<br />" if($cttpos->{$id}->{int04});
$ct_pos .= "Rad: $cttpos->{$id}->{ct_name}"; $ct_pos .= "Mietrad: $cttpos->{$id}->{ct_name}";
}else{ }else{
$ct_pos = "$cttpos->{$id}->{ct_name}"; $ct_pos = "$cttpos->{$id}->{ct_name}";
} }

View file

@ -700,7 +700,9 @@ sub tpl(){
} }
} keys(%$ct4rel)){ } keys(%$ct4rel)){
my ($set_style,$set_style4nr,$sum_error); my $set_style = "";
my $set_style4nr = "";
my $sum_error = 0;
my $ecol=0; my $ecol=0;
if($ct4rel->{$id}->{int01} > 0 && $ct4rel->{$id}->{int03} > 0){ if($ct4rel->{$id}->{int01} > 0 && $ct4rel->{$id}->{int03} > 0){