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 566-572 sub import_biblios_list { Link Here
566
                        'quantity' => $item_quantity,
569
                        'quantity' => $item_quantity,
567
                        'budget_code' => $item_budget_code || $budget_code,
570
                        'budget_code' => $item_budget_code || $budget_code,
568
                        'itemprice' => $item_price || $price,
571
                        'itemprice' => $item_price || $price,
569
                        'replacementprice' => $item_replacement_price,
572
                        'replacementprice' => $item_replacement_price || $replacementprice,
570
                        'itemcallnumber' => $item_callnumber,
573
                        'itemcallnumber' => $item_callnumber,
571
                    );
574
                    );
572
                    $all_items_quantity++;
575
                    $all_items_quantity++;
Lines 583-588 sub import_biblios_list { Link Here
583
586
584
        if ($alliteminfos == -1 || scalar(@$alliteminfos) == 0) {
587
        if ($alliteminfos == -1 || scalar(@$alliteminfos) == 0) {
585
            $cellrecord{price} = $price || '';
588
            $cellrecord{price} = $price || '';
589
            $cellrecord{replacementprice} = $replacementprice || '';
586
            $cellrecord{quantity} = $quantity || '';
590
            $cellrecord{quantity} = $quantity || '';
587
            $cellrecord{budget_id} = $budget_id || '';
591
            $cellrecord{budget_id} = $budget_id || '';
588
            $cellrecord{discount} = $discount || '';
592
            $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 357-362 Link Here
357
                        <th class="tax_excluded">ecost tax exc.</th>
357
                        <th class="tax_excluded">ecost tax exc.</th>
358
                        <th class="tax_included">RRP tax inc.</th>
358
                        <th class="tax_included">RRP tax inc.</th>
359
                        <th class="tax_included">ecost tax inc.</th>
359
                        <th class="tax_included">ecost tax inc.</th>
360
                        <th class="replacementprice">Replacement price</th>
360
                        <th>Qty.</th>
361
                        <th>Qty.</th>
361
                        <th class="tax_excluded">Total tax exc. ([% currency %])</th>
362
                        <th class="tax_excluded">Total tax exc. ([% currency %])</th>
362
                        <th class="tax_included">Total tax inc. ([% currency %])</th>
363
                        <th class="tax_included">Total tax inc. ([% currency %])</th>
Lines 381-386 Link Here
381
                        <th class="tax_excluded">&nbsp;</th>
382
                        <th class="tax_excluded">&nbsp;</th>
382
                        <th class="tax_included">&nbsp;</th>
383
                        <th class="tax_included">&nbsp;</th>
383
                        <th class="tax_included">&nbsp;</th>
384
                        <th class="tax_included">&nbsp;</th>
385
                        <th class="replacementprice">&nbsp;</th>
384
                        <th>[% foot_loo.quantity %]</th>
386
                        <th>[% foot_loo.quantity %]</th>
385
                        <th class="tax_excluded">[% foot_loo.total_tax_excluded | $Price%]</th>
387
                        <th class="tax_excluded">[% foot_loo.total_tax_excluded | $Price%]</th>
386
                        <th class="tax_included">[% foot_loo.total_tax_included | $Price %]</th>
388
                        <th class="tax_included">[% foot_loo.total_tax_included | $Price %]</th>
Lines 403-408 Link Here
403
                    <th class="tax_excluded">&nbsp;</th>
405
                    <th class="tax_excluded">&nbsp;</th>
404
                    <th class="tax_included">&nbsp;</th>
406
                    <th class="tax_included">&nbsp;</th>
405
                    <th class="tax_included">&nbsp;</th>
407
                    <th class="tax_included">&nbsp;</th>
408
                    <th class="replacementprice">&nbsp;</th>
406
                    <th>[% total_quantity %]</th>
409
                    <th>[% total_quantity %]</th>
407
                    <th class="tax_excluded">[% total_tax_excluded | $Price %]</th>
410
                    <th class="tax_excluded">[% total_tax_excluded | $Price %]</th>
408
                    <th class="tax_included">[% total_tax_included | $Price %]</th>
411
                    <th class="tax_included">[% total_tax_included | $Price %]</th>
Lines 478-483 Link Here
478
                        <td class="number tax_excluded [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price%]</td>
481
                        <td class="number tax_excluded [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price%]</td>
479
                        <td class="number tax_included [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price %]</td>
482
                        <td class="number tax_included [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_included | $Price %]</td>
480
                        <td class="number tax_included [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price %]</td>
483
                        <td class="number tax_included [% IF books_loo.ecost_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_included | $Price %]</td>
484
                        <td class="number replacementprice [% IF books_loo.replacementprice.search(zero_regex) %]error[% END %]">[% books_loo.replacementprice | $Price %]</td>
481
                        <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity %]</td>
485
                        <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity %]</td>
482
                        <td class="number tax_excluded [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price %]</td>
486
                        <td class="number tax_excluded [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $Price %]</td>
483
                        <td class="number tax_included [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price %]</td>
487
                        <td class="number tax_included [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price %]</td>
Lines 540-545 Link Here
540
                  <th class="tax_excluded">ecost tax exc.</th>
544
                  <th class="tax_excluded">ecost tax exc.</th>
541
                  <th class="tax_included">RRP tax inc.</th>
545
                  <th class="tax_included">RRP tax inc.</th>
542
                  <th class="tax_included">ecost tax inc.</th>
546
                  <th class="tax_included">ecost tax inc.</th>
547
                  <th class="replacementprice">Replacement price</th>
543
                  <th>Qty.</th>
548
                  <th>Qty.</th>
544
                  <th class="tax_excluded">Total tax exc. ([% currency %])</th>
549
                  <th class="tax_excluded">Total tax exc. ([% currency %])</th>
545
                  <th class="tax_included">Total tax inc. ([% currency %])</th>
550
                  <th class="tax_included">Total tax inc. ([% currency %])</th>
Lines 592-597 Link Here
592
                    <td class="number tax_excluded">[% order.ecost_tax_excluded | $Price %]</td>
597
                    <td class="number tax_excluded">[% order.ecost_tax_excluded | $Price %]</td>
593
                    <td class="number tax_included">[% order.rrp_tax_included | $Price %]</td>
598
                    <td class="number tax_included">[% order.rrp_tax_included | $Price %]</td>
594
                    <td class="number tax_included">[% order.ecost_tax_included | $Price %]</td>
599
                    <td class="number tax_included">[% order.ecost_tax_included | $Price %]</td>
600
                    <td class="number replacementprice">[% order.replacementprice | $Price %]</td>
595
                    <td class="number">[% order.quantity %]</td>
601
                    <td class="number">[% order.quantity %]</td>
596
                    <td class="number tax_excluded">[% order.total_tax_excluded | $Price %]</td>
602
                    <td class="number tax_excluded">[% order.total_tax_excluded | $Price %]</td>
597
                    <td class="number tax_included">[% order.total_tax_included | $Price %]</td>
603
                    <td class="number tax_included">[% order.total_tax_included | $Price %]</td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt (+5 lines)
Lines 99-104 Link Here
99
                <th>Library</th>
99
                <th>Library</th>
100
                <th class="tax_excluded">Actual cost tax exc.</th>
100
                <th class="tax_excluded">Actual cost tax exc.</th>
101
                <th class="tax_included">Actual cost tax inc.</th>
101
                <th class="tax_included">Actual cost tax inc.</th>
102
                <th class="replacementprice">Replacement price</th>
102
                <th>Qty.</th>
103
                <th>Qty.</th>
103
                <th class="tax_excluded">Total tax exc. ([% currency.symbol %])</th>
104
                <th class="tax_excluded">Total tax exc. ([% currency.symbol %])</th>
104
                <th class="tax_included">Total tax inc. ([% currency.symbol %])</th>
105
                <th class="tax_included">Total tax inc. ([% currency.symbol %])</th>
Lines 129-134 Link Here
129
                  <td><p>[% order.branchcode %]</p></td>
130
                  <td><p>[% order.branchcode %]</p></td>
130
                  <td class="number tax_excluded">[% order.unitprice_tax_excluded | $Price %]</td>
131
                  <td class="number tax_excluded">[% order.unitprice_tax_excluded | $Price %]</td>
131
                  <td class="number tax_included">[% order.unitprice_tax_included | $Price %]</td>
132
                  <td class="number tax_included">[% order.unitprice_tax_included | $Price %]</td>
133
                  <td class="number replacementprice">[% order.replacementprice | $Price %]</td>
132
                  <td class="number">[% order.quantity %]</td>
134
                  <td class="number">[% order.quantity %]</td>
133
                  <td class="number tax_excluded">[% order.total_tax_excluded | $Price %]</td>
135
                  <td class="number tax_excluded">[% order.total_tax_excluded | $Price %]</td>
134
                  <td class="number tax_included">[% order.total_tax_included | $Price %]</td>
136
                  <td class="number tax_included">[% order.total_tax_included | $Price %]</td>
Lines 144-149 Link Here
144
                    <th colspan="2">Total (GST [% tf.tax_rate * 100 %] %)</th>
146
                    <th colspan="2">Total (GST [% tf.tax_rate * 100 %] %)</th>
145
                    <th class="tax_excluded"></th>
147
                    <th class="tax_excluded"></th>
146
                    <th class="tax_included"></th>
148
                    <th class="tax_included"></th>
149
                    <th class="replacementprice"/>
147
                    <th>[% tf.quantity %]</th>
150
                    <th>[% tf.quantity %]</th>
148
                    <th class="tax_excluded">[% tf.total_tax_excluded | $Price %]</th>
151
                    <th class="tax_excluded">[% tf.total_tax_excluded | $Price %]</th>
149
                    <th class="tax_included">[% tf.total_tax_included | $Price %]</th>
152
                    <th class="tax_included">[% tf.total_tax_included | $Price %]</th>
Lines 156-161 Link Here
156
                <th colspan="2">Total ([% currency.symbol %])</th>
159
                <th colspan="2">Total ([% currency.symbol %])</th>
157
                <th class="tax_excluded"></th>
160
                <th class="tax_excluded"></th>
158
                <th class="tax_included"></th>
161
                <th class="tax_included"></th>
162
                <th class="replacementprice"/>
159
                <th>[% total_quantity %]</th>
163
                <th>[% total_quantity %]</th>
160
                <th class="tax_excluded">[% total_tax_excluded | $Price %]</th>
164
                <th class="tax_excluded">[% total_tax_excluded | $Price %]</th>
161
                <th class="tax_included">[% total_tax_included | $Price %]</th>
165
                <th class="tax_included">[% total_tax_included | $Price %]</th>
Lines 167-172 Link Here
167
                <th colspan="2">Total + Shipment cost ([% currency.symbol %])</th>
171
                <th colspan="2">Total + Shipment cost ([% currency.symbol %])</th>
168
                <th class="tax_excluded"></th>
172
                <th class="tax_excluded"></th>
169
                <th class="tax_included"></th>
173
                <th class="tax_included"></th>
174
                <th class="replacementprice"/>
170
                <th>[% total_quantity %]</th>
175
                <th>[% total_quantity %]</th>
171
                <th class="tax_excluded">[% total_tax_excluded_shipment | $Price %]</th>
176
                <th class="tax_excluded">[% total_tax_excluded_shipment | $Price %]</th>
172
                <th class="tax_included">[% total_tax_included_shipment | $Price %]</th>
177
                <th class="tax_included">[% total_tax_included_shipment | $Price %]</th>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-2 / +6 lines)
Lines 433-445 Link Here
433
            </li>
433
            </li>
434
            <li>
434
            <li>
435
                [% IF ( close ) %]
435
                [% IF ( close ) %]
436
                    <span class="label">Replacement cost: </span>
436
                    <span class="label">Retail price: </span>
437
                    <input type="hidden" name="rrp" id="rrp" value="[% rrp %]" />[% rrp %]  (adjusted for [% cur_active %], [% IF (listincgst == 1) %]tax inc.[% ELSE %]tax exc.[% END %])
437
                    <input type="hidden" name="rrp" id="rrp" value="[% rrp %]" />[% rrp %]  (adjusted for [% cur_active %], [% IF (listincgst == 1) %]tax inc.[% ELSE %]tax exc.[% END %])
438
                [% ELSE %]
438
                [% ELSE %]
439
                    <label for="rrp">Replacement cost: </label>
439
                    <label for="rrp">Retail price: </label>
440
                    <input type="text" size="20" name="rrp" id="rrp" value="[% rrp %]" /> (adjusted for [% cur_active %], [% IF (listincgst == 1) %]tax inc.[% ELSE %]tax exc.[% END %])
440
                    <input type="text" size="20" name="rrp" id="rrp" value="[% rrp %]" /> (adjusted for [% cur_active %], [% IF (listincgst == 1) %]tax inc.[% ELSE %]tax exc.[% END %])
441
                [% END %]
441
                [% END %]
442
            </li>
442
            </li>
443
            <li>
444
                <label for="replacementprice">Replacement cost: </label>
445
                <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice %]" />
446
            </li>
443
            <li>
447
            <li>
444
                <label for="ecost">Budgeted cost: </label>
448
                <label for="ecost">Budgeted cost: </label>
445
                <input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" readonly="readonly"  /> [% IF (listincgst == 1) %](tax inc.)[% ELSE %](tax exc.)[% END %]
449
                <input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" 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 238-244 Link Here
238
            <input type="hidden" name="tax_rate" value="0" />
238
            <input type="hidden" name="tax_rate" value="0" />
239
        [% END %]
239
        [% END %]
240
240
241
        <li><label for="rrp">Replacement cost: </label>[% rrp | $Price %]</li>
241
        <li><label for="rrp">Retail price: </label>[% rrp | $Price %]</li>
242
        <li>
243
            <label for="replacementprice">Replacement price:</label>
244
            <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | $Price %]" />
245
        </li>
242
        <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price %]</li>
246
        <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price %]</li>
243
        <li>
247
        <li>
244
            <label for="unitprice">Actual cost:</label>
248
            <label for="unitprice">Actual cost:</label>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt (-96 / +102 lines)
Lines 102-107 Link Here
102
            <th>Order line search</th>
102
            <th>Order line search</th>
103
            <th>Summary search</th>
103
            <th>Summary search</th>
104
            <th>&nbsp;</th>
104
            <th>&nbsp;</th>
105
            <th>Replacement price search</th>
105
            <th>Quantity search</th>
106
            <th>Quantity search</th>
106
            <th>Unit cost search</th>
107
            <th>Unit cost search</th>
107
            <th>Order cost search</th>
108
            <th>Order cost search</th>
Lines 115-120 Link Here
115
            <th>Order line</th>
116
            <th>Order line</th>
116
            <th>Summary</th>
117
            <th>Summary</th>
117
            <th>More</th>
118
            <th>More</th>
119
            <th>Replacement price</th>
118
            <th>Quantity</th>
120
            <th>Quantity</th>
119
            <th>Unit cost</th>
121
            <th>Unit cost</th>
120
            <th>Order cost</th>
122
            <th>Order cost</th>
Lines 167-172 Link Here
167
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber %]" class="previewData">MARC</a><br>
169
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% loop_order.biblionumber %]" class="previewData">MARC</a><br>
168
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=[% loop_order.biblionumber %]" class="previewData">Card</a>
170
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=[% loop_order.biblionumber %]" class="previewData">Card</a>
169
                </td>
171
                </td>
172
                <td>[% loop_order.replacementprice | $Price %]</td>
170
                <td>[% loop_order.quantity %]</td>
173
                <td>[% loop_order.quantity %]</td>
171
                <td>[% loop_order.ecost | $Price %]</td>
174
                <td>[% loop_order.ecost | $Price %]</td>
172
                <td>[% loop_order.total | $Price %]</td>
175
                <td>[% loop_order.total | $Price %]</td>
Lines 227-232 Link Here
227
          <th title="Item holds / Total holds">Holds</th>
230
          <th title="Item holds / Total holds">Holds</th>
228
          <th>Summary</th>
231
          <th>Summary</th>
229
          <th>More</th>
232
          <th>More</th>
233
          <th>Replacement price</th>
230
          <th>Quantity</th>
234
          <th>Quantity</th>
231
          <th>Fund</th>
235
          <th>Fund</th>
232
          <th>Est cost</th>
236
          <th>Est cost</th>
Lines 318-323 Link Here
318
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber %]" class="previewData">MARC</a><br>
322
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% order.biblionumber %]" class="previewData">MARC</a><br>
319
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=[% order.biblionumber %]" class="previewData">Card</a>
323
                  <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&amp;id=[% order.biblionumber %]" class="previewData">Card</a>
320
                </td>
324
                </td>
325
                <td>[% order.replacementprice | $Price %]</td>
321
                <td>[% order.quantityreceived %]</td>
326
                <td>[% order.quantityreceived %]</td>
322
                <td>[% order.budget.budget_name %]</td>
327
                <td>[% order.budget.budget_name %]</td>
323
                <td>[% order.ecost | $Price %]</td>
328
                <td>[% order.ecost | $Price %]</td>
Lines 437-532 Link Here
437
    [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") %]
442
    [% Asset.js("lib/jquery/plugins/jquery.cookie.min.js") %]
438
    <style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
443
    <style type="text/css">#dataPreview { width : 80%; } @media (max-width: 767px) { #dataPreview { margin: 0; width : auto; } }</style>
439
    <script type="text/javascript">
444
    <script type="text/javascript">
440
445
    
441
        dt_overwrite_html_sorting_localeCompare();
446
        dt_overwrite_html_sorting_localeCompare();
442
        var sticky_filters = [% sticky_filters %];
447
        var sticky_filters = [% sticky_filters %];
443
448
    
444
        $(document).ready(function(){
449
        $(document).ready(function(){
445
            if ( $("#pendingt").length ) {
450
          if ( $("#pendingt").length ) {
446
                var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
451
            var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, {
447
                    "bStateSave": true,
452
                "bStateSave": true,
448
                    "iCookieDuration": 60*60*24*1000, // 1000 days
453
                "iCookieDuration": 60*60*24*1000, // 1000 days
449
                    "iDisplayLength": 10,
454
                "iDisplayLength": 10,
450
                    "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
455
                "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
451
                    "aoColumnDefs": [
456
                "aoColumnDefs": [
452
                        { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
457
                    { "aTargets": [ 4, 9, 10 ], "bSortable": false, "bSearchable": false },
453
                    ],
458
                ],
454
                    "aoColumns": [
459
                "aoColumns": [
455
                        { "sType": "html" },
460
                    { "sType": "html" },
456
                        { "sType": "html" },
461
                    { "sType": "html" },
457
                        { "sType": "num-html" },
462
                    { "sType": "num-html" },
458
                        { "sType": "anti-the" },
463
                    { "sType": "anti-the" },
459
                        null,
464
                    null,
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
                    ],
471
                    null,
467
                    'bAutoWidth': false,
472
                ],
468
                    "sPaginationType": "four_button"
473
                'bAutoWidth': false,
469
                })
474
                "sPaginationType": "four_button"
470
                ).columnFilter({
475
            } )
471
                    sPlaceHolder: "head:after",
476
            ).columnFilter({
472
                    aoColumns: [
477
                sPlaceHolder: "head:after",
473
                        { type: "text" },
478
                aoColumns: [
474
                        { type: "text" },
479
                    { type: "text" },
475
                        { type: "text" },
480
                    { type: "text" },
476
                        { type: "text" },
481
                    { type: "text" },
477
                        null,
482
                    { type: "text" },
478
                        { type: "text" },
483
                    null,
479
                        { type: "text" },
484
                    { type: "text" },
480
                        { type: "text" },
485
                    { type: "text" },
481
                        { type: "text" },
486
                    { type: "text" },
482
                        null,
487
                    { type: "text" },
483
                        null
488
                    { type: "text" },
484
                    ]
489
                    null,
485
                });
490
                    null
486
            }
491
                ]
487
492
            });
488
            if ( $("#receivedt").length ) {
493
          }
489
                var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
494
    
490
                    "bStateSave": true,
495
          if ( $("#receivedt").length ) {
491
                    "iCookieDuration": 60*60*24*1000, // 1000 days
496
            var receivedt = $("#receivedt").dataTable($.extend(true, {}, dataTablesDefaults, {
492
                    "iDisplayLength": 10,
497
                "bStateSave": true,
493
                    "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
498
                "iCookieDuration": 60*60*24*1000, // 1000 days
494
                    "aoColumnDefs": [
499
                "iDisplayLength": 10,
495
                        { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
500
                "aLengthMenu": [[5, 10, 20, 50, 100, -1], [5, 10, 20, 50, 100, _("All")]],
496
                    ],
501
                "aoColumnDefs": [
497
                    "aoColumns": [
502
                    { "aTargets": [ 5, -1 ], "bSortable": false, "bSearchable": false },
498
                        { "sType": "html" },
503
                ],
499
                        { "sType": "html" },
504
                "aoColumns": [
500
                        { "sType": "html" },
505
                    { "sType": "html" },
501
                        { "sType": "num-html" },
506
                    { "sType": "html" },
502
                        { "sType": "anti-the" },
507
                    { "sType": "html" },
503
                        null,
508
                    { "sType": "num-html" },
504
                        null,
509
                    { "sType": "anti-the" },
505
                        null,
510
                    null,
506
                        null,
511
                    null,
507
                        null,
512
                    null,
508
                        null,
513
                    null,
509
                        null
514
                    null,
510
                    ],
515
                    null,
511
                    "sPaginationType": "four_button"
516
                    null
512
                }));
517
                ],
513
            }
518
                "sPaginationType": "four_button"
514
519
            }));
515
            // Keep filters from finishreceive.pl to parcel.pl
520
          }
521
    
522
          // Keep filters from finishreceive.pl to parcel.pl
523
          $.cookie("filter_parcel_summary", $("#summaryfilter").val());
524
          $.cookie("filter_parcel_basketname", $("#basketfilter").val());
525
          $.cookie("filter_parcel_orderno", $("#orderfilter").val());
526
          $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
527
          $.cookie("filter_parcel_ean", $("#eanfilter").val());
528
    
529
          $("#filterform").on('submit', function(){
516
            $.cookie("filter_parcel_summary", $("#summaryfilter").val());
530
            $.cookie("filter_parcel_summary", $("#summaryfilter").val());
517
            $.cookie("filter_parcel_basketname", $("#basketfilter").val());
531
            $.cookie("filter_parcel_basketname", $("#basketfilter").val());
518
            $.cookie("filter_parcel_orderno", $("#orderfilter").val());
532
            $.cookie("filter_parcel_orderno", $("#orderfilter").val());
519
            $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
533
            $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
520
            $.cookie("filter_parcel_ean", $("#eanfilter").val());
534
            $.cookie("filter_parcel_ean", $("#eanfilter").val());
521
535
          });
522
            $("#filterform").on('submit', function(){
536
    
523
                $.cookie("filter_parcel_summary", $("#summaryfilter").val());
524
                $.cookie("filter_parcel_basketname", $("#basketfilter").val());
525
                $.cookie("filter_parcel_orderno", $("#orderfilter").val());
526
                $.cookie("filter_parcel_basketgroupname", $("#basketgroupnamefilter").val());
527
                $.cookie("filter_parcel_ean", $("#eanfilter").val());
528
            });
529
530
            $(".previewData").on("click", function(e){
537
            $(".previewData").on("click", function(e){
531
                e.preventDefault();
538
                e.preventDefault();
532
                var ltitle = $(this).text();
539
                var ltitle = $(this).text();
Lines 539-562 Link Here
539
                $("#dataPreviewLabel").html("");
546
                $("#dataPreviewLabel").html("");
540
                $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
547
                $("#dataPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
541
            });
548
            });
542
549
    
543
        });
544
545
        // Case-insensitive version of jquery's contains function
546
        jQuery.extend(jQuery.expr[':'], {
547
            icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
548
        });
550
        });
549
551
    
552
         // Case-insensitive version of jquery's contains function
553
         jQuery.extend(jQuery.expr[':'], {
554
    	    icontains : "jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0"
555
         });
556
    
550
         // Contains exactly function
557
         // Contains exactly function
551
        jQuery.extend(jQuery.expr[':'], {
558
         jQuery.extend(jQuery.expr[':'], {
552
            containsExactly: "$(a).text() == m[3]"
559
              containsExactly: "$(a).text() == m[3]"
553
        });
560
         });
554
561
    
555
        function transfer_order_popup(ordernumber) {
562
         function transfer_order_popup(ordernumber) {
556
            var url = "/cgi-bin/koha/acqui/transferorder.pl?"
563
            var url = "/cgi-bin/koha/acqui/transferorder.pl?"
557
                + "ordernumber=" + ordernumber
564
                + "ordernumber=" + ordernumber
558
                window.open(url, 'TransferOrder');
565
                window.open(url, 'TransferOrder');
559
        }
566
         }
560
    </script>
567
    </script>
561
[% END %]
568
[% END %]
562
569
563
- 

Return to bug 18639