# 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
</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.',
[%- END %]
<table>
-[%#- subtotal %]
[%- UNLESS taxincluded %]
<tr>
<th align="right">Zwischensumme</th>
</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>',
[%- END %]
<table>
-[%#- subtotal %]
[%- UNLESS taxincluded %]
<tr>
<th align="right"><translate>Subtotal</translate></th>