@@ -, +, @@ module home page |____ Book |_____ Adult fiction --- acqui/acqui-home.pl | 8 +++++++- .../intranet-tmpl/prog/en/modules/acqui/acqui-home.tt | 16 +++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) --- a/acqui/acqui-home.pl +++ a/acqui/acqui-home.pl @@ -78,6 +78,12 @@ foreach my $budget ( @{$budget_arr} ) { if ( !defined $budget->{budget_amount} ) { $budget->{budget_amount} = 0; } + + $budget->{'budget_ordered'} = GetBudgetOrdered( $budget->{'budget_id'} ); + $budget->{'budget_spent'} = GetBudgetSpent( $budget->{'budget_id'} ); + $budget->{'total_spent'} = GetBudgetHierarchySpent( $budget->{'budget_id'} ) // 0; + $budget->{'total_ordered'} = GetBudgetHierarchyOrdered( $budget->{'budget_id'} ) // 0; + if ( !defined $budget->{budget_spent} ) { $budget->{budget_spent} = 0; } @@ -85,7 +91,7 @@ foreach my $budget ( @{$budget_arr} ) { $budget->{budget_ordered} = 0; } $budget->{'budget_avail'} = - $budget->{'budget_amount'} - ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} ); + $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 @@ -85,8 +85,10 @@