@@ -, +, @@ --- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -342,15 +342,18 @@ [% 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 %] + [% SET index = loop.count %] + [% SET funds.${ index }.budget_name = loop_receive.budget.budget_name %] + [% IF (funds.${ index }.estimated == '') %] + [% SET funds.${ index }.estimated = 0 %] [% END %] - [% IF (funds.${ loop_receive.budget.budget_name }.actual == '') %] - [% SET funds.${ loop_receive.budget.budget_name }.actual = 0 %] + [% IF (funds.${ index }.actual == '') %] + [% SET funds.${ index }.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 %] + [% SET funds.${ index }.estimated = funds.${ index }.estimated + ( loop_receive.ecost * loop_receive.quantityreceived )%] + + [% SET funds.${ index }.actual = funds.${ loop_receive.budget.budget_name }.actual + loop_receive.total %] [% END %]
@@ -375,7 +378,7 @@ [% FOREACH key IN funds.keys.sort %] (Tax exc.) - Subtotal for [% key %] + Subtotal for [% funds.$key.budget_name %] [% currency( funds.$key.estimated ) %] [% currency( funds.$key.actual ) %]   --