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
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),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt (-12 lines)
Lines 99-115 $(document).ready(function() { Link Here
99
            <th>Avail</th>
99
            <th>Avail</th>
100
        </tr>
100
        </tr>
101
        </thead>
101
        </thead>
102
        <tfoot>
103
        <tr>
104
            <th>Total</th>
105
            <th>&nbsp;</th>
106
            <th>&nbsp;</th>
107
            <th align="right" ><span class="bu_active" style="display : none;">[% total %]</span><span class="bu_inactive" >[% total_active %]</span></th>
108
            <th align="right" ><span class="bu_active" style="display : none;">[% totordered %]</span><span class="bu_inactive" >[% totordered_active %]</span></th>
109
            <th align="right" ><span class="bu_active" style="display : none;">[% totspent %]</span><span class="bu_inactive" >[% totspent_active %]</span></th>
110
            <th align="right" ><span class="bu_active" style="display : none;">[% totavail %]</span><span class="bu_inactive" >[% totavail_active %]</span></th>
111
        </tr>
112
        </tfoot>
113
        <tbody>
102
        <tbody>
114
        [% FOREACH loop_budge IN loop_budget %]
103
        [% FOREACH loop_budge IN loop_budget %]
115
	    [% IF ( loop_budge.budget_period_active ) %]
104
	    [% IF ( loop_budge.budget_period_active ) %]
116
- 

Return to bug 6080