|
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 |
foreach my $budget ( @{$budget_arr} ) { |
85 |
foreach my $budget ( @{$budget_arr} ) { |
| 92 |
|
86 |
|
| 93 |
$budget->{budget_code_indent} =~ s/\ /\ \;/g; |
87 |
$budget->{budget_code_indent} =~ s/\ /\ \;/g; |
|
Lines 116-126
foreach my $budget ( @{$budget_arr} ) {
Link Here
|
| 116 |
$budget->{'budget_avail'} = |
110 |
$budget->{'budget_avail'} = |
| 117 |
$budget->{'budget_amount'} - ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} ); |
111 |
$budget->{'budget_amount'} - ( $budget->{'budget_spent'} + $budget->{'budget_ordered'} ); |
| 118 |
|
112 |
|
| 119 |
$total += $budget->{'budget_amount'}; |
|
|
| 120 |
$totspent += $budget->{'budget_spent'}; |
| 121 |
$totordered += $budget->{'budget_ordered'}; |
| 122 |
$totavail += $budget->{'budget_avail'}; |
| 123 |
|
| 124 |
for my $field (qw( budget_amount budget_spent budget_ordered budget_avail ) ) { |
113 |
for my $field (qw( budget_amount budget_spent budget_ordered budget_avail ) ) { |
| 125 |
$budget->{$field} = $num_formatter->format_price( $budget->{$field} ); |
114 |
$budget->{$field} = $num_formatter->format_price( $budget->{$field} ); |
| 126 |
} |
115 |
} |
|
Lines 130-140
$template->param(
Link Here
|
| 130 |
type => 'intranet', |
119 |
type => 'intranet', |
| 131 |
loop_budget => $budget_arr, |
120 |
loop_budget => $budget_arr, |
| 132 |
branchname => $branchname, |
121 |
branchname => $branchname, |
| 133 |
total => $num_formatter->format_price($total), |
|
|
| 134 |
totspent => $num_formatter->format_price($totspent), |
| 135 |
totordered => $num_formatter->format_price($totordered), |
| 136 |
totcomtd => $num_formatter->format_price($totcomtd), |
| 137 |
totavail => $num_formatter->format_price($totavail), |
| 138 |
suggestions_count => $suggestions_count, |
122 |
suggestions_count => $suggestions_count, |
| 139 |
); |
123 |
); |
| 140 |
|
124 |
|