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

(-)a/C4/Acquisition.pm (-9 / +9 lines)
Lines 1465-1472 sub ModReceiveOrder { Link Here
1465
        $dbh->do(q|
1465
        $dbh->do(q|
1466
            UPDATE aqorders
1466
            UPDATE aqorders
1467
            SET
1467
            SET
1468
                tax_value_on_ordering = quantity * ecost_tax_excluded * tax_rate_on_ordering,
1468
                tax_value_on_ordering = quantity * ROUND(ecost_tax_excluded, 2) * ROUND(tax_rate_on_ordering, 2),
1469
                tax_value_on_receiving = quantity * unitprice_tax_excluded * tax_rate_on_receiving
1469
                tax_value_on_receiving = quantity * ROUND(unitprice_tax_excluded, 2) * ROUND(tax_rate_on_receiving, 2)
1470
            WHERE ordernumber = ?
1470
            WHERE ordernumber = ?
1471
        |, undef, $order->{ordernumber});
1471
        |, undef, $order->{ordernumber});
1472
1472
Lines 1478-1485 sub ModReceiveOrder { Link Here
1478
        $order->{tax_rate_on_ordering} //= 0;
1478
        $order->{tax_rate_on_ordering} //= 0;
1479
        $order->{unitprice_tax_excluded} //= 0;
1479
        $order->{unitprice_tax_excluded} //= 0;
1480
        $order->{tax_rate_on_receiving} //= 0;
1480
        $order->{tax_rate_on_receiving} //= 0;
1481
        $order->{tax_value_on_ordering} = $order->{quantity} * $order->{ecost_tax_excluded} * $order->{tax_rate_on_ordering};
1481
        $order->{tax_value_on_ordering} = $order->{quantity} * Koha::Number::Price->new($order->{ecost_tax_excluded})->format() * Koha::Number::Price->new($order->{tax_rate_on_ordering})->format();
1482
        $order->{tax_value_on_receiving} = $order->{quantity} * $order->{unitprice_tax_excluded} * $order->{tax_rate_on_receiving};
1482
        $order->{tax_value_on_receiving} = $order->{quantity} * Koha::Number::Price->new($order->{unitprice_tax_excluded})->format() * Koha::Number::Price->new($order->{tax_rate_on_receiving})->format();
1483
        $order->{datereceived} = $datereceived;
1483
        $order->{datereceived} = $datereceived;
1484
        $order->{invoiceid} = $invoice->{invoiceid};
1484
        $order->{invoiceid} = $invoice->{invoiceid};
1485
        $order->{orderstatus} = 'complete';
1485
        $order->{orderstatus} = 'complete';
Lines 1640-1647 sub CancelReceipt { Link Here
1640
        $dbh->do(q|
1640
        $dbh->do(q|
1641
            UPDATE aqorders
1641
            UPDATE aqorders
1642
            SET
1642
            SET
1643
                tax_value_on_ordering = quantity * ecost_tax_excluded * tax_rate_on_ordering,
1643
                tax_value_on_ordering = quantity * ROUND(ecost_tax_excluded, 2) * ROUND(tax_rate_on_ordering, 2),
1644
                tax_value_on_receiving = quantity * unitprice_tax_excluded * tax_rate_on_receiving
1644
                tax_value_on_receiving = quantity * ROUND(unitprice_tax_excluded, 2) * ROUND(tax_rate_on_receiving, 2)
1645
            WHERE ordernumber = ?
1645
            WHERE ordernumber = ?
1646
        |, undef, $parent_ordernumber);
1646
        |, undef, $parent_ordernumber);
1647
1647
Lines 2155-2161 sub GetLateOrders { Link Here
2155
        # FIXME: account for IFNULL as above
2155
        # FIXME: account for IFNULL as above
2156
        $select .= "
2156
        $select .= "
2157
                aqorders.quantity                AS quantity,
2157
                aqorders.quantity                AS quantity,
2158
                aqorders.quantity * aqorders.rrp AS subtotal,
2158
                aqorders.quantity * ROUND(aqorders.rrp, 2) AS subtotal,
2159
                (CAST(now() AS date) - closedate)            AS latesince
2159
                (CAST(now() AS date) - closedate)            AS latesince
2160
        ";
2160
        ";
2161
        if ( defined $delay ) {
2161
        if ( defined $delay ) {
Lines 2969-2975 sub populate_order_with_prices { Link Here
2969
2969
2970
        # tax value = quantity * ecost tax excluded * tax rate
2970
        # tax value = quantity * ecost tax excluded * tax rate
2971
        $order->{tax_value_on_ordering} =
2971
        $order->{tax_value_on_ordering} =
2972
            $order->{quantity} * $order->{ecost_tax_excluded} * $order->{tax_rate_on_ordering};
2972
            $order->{quantity} * Koha::Number::Price->new( $order->{ecost_tax_excluded} )->format() * $order->{tax_rate_on_ordering};
2973
    }
2973
    }
2974
2974
2975
    if ($receiving) {
2975
    if ($receiving) {
Lines 3003-3009 sub populate_order_with_prices { Link Here
3003
        }
3003
        }
3004
3004
3005
        # tax value = quantity * unit price tax excluded * tax rate
3005
        # tax value = quantity * unit price tax excluded * tax rate
3006
        $order->{tax_value_on_receiving} = $order->{quantity} * $order->{unitprice_tax_excluded} * $order->{tax_rate_on_receiving};
3006
        $order->{tax_value_on_receiving} = $order->{quantity} * Koha::Number::Price->new( $order->{unitprice_tax_excluded} ) * $order->{tax_rate_on_receiving};
3007
    }
3007
    }
3008
3008
3009
    return $order;
3009
    return $order;
(-)a/C4/Budgets.pm (-8 / +8 lines)
Lines 212-218 sub GetBudgetsPlanCell { Link Here
212
        # get the actual amount
212
        # get the actual amount
213
        $sth = $dbh->prepare( qq|
213
        $sth = $dbh->prepare( qq|
214
214
215
            SELECT SUM(ecost_tax_included) AS actual FROM aqorders
215
            SELECT SUM(ROUND(ecost_tax_included, 2)) AS actual FROM aqorders
216
                WHERE    budget_id = ? AND
216
                WHERE    budget_id = ? AND
217
                entrydate like "$cell->{'authvalue'}%"  |
217
                entrydate like "$cell->{'authvalue'}%"  |
218
        );
218
        );
Lines 221-227 sub GetBudgetsPlanCell { Link Here
221
        # get the actual amount
221
        # get the actual amount
222
        $sth = $dbh->prepare( qq|
222
        $sth = $dbh->prepare( qq|
223
223
224
            SELECT SUM(ecost_tax_included) FROM aqorders
224
            SELECT SUM(ROUD(ecost_tax_included, 2)) FROM aqorders
225
                LEFT JOIN aqorders_items
225
                LEFT JOIN aqorders_items
226
                ON (aqorders.ordernumber = aqorders_items.ordernumber)
226
                ON (aqorders.ordernumber = aqorders_items.ordernumber)
227
                LEFT JOIN items
227
                LEFT JOIN items
Lines 233-239 sub GetBudgetsPlanCell { Link Here
233
        # get the actual amount
233
        # get the actual amount
234
        $sth = $dbh->prepare(  qq|
234
        $sth = $dbh->prepare(  qq|
235
235
236
            SELECT SUM( ecost_tax_included *  quantity) AS actual
236
            SELECT SUM( ROUND(ecost_tax_included, 2) *  quantity) AS actual
237
                FROM aqorders JOIN biblioitems
237
                FROM aqorders JOIN biblioitems
238
                ON (biblioitems.biblionumber = aqorders.biblionumber )
238
                ON (biblioitems.biblionumber = aqorders.biblionumber )
239
                WHERE aqorders.budget_id = ? and itemtype  = ? |
239
                WHERE aqorders.budget_id = ? and itemtype  = ? |
Lines 246-252 sub GetBudgetsPlanCell { Link Here
246
        # get the actual amount
246
        # get the actual amount
247
        $sth = $dbh->prepare( qq|
247
        $sth = $dbh->prepare( qq|
248
248
249
        SELECT  SUM(ecost_tax_included * quantity) AS actual
249
        SELECT  SUM(ROUND(ecost_tax_included, 2) * quantity) AS actual
250
            FROM aqorders
250
            FROM aqorders
251
            JOIN aqbudgets ON (aqbudgets.budget_id = aqorders.budget_id )
251
            JOIN aqbudgets ON (aqbudgets.budget_id = aqorders.budget_id )
252
            WHERE  aqorders.budget_id = ? AND
252
            WHERE  aqorders.budget_id = ? AND
Lines 330-336 sub GetBudgetSpent { Link Here
330
    # unitprice_tax_included should always been set here
330
    # unitprice_tax_included should always been set here
331
    # we should not need to retrieve ecost_tax_included
331
    # we should not need to retrieve ecost_tax_included
332
    my $sth = $dbh->prepare(qq|
332
    my $sth = $dbh->prepare(qq|
333
        SELECT SUM( COALESCE(unitprice_tax_included, ecost_tax_included) * quantity ) AS sum FROM aqorders
333
        SELECT SUM( ROUND(COALESCE(unitprice_tax_included, ecost_tax_included), 2) * quantity ) AS sum FROM aqorders
334
            WHERE budget_id = ? AND
334
            WHERE budget_id = ? AND
335
            quantityreceived > 0 AND
335
            quantityreceived > 0 AND
336
            datecancellationprinted IS NULL
336
            datecancellationprinted IS NULL
Lines 339-345 sub GetBudgetSpent { Link Here
339
	my $sum =  $sth->fetchrow_array;
339
	my $sum =  $sth->fetchrow_array;
340
340
341
    $sth = $dbh->prepare(qq|
341
    $sth = $dbh->prepare(qq|
342
        SELECT SUM(shipmentcost) AS sum
342
        SELECT SUM(ROUND(shipmentcost, 2)) AS sum
343
        FROM aqinvoices
343
        FROM aqinvoices
344
        WHERE shipmentcost_budgetid = ?
344
        WHERE shipmentcost_budgetid = ?
345
          AND closedate IS NOT NULL
345
          AND closedate IS NOT NULL
Lines 356-362 sub GetBudgetOrdered { Link Here
356
	my ($budget_id) = @_;
356
	my ($budget_id) = @_;
357
	my $dbh = C4::Context->dbh;
357
	my $dbh = C4::Context->dbh;
358
	my $sth = $dbh->prepare(qq|
358
	my $sth = $dbh->prepare(qq|
359
        SELECT SUM(ecost_tax_included *  quantity) AS sum FROM aqorders
359
        SELECT SUM(ROUND(ecost_tax_included, 2) *  quantity) AS sum FROM aqorders
360
            WHERE budget_id = ? AND
360
            WHERE budget_id = ? AND
361
            quantityreceived = 0 AND
361
            quantityreceived = 0 AND
362
            datecancellationprinted IS NULL
362
            datecancellationprinted IS NULL
Lines 365-371 sub GetBudgetOrdered { Link Here
365
	my $sum =  $sth->fetchrow_array;
365
	my $sum =  $sth->fetchrow_array;
366
366
367
    $sth = $dbh->prepare(qq|
367
    $sth = $dbh->prepare(qq|
368
        SELECT SUM(shipmentcost) AS sum
368
        SELECT SUM(ROUND(shipmentcost, 2)) AS sum
369
        FROM aqinvoices
369
        FROM aqinvoices
370
        WHERE shipmentcost_budgetid = ?
370
        WHERE shipmentcost_budgetid = ?
371
          AND closedate IS NULL
371
          AND closedate IS NULL
(-)a/acqui/basket.pl (-5 / +6 lines)
Lines 41-46 use Date::Calc qw/Add_Delta_Days/; Link Here
41
use Koha::Database;
41
use Koha::Database;
42
use Koha::EDI qw( create_edi_order get_edifact_ean );
42
use Koha::EDI qw( create_edi_order get_edifact_ean );
43
use Koha::CsvProfiles;
43
use Koha::CsvProfiles;
44
use Koha::Number::Price;
44
45
45
=head1 NAME
46
=head1 NAME
46
47
Lines 348-360 if ( $op eq 'list' ) { Link Here
348
        push @books_loop, $line;
349
        push @books_loop, $line;
349
350
350
        $foot{$$line{tax_rate}}{tax_rate} = $$line{tax_rate};
351
        $foot{$$line{tax_rate}}{tax_rate} = $$line{tax_rate};
351
        $foot{$$line{tax_rate}}{tax_value} += $$line{tax_value};
352
        $foot{$$line{tax_rate}}{tax_value} += Koha::Number::Price->new( $$line{tax_value} )->format;
352
        $total_tax_value += $$line{tax_value};
353
        $total_tax_value += $$line{tax_value};
353
        $foot{$$line{tax_rate}}{quantity}  += $$line{quantity};
354
        $foot{$$line{tax_rate}}{quantity}  += $$line{quantity};
354
        $total_quantity += $$line{quantity};
355
        $total_quantity += $$line{quantity};
355
        $foot{$$line{tax_rate}}{total_tax_excluded} += $$line{total_tax_excluded};
356
        $foot{$$line{tax_rate}}{total_tax_excluded} += Koha::Number::Price->new( $$line{total_tax_excluded} )->format;
356
        $total_tax_excluded += $$line{total_tax_excluded};
357
        $total_tax_excluded += $$line{total_tax_excluded};
357
        $foot{$$line{tax_rate}}{total_tax_included} += $$line{total_tax_included};
358
        $foot{$$line{tax_rate}}{total_tax_included} += Koha::Number::Price->new( $$line{total_tax_included} )->format;
358
        $total_tax_included += $$line{total_tax_included};
359
        $total_tax_included += $$line{total_tax_included};
359
    }
360
    }
360
361
Lines 454-461 sub get_order_infos { Link Here
454
    $line{basketno}       = $basketno;
455
    $line{basketno}       = $basketno;
455
    $line{budget_name}    = $budget->{budget_name};
456
    $line{budget_name}    = $budget->{budget_name};
456
457
457
    $line{total_tax_included} = $line{ecost_tax_included} * $line{quantity};
458
    $line{total_tax_included} = Koha::Number::Price->new( $line{ecost_tax_included} )->format * $line{quantity};
458
    $line{total_tax_excluded} = $line{ecost_tax_excluded} * $line{quantity};
459
    $line{total_tax_excluded} = Koha::Number::Price->new( $line{ecost_tax_excluded} )->format * $line{quantity};
459
    $line{tax_value} = $line{tax_value_on_ordering};
460
    $line{tax_value} = $line{tax_value_on_ordering};
460
    $line{tax_rate} = $line{tax_rate_on_ordering};
461
    $line{tax_rate} = $line{tax_rate_on_ordering};
461
462
(-)a/acqui/basketgroup.pl (-4 / +5 lines)
Lines 57-62 use Koha::EDI qw/create_edi_order get_edifact_ean/; Link Here
57
57
58
use Koha::Acquisition::Booksellers;
58
use Koha::Acquisition::Booksellers;
59
use Koha::ItemTypes;
59
use Koha::ItemTypes;
60
use Koha::Number::Price;
60
61
61
our $input=new CGI;
62
our $input=new CGI;
62
63
Lines 77-85 sub BasketTotal { Link Here
77
    for my $order (@orders){
78
    for my $order (@orders){
78
        # FIXME The following is wrong
79
        # FIXME The following is wrong
79
        if ( $bookseller->listincgst ) {
80
        if ( $bookseller->listincgst ) {
80
            $total = $total + ( $order->{ecost_tax_included} * $order->{quantity} );
81
            $total = $total + ( Koha::Number::Price->new($order->{ecost_tax_included})->format() * $order->{quantity} );
81
        } else {
82
        } else {
82
            $total = $total + ( $order->{ecost_tax_excluded} * $order->{quantity} );
83
            $total = $total + ( Koha::Number::Price->new($order->{ecost_tax_excluded})->format() * $order->{quantity} );
83
        }
84
        }
84
    }
85
    }
85
    $total .= " " . ($bookseller->invoiceprice // 0);
86
    $total .= " " . ($bookseller->invoiceprice // 0);
Lines 171-178 sub printbasketgrouppdf{ Link Here
171
172
172
            $ord->{tax_value} = $ord->{tax_value_on_ordering};
173
            $ord->{tax_value} = $ord->{tax_value_on_ordering};
173
            $ord->{tax_rate} = $ord->{tax_rate_on_ordering};
174
            $ord->{tax_rate} = $ord->{tax_rate_on_ordering};
174
            $ord->{total_tax_included} = $ord->{ecost_tax_included} * $ord->{quantity};
175
            $ord->{total_tax_included} = Koha::Number::Price->new($ord->{ecost_tax_included})->format() * $ord->{quantity};
175
            $ord->{total_tax_excluded} = $ord->{ecost_tax_excluded} * $ord->{quantity};
176
            $ord->{total_tax_excluded} = Koha::Number::Price->new($ord->{ecost_tax_excluded})->format() * $ord->{quantity};
176
177
177
            my $bib = GetBiblioData($ord->{biblionumber});
178
            my $bib = GetBiblioData($ord->{biblionumber});
178
179
(-)a/acqui/invoice.pl (-2 / +3 lines)
Lines 38-43 use C4::Budgets; Link Here
38
use Koha::Acquisition::Booksellers;
38
use Koha::Acquisition::Booksellers;
39
use Koha::Acquisition::Currencies;
39
use Koha::Acquisition::Currencies;
40
use Koha::DateUtils;
40
use Koha::DateUtils;
41
use Koha::Number::Price;
41
use Koha::Misc::Files;
42
use Koha::Misc::Files;
42
43
43
my $input = new CGI;
44
my $input = new CGI;
Lines 124-131 my $total_tax_value = 0; Link Here
124
foreach my $order (@$orders) {
125
foreach my $order (@$orders) {
125
    my $line = get_infos( $order, $bookseller);
126
    my $line = get_infos( $order, $bookseller);
126
127
127
    $line->{total_tax_excluded} = $line->{unitprice_tax_excluded} * $line->{quantity};
128
    $line->{total_tax_excluded} = Koha::Price::Number->new($line->{unitprice_tax_excluded})->format() * $line->{quantity};
128
    $line->{total_tax_included} = $line->{unitprice_tax_included} * $line->{quantity};
129
    $line->{total_tax_included} = Koha::Price::Number->new($line->{unitprice_tax_included})->format() * $line->{quantity};
129
130
130
    $line->{tax_value} = $line->{tax_value_on_receiving};
131
    $line->{tax_value} = $line->{tax_value_on_receiving};
131
    $line->{tax_rate} = $line->{tax_rate_on_receiving};
132
    $line->{tax_rate} = $line->{tax_rate_on_receiving};
(-)a/acqui/parcel.pl (-5 / +6 lines)
Lines 70-75 use Koha::Acquisition::Bookseller; Link Here
70
use Koha::Biblios;
70
use Koha::Biblios;
71
use Koha::DateUtils;
71
use Koha::DateUtils;
72
use Koha::Biblios;
72
use Koha::Biblios;
73
use Koha::Number::Price;
73
74
74
use JSON;
75
use JSON;
75
76
Lines 134-140 for my $order ( @orders ) { Link Here
134
        $order->{unitprice} = $order->{unitprice_tax_excluded};
135
        $order->{unitprice} = $order->{unitprice_tax_excluded};
135
    }
136
    }
136
137
137
    $order->{total} = $order->{unitprice} * $order->{quantity};
138
    $order->{total} = Koha::Number::Price->new($order->{unitprice})->format() * $order->{quantity};
138
139
139
    my %line = %{ $order };
140
    my %line = %{ $order };
140
    $line{invoice} = $invoice->{invoicenumber};
141
    $line{invoice} = $invoice->{invoicenumber};
Lines 152-159 for my $order ( @orders ) { Link Here
152
    $line{tax_rate} = $line{tax_rate_on_receiving};
153
    $line{tax_rate} = $line{tax_rate_on_receiving};
153
    $foot{$line{tax_rate}}{tax_rate} = $line{tax_rate};
154
    $foot{$line{tax_rate}}{tax_rate} = $line{tax_rate};
154
    $foot{$line{tax_rate}}{tax_value} += $line{tax_value};
155
    $foot{$line{tax_rate}}{tax_value} += $line{tax_value};
155
    $total_tax_excluded += $line{unitprice_tax_excluded} * $line{quantity};
156
    $total_tax_excluded += Koha::Number::Price->new($line{unitprice_tax_excluded})->format() * $line{quantity};
156
    $total_tax_included += $line{unitprice_tax_included} * $line{quantity};
157
    $total_tax_included += Koha::Number::Price->new($line{unitprice_tax_included})->format() * $line{quantity};
157
158
158
    my $suggestion   = GetSuggestionInfoFromBiblionumber($line{biblionumber});
159
    my $suggestion   = GetSuggestionInfoFromBiblionumber($line{biblionumber});
159
    $line{suggestionid}         = $suggestion->{suggestionid};
160
    $line{suggestionid}         = $suggestion->{suggestionid};
Lines 172-178 for my $order ( @orders ) { Link Here
172
    my $budget_name = GetBudgetName( $line{budget_id} );
173
    my $budget_name = GetBudgetName( $line{budget_id} );
173
    $line{budget_name} = $budget_name;
174
    $line{budget_name} = $budget_name;
174
175
175
    $subtotal_for_funds->{ $line{budget_name} }{ecost} += $order->{ecost} * $order->{quantity};
176
    $subtotal_for_funds->{ $line{budget_name} }{ecost} += Koha::Number::Price->new($order->{ecost})->format() * $order->{quantity};
176
    $subtotal_for_funds->{ $line{budget_name} }{unitprice} += $order->{total};
177
    $subtotal_for_funds->{ $line{budget_name} }{unitprice} += $order->{total};
177
178
178
    push @loop_received, \%line;
179
    push @loop_received, \%line;
Lines 230-236 unless( defined $invoice->{closedate} ) { Link Here
230
        } else {
231
        } else {
231
            $order->{ecost} = $order->{ecost_tax_excluded};
232
            $order->{ecost} = $order->{ecost_tax_excluded};
232
        }
233
        }
233
        $order->{total} = $order->{ecost} * $order->{quantity};
234
        $order->{total} = Koha::Price::Number->new($order->{ecost})->format() * $order->{quantity};
234
235
235
        my %line = %$order;
236
        my %line = %$order;
236
237
(-)a/acqui/pdfformat/layout3pages.pm (-3 / +3 lines)
Lines 222-230 sub printbaskets { Link Here
222
            $total_tax_excluded += $ord->{total_tax_excluded};
222
            $total_tax_excluded += $ord->{total_tax_excluded};
223
            $total_tax_included += $ord->{total_tax_included};
223
            $total_tax_included += $ord->{total_tax_included};
224
            $totaltax_value += $ord->{tax_value};
224
            $totaltax_value += $ord->{tax_value};
225
            $totaldiscount += ($ord->{rrp_tax_excluded} - $ord->{ecost_tax_excluded} ) * $ord->{quantity};
225
            $totaldiscount += (Koha::Price::Number->new($ord->{rrp_tax_excluded})->format() - Koha::Price::Number->new($ord->{ecost_tax_excluded})->format() ) * $ord->{quantity};
226
            $total_rrp_tax_excluded += $ord->{rrp_tax_excluded} * $ord->{quantity};
226
            $total_rrp_tax_excluded += Koha::Price::Number->new($ord->{rrp_tax_excluded})->format() * $ord->{quantity};
227
            $total_rrp_tax_included += $ord->{rrp_tax_included} * $ord->{quantity};
227
            $total_rrp_tax_included += Koha::Price::Number->new($ord->{rrp_tax_included})->format() * $ord->{quantity};
228
            push @gst, $ord->{tax_rate};
228
            push @gst, $ord->{tax_rate};
229
        }
229
        }
230
        @gst = uniq map { $_ * 100 } @gst;
230
        @gst = uniq map { $_ * 100 } @gst;
(-)a/acqui/pdfformat/layout3pagesfr.pm (-3 / +3 lines)
Lines 222-230 sub printbaskets { Link Here
222
            $total_tax_excluded += $ord->{total_tax_excluded};
222
            $total_tax_excluded += $ord->{total_tax_excluded};
223
            $total_tax_included += $ord->{total_tax_included};
223
            $total_tax_included += $ord->{total_tax_included};
224
            $totaltax_value += $ord->{tax_value};
224
            $totaltax_value += $ord->{tax_value};
225
            $totaldiscount += ($ord->{rrp_tax_excluded} - $ord->{ecost_tax_excluded} ) * $ord->{quantity};
225
            $totaldiscount += (Koha::Price::Number->new($ord->{rrp_tax_excluded})->format() - Koha::Price::Number->new($ord->{ecost_tax_excluded})->format() ) * $ord->{quantity};
226
            $total_rrp_tax_excluded += $ord->{rrp_tax_excluded} * $ord->{quantity};
226
            $total_rrp_tax_excluded += Koha::Price::Number->new($ord->{rrp_tax_excluded})->format() * $ord->{quantity};
227
            $total_rrp_tax_included += $ord->{rrp_tax_included} * $ord->{quantity};
227
            $total_rrp_tax_included += Koha::Price::Number->new($ord->{rrp_tax_included})->format() * $ord->{quantity};
228
            push @gst, $ord->{tax_rate};
228
            push @gst, $ord->{tax_rate};
229
        }
229
        }
230
        @gst = uniq map { $_ * 100 } @gst;
230
        @gst = uniq map { $_ * 100 } @gst;
(-)a/reports/orders_by_fund.pl (-3 / +2 lines)
Lines 105-112 if ( $get_orders ) { Link Here
105
105
106
        $order->{'title'} = $biblio->{'title'} || $order->{'biblionumber'};
106
        $order->{'title'} = $biblio->{'title'} || $order->{'biblionumber'};
107
107
108
        $order->{'total_rrp'} = $order->{'quantity'} * $order->{'rrp'};
108
        $order->{'total_rrp'} = $order->{'quantity'} * Koha::Price::Number->new($order->{'rrp'})->format();
109
        $order->{'total_ecost'} = $order->{'quantity'} * $order->{'ecost'};
109
        $order->{'total_ecost'} = $order->{'quantity'} * Koha::Price::Number->new($order->{'ecost'})->format();
110
110
111
        # Format the dates and currencies correctly
111
        # Format the dates and currencies correctly
112
        $order->{'datereceived'} = output_pref(dt_from_string($order->{'datereceived'}));
112
        $order->{'datereceived'} = output_pref(dt_from_string($order->{'datereceived'}));
113
- 

Return to bug 18736