diff --git a/copri4/main/src/Mod/Payment.pm b/copri4/main/src/Mod/Payment.pm index b208f73..46a2660 100755 --- a/copri4/main/src/Mod/Payment.pm +++ b/copri4/main/src/Mod/Payment.pm @@ -117,7 +117,7 @@ sub preauthorizationSEPA_main { my $pref = { table => "contenttrans", fetch => "one", - template_id => 205, + template_id => 218, c_id => $ctt->{c_id}, }; my $ctt_up = $dbt->fetch_record($dbh,$pref); @@ -133,9 +133,7 @@ sub preauthorizationSEPA_main { $ctt->{ct_name} = "$ctt_up->{ct_name}-1"; } } - if(!$ctt->{reference}){ - $ctt->{reference} = $dbt->{operator}->{$varenv->{dbname}}->{oprefix} . "-" . $ctt->{ct_name}; - } + $ctt->{reference} = $dbt->{operator}->{$varenv->{dbname}}->{oprefix} . "-S-" . $ctt->{ct_name}; #2019-05-18, makes only sense if int15 alias $sum_preauth > 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"; } } - if(!$ctt->{reference}){ - $ctt->{reference} = $dbt->{operator}->{$varenv->{dbname}}->{oprefix} . "-" . $ctt->{ct_name}; - } + $ctt->{reference} = $dbt->{operator}->{$varenv->{dbname}}->{oprefix} . "-C-" . $ctt->{ct_name}; #2019-05-18, makes only sense if int15 alias $sum_preauth > 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`; $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 - 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}"`); - $return_text .= "---> Sent Invoice Info e-mail\n"; - } + #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}"`); + # $return_text .= "---> Sent Invoice Info e-mail\n"; + #} } #TODO diff --git a/copri4/main/src/Mod/Prelogic.pm b/copri4/main/src/Mod/Prelogic.pm index 19a3446..cc97867 100755 --- a/copri4/main/src/Mod/Prelogic.pm +++ b/copri4/main/src/Mod/Prelogic.pm @@ -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 # #my $key_pdf; diff --git a/copri4/main/src/Mod/Printpreview.pm b/copri4/main/src/Mod/Printpreview.pm index 69a0ada..7a53cbf 100755 --- a/copri4/main/src/Mod/Printpreview.pm +++ b/copri4/main/src/Mod/Printpreview.pm @@ -229,7 +229,7 @@ td { #2.seite if($site_all > 1){ #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); $h_top +=250; &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 "