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

(-)a/acqui/acqui-home.pl (-1 / +17 lines)
Lines 88-93 my $totordered = 0; Link Here
88
my $totcomtd   = 0;
88
my $totcomtd   = 0;
89
my $totavail   = 0;
89
my $totavail   = 0;
90
90
91
my $total_active        = 0;
92
my $totspent_active     = 0;
93
my $totordered_active   = 0;
94
my $totavail_active     = 0;
95
91
foreach my $budget ( @{$budget_arr} ) {
96
foreach my $budget ( @{$budget_arr} ) {
92
97
93
    $budget->{budget_code_indent} =~ s/\ /\&nbsp\;/g;
98
    $budget->{budget_code_indent} =~ s/\ /\&nbsp\;/g;
Lines 121-126 foreach my $budget ( @{$budget_arr} ) { Link Here
121
    $totordered += $budget->{'budget_ordered'};
126
    $totordered += $budget->{'budget_ordered'};
122
    $totavail   += $budget->{'budget_avail'};
127
    $totavail   += $budget->{'budget_avail'};
123
128
129
    if ($budget->{budget_period_active}){
130
	$total_active      += $budget->{'budget_amount'};
131
	$totspent_active   += $budget->{'budget_spent'};
132
	$totordered_active += $budget->{'budget_ordered'};
133
	$totavail_active   += $budget->{'budget_avail'};    
134
    }
135
124
    for my $field (qw( budget_amount budget_spent budget_ordered budget_avail ) ) {
136
    for my $field (qw( budget_amount budget_spent budget_ordered budget_avail ) ) {
125
        $budget->{$field} = $num_formatter->format_price( $budget->{$field} );
137
        $budget->{$field} = $num_formatter->format_price( $budget->{$field} );
126
    }
138
    }
Lines 135-141 $template->param( Link Here
135
    totordered    => $num_formatter->format_price($totordered),
147
    totordered    => $num_formatter->format_price($totordered),
136
    totcomtd      => $num_formatter->format_price($totcomtd),
148
    totcomtd      => $num_formatter->format_price($totcomtd),
137
    totavail      => $num_formatter->format_price($totavail),
149
    totavail      => $num_formatter->format_price($totavail),
138
    suggestions_count    => $suggestions_count,
150
    total_active  => $num_formatter->format_price($total_active),
151
    totspent_active     => $num_formatter->format_price($totspent_active),
152
    totordered_active   => $num_formatter->format_price($totordered_active),
153
    totavail_active     => $num_formatter->format_price($totavail_active),
154
    suggestions_count   => $suggestions_count,
139
);
155
);
140
156
141
output_html_with_http_headers $query, $cookie, $template->output;
157
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tmpl (-6 / +41 lines)
Lines 1-6 Link Here
1
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
1
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2
<title>Koha &rsaquo; Acquisitions</title>
2
<title>Koha &rsaquo; Acquisitions</title>
3
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
3
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4
<script type="text/javascript">
5
//<![CDATA[
6
$(document).ready(function() {
7
    $('#showallbudgets').click(function() {
8
	if ( $('#showallbudgets:checked').val() !== undefined) {
9
	    $('.b_inactive').show();
10
	    $('#b_inactive').show();
11
	    $('.bu_active').show();
12
	    $('.bu_inactive').hide();
13
	}
14
	else {
15
	    $('.b_inactive').hide();
16
	    $('#b_inactive').hide();
17
	    $('.bu_inactive').show();
18
	    $('.bu_active').hide();
19
	}
20
    });
21
});
22
//]]>
23
</script>
24
4
</head>
25
</head>
5
<body>
26
<body>
6
<!-- TMPL_INCLUDE NAME="header.inc" -->
27
<!-- TMPL_INCLUDE NAME="header.inc" -->
Lines 83-96 Link Here
83
            <th>Total</th>
104
            <th>Total</th>
84
            <th>&nbsp;</th>
105
            <th>&nbsp;</th>
85
            <th>&nbsp;</th>
106
            <th>&nbsp;</th>
86
            <th align="right" ><!-- TMPL_VAR name="total" --></th>
107
            <th align="right" ><span class="bu_active" style="display : none;"><!-- TMPL_VAR name="total" --></span><span class="bu_inactive" ><!-- TMPL_VAR name="total_active" --></span></th>
87
            <th align="right" ><!-- TMPL_VAR name="totordered" --></th>
108
            <th align="right" ><span class="bu_active" style="display : none;"><!-- TMPL_VAR name="totordered" --></span><span class="bu_inactive" ><!-- TMPL_VAR name="totordered_active" --></span></th>
88
            <th align="right" ><!-- TMPL_VAR name="totspent" --></th>
109
            <th align="right" ><span class="bu_active" style="display : none;"><!-- TMPL_VAR name="totspent" --></span><span class="bu_inactive" ><!-- TMPL_VAR name="totspent_active" --></span></th>
89
            <th align="right" ><!-- TMPL_VAR name="totavail" --></th>
110
            <th align="right" ><span class="bu_active" style="display : none;"><!-- TMPL_VAR name="totavail" --></span><span class="bu_inactive" ><!-- TMPL_VAR name="totavail_active" --></span></th>
90
        </tr>
111
        </tr>
91
        </tfoot>
112
        </tfoot>
92
        <tbody>
113
        <tbody>
93
        <!-- TMPL_LOOP name="loop_budget" -->
114
        <!-- TMPL_LOOP name="loop_budget" -->
115
	    <!-- TMPL_IF NAME="budget_period_active" -->
94
            <!--TMPL_IF NAME="__odd__" -->
116
            <!--TMPL_IF NAME="__odd__" -->
95
                <tr>
117
                <tr>
96
            <!--TMPL_ELSE-->
118
            <!--TMPL_ELSE-->
Lines 104-113 Link Here
104
                <td align="right" ><!-- TMPL_VAR name="budget_spent" --></td>
126
                <td align="right" ><!-- TMPL_VAR name="budget_spent" --></td>
105
                <td align="right" ><!-- TMPL_VAR name="budget_avail" --></td>
127
                <td align="right" ><!-- TMPL_VAR name="budget_avail" --></td>
106
            </tr>
128
            </tr>
129
            <!--TMPL_ELSE -->
130
            <!--TMPL_IF NAME="__odd__" -->
131
                <tr class="b_inactive" style="display : none;">
132
            <!--TMPL_ELSE-->
133
                <tr class="highlight" id = "b_inactive" style="display : none;">
134
            <!--/TMPL_IF-->
135
            <td align="center" ><!-- TMPL_VAR name="budget_code" --></td>
136
                <td align="center"><!-- TMPL_VAR name="budget_owner" --></td>
137
                <td align="center"><!-- TMPL_VAR name="budget_branchname" --></td>
138
                <td align="right" ><!-- TMPL_VAR name="budget_amount" --></td>
139
                <td align="right" ><!-- TMPL_VAR name="budget_ordered" --></td>
140
                <td align="right" ><!-- TMPL_VAR name="budget_spent" --></td>
141
                <td align="right" ><!-- TMPL_VAR name="budget_avail" --></td>
142
            <!-- /TMPL_IF -->
107
        <!-- /TMPL_LOOP -->
143
        <!-- /TMPL_LOOP -->
108
        </tbody>
144
        </tbody>
109
    </table>
145
    </table>
110
    </div>
146
    </div><span class="label">Show all :&nbsp;</span><input type="checkbox" id="showallbudgets" />
111
    <!-- /TMPL_IF -->
147
    <!-- /TMPL_IF -->
112
</div>
148
</div>
113
149
114
- 

Return to bug 5961