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

(-)a/C4/Acquisition.pm (+8 lines)
Lines 1507-1512 sub ModReceiveOrder { Link Here
1507
                orderstatus = 'complete'
1507
                orderstatus = 'complete'
1508
        |;
1508
        |;
1509
1509
1510
        $query .= q|
1511
            , replacementprice = ?
1512
        | if defined $order->{replacementprice};
1513
1510
        $query .= q|
1514
        $query .= q|
1511
            , unitprice = ?, unitprice_tax_included = ?, unitprice_tax_excluded = ?
1515
            , unitprice = ?, unitprice_tax_included = ?, unitprice_tax_excluded = ?
1512
        | if defined $order->{unitprice};
1516
        | if defined $order->{unitprice};
Lines 1528-1533 sub ModReceiveOrder { Link Here
1528
        my $sth = $dbh->prepare( $query );
1532
        my $sth = $dbh->prepare( $query );
1529
        my @params = ( $quantrec, $datereceived, $invoice->{invoiceid}, ( $budget_id ? $budget_id : $order->{budget_id} ) );
1533
        my @params = ( $quantrec, $datereceived, $invoice->{invoiceid}, ( $budget_id ? $budget_id : $order->{budget_id} ) );
1530
1534
1535
        if ( defined $order->{replacementprice} ) {
1536
            push @params, $order->{replacementprice};
1537
        }
1538
1531
        if ( defined $order->{unitprice} ) {
1539
        if ( defined $order->{unitprice} ) {
1532
            push @params, $order->{unitprice}, $order->{unitprice_tax_included}, $order->{unitprice_tax_excluded};
1540
            push @params, $order->{unitprice}, $order->{unitprice_tax_included}, $order->{unitprice_tax_excluded};
1533
        }
1541
        }
(-)a/acqui/addorderiso2709.pl (-2 / +6 lines)
Lines 262-267 if ($op eq ""){ Link Here
262
                    );
262
                    );
263
263
264
                    my $price = $infos->{price};
264
                    my $price = $infos->{price};
265
                    my $replacementprice = $infos->{replacementprice};
265
                    if ($price){
266
                    if ($price){
266
                        # in France, the cents separator is the , but sometimes, ppl use a .
267
                        # in France, the cents separator is the , but sometimes, ppl use a .
267
                        # in this case, the price will be x100 when unformatted ! Replace the . by a , to get a proper price calculation
268
                        # in this case, the price will be x100 when unformatted ! Replace the . by a , to get a proper price calculation
Lines 283-288 if ($op eq ""){ Link Here
283
                    } else {
284
                    } else {
284
                        $orderinfo{listprice} = 0;
285
                        $orderinfo{listprice} = 0;
285
                    }
286
                    }
287
                    $orderinfo{replacementprice} = $replacementprice || 0;
286
288
287
                    # remove uncertainprice flag if we have found a price in the MARC record
289
                    # remove uncertainprice flag if we have found a price in the MARC record
288
                    $orderinfo{uncertainprice} = 0 if $orderinfo{listprice};
290
                    $orderinfo{uncertainprice} = 0 if $orderinfo{listprice};
Lines 511-518 sub import_biblios_list { Link Here
511
        my ( $marcblob, $encoding ) = GetImportRecordMarc( $biblio->{'import_record_id'} );
513
        my ( $marcblob, $encoding ) = GetImportRecordMarc( $biblio->{'import_record_id'} );
512
        my $marcrecord = MARC::Record->new_from_usmarc($marcblob) || die "couldn't translate marc information";
514
        my $marcrecord = MARC::Record->new_from_usmarc($marcblob) || die "couldn't translate marc information";
513
515
514
        my $infos = get_infos_syspref('MarcFieldsToOrder', $marcrecord, ['price', 'quantity', 'budget_code', 'discount', 'sort1', 'sort2']);
516
        my $infos = get_infos_syspref('MarcFieldsToOrder', $marcrecord, ['price', 'quantity', 'budget_code', 'discount', 'sort1', 'sort2','replacementprice']);
515
        my $price = $infos->{price};
517
        my $price = $infos->{price};
518
        my $replacementprice = $infos->{replacementprice};
516
        my $quantity = $infos->{quantity};
519
        my $quantity = $infos->{quantity};
517
        my $budget_code = $infos->{budget_code};
520
        my $budget_code = $infos->{budget_code};
518
        my $discount = $infos->{discount};
521
        my $discount = $infos->{discount};
Lines 573-579 sub import_biblios_list { Link Here
573
                        'quantity' => $item_quantity,
576
                        'quantity' => $item_quantity,
574
                        'budget_id' => $item_budget_id || $budget_id,
577
                        'budget_id' => $item_budget_id || $budget_id,
575
                        'itemprice' => $item_price || $price,
578
                        'itemprice' => $item_price || $price,
576
                        'replacementprice' => $item_replacement_price,
579
                        'replacementprice' => $item_replacement_price || $replacementprice,
577
                        'itemcallnumber' => $item_callnumber,
580
                        'itemcallnumber' => $item_callnumber,
578
                    );
581
                    );
579
                    $all_items_quantity++;
582
                    $all_items_quantity++;
Lines 590-595 sub import_biblios_list { Link Here
590
593
591
        if ($alliteminfos == -1 || scalar(@$alliteminfos) == 0) {
594
        if ($alliteminfos == -1 || scalar(@$alliteminfos) == 0) {
592
            $cellrecord{price} = $price || '';
595
            $cellrecord{price} = $price || '';
596
            $cellrecord{replacementprice} = $replacementprice || '';
593
            $cellrecord{quantity} = $quantity || '';
597
            $cellrecord{quantity} = $quantity || '';
594
            $cellrecord{budget_id} = $budget_id || '';
598
            $cellrecord{budget_id} = $budget_id || '';
595
            $cellrecord{discount} = $discount || '';
599
            $cellrecord{discount} = $discount || '';
(-)a/acqui/finishreceive.pl (-1 / +5 lines)
Lines 48-53 my $origquantityrec = $input->param('origquantityrec'); Link Here
48
my $quantityrec      = $input->param('quantityrec');
48
my $quantityrec      = $input->param('quantityrec');
49
my $quantity         = $input->param('quantity');
49
my $quantity         = $input->param('quantity');
50
my $unitprice        = $input->param('unitprice');
50
my $unitprice        = $input->param('unitprice');
51
my $replacementprice = $input->param('replacementprice');
51
my $datereceived     = $input->param('datereceived'),
52
my $datereceived     = $input->param('datereceived'),
52
my $invoiceid        = $input->param('invoiceid');
53
my $invoiceid        = $input->param('invoiceid');
53
my $invoice          = GetInvoice($invoiceid);
54
my $invoice          = GetInvoice($invoiceid);
Lines 59-64 my $order = GetOrder($ordernumber); Link Here
59
my $new_ordernumber  = $ordernumber;
60
my $new_ordernumber  = $ordernumber;
60
61
61
$unitprice = Koha::Number::Price->new( $unitprice )->unformat();
62
$unitprice = Koha::Number::Price->new( $unitprice )->unformat();
63
$replacementprice = Koha::Number::Price->new( $replacementprice )->unformat();
64
warn "Replacement $replacementprice";
62
my $basket = Koha::Acquisition::Orders->find( $ordernumber )->basket;
65
my $basket = Koha::Acquisition::Orders->find( $ordernumber )->basket;
63
66
64
#need old receivedate if we update the order, parcel.pl only shows the right parcel this way FIXME
67
#need old receivedate if we update the order, parcel.pl only shows the right parcel this way FIXME
Lines 85-90 if ($quantityrec > $origquantityrec ) { Link Here
85
88
86
    $order->{order_internalnote} = $input->param("order_internalnote");
89
    $order->{order_internalnote} = $input->param("order_internalnote");
87
    $order->{tax_rate_on_receiving} = $input->param("tax_rate");
90
    $order->{tax_rate_on_receiving} = $input->param("tax_rate");
91
    $order->{replacementprice} = $replacementprice;
88
    $order->{unitprice} = $unitprice;
92
    $order->{unitprice} = $unitprice;
89
93
90
    $order = C4::Acquisition::populate_order_with_prices(
94
    $order = C4::Acquisition::populate_order_with_prices(
Lines 156-162 ModItem( Link Here
156
        dateaccessioned      => $datereceived,
160
        dateaccessioned      => $datereceived,
157
        datelastseen         => $datereceived,
161
        datelastseen         => $datereceived,
158
        price                => $unitprice,
162
        price                => $unitprice,
159
        replacementprice     => $order->{rrp},
163
        replacementprice     => $replacementprice,
160
        replacementpricedate => $datereceived,
164
        replacementpricedate => $datereceived,
161
    },
165
    },
162
    $biblionumber,
166
    $biblionumber,
(-)a/acqui/neworderempty.pl (+2 lines)
Lines 371-376 if ( defined $from_subscriptionid ) { Link Here
371
        $data->{tax_rate}       = $lastOrderReceived->{tax_rate_on_ordering};
371
        $data->{tax_rate}       = $lastOrderReceived->{tax_rate_on_ordering};
372
        $data->{discount}       = $lastOrderReceived->{discount};
372
        $data->{discount}       = $lastOrderReceived->{discount};
373
        $data->{rrp}            = $lastOrderReceived->{rrp};
373
        $data->{rrp}            = $lastOrderReceived->{rrp};
374
        $data->{replacementprice} = $lastOrderReceived->{replacementprice};
374
        $data->{ecost}          = $lastOrderReceived->{ecost};
375
        $data->{ecost}          = $lastOrderReceived->{ecost};
375
        $data->{quantity}       = $lastOrderReceived->{quantity};
376
        $data->{quantity}       = $lastOrderReceived->{quantity};
376
        $data->{unitprice}      = $lastOrderReceived->{unitprice};
377
        $data->{unitprice}      = $lastOrderReceived->{unitprice};
Lines 454-459 $template->param( Link Here
454
    quantity         => $quantity,
455
    quantity         => $quantity,
455
    quantityrec      => $quantity,
456
    quantityrec      => $quantity,
456
    rrp              => $data->{'rrp'},
457
    rrp              => $data->{'rrp'},
458
    replacementprice => $data->{'replacementprice'},
457
    gst_values       => \@gst_values,
459
    gst_values       => \@gst_values,
458
    tax_rate         => $data->{tax_rate_on_ordering} ? $data->{tax_rate_on_ordering}+0.0 : $bookseller->tax_rate ? $bookseller->tax_rate+0.0 : 0,
460
    tax_rate         => $data->{tax_rate_on_ordering} ? $data->{tax_rate_on_ordering}+0.0 : $bookseller->tax_rate ? $bookseller->tax_rate+0.0 : 0,
459
    listprice        => sprintf( "%.2f", $data->{listprice} || $data->{price} || $listprice),
461
    listprice        => sprintf( "%.2f", $data->{listprice} || $data->{price} || $listprice),
(-)a/acqui/orderreceive.pl (+1 lines)
Lines 213-218 $template->param( Link Here
213
    quantityreceivedplus1 => $order->{'quantityreceived'} + 1,
213
    quantityreceivedplus1 => $order->{'quantityreceived'} + 1,
214
    quantityreceived      => $order->{'quantityreceived'},
214
    quantityreceived      => $order->{'quantityreceived'},
215
    rrp                   => $rrp,
215
    rrp                   => $rrp,
216
    replacementprice      => $order->{'replacementprice'},
216
    ecost                 => $ecost,
217
    ecost                 => $ecost,
217
    unitprice             => $unitprice,
218
    unitprice             => $unitprice,
218
    tax_rate              => $tax_rate,
219
    tax_rate              => $tax_rate,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (+6 lines)
Lines 358-363 Link Here
358
                        <th class="tax_excluded">ecost tax exc.</th>
358
                        <th class="tax_excluded">ecost tax exc.</th>
359
                        <th class="tax_included">RRP tax inc.</th>
359
                        <th class="tax_included">RRP tax inc.</th>
360
                        <th class="tax_included">ecost tax inc.</th>
360
                        <th class="tax_included">ecost tax inc.</th>
361
                        <th class="replacementprice">Replacement price</th>
361
                        <th>Qty.</th>
362
                        <th>Qty.</th>
362
                        <th class="tax_excluded">Total tax exc. ([% currency | html %])</th>
363
                        <th class="tax_excluded">Total tax exc. ([% currency | html %])</th>
363
                        <th class="tax_included">Total tax inc. ([% currency | html %])</th>
364
                        <th class="tax_included">Total tax inc. ([% currency | html %])</th>
Lines 382-387 Link Here
382
                        <th class="tax_excluded">&nbsp;</th>
383
                        <th class="tax_excluded">&nbsp;</th>
383
                        <th class="tax_included">&nbsp;</th>
384
                        <th class="tax_included">&nbsp;</th>
384
                        <th class="tax_included">&nbsp;</th>
385
                        <th class="tax_included">&nbsp;</th>
386
                        <th class="replacementprice">&nbsp;</th>
385
                        <th>[% foot_loo.quantity | html %]</th>
387
                        <th>[% foot_loo.quantity | html %]</th>
386
                        <th class="tax_excluded">[% foot_loo.total_tax_excluded | $Price | html %]</th>
388
                        <th class="tax_excluded">[% foot_loo.total_tax_excluded | $Price | html %]</th>
387
                        <th class="tax_included">[% foot_loo.total_tax_included | $Price | html %]</th>
389
                        <th class="tax_included">[% foot_loo.total_tax_included | $Price | html %]</th>
Lines 404-409 Link Here
404
                    <th class="tax_excluded">&nbsp;</th>
406
                    <th class="tax_excluded">&nbsp;</th>
405
                    <th class="tax_included">&nbsp;</th>
407
                    <th class="tax_included">&nbsp;</th>
406
                    <th class="tax_included">&nbsp;</th>
408
                    <th class="tax_included">&nbsp;</th>
409
                    <th class="replacementprice">&nbsp;</th>
407
                    <th>[% total_quantity | html %]</th>
410
                    <th>[% total_quantity | html %]</th>
408
                    <th class="tax_excluded">[% total_tax_excluded | $Price | html %]</th>
411
                    <th class="tax_excluded">[% total_tax_excluded | $Price | html %]</th>
409
                    <th class="tax_included">[% total_tax_included | $Price | html %]</th>
412
                    <th class="tax_included">[% total_tax_included | $Price | html %]</th>
Lines 479-484 Link Here
479
                        <td class="number tax_excluded [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price | html %]</td>
482
                        <td class="number tax_excluded [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price | html %]</td>
480
                        <td class="number tax_included [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price | html %]</td>
483
                        <td class="number tax_included [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price | html %]</td>
481
                        <td class="number tax_included [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price | html %]</td>
484
                        <td class="number tax_included [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price | html %]</td>
485
                        <td class="number replacementprice [% IF books_loo.replacementprice.search(zero_regex) %]error[% END %]">[% books_loo.replacementprice | $Price | html %]</td>
482
                        <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity | html %]</td>
486
                        <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity | html %]</td>
483
                        <td class="number tax_excluded [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price | html %]</td>
487
                        <td class="number tax_excluded [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price | html %]</td>
484
                        <td class="number tax_included [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price | html %]</td>
488
                        <td class="number tax_included [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price | html %]</td>
Lines 541-546 Link Here
541
                  <th class="tax_excluded">ecost tax exc.</th>
545
                  <th class="tax_excluded">ecost tax exc.</th>
542
                  <th class="tax_included">RRP tax inc.</th>
546
                  <th class="tax_included">RRP tax inc.</th>
543
                  <th class="tax_included">ecost tax inc.</th>
547
                  <th class="tax_included">ecost tax inc.</th>
548
                  <th class="replacementprice">Replacement price</th>
544
                  <th>Qty.</th>
549
                  <th>Qty.</th>
545
                  <th class="tax_excluded">Total tax exc. ([% currency | html %])</th>
550
                  <th class="tax_excluded">Total tax exc. ([% currency | html %])</th>
546
                  <th class="tax_included">Total tax inc. ([% currency | html %])</th>
551
                  <th class="tax_included">Total tax inc. ([% currency | html %])</th>
Lines 593-598 Link Here
593
                    <td class="number tax_excluded">[% order.ecost_tax_excluded | $Price | html %]</td>
598
                    <td class="number tax_excluded">[% order.ecost_tax_excluded | $Price | html %]</td>
594
                    <td class="number tax_included">[% order.rrp_tax_included | $Price | html %]</td>
599
                    <td class="number tax_included">[% order.rrp_tax_included | $Price | html %]</td>
595
                    <td class="number tax_included">[% order.ecost_tax_included | $Price | html %]</td>
600
                    <td class="number tax_included">[% order.ecost_tax_included | $Price | html %]</td>
601
                    <td class="number replacementprice">[% order.replacementprice | $Price | html %]</td>
596
                    <td class="number">[% order.quantity | html %]</td>
602
                    <td class="number">[% order.quantity | html %]</td>
597
                    <td class="number tax_excluded">[% order.total_tax_excluded | $Price | html %]</td>
603
                    <td class="number tax_excluded">[% order.total_tax_excluded | $Price | html %]</td>
598
                    <td class="number tax_included">[% order.total_tax_included | $Price | html %]</td>
604
                    <td class="number tax_included">[% order.total_tax_included | $Price | html %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt (+5 lines)
Lines 244-249 Link Here
244
                <th>Library</th>
244
                <th>Library</th>
245
                <th class="tax_excluded">Actual cost tax exc.</th>
245
                <th class="tax_excluded">Actual cost tax exc.</th>
246
                <th class="tax_included">Actual cost tax inc.</th>
246
                <th class="tax_included">Actual cost tax inc.</th>
247
                <th class="replacementprice">Replacement price</th>
247
                <th>Qty.</th>
248
                <th>Qty.</th>
248
                <th class="tax_excluded">Total tax exc. ([% currency.symbol | html %])</th>
249
                <th class="tax_excluded">Total tax exc. ([% currency.symbol | html %])</th>
249
                <th class="tax_included">Total tax inc. ([% currency.symbol | html %])</th>
250
                <th class="tax_included">Total tax inc. ([% currency.symbol | html %])</th>
Lines 274-279 Link Here
274
                  <td><p>[% order.branchcode | html %]</p></td>
275
                  <td><p>[% order.branchcode | html %]</p></td>
275
                  <td class="number tax_excluded">[% order.unitprice_tax_excluded | $Price | html %]</td>
276
                  <td class="number tax_excluded">[% order.unitprice_tax_excluded | $Price | html %]</td>
276
                  <td class="number tax_included">[% order.unitprice_tax_included | $Price | html %]</td>
277
                  <td class="number tax_included">[% order.unitprice_tax_included | $Price | html %]</td>
278
                  <td class="number replacementprice">[% order.replacementprice | $Price | html %]</td>
277
                  <td class="number">[% order.quantity | html %]</td>
279
                  <td class="number">[% order.quantity | html %]</td>
278
                  <td class="number tax_excluded">[% order.total_tax_excluded | $Price | html %]</td>
280
                  <td class="number tax_excluded">[% order.total_tax_excluded | $Price | html %]</td>
279
                  <td class="number tax_included">[% order.total_tax_included | $Price | html %]</td>
281
                  <td class="number tax_included">[% order.total_tax_included | $Price | html %]</td>
Lines 289-294 Link Here
289
                    <th colspan="2">Total (GST [% tf.tax_rate * 100 | html %] %)</th>
291
                    <th colspan="2">Total (GST [% tf.tax_rate * 100 | html %] %)</th>
290
                    <th class="tax_excluded"></th>
292
                    <th class="tax_excluded"></th>
291
                    <th class="tax_included"></th>
293
                    <th class="tax_included"></th>
294
                    <th class="replacementprice"/>
292
                    <th>[% tf.quantity | html %]</th>
295
                    <th>[% tf.quantity | html %]</th>
293
                    <th class="tax_excluded">[% tf.total_tax_excluded | $Price | html %]</th>
296
                    <th class="tax_excluded">[% tf.total_tax_excluded | $Price | html %]</th>
294
                    <th class="tax_included">[% tf.total_tax_included | $Price | html %]</th>
297
                    <th class="tax_included">[% tf.total_tax_included | $Price | html %]</th>
Lines 301-306 Link Here
301
                <th colspan="2">Total ([% currency.symbol | html %])</th>
304
                <th colspan="2">Total ([% currency.symbol | html %])</th>
302
                <th class="tax_excluded"></th>
305
                <th class="tax_excluded"></th>
303
                <th class="tax_included"></th>
306
                <th class="tax_included"></th>
307
                <th class="replacementprice"/>
304
                <th>[% total_quantity | html %]</th>
308
                <th>[% total_quantity | html %]</th>
305
                <th class="tax_excluded">[% total_tax_excluded | $Price | html %]</th>
309
                <th class="tax_excluded">[% total_tax_excluded | $Price | html %]</th>
306
                <th class="tax_included">[% total_tax_included | $Price | html %]</th>
310
                <th class="tax_included">[% total_tax_included | $Price | html %]</th>
Lines 312-317 Link Here
312
                <th colspan="2">Total + Adjustments + Shipment cost ([% currency.symbol | html %])</th>
316
                <th colspan="2">Total + Adjustments + Shipment cost ([% currency.symbol | html %])</th>
313
                <th class="tax_excluded"></th>
317
                <th class="tax_excluded"></th>
314
                <th class="tax_included"></th>
318
                <th class="tax_included"></th>
319
                <th class="replacementprice"/>
315
                <th>[% total_quantity | html %]</th>
320
                <th>[% total_quantity | html %]</th>
316
                <th class="tax_excluded">[% total_tax_excluded_shipment + total_adj | $Price | html %]</th>
321
                <th class="tax_excluded">[% total_tax_excluded_shipment + total_adj | $Price | html %]</th>
317
                <th class="tax_included">[% total_tax_included_shipment | $Price | html %]</th>
322
                <th class="tax_included">[% total_tax_included_shipment | $Price | html %]</th>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-2 / +6 lines)
Lines 434-446 Link Here
434
            </li>
434
            </li>
435
            <li>
435
            <li>
436
                [% IF ( close ) %]
436
                [% IF ( close ) %]
437
                    <span class="label">Replacement cost: </span>
437
                    <span class="label">Retail price: </span>
438
                    <input type="hidden" name="rrp" id="rrp" value="[% rrp | html %]" />[% rrp | html %]  (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inc.[% ELSE %]tax exc.[% END %])
438
                    <input type="hidden" name="rrp" id="rrp" value="[% rrp | html %]" />[% rrp | html %]  (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inc.[% ELSE %]tax exc.[% END %])
439
                [% ELSE %]
439
                [% ELSE %]
440
                    <label for="rrp">Replacement cost: </label>
440
                    <label for="rrp">Retail price: </label>
441
                    <input type="text" size="20" name="rrp" id="rrp" value="[% rrp | html %]" /> (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inc.[% ELSE %]tax exc.[% END %])
441
                    <input type="text" size="20" name="rrp" id="rrp" value="[% rrp | html %]" /> (adjusted for [% cur_active | html %], [% IF (listincgst == 1) %]tax inc.[% ELSE %]tax exc.[% END %])
442
                [% END %]
442
                [% END %]
443
            </li>
443
            </li>
444
            <li>
445
                <label for="replacementprice">Replacement cost: </label>
446
                <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | html %]" />
447
            </li>
444
            <li>
448
            <li>
445
                <label for="ecost">Budgeted cost: </label>
449
                <label for="ecost">Budgeted cost: </label>
446
                <input type="text" size="20" name="ecost" id="ecost" value="[% ecost | html %]" readonly="readonly"  /> [% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
450
                <input type="text" size="20" name="ecost" id="ecost" value="[% ecost | html %]" readonly="readonly"  /> [% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt (-1 / +5 lines)
Lines 240-246 Link Here
240
            <input type="hidden" name="tax_rate" value="0" />
240
            <input type="hidden" name="tax_rate" value="0" />
241
        [% END %]
241
        [% END %]
242
242
243
        <li><label for="rrp">Replacement cost: </label>[% rrp | $Price | html %]</li>
243
        <li><label for="rrp">Retail price: </label>[% rrp | $Price | html %]</li>
244
        <li>
245
            <label for="replacementprice">Replacement price:</label>
246
            <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | $Price | html %]" />
247
        </li>
244
        <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price | html %]</li>
248
        <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price | html %]</li>
245
        <li>
249
        <li>
246
            <label for="unitprice">Actual cost:</label>
250
            <label for="unitprice">Actual cost:</label>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt (-87 / +93 lines)
Lines 103-108 Link Here
103
            <th>Order line search</th>
103
            <th>Order line search</th>
104
            <th>Summary search</th>
104
            <th>Summary search</th>
105
            <th>&nbsp;</th>
105
            <th>&nbsp;</th>
106
            <th>Replacement price search</th>
106
            <th>Quantity search</th>
107
            <th>Quantity search</th>
107
            <th>Unit cost search</th>
108
            <th>Unit cost search</th>
108
            <th>Order cost search</th>
109
            <th>Order cost search</th>
Lines 116-121 Link Here
116
            <th>Order line</th>
117
            <th>Order line</th>
117
            <th>Summary</th>
118
            <th>Summary</th>
118
            <th>More</th>
119
            <th>More</th>
120
            <th>Replacement price</th>
119
            <th>Quantity</th>
121
            <th>Quantity</th>
120
            <th>Unit cost</th>
122
            <th>Unit cost</th>
121
            <th>Order cost</th>
123
            <th>Order cost</th>
Lines 168-173 Link Here
168
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber | html %]" class="previewData">MARC</a><br>
170
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber | html %]" class="previewData">MARC</a><br>
169
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=[% loop_order.biblionumber | html %]" class="previewData">Card</a>
171
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=[% loop_order.biblionumber | html %]" class="previewData">Card</a>
170
                </td>
172
                </td>
173
                <td>[% loop_order.replacementprice | $Price | html %]</td>
171
                <td>[% loop_order.quantity | html %]</td>
174
                <td>[% loop_order.quantity | html %]</td>
172
                <td>[% loop_order.ecost | $Price | html %]</td>
175
                <td>[% loop_order.ecost | $Price | html %]</td>
173
                <td>[% loop_order.total | $Price | html %]</td>
176
                <td>[% loop_order.total | $Price | html %]</td>
Lines 228-233 Link Here
228
          <th title="Item holds / Total holds">Holds</th>
231
          <th title="Item holds / Total holds">Holds</th>
229
          <th>Summary</th>
232
          <th>Summary</th>
230
          <th>More</th>
233
          <th>More</th>
234
          <th>Replacement price</th>
231
          <th>Quantity</th>
235
          <th>Quantity</th>
232
          <th>Fund</th>
236
          <th>Fund</th>
233
          <th>Est cost</th>
237
          <th>Est cost</th>
Lines 319-324 Link Here
319
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber | html %]" class="previewData">MARC</a><br>
323
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber | html %]" class="previewData">MARC</a><br>
320
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=[% order.biblionumber | html %]" class="previewData">Card</a>
324
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=[% order.biblionumber | html %]" class="previewData">Card</a>
321
                </td>
325
                </td>
326
                <td>[% order.replacementprice | $Price | html %]</td>
322
                <td>[% order.quantityreceived | html %]</td>
327
                <td>[% order.quantityreceived | html %]</td>
323
                <td>[% order.budget.budget_name | html %]</td>
328
                <td>[% order.budget.budget_name | html %]</td>
324
                <td>[% order.ecost | $Price | html %]</td>
329
                <td>[% order.ecost | $Price | html %]</td>
Lines 443-532 Link Here
443
        var sticky_filters = [% sticky_filters | html %];
448
        var sticky_filters = [% sticky_filters | html %];
444
449
445
        $(document).ready(function(){
450
        $(document).ready(function(){
446
            if ( $("#pendingt").length ) {
451
          if ( $("#pendingt").length ) {
447
                var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
452
            var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
448
                    "bStateSave": true,
453
                "bStateSave": true,
449
                    "iCookieDuration": 60*60*24*1000, // 1000 days
454
                "iCookieDuration": 60*60*24*1000, // 1000 days
450
                    "iDisplayLength": 10,
455
                "iDisplayLength": 10,
451
                    "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
456
                "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
452
                    "aoColumnDefs": [
457
                "aoColumnDefs": [
453
                        { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
458
                    { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
454
                    ],
459
                ],
455
                    "aoColumns": [
460
                "aoColumns": [
456
                        { "sType": "html" },
461
                    { "sType": "html" },
457
                        { "sType": "html" },
462
                    { "sType": "html" },
458
                        { "sType": "num-html" },
463
                    { "sType": "num-html" },
459
                        { "sType": "anti-the" },
464
                    { "sType": "anti-the" },
460
                        null,
465
                    null,
461
                        null,
466
                    null,
462
                        null,
467
                    null,
463
                        null,
468
                    null,
464
                        null,
469
                    null,
465
                        null,
470
                    null,
466
                        null,
471
                    null,
467
                    ],
472
                    null,
468
                    'bAutoWidth': false,
473
                ],
469
                    "sPaginationType": "four_button"
474
                'bAutoWidth': false,
470
                })
475
                "sPaginationType": "four_button"
471
                ).columnFilter({
476
            } )
472
                    sPlaceHolder: "head:after",
477
            ).columnFilter({
473
                    aoColumns: [
478
                sPlaceHolder: "head:after",
474
                        { type: "text" },
479
                aoColumns: [
475
                        { type: "text" },
480
                    { type: "text" },
476
                        { type: "text" },
481
                    { type: "text" },
477
                        { type: "text" },
482
                    { type: "text" },
478
                        null,
483
                    { type: "text" },
479
                        { type: "text" },
484
                    null,
480
                        { type: "text" },
485
                    { type: "text" },
481
                        { type: "text" },
486
                    { type: "text" },
482
                        { type: "text" },
487
                    { type: "text" },
483
                        null,
488
                    { type: "text" },
484
                        null
489
                    { type: "text" },
485
                    ]
490
                    null,
486
                });
491
                    null
487
            }
492
                ]
493
            });
494
          }
495
496
          if ( $("#receivedt").length ) {
497
            var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
498
                "bStateSave": true,
499
                "iCookieDuration": 60*60*24*1000, // 1000 days
500
                "iDisplayLength": 10,
501
                "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
502
                "aoColumnDefs": [
503
                    { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
504
                ],
505
                "aoColumns": [
506
                    { "sType": "html" },
507
                    { "sType": "html" },
508
                    { "sType": "html" },
509
                    { "sType": "num-html" },
510
                    { "sType": "anti-the" },
511
                    null,
512
                    null,
513
                    null,
514
                    null,
515
                    null,
516
                    null,
517
                    null
518
                ],
519
                "sPaginationType": "four_button"
520
            }));
521
          }
488
522
489
            if ( $("#receivedt").length ) {
523
          // Keep filters from finishreceive.pl to parcel.pl
490
                var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
524
          $.cookie("filter_parcel_summary", $("#summaryfilter").val());
491
                    "bStateSave": true,
525
          $.cookie("filter_parcel_basketname", $("#basketfilter").val());
492
                    "iCookieDuration": 60*60*24*1000, // 1000 days
526
          $.cookie("filter_parcel_orderno", $("#orderfilter").val());
493
                    "iDisplayLength": 10,
527
          $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
494
                    "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
528
          $.cookie("filter_parcel_ean", $("#eanfilter").val());
495
                    "aoColumnDefs": [
496
                        { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
497
                    ],
498
                    "aoColumns": [
499
                        { "sType": "html" },
500
                        { "sType": "html" },
501
                        { "sType": "html" },
502
                        { "sType": "num-html" },
503
                        { "sType": "anti-the" },
504
                        null,
505
                        null,
506
                        null,
507
                        null,
508
                        null,
509
                        null,
510
                        null
511
                    ],
512
                    "sPaginationType": "four_button"
513
                }));
514
            }
515
529
516
            // Keep filters from finishreceive.pl to parcel.pl
530
          $("#filterform").on('submit', function(){
517
            $.cookie("filter_parcel_summary", $("#summaryfilter").val());
531
            $.cookie("filter_parcel_summary", $("#summaryfilter").val());
518
            $.cookie("filter_parcel_basketname", $("#basketfilter").val());
532
            $.cookie("filter_parcel_basketname", $("#basketfilter").val());
519
            $.cookie("filter_parcel_orderno", $("#orderfilter").val());
533
            $.cookie("filter_parcel_orderno", $("#orderfilter").val());
520
            $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
534
            $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
521
            $.cookie("filter_parcel_ean", $("#eanfilter").val());
535
            $.cookie("filter_parcel_ean", $("#eanfilter").val());
522
536
          });
523
            $("#filterform").on('submit', function(){
524
                $.cookie("filter_parcel_summary", $("#summaryfilter").val());
525
                $.cookie("filter_parcel_basketname", $("#basketfilter").val());
526
                $.cookie("filter_parcel_orderno", $("#orderfilter").val());
527
                $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
528
                $.cookie("filter_parcel_ean", $("#eanfilter").val());
529
            });
530
537
531
            $(".previewData").on("click", function(e){
538
            $(".previewData").on("click", function(e){
532
                e.preventDefault();
539
                e.preventDefault();
Lines 543-563 Link Here
543
550
544
        });
551
        });
545
552
546
        // Case-insensitive version of jquery's contains function
553
         // Case-insensitive version of jquery's contains function
547
        jQuery.extend(jQuery.expr[':'], {
554
         jQuery.extend(jQuery.expr[':'], {
548
            icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
555
	    icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
549
        });
556
         });
550
557
551
         // Contains exactly function
558
         // Contains exactly function
552
        jQuery.extend(jQuery.expr[':'], {
559
         jQuery.extend(jQuery.expr[':'], {
553
            containsExactly: "$(a).text() == m[3]"
560
              containsExactly: "$(a).text() == m[3]"
554
        });
561
         });
555
562
556
        function transfer_order_popup(ordernumber) {
563
         function transfer_order_popup(ordernumber) {
557
            var url = "/cgi-bin/koha/acqui/transferorder.pl?"
564
            var url = "/cgi-bin/koha/acqui/transferorder.pl?"
558
                + "ordernumber=" + ordernumber
565
                + "ordernumber=" + ordernumber
559
                window.open(url, 'TransferOrder');
566
                window.open(url, 'TransferOrder');
560
        }
567
         }
561
    </script>
568
    </script>
562
[% END %]
569
[% END %]
563
570
564
- 

Return to bug 18639