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

(-)a/acqui/ordered.pl (-3 / +1 lines)
Lines 93-99 while ( my $data = $sth->fetchrow_hashref ) { Link Here
93
    }
93
    }
94
    if ( $left && $left > 0 ) {
94
    if ( $left && $left > 0 ) {
95
        my $subtotal = $left * $data->{'ecost'};
95
        my $subtotal = $left * $data->{'ecost'};
96
        $data->{subtotal} = sprintf( "%.2f", $subtotal );
96
        $data->{subtotal} = $subtotal;
97
        $data->{'left'} = $left;
97
        $data->{'left'} = $left;
98
        push @ordered, $data;
98
        push @ordered, $data;
99
        $total += $subtotal;
99
        $total += $subtotal;
Lines 105-112 while ( my $adj = $adjustments->next ){ Link Here
105
    $total += $adj->adjustment;
105
    $total += $adj->adjustment;
106
}
106
}
107
107
108
$total = sprintf( "%.2f", $total );
109
110
$template->{VARS}->{'fund'}    = $fund_id;
108
$template->{VARS}->{'fund'}    = $fund_id;
111
$template->{VARS}->{'ordered'} = \@ordered;
109
$template->{VARS}->{'ordered'} = \@ordered;
112
$template->{VARS}->{'total'}   = $total;
110
$template->{VARS}->{'total'}   = $total;
(-)a/acqui/spent.pl (-5 / +2 lines)
Lines 96-103 while ( my $data = $sth->fetchrow_hashref ) { Link Here
96
    my $recv = $data->{'quantityreceived'};
96
    my $recv = $data->{'quantityreceived'};
97
    if ( $recv > 0 ) {
97
    if ( $recv > 0 ) {
98
        my $rowtotal = $recv * $data->{'unitprice'};
98
        my $rowtotal = $recv * $data->{'unitprice'};
99
        $data->{'rowtotal'}  = sprintf( "%.2f", $rowtotal );
99
        $data->{'rowtotal'}  = $rowtotal;
100
        $data->{'unitprice'} = sprintf( "%.2f", $data->{'unitprice'} );
101
        $subtotal += $rowtotal;
100
        $subtotal += $rowtotal;
102
        push @spent, $data;
101
        push @spent, $data;
103
    }
102
    }
Lines 115-121 $sth->execute($bookfund); Link Here
115
my @shipmentcosts;
114
my @shipmentcosts;
116
while (my $data = $sth->fetchrow_hashref) {
115
while (my $data = $sth->fetchrow_hashref) {
117
    push @shipmentcosts, {
116
    push @shipmentcosts, {
118
        shipmentcost => sprintf("%.2f", $data->{shipmentcost}),
117
        shipmentcost => $data->{shipmentcost},
119
        invoicenumber => $data->{invoicenumber}
118
        invoicenumber => $data->{invoicenumber}
120
    };
119
    };
121
    $total += $data->{shipmentcost};
120
    $total += $data->{shipmentcost};
Lines 127-134 while ( my $adj = $adjustments->next ){ Link Here
127
    $total += $adj->adjustment;
126
    $total += $adj->adjustment;
128
}
127
}
129
128
130
$total = sprintf( "%.2f", $total );
131
132
$template->param(
129
$template->param(
133
    fund => $bookfund,
130
    fund => $bookfund,
134
    spent => \@spent,
131
    spent => \@spent,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/ordered.tt (-3 / +4 lines)
Lines 2-7 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE ItemTypes %]
4
[% USE ItemTypes %]
5
[% USE Price %]
5
[% SET footerjs = 1 %]
6
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Acquisitions &rsaquo; Ordered</title>
8
<title>Koha &rsaquo; Acquisitions &rsaquo; Ordered</title>
Lines 61-73 Link Here
61
	    [% order.left | html %]
62
	    [% order.left | html %]
62
	</td>
63
	</td>
63
    <td class="data cell">
64
    <td class="data cell">
64
	    [% order.ecost | html %]
65
	    [% order.ecost | $Price  %]
65
	</td>
66
	</td>
66
    <td class="cell">
67
    <td class="cell">
67
        <span title="[% order.entrydate | html %]">[% order.entrydate | $KohaDates %]</span>
68
        <span title="[% order.entrydate | html %]">[% order.entrydate | $KohaDates %]</span>
68
	</td>
69
	</td>
69
    <td class="data cell">
70
    <td class="data cell">
70
	    [% order.subtotal | html %]
71
	    [% order.subtotal | $Price %]
71
	</td>
72
	</td>
72
    </tr>
73
    </tr>
73
[% END %]
74
[% END %]
Lines 92-98 Link Here
92
        <td> </td>
93
        <td> </td>
93
	<td> </td>
94
	<td> </td>
94
        <td class="data">
95
        <td class="data">
95
            [% total | html %]
96
            [% total | $Price %]
96
        </td>
97
        </td>
97
    </tr>
98
    </tr>
98
    </tfoot>
99
    </tfoot>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/spent.tt (-4 / +4 lines)
Lines 2-7 Link Here
2
[% USE Asset %]
2
[% USE Asset %]
3
[% USE KohaDates %]
3
[% USE KohaDates %]
4
[% USE ItemTypes %]
4
[% USE ItemTypes %]
5
[% USE Price %]
5
[% SET footerjs = 1 %]
6
[% SET footerjs = 1 %]
6
[% INCLUDE 'doc-head-open.inc' %]
7
[% INCLUDE 'doc-head-open.inc' %]
7
<title>Koha &rsaquo; Acquisitions &rsaquo; Spent</title>
8
<title>Koha &rsaquo; Acquisitions &rsaquo; Spent</title>
Lines 62-68 Link Here
62
                [% order.quantityreceived | html %]
63
                [% order.quantityreceived | html %]
63
            </td>
64
            </td>
64
            <td class="cell">
65
            <td class="cell">
65
                [% order.unitprice | html %]
66
                [% order.unitprice | $Price %]
66
            </td>
67
            </td>
67
            <td class="cell">
68
            <td class="cell">
68
                <span title="[% order.entrydate | html %]">[% order.entrydate | $KohaDates %]</span>
69
                <span title="[% order.entrydate | html %]">[% order.entrydate | $KohaDates %]</span>
Lines 71-77 Link Here
71
                <span title="[% order.datereceived | html %]">[% order.datereceived | $KohaDates %]</span>
72
                <span title="[% order.datereceived | html %]">[% order.datereceived | $KohaDates %]</span>
72
            </td>
73
            </td>
73
            <td class="data cell">
74
            <td class="data cell">
74
                [% order.rowtotal | html %]
75
                [% order.rowtotal | $Price %]
75
            </td>
76
            </td>
76
        </tr>
77
        </tr>
77
    [% END %]
78
    [% END %]
Lines 103-109 Link Here
103
        [% END %]
104
        [% END %]
104
        <tr>
105
        <tr>
105
            <td colspan="9">TOTAL</td>
106
            <td colspan="9">TOTAL</td>
106
            <td class="data total">[% total | html %]</td>
107
            <td class="data total">[% total | $Price %]</td>
107
        </tr>
108
        </tr>
108
    </tfoot>
109
    </tfoot>
109
</table>
110
</table>
110
- 

Return to bug 21427