X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/8c7e44938a661e035f62840e1e177353240ace5d..03ea97647e3fbdea4323f4f2136bdfa87cb15c1b:/bin/mozilla/is.pl diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 975cb9479..b632b389f 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -31,10 +31,11 @@ # #====================================================================== +use SL::FU; use SL::IS; use SL::PE; use Data::Dumper; -use List::Util qw(max); +use List::Util qw(max sum); require "bin/mozilla/io.pl"; require "bin/mozilla/invoice_io.pl"; @@ -574,6 +575,11 @@ sub form_header { } $credittext = $locale->text('Credit Limit exceeded!!!'); + + my $follow_up_vc = $form->{customer}; + $follow_up_vc =~ s/--.*?//; + my $follow_up_trans_info = "$form->{invnumber} ($follow_up_vc)"; + $onload = ($form->{resubmit} && ($form->{format} eq "html")) ? qq|window.open('about:blank','Beleg'); document.invoice.target = 'Beleg';document.invoice.submit()| : ($form->{resubmit}) ? qq|document.invoice.submit()| : ($creditwarning) ? qq|alert('$credittext')| @@ -599,6 +605,7 @@ sub form_header { +
| ; @@ -614,6 +621,11 @@ sub form_header { print qq| + + + + +
$form->{title}
@@ -860,6 +872,20 @@ sub form_footer { $form->{invtotal} = $form->format_amount(\%myconfig, $form->{invtotal}, 2, 0); + my $follow_ups_block; + if ($form->{id}) { + my $follow_ups = FU->follow_ups('trans_id' => $form->{id}); + + if (@{ $follow_ups} ) { + my $num_due = sum map { $_->{due} * 1 } @{ $follow_ups }; + $follow_ups_block = qq| + + | . $locale->text("There are #1 unfinished follow-ups of which #2 are due.", scalar @{ $follow_ups }, $num_due) . qq| + +|; + } + } + print qq| @@ -878,6 +904,7 @@ sub form_footer { + $follow_ups_block @@ -1095,18 +1122,18 @@ if ($form->{type} eq "credit_note") { print qq| |; - if ($form->{id} && !($form->{type} eq "credit_note")) { - print qq| + if ($form->{id} && !($form->{type} eq "credit_note")) { + print qq| |; - } + } if ($form->{radier}) { print qq| |; - } + } if ($invdate > $closedto) { @@ -1116,6 +1143,11 @@ if ($form->{type} eq "credit_note") { |; } + print qq| + |; + } else { if ($invdate > $closedto) { print qq|