From eaf4730abe6002e52192076376a15729447f2939 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 21 Oct 2013 23:49:01 +0000 Subject: [PATCH] Bug 8037: (follow-up) fix undefined variable warning during template processing Fix instances of the following warning appearing in the Apache log: ... parcel.pl: Argument "" isn't numeric in addition (+) Signed-off-by: Galen Charlton --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index 7fe64606d0..db6783b81f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -305,6 +305,12 @@ [% 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 %] -- 2.20.1