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

(-)a/acqui/basket.pl (-22 / +22 lines)
Lines 306-312 if ( $op eq 'delete_confirm' ) { Link Here
306
306
307
    my @cancelledorders = GetCancelledOrders($basketno);
307
    my @cancelledorders = GetCancelledOrders($basketno);
308
    foreach (@cancelledorders) {
308
    foreach (@cancelledorders) {
309
        $_->{'line_total'} = sprintf("%.2f", $_->{'ecost'} * $_->{'quantity'});
309
        $_->{'line_total'} = $_->{'ecost'} * $_->{'quantity'};
310
    }
310
    }
311
311
312
    $template->param(
312
    $template->param(
Lines 330-338 if ( $op eq 'delete_confirm' ) { Link Here
330
        book_foot_loop       => \@book_foot_loop,
330
        book_foot_loop       => \@book_foot_loop,
331
        cancelledorders_loop => \@cancelledorders,
331
        cancelledorders_loop => \@cancelledorders,
332
        total_quantity       => $total_quantity,
332
        total_quantity       => $total_quantity,
333
        total_gste           => sprintf( "%.2f", $total_gste ),
333
        total_gste           => $total_gste,
334
        total_gsti           => sprintf( "%.2f", $total_gsti ),
334
        total_gsti           => $total_gsti,
335
        total_gstvalue       => sprintf( "%.2f", $total_gstvalue ),
335
        total_gstvalue       => $total_gstvalue,
336
        currency             => $cur->{'currency'},
336
        currency             => $cur->{'currency'},
337
        listincgst           => $bookseller->{listincgst},
337
        listincgst           => $bookseller->{listincgst},
338
        basketgroups         => $basketgroups,
338
        basketgroups         => $basketgroups,
Lines 358-382 sub get_order_infos { Link Here
358
    $line{budget_name}    = $budget->{budget_name};
358
    $line{budget_name}    = $budget->{budget_name};
359
    $line{rrp} = ConvertCurrency( $order->{'currency'}, $line{rrp} ); # FIXME from comm
359
    $line{rrp} = ConvertCurrency( $order->{'currency'}, $line{rrp} ); # FIXME from comm
360
    if ( $bookseller->{'listincgst'} ) {
360
    if ( $bookseller->{'listincgst'} ) {
361
        $line{rrpgsti} = sprintf( "%.2f", $line{rrp} );
361
        $line{rrpgsti} = $line{rrp};
362
        $line{gstgsti} = sprintf( "%.2f", $line{gstrate} * 100 );
362
        $line{gstgsti} = $line{gstrate} * 100;
363
        $line{rrpgste} = sprintf( "%.2f", $line{rrp} / ( 1 + ( $line{gstgsti} / 100 ) ) );
363
        $line{rrpgste} = $line{rrp} / ( 1 + ( $line{gstgsti} / 100 ) );
364
        $line{gstgste} = sprintf( "%.2f", $line{gstgsti} / ( 1 + ( $line{gstgsti} / 100 ) ) );
364
        $line{gstgste} = $line{gstgsti} / ( 1 + ( $line{gstgsti} / 100 ) );
365
        $line{ecostgsti} = sprintf( "%.2f", $line{ecost} );
365
        $line{ecostgsti} = $line{ecost};
366
        $line{ecostgste} = sprintf( "%.2f", $line{ecost} / ( 1 + ( $line{gstgsti} / 100 ) ) );
366
        $line{ecostgste} = $line{ecost} / ( 1 + ( $line{gstgsti} / 100 ) );
367
        $line{gstvalue} = sprintf( "%.2f", ( $line{ecostgsti} - $line{ecostgste} ) * $line{quantity});
367
        $line{gstvalue} = ( $line{ecostgsti} - $line{ecostgste} ) * $line{quantity};
368
        $line{totalgste} = sprintf( "%.2f", $order->{quantity} * $line{ecostgste} );
368
        $line{totalgste} = $order->{quantity} * $line{ecostgste};
369
        $line{totalgsti} = sprintf( "%.2f", $order->{quantity} * $line{ecostgsti} );
369
        $line{totalgsti} = $order->{quantity} * $line{ecostgsti};
370
    } else {
370
    } else {
371
        $line{rrpgsti} = sprintf( "%.2f", $line{rrp} * ( 1 + ( $line{gstrate} ) ) );
371
        $line{rrpgsti} = $line{rrp} * ( 1 + ( $line{gstrate} ) );
372
        $line{rrpgste} = sprintf( "%.2f", $line{rrp} );
372
        $line{rrpgste} = $line{rrp};
373
        $line{gstgsti} = sprintf( "%.2f", $line{gstrate} * 100 );
373
        $line{gstgsti} = $line{gstrate} * 100;
374
        $line{gstgste} = sprintf( "%.2f", $line{gstrate} * 100 );
374
        $line{gstgste} = $line{gstrate} * 100;
375
        $line{ecostgsti} = sprintf( "%.2f", $line{ecost} * ( 1 + ( $line{gstrate} ) ) );
375
        $line{ecostgsti} = $line{ecost} * ( 1 + ( $line{gstrate} ) );
376
        $line{ecostgste} = sprintf( "%.2f", $line{ecost} );
376
        $line{ecostgste} = $line{ecost};
377
        $line{gstvalue} = sprintf( "%.2f", ( $line{ecostgsti} - $line{ecostgste} ) * $line{quantity});
377
        $line{gstvalue} = ( $line{ecostgsti} - $line{ecostgste} ) * $line{quantity};
378
        $line{totalgste} = sprintf( "%.2f", $order->{quantity} * $line{ecostgste} );
378
        $line{totalgste} = $order->{quantity} * $line{ecostgste};
379
        $line{totalgsti} = sprintf( "%.2f", $order->{quantity} * $line{ecostgsti} );
379
        $line{totalgsti} = $order->{quantity} * $line{ecostgsti};
380
    }
380
    }
381
381
382
    if ( $line{uncertainprice} ) {
382
    if ( $line{uncertainprice} ) {
(-)a/acqui/basketgroup.pl (-18 / +18 lines)
Lines 233-257 sub printbasketgrouppdf{ Link Here
233
233
234
            $ord->{rrp} = ConvertCurrency( $ord->{'currency'}, $ord->{rrp} );
234
            $ord->{rrp} = ConvertCurrency( $ord->{'currency'}, $ord->{rrp} );
235
            if ( $bookseller->{'listincgst'} ) {
235
            if ( $bookseller->{'listincgst'} ) {
236
                $ord->{rrpgsti} = sprintf( "%.2f", $ord->{rrp} );
236
                $ord->{rrpgsti} = Koha::Prices::format( $ord->{rrp} );
237
                $ord->{gstgsti} = sprintf( "%.2f", $ord->{gstrate} * 100 );
237
                $ord->{gstgsti} = Koha::Prices::format( $ord->{gstrate} * 100 );
238
                $ord->{rrpgste} = sprintf( "%.2f", $ord->{rrp} / ( 1 + ( $ord->{gstgsti} / 100 ) ) );
238
                $ord->{rrpgste} = Koha::Prices::format( $ord->{rrp} / ( 1 + ( $ord->{gstgsti} / 100 ) ) );
239
                $ord->{gstgste} = sprintf( "%.2f", $ord->{gstgsti} / ( 1 + ( $ord->{gstgsti} / 100 ) ) );
239
                $ord->{gstgste} = Koha::Prices::format( $ord->{gstgsti} / ( 1 + ( $ord->{gstgsti} / 100 ) ) );
240
                $ord->{ecostgsti} = sprintf( "%.2f", $ord->{ecost} );
240
                $ord->{ecostgsti} = Koha::Prices::format( $ord->{ecost} );
241
                $ord->{ecostgste} = sprintf( "%.2f", $ord->{ecost} / ( 1 + ( $ord->{gstgsti} / 100 ) ) );
241
                $ord->{ecostgste} = Koha::Prices::format( $ord->{ecost} / ( 1 + ( $ord->{gstgsti} / 100 ) ) );
242
                $ord->{gstvalue} = sprintf( "%.2f", ( $ord->{ecostgsti} - $ord->{ecostgste} ) * $ord->{quantity});
242
                $ord->{gstvalue} = Koha::Prices::format( ( $ord->{ecostgsti} - $ord->{ecostgste} ) * $ord->{quantity});
243
                $ord->{totalgste} = sprintf( "%.2f", $ord->{quantity} * $ord->{ecostgste} );
243
                $ord->{totalgste} = Koha::Prices::format( $ord->{quantity} * $ord->{ecostgste} );
244
                $ord->{totalgsti} = sprintf( "%.2f", $ord->{quantity} * $ord->{ecostgsti} );
244
                $ord->{totalgsti} = Koha::Prices::format( $ord->{quantity} * $ord->{ecostgsti} );
245
            } else {
245
            } else {
246
                $ord->{rrpgsti} = sprintf( "%.2f", $ord->{rrp} * ( 1 + ( $ord->{gstrate} ) ) );
246
                $ord->{rrpgsti} = Koha::Prices::format( $ord->{rrp} * ( 1 + ( $ord->{gstrate} ) ) );
247
                $ord->{rrpgste} = sprintf( "%.2f", $ord->{rrp} );
247
                $ord->{rrpgste} = Koha::Prices::format( $ord->{rrp} );
248
                $ord->{gstgsti} = sprintf( "%.2f", $ord->{gstrate} * 100 );
248
                $ord->{gstgsti} = Koha::Prices::format( $ord->{gstrate} * 100 );
249
                $ord->{gstgste} = sprintf( "%.2f", $ord->{gstrate} * 100 );
249
                $ord->{gstgste} = Koha::Prices::format( $ord->{gstrate} * 100 );
250
                $ord->{ecostgsti} = sprintf( "%.2f", $ord->{ecost} * ( 1 + ( $ord->{gstrate} ) ) );
250
                $ord->{ecostgsti} = Koha::Prices::format( $ord->{ecost} * ( 1 + ( $ord->{gstrate} ) ) );
251
                $ord->{ecostgste} = sprintf( "%.2f", $ord->{ecost} );
251
                $ord->{ecostgste} = Koha::Prices::format( $ord->{ecost} );
252
                $ord->{gstvalue} = sprintf( "%.2f", ( $ord->{ecostgsti} - $ord->{ecostgste} ) * $ord->{quantity});
252
                $ord->{gstvalue} = Koha::Prices::format( ( $ord->{ecostgsti} - $ord->{ecostgste} ) * $ord->{quantity});
253
                $ord->{totalgste} = sprintf( "%.2f", $ord->{quantity} * $ord->{ecostgste} );
253
                $ord->{totalgste} = Koha::Prices::format( $ord->{quantity} * $ord->{ecostgste} );
254
                $ord->{totalgsti} = sprintf( "%.2f", $ord->{quantity} * $ord->{ecostgsti} );
254
                $ord->{totalgsti} = Koha::Prices::format( $ord->{quantity} * $ord->{ecostgsti} );
255
            }
255
            }
256
            my $bib = GetBiblioData($ord->{biblionumber});
256
            my $bib = GetBiblioData($ord->{biblionumber});
257
            my $itemtypes = GetItemTypes();
257
            my $itemtypes = GetItemTypes();
(-)a/acqui/neworderempty.pl (-6 / +4 lines)
Lines 379-387 $template->param( Link Here
379
    biblionumber         => $biblionumber,
379
    biblionumber         => $biblionumber,
380
    uncertainprice       => $data->{'uncertainprice'},
380
    uncertainprice       => $data->{'uncertainprice'},
381
    authorisedbyname     => $borrower->{'firstname'} . " " . $borrower->{'surname'},
381
    authorisedbyname     => $borrower->{'firstname'} . " " . $borrower->{'surname'},
382
    discount_2dp         => sprintf( "%.2f",  $bookseller->{'discount'} ) ,   # for display
383
    discount             => $bookseller->{'discount'},
382
    discount             => $bookseller->{'discount'},
384
    orderdiscount_2dp    => sprintf( "%.2f", $data->{'discount'} || 0 ),
385
    orderdiscount        => $data->{'discount'},
383
    orderdiscount        => $data->{'discount'},
386
    listincgst       => $bookseller->{'listincgst'},
384
    listincgst       => $bookseller->{'listincgst'},
387
    invoiceincgst    => $bookseller->{'invoiceincgst'},
385
    invoiceincgst    => $bookseller->{'invoiceincgst'},
Lines 405-414 $template->param( Link Here
405
    gst_values       => \@gst_values,
403
    gst_values       => \@gst_values,
406
    gstrate          => $data->{gstrate} ? $data->{gstrate}+0.0 : $bookseller->{gstrate} ? $bookseller->{gstrate}+0.0 : 0,
404
    gstrate          => $data->{gstrate} ? $data->{gstrate}+0.0 : $bookseller->{gstrate} ? $bookseller->{gstrate}+0.0 : 0,
407
    gstreg           => $bookseller->{'gstreg'},
405
    gstreg           => $bookseller->{'gstreg'},
408
    listprice        => sprintf( "%.2f", $data->{listprice} || $data->{price} || $listprice),
406
    listprice        => $data->{listprice} || $data->{price} || $listprice,
409
    total            => sprintf( "%.2f", ($data->{ecost} || 0) * ($data->{'quantity'} || 0) ),
407
    total            => ($data->{ecost} || 0) * ($data->{'quantity'} || 0),
410
    ecost            => sprintf( "%.2f", $data->{ecost} || 0),
408
    ecost            => $data->{ecost} || 0,
411
    unitprice        => sprintf( "%.2f", $data->{unitprice} || 0),
409
    unitprice        => $data->{unitprice} || 0,
412
    publishercode    => $data->{'publishercode'},
410
    publishercode    => $data->{'publishercode'},
413
    barcode_subfield => $barcode_subfield,
411
    barcode_subfield => $barcode_subfield,
414
    import_batch_id  => $import_batch_id,
412
    import_batch_id  => $import_batch_id,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-17 / +18 lines)
Lines 1-4 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE FormatNum %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</title>
4
<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</title>
4
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
Lines 346-360 Link Here
346
                                    <p>[<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]">Add note</a>]</p>
347
                                    <p>[<a href="/cgi-bin/koha/acqui/modordernotes.pl?ordernumber=[% books_loo.ordernumber %]">Add note</a>]</p>
347
                                [% END %]
348
                                [% END %]
348
                        </td>
349
                        </td>
349
                        <td class="number gste [% IF books_loo.rrpgste.search('^0') %]error[% END %]">[% books_loo.rrpgste %]</td>
350
                        <td class="number gste [% IF books_loo.rrpgste.search('^0') %]error[% END %]">[% FormatNum.Price( books_loo.rrpgste ) %]</td>
350
                        <td class="number gste [% IF books_loo.ecostgste.search('^0') %]error[% END %]">[% books_loo.ecostgste %]</td>
351
                        <td class="number gste [% IF books_loo.ecostgste.search('^0') %]error[% END %]">[% FormatNum.Price( bbooks_loo.ecostgste ) %]</td>
351
                        <td class="number gsti [% IF books_loo.rrpgsti.search('^0') %]error[% END %]">[% books_loo.rrpgsti %]</td>
352
                        <td class="number gsti [% IF books_loo.rrpgsti.search('^0') %]error[% END %]">[% FormatNum.Price( bbooks_loo.rrpgsti ) %]</td>
352
                        <td class="number gsti [% IF books_loo.ecostgsti.search('^0') %]error[% END %]">[% books_loo.ecostgsti %]</td>
353
                        <td class="number gsti [% IF books_loo.ecostgsti.search('^0') %]error[% END %]">[% FormatNum.Price( bbooks_loo.ecostgsti ) %]</td>
353
                        <td class="number [% IF books_loo.quantity.search('^0') %]error[% END %]">[% books_loo.quantity %]</td>
354
                        <td class="number [% IF books_loo.quantity.search('^0') %]error[% END %]">[% bbooks_loo.quantity%]</td>
354
                        <td class="number gste [% IF books_loo.totalgste.search('^0') %]error[% END %]">[% books_loo.totalgste %]</td>
355
                        <td class="number gste [% IF books_loo.totalgste.search('^0') %]error[% END %]">[% FormatNum.Price( bbooks_loo.totalgste ) %]</td>
355
                        <td class="number gsti [% IF books_loo.totalgsti.search('^0') %]error[% END %]">[% books_loo.totalgsti %]</td>
356
                        <td class="number gsti [% IF books_loo.totalgsti.search('^0') %]error[% END %]">[% FormatNum.Price( bbooks_loo.totalgsti ) %]</td>
356
                        <td class="number [% IF books_loo.gstgsti.search('^0') %]error[% END %]">[% books_loo.gstgsti %]</td>
357
                        <td class="number [% IF books_loo.gstgsti.search('^0') %]error[% END %]">[% FormatNum.Price( bbooks_loo.gstgsti ) %]</td>
357
                        <td class="number [% IF books_loo.gstvalue.search('^0') %]error[% END %]">[% books_loo.gstvalue %]</td>
358
                        <td class="number [% IF books_loo.gstvalue.search('^0') %]error[% END %]">[% FormatNum.Price( bbooks_loo.gstvalue ) %]</td>
358
                        <td>[% books_loo.budget_name %]</td>
359
                        <td>[% books_loo.budget_name %]</td>
359
                        [% IF ( active ) %]
360
                        [% IF ( active ) %]
360
                            [% UNLESS ( closedate ) %]
361
                            [% UNLESS ( closedate ) %]
Lines 433-447 Link Here
433
                        [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
434
                        [% IF ( books_loo.editionstatement ) %], [% books_loo.editionstatement %][% END %]
434
                      </p>
435
                      </p>
435
                    </td>
436
                    </td>
436
                    <td class="number gste">[% order.rrpgste %]</td>
437
                    <td class="number gste">[% FormatNum.Price( border.rrpgste ) %]</td>
437
                    <td class="number gste">[% order.ecostgste %]</td>
438
                    <td class="number gste">[% FormatNum.Price( border.ecostgste ) %]</td>
438
                    <td class="number gsti">[% order.rrpgsti %]</td>
439
                    <td class="number gsti">[% FormatNum.Price( border.rrpgsti ) %]</td>
439
                    <td class="number gsti">[% order.ecostgsti %]</td>
440
                    <td class="number gsti">[% FormatNum.Price( border.ecostgsti ) %]</td>
440
                    <td class="number">[% order.quantity %]</td>
441
                    <td class="number">[% order.quantity %]</td>
441
                    <td class="number gste">[% order.totalgste %]</td>
442
                    <td class="number gste">[% FormatNum.Price( border.totalgste ) %]</td>
442
                    <td class="number gsti">[% order.totalgsti %]</td>
443
                    <td class="number gsti">[% FormatNum.Price( border.totalgsti ) %]</td>
443
                    <td class="number">[% order.gstgsti %]</td>
444
                    <td class="number">[% FormatNum.Price( border.gstgsti ) %]</td>
444
                    <td class="number">[% order.gstvalue %]</td>
445
                    <td class="number">[% FormatNum.Price( border.gstvalue ) %]</td>
445
                    <td>[% order.budget_name %]
446
                    <td>[% order.budget_name %]
446
                  </tr>
447
                  </tr>
447
                [% END %]
448
                [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt (-17 / +17 lines)
Lines 1-4 Link Here
1
[% USE KohaDates %]
1
[% USE KohaDates %]
2
[% USE FormatNum %]
2
[% INCLUDE 'doc-head-open.inc' %]
3
[% INCLUDE 'doc-head-open.inc' %]
3
<title>Koha &rsaquo; Acquisitions &rsaquo; Basket [% basketno %] &rsaquo; [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber %])[% ELSE %]New order[% END %]</title>
4
<title>Koha &rsaquo; Acquisitions &rsaquo; Basket [% basketno %] &rsaquo; [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber %])[% ELSE %]New order[% END %]</title>
4
[% INCLUDE 'doc-head-close.inc' %]
5
[% INCLUDE 'doc-head-close.inc' %]
Lines 450-459 $(document).ready(function() Link Here
450
            <li>
451
            <li>
451
                [% IF ( close ) %]
452
                [% IF ( close ) %]
452
                    <span class="label">Vendor price: </span>
453
                    <span class="label">Vendor price: </span>
453
                    <input type="hidden" name="listprice" id="listprice" value="[% listprice %]" />[% listprice %]
454
                    <input type="hidden" name="listprice" id="listprice" value="[% listprice %]" />[% FormatNum.Price( listprice ) %]
454
                [% ELSE %]
455
                [% ELSE %]
455
                <label for="listprice">Vendor price: </label>
456
                <label for="listprice">Vendor price: </label>
456
                    <input type="text" size="20" name="listprice" id="listprice" value="[% listprice %]" onchange="updateCosts()" />
457
                    <input type="text" size="20" name="listprice" id="listprice" value="[% FormatNum.Price( listprice ) %]" onchange="updateCosts()" />
457
                [% END %]
458
                [% END %]
458
            </li>
459
            </li>
459
            [% UNLESS ( close ) %]
460
            [% UNLESS ( close ) %]
Lines 476-484 $(document).ready(function() Link Here
476
                        <select name="gstrate" id="gstrate" onchange="updateCosts();">
477
                        <select name="gstrate" id="gstrate" onchange="updateCosts();">
477
                        [% FOREACH gst IN gst_values %]
478
                        [% FOREACH gst IN gst_values %]
478
                          [% IF ( gst.option == gstrate ) %]
479
                          [% IF ( gst.option == gstrate ) %]
479
                            <option value="[% gst.option %]" selected="selected">[% gst.option * 100 | format("%.1f") %]%</option>
480
                            <option value="[% gst.option %]" selected="selected">[% FormatNum.Rate( gst.option ) %]%</option>
480
                          [% ELSE %]
481
                          [% ELSE %]
481
                            <option value="[% gst.option %]">[% gst.option * 100 | format("%.1f") %]%</option>
482
                            <option value="[% gst.option %]">[% FormatNum.Rate( gst.option ) %]%</option>
482
                          [% END %]
483
                          [% END %]
483
                        [% END %]
484
                        [% END %]
484
                        </select>
485
                        </select>
Lines 491-542 $(document).ready(function() Link Here
491
                <label for="discount">Discount: </label>
492
                <label for="discount">Discount: </label>
492
                [% IF ( close ) %]
493
                [% IF ( close ) %]
493
                    [% IF ( orderdiscount ) %]
494
                    [% IF ( orderdiscount ) %]
494
                        <input type="hidden" name="discount" id="discount" value="[% orderdiscount %]" />[% orderdiscount_2dp %]%
495
                        <input type="hidden" name="discount" id="discount" value="[% orderdiscount %]" />[% FormatNum.Percent( orderdiscount ) %]%
495
                    [% ELSE %]
496
                    [% ELSE %]
496
                        <input type="hidden" name="discount" id="discount" value="[% discount %]" />[% discount_2dp %]%
497
                        <input type="hidden" name="discount" id="discount" value="[% discount %]" />[% FormatNum.Percent( discount ) %]%
497
                    [% END %]
498
                    [% END %]
498
                [% ELSE %]
499
                [% ELSE %]
499
                    [% IF ( orderdiscount ) %]
500
                    [% IF ( orderdiscount ) %]
500
                        <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount %]" onchange="updateCosts();" />%
501
                        <input type="text" size="6" name="discount" id="discount" value="[% FormatNum.Percent( orderdiscount ) %]" onchange="updateCosts();" />%
501
                    [% ELSE %]
502
                    [% ELSE %]
502
                        <input type="text" size="6" name="discount" id="discount" value="[% discount %]" onchange="updateCosts();" />%
503
                        <input type="text" size="6" name="discount" id="discount" value="[% FormatNum.Percent( discount ) %]" onchange="updateCosts();" />%
503
                    [% END %]
504
                    [% END %]
504
                [% END %]
505
                [% END %]
505
            </li>
506
            </li>
506
            <li>
507
            <li>
507
                [% IF ( close ) %]
508
                [% IF ( close ) %]
508
                    <span class="label">Replacement cost: </span>
509
                    <span class="label">Replacement cost: </span>
509
                    <input type="hidden" name="rrp" id="rrp" value="[% rrp %]" />[% rrp %]
510
                    <input type="hidden" name="rrp" id="rrp" value="[% rrp %]" />[% FormatNum.Price( rrp ) %]
510
                [% ELSE %]
511
                [% ELSE %]
511
                    <label for="rrp">Replacement cost: </label>
512
                    <label for="rrp">Replacement cost: </label>
512
                    <input type="text" size="20" name="rrp" id="rrp" value="[% rrp %]" /> (adjusted for [% cur_active %])
513
                    <input type="text" size="20" name="rrp" id="rrp" value="[% FormatNum.Price( rrp ) %]" /> (adjusted for [% cur_active %])
513
                [% END %]
514
                [% END %]
514
            </li>
515
            </li>
515
            <li>
516
            <li>
516
                [% IF ( close ) %]
517
                [% IF ( close ) %]
517
                    <label for="ecost">Budgeted cost: </label>
518
                    <label for="ecost">Budgeted cost: </label>
518
                    <input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" readonly="readonly"  />
519
                    <input type="text" size="20" name="ecost" id="ecost" value="[% FormatNum.Price( ecost ) %]" readonly="readonly"  />
519
                [% ELSE %]
520
                [% ELSE %]
520
                    <label for="ecost">Budgeted cost: </label>
521
                    <label for="ecost">Budgeted cost: </label>
521
                    <input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" />
522
                    <input type="text" size="20" name="ecost" id="ecost" value="[% FormatNum.Price( ecost ) %]" />
522
                [% END %]
523
                [% END %]
523
            </li>
524
            </li>
524
            <li>
525
            <li>
525
                [% IF ( close ) %]
526
                [% IF ( close ) %]
526
                    <label for="total">Total: </label>
527
                    <label for="total">Total: </label>
527
                    <input type="text" id="total" size="20" name="total" value="[% total %]" readonly="readonly" />
528
                    <input type="text" id="total" size="20" name="total" value="[% FormatNum.Price( total ) %]" readonly="readonly" />
528
                [% ELSE %]
529
                [% ELSE %]
529
                    <label for="total">Total: </label>
530
                    <label for="total">Total: </label>
530
                    <input type="text" id="total" size="20" name="total" value="[% total %]" /> (budgeted cost * quantity)
531
                    <input type="text" id="total" size="20" name="total" value="[% FormatNum.Price( total ) %]" /> (budgeted cost * quantity)
531
                [% END %]
532
                [% END %]
532
            </li>
533
            </li>
533
            <li>
534
            <li>
534
                [% IF ( close ) %]
535
                [% IF ( close ) %]
535
                    <label for="unitprice">Actual cost: </label>
536
                    <label for="unitprice">Actual cost: </label>
536
                    <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice %]" readonly="readonly" />
537
                    <input type="text" id="unitprice" size="20" name="unitprice" value="[% FormatNum.Price( unitprice ) %]" readonly="readonly" />
537
                [% ELSE %]
538
                [% ELSE %]
538
                    <label for="unitprice">Actual cost: </label>
539
                    <label for="unitprice">Actual cost: </label>
539
                    <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice %]" />
540
                    <input type="text" id="unitprice" size="20" name="unitprice" value="[% FormatNum.Price( unitprice ) %]" />
540
                [% END %]
541
                [% END %]
541
            </li>
542
            </li>
542
            <li>
543
            <li>
543
- 

Return to bug 9410