From 01ddabbad28cd1b523b8a2d79710069d02f51f70 Mon Sep 17 00:00:00 2001 From: ragu Date: Tue, 1 Aug 2023 14:26:20 +0200 Subject: [PATCH] some minor mailing-footer fixes --- copri4/main/src/Mod/MailTransport.pm | 4 +-- copri4/main/src/Mod/Printpreview.pm | 39 +++++++-------------- copri4/main/src/scripts/mailTransportcms.pl | 11 +++--- 3 files changed, 21 insertions(+), 33 deletions(-) diff --git a/copri4/main/src/Mod/MailTransport.pm b/copri4/main/src/Mod/MailTransport.pm index 86c5a80..9bc6af7 100755 --- a/copri4/main/src/Mod/MailTransport.pm +++ b/copri4/main/src/Mod/MailTransport.pm @@ -95,7 +95,7 @@ sub mail_transport(){ $html .= ""; - $bw->log("Trying send_mail by $0",$mail_to,""); + print EMA "Trying send_mail by $0 to $mail_to\n"; print EMA Dumper($sendref); if(ref($sendref) eq "HASH"){ @@ -109,7 +109,7 @@ sub mail_transport(){ $smtp->datasend("To: $mail_to\n"); $smtp->datasend("Bcc: $mail_bcc\n") if($mail_bcc); $smtp->datasend("Subject: $subject\n"); - $smtp->datasend("\n") if(!$attachBinaryFile); + #$smtp->datasend("\n") if(!$attachBinaryFile); $smtp->datasend("MIME-Version: 1.0\n"); $smtp->datasend("Content-type: multipart/mixed;\n\tboundary=\"$boundary\"\n"); $smtp->datasend("\n"); diff --git a/copri4/main/src/Mod/Printpreview.pm b/copri4/main/src/Mod/Printpreview.pm index fc93b3b..facb1ba 100755 --- a/copri4/main/src/Mod/Printpreview.pm +++ b/copri4/main/src/Mod/Printpreview.pm @@ -171,7 +171,7 @@ td { my $site_all=1; my $header_top = 0; - my $footer_px = 1780; + my $footer_px = 1800; my $footer_top = $footer_px;#end 1.site my $sum_paid = 0; @@ -949,7 +949,7 @@ td { my @txt12 = split (/;/,"$ctf->{txt12}");#Geschäftsführer my @txt19 = split (/;/,"$ctf->{txt19}");#Bank usw. - my $top2 = $footer_top + 120; + my $top2 = $footer_top + 150; $footer_top .= "px"; $top2 .= "px"; print PMA "sub text_footer --> footer_top: $footer_top | top2: $top2\n"; @@ -984,10 +984,10 @@ td { print "
\n"; } - print $q->start_table({-width=>'100%',-border=>'0',-align=>'center', -cellpadding=>'2', -cellspacing=>'0'}); + print $q->start_table({-width=>'100%',-border=>'0',-align=>'left', -cellpadding=>'0', -cellspacing=>'0'}); print ""; - print ""; + print ""; print $q->start_table({-border=>'0',-align=>'left'}); print $q->Tr(); print $q->td({-class=>'tdpdf2'}, "$txt12[0]"),"\n"; @@ -1000,7 +1000,7 @@ td { print $q->end_table; print ""; - print ""; + print ""; print $q->start_table({-border=>'0',-align=>'left'}); print $q->Tr(); print $q->td({-class=>'tdpdf2'}, "TEL: $ctf->{txt07}"),"\n"; @@ -1010,18 +1010,10 @@ td { print $q->td({-class=>'tdpdf2'}, "$txt11[0]"),"\n"; print $q->Tr(); print $q->td({-class=>'tdpdf2'}, "$txt11[1]"),"\n"; - print $q->Tr(); - print $q->td({-class=>'tdpdf2'}, "$txt11[2]"),"\n"; - print $q->Tr(); - print $q->td({-class=>'tdpdf2'}, "$txt11[3]"),"\n"; - print $q->Tr(); - print $q->td({-class=>'tdpdf2'}, "$txt11[4]"),"\n"; - print $q->Tr(); - print $q->td({-class=>'tdpdf2'}, "$txt11[5]"),"\n"; - print $q->end_table; print ""; - print ""; + + print ""; print $q->start_table({-border=>'0',-align=>'left'}); print $q->Tr(); print $q->td({-class=>'tdpdf2'}, "$txt19[0]"),"\n"; @@ -1031,24 +1023,17 @@ td { print $q->td({-class=>'tdpdf2'}, "$txt19[2]"),"\n"; print $q->Tr(); print $q->td({-class=>'tdpdf2'}, "$txt19[3]"),"\n"; + print $q->end_table; + print ""; + + print ""; + print $q->start_table({-border=>'0',-align=>'left'}); print $q->Tr(); print $q->td({-class=>'tdpdf2'}, "$txt19[4]"),"\n"; print $q->Tr(); print $q->td({-class=>'tdpdf2'}, "$txt19[5]"),"\n"; - print $q->end_table; - print ""; - print ""; - print $q->start_table({-width=>'100%',-border=>'0',-align=>'left'}); print $q->Tr(); print $q->td({-class=>'tdpdf2'}, "$txt19[6]"),"\n"; - print $q->Tr(); - print $q->td({-class=>'tdpdf2'}, "$txt19[7]"),"\n"; - print $q->Tr(); - print $q->td({-class=>'tdpdf2'}, "$txt19[8]"),"\n"; - print $q->Tr(); - print $q->td({-class=>'tdpdf2'}, "$txt19[9]"),"\n"; - print $q->Tr(); - print $q->td({-class=>'tdpdf2'}, "$txt19[10]"),"\n"; print $q->end_table; print ""; diff --git a/copri4/main/src/scripts/mailTransportcms.pl b/copri4/main/src/scripts/mailTransportcms.pl index fb9ba72..a7d4e33 100755 --- a/copri4/main/src/scripts/mailTransportcms.pl +++ b/copri4/main/src/scripts/mailTransportcms.pl @@ -178,7 +178,7 @@ sub send_invoice { my $ctt = { c_id => 0 }; $ctt = $dbt->fetch_tablerecord($dbh,$fetchctt); - $sendref = prepare_content($sendref,$ctadr,$uadr,$ctt,$varenv{cms}->{$cms_message_key}->{txt}); + $sendref = prepare_content($sendref,$ctadr,$uadr,$ctt,$varenv{cms}->{$cms_message_key}->{txt},$with_pdf); my $updatectt = { table => "contenttrans", @@ -461,7 +461,8 @@ sub prepare_content { my $ctadr = shift; my $uadr = shift; my $ctt = shift || {}; - my $cms_prim = shift; + my $cms_prim = shift || ""; + my $with_pdf = shift || ""; my $app_name = "Mietrad App"; $app_name = $dbt->{operator}->{$varenv{dbname}}->{app_name}; @@ -470,7 +471,7 @@ sub prepare_content { my $sharee_ticket = ""; if(ref($ctt) eq "HASH" && $ctt->{ct_name}){ $invoice_name = "$ctt->{txt00}-$varenv{dbname}-$ctt->{ct_name}.pdf"; - $sendref->{attachment} = "$invoice_name"; + $sendref->{attachment} = "$invoice_name" if($with_pdf); $invoice_nr = "$varenv{dbname}-$ctt->{ct_name}"; $sharee_ticket = "[$invoice_nr]"; } @@ -489,7 +490,9 @@ my $signature = <{txt07} $uadr->{txt08} - $uadr->{txt84} + $uadr->{txt09} + + $uadr->{txt10} EOF ;