Wiedervorlagen korrekt anzeigen.
authorSven Schöling <s.schoeling@linet-services.de>
Fri, 6 Nov 2009 12:21:44 +0000 (13:21 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Fri, 6 Nov 2009 12:21:44 +0000 (13:21 +0100)
bin/mozilla/is.pl
templates/webpages/is/form_footer_de.html
templates/webpages/is/form_footer_master.html

index 797c260..b1aa9f3 100644 (file)
@@ -404,7 +404,7 @@ sub form_footer {
   # follow ups
   if ($form->{id}) {
     $form->{follow_ups}            = FU->follow_ups('trans_id' => $form->{id}) || [];
-    $form->{follow_ups_unfinished} = sum map { $_->{due} * 1 } @{ $form->{follow_ups} };
+    $form->{follow_ups_unfinished} = ( sum map { $_->{due} * 1 } @{ $form->{follow_ups} } ) || 0;
   }
 
   # payments
index 66283ec..bb8ac22 100644 (file)
@@ -32,7 +32,7 @@
           </script>
          </td>
         </tr>
-[%- IF id %]
+[%- IF id && follow_ups.size %]
         <tr>
           <td colspan="2">
             [%- LxERP.format_string('Es gibt #1 Wiedervorlage(n), von denen #2 fällig ist/sind.',
@@ -66,7 +66,6 @@
   [%- END %]
        <table>
 
-[%#- subtotal %]
 [%- UNLESS taxincluded %]
         <tr>
          <th align="right">Zwischensumme</th>
index a3d53fd..f780367 100644 (file)
@@ -32,7 +32,7 @@
           </script>
          </td>
         </tr>
-[%- IF id %]
+[%- IF id && follow_ups.size %]
         <tr>
           <td colspan="2">
             [%- LxERP.format_string('<translate>There are #1 unfinished follow-ups of which #2 are due.</translate>',
@@ -66,7 +66,6 @@
   [%- END %]
        <table>
 
-[%#- subtotal %]
 [%- UNLESS taxincluded %]
         <tr>
          <th align="right"><translate>Subtotal</translate></th>