Bug 8037: (follow-up) fix undefined variable warning during template processing
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / parcel.tt
index 3bd842e..db6783b 100644 (file)
        [% SET estimated_total = 0 %]
 
        [% FOREACH loop_receive IN loop_received %]
+           [% IF (funds.${ loop_receive.budget.budget_name }.estimated == '') %]
+              [% SET funds.${ loop_receive.budget.budget_name }.estimated = 0 %]
+           [% END %]
+           [% IF (funds.${ loop_receive.budget.budget_name }.actual == '') %]
+              [% SET funds.${ loop_receive.budget.budget_name }.actual = 0 %]
+           [% END %]
            [% SET estimated_total = estimated_total + ( loop_receive.ecost * loop_receive.quantityreceived ) %]
            [% SET funds.${ loop_receive.budget.budget_name }.estimated = funds.${ loop_receive.budget.budget_name }.estimated + ( loop_receive.ecost * loop_receive.quantityreceived )%]
            [% SET funds.${ loop_receive.budget.budget_name }.actual = funds.${ loop_receive.budget.budget_name }.actual + loop_receive.total %]
     <tfoot>
         [% FOREACH key IN funds.keys.sort %]
             <tr>
-                <td colspan="6" class="total font-weight-normal"><i>(GST exc.)</i></td>
+                <td colspan="6" class="total">(Tax exc.)</td>
                 <td><i>Subtotal for</i> [% key %]</td>
                 <td>[% currency( funds.$key.estimated ) %]</td>
                 <td>[% currency( funds.$key.actual ) %]</td>