Bug 8037: (follow-up) fix undefined variable warning during template processing
authorGalen Charlton <gmc@esilibrary.com>
Mon, 21 Oct 2013 23:49:01 +0000 (23:49 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 31 Oct 2013 15:17:44 +0000 (15:17 +0000)
Fix instances of the following warning appearing in the Apache log:

... parcel.pl: Argument "" isn't numeric in addition (+)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt

index 7fe6460..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 %]