@@ -, +, @@ acqui home --- acqui/acqui-home.pl | 2 ++ .../prog/en/modules/acqui/acqui-home.tt | 32 +++++++++++++++---- 2 files changed, 28 insertions(+), 6 deletions(-) --- a/acqui/acqui-home.pl +++ a/acqui/acqui-home.pl @@ -95,6 +95,8 @@ foreach my $budget ( @{$budget_arr} ) { } $budget->{'budget_avail'} = $budget->{'budget_amount'} - ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} ); + $budget->{'total_avail'} = + $budget->{'budget_amount'} - ( $budget->{'total_spent'} + $budget->{'total_ordered'} ); $total += $budget->{'budget_amount'}; $totspent += $budget->{'budget_spent'}; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -159,16 +159,36 @@ - [% loop_budge.budget_ordered | $Price %] - + [% IF !loop_budge.budget_parent_id %] + + ([% loop_budge.budget_ordered | $Price %]) + + [% loop_budge.total_ordered | $Price %] + [% ELSE %] + + [% loop_budge.budget_ordered | $Price %] + + [% END %] - - [% loop_budge.budget_spent | $Price %] - + [% IF !loop_budge.budget_parent_id %] + + ([% loop_budge.budget_spent | $Price %]) + + [% loop_budge.total_spent | $Price %] + [% ELSE %] + + [% loop_budge.budget_spent | $Price %] + + [% END %] - [% loop_budge.budget_avail | $Price %] + [% IF !loop_budge.budget_parent_id %] + ([% loop_budge.budget_avail | $Price %]) + [% loop_budge.total_avail | $Price %] + [% ELSE %] + [% loop_budge.budget_avail | $Price %] + [% END %] [% END %] --