Lines 82-93
my $budget_arr =
Link Here
|
82 |
GetBudgetHierarchy( '', $user->{branchcode}, |
82 |
GetBudgetHierarchy( '', $user->{branchcode}, |
83 |
$template->{param_map}->{'USER_INFO'}[0]->{'borrowernumber'} ); |
83 |
$template->{param_map}->{'USER_INFO'}[0]->{'borrowernumber'} ); |
84 |
|
84 |
|
85 |
my $total = 0; |
|
|
86 |
my $totspent = 0; |
87 |
my $totordered = 0; |
88 |
my $totcomtd = 0; |
89 |
my $totavail = 0; |
90 |
|
91 |
my $total_active = 0; |
85 |
my $total_active = 0; |
92 |
my $totspent_active = 0; |
86 |
my $totspent_active = 0; |
93 |
my $totordered_active = 0; |
87 |
my $totordered_active = 0; |
Lines 121-131
foreach my $budget ( @{$budget_arr} ) {
Link Here
|
121 |
$budget->{'budget_avail'} = |
115 |
$budget->{'budget_avail'} = |
122 |
$budget->{'budget_amount'} - ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} ); |
116 |
$budget->{'budget_amount'} - ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} ); |
123 |
|
117 |
|
124 |
$total += $budget->{'budget_amount'}; |
|
|
125 |
$totspent += $budget->{'budget_spent'}; |
126 |
$totordered += $budget->{'budget_ordered'}; |
127 |
$totavail += $budget->{'budget_avail'}; |
128 |
|
129 |
if ($budget->{budget_period_active}){ |
118 |
if ($budget->{budget_period_active}){ |
130 |
$total_active += $budget->{'budget_amount'}; |
119 |
$total_active += $budget->{'budget_amount'}; |
131 |
$totspent_active += $budget->{'budget_spent'}; |
120 |
$totspent_active += $budget->{'budget_spent'}; |
Lines 142-152
$template->param(
Link Here
|
142 |
type => 'intranet', |
131 |
type => 'intranet', |
143 |
loop_budget => $budget_arr, |
132 |
loop_budget => $budget_arr, |
144 |
branchname => $branchname, |
133 |
branchname => $branchname, |
145 |
total => $num_formatter->format_price($total), |
|
|
146 |
totspent => $num_formatter->format_price($totspent), |
147 |
totordered => $num_formatter->format_price($totordered), |
148 |
totcomtd => $num_formatter->format_price($totcomtd), |
149 |
totavail => $num_formatter->format_price($totavail), |
150 |
total_active => $num_formatter->format_price($total_active), |
134 |
total_active => $num_formatter->format_price($total_active), |
151 |
totspent_active => $num_formatter->format_price($totspent_active), |
135 |
totspent_active => $num_formatter->format_price($totspent_active), |
152 |
totordered_active => $num_formatter->format_price($totordered_active), |
136 |
totordered_active => $num_formatter->format_price($totordered_active), |