View | Details | Raw Unified | Return to bug 6080
Collapse All | Expand All

(-)a/acqui/acqui-home.pl (-16 lines)
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/\ /\&nbsp\;/g;
87
    $budget->{budget_code_indent} =~ s/\ /\&nbsp\;/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
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tmpl (-12 lines)
Lines 78-94 Link Here
78
            <th>Avail</th>
78
            <th>Avail</th>
79
        </tr>
79
        </tr>
80
        </thead>
80
        </thead>
81
        <tfoot>
82
        <tr>
83
            <th>Total</th>
84
            <th>&nbsp;</th>
85
            <th>&nbsp;</th>
86
            <th align="right" ><!-- TMPL_VAR name="total" --></th>
87
            <th align="right" ><!-- TMPL_VAR name="totordered" --></th>
88
            <th align="right" ><!-- TMPL_VAR name="totspent" --></th>
89
            <th align="right" ><!-- TMPL_VAR name="totavail" --></th>
90
        </tr>
91
        </tfoot>
92
        <tbody>
81
        <tbody>
93
        <!-- TMPL_LOOP name="loop_budget" -->
82
        <!-- TMPL_LOOP name="loop_budget" -->
94
            <!--TMPL_IF NAME="__odd__" -->
83
            <!--TMPL_IF NAME="__odd__" -->
95
- 

Return to bug 6080