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

(-)a/admin/columns_settings.yml (+39 lines)
Lines 59-64 modules: Link Here
59
          columnname: claims_count
59
          columnname: claims_count
60
        -
60
        -
61
          columnname: claimed_date
61
          columnname: claimed_date
62
    basket:
63
      orders:
64
        -
65
          columnname: basket_number
66
        -
67
          columnname: order_information
68
        -
69
          columnname: recommended_retail_price_tax_excluded
70
        -
71
          columnname: ecost_tax_excluded
72
        -
73
          columnname: recommended_retail_price_tax_included
74
          is_hidden: 1
75
        -
76
          columnname: ecost_tax_included
77
          is_hidden: 1
78
        -
79
          columnname: quantity
80
        -
81
          columnname: total_tax_excluded
82
        -
83
          columnname: total_tax_included
84
          is_hidden: 1
85
        -
86
          columnname: goods_and_services_tax_percentage
87
        -
88
          columnname: goods_and_services_tax
89
        -
90
          columnname: fund
91
        -
92
          columnname: supplier_report
93
        -
94
          columnname: modify
95
          cannot_be_toggled: 1
96
          cannot_be_modified: 1
97
        -
98
          columnname: cancel
99
          cannot_be_toggled: 1
100
          cannot_be_modified: 1
62
101
63
  admin:
102
  admin:
64
    currency:
103
    currency:
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-74 / +54 lines)
Lines 18-23 Link Here
18
[% USE Branches %]
18
[% USE Branches %]
19
[% USE Price %]
19
[% USE Price %]
20
[% USE AuthorisedValues %]
20
[% USE AuthorisedValues %]
21
[% USE ColumnsSettings %]
21
[% SET footerjs = 1 %]
22
[% SET footerjs = 1 %]
22
[% INCLUDE 'doc-head-open.inc' %]
23
[% INCLUDE 'doc-head-open.inc' %]
23
<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname | html %] ([% basketno | html %]) for [% booksellername | html %]</title>
24
<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname | html %] ([% basketno | html %]) for [% booksellername | html %]</title>
Lines 344-375 Link Here
344
345
345
        <div id="acqui_basket_content" class="yui-g">
346
        <div id="acqui_basket_content" class="yui-g">
346
        [% IF ( books_loop ) %]
347
        [% IF ( books_loop ) %]
347
        <h2>Orders</h2>
348
            <h2>Orders</h2>
348
        <label for="show_all_details">
349
            <input type="checkbox" style="vertical-align: middle;" id="show_all_details" />
350
            Show all details
351
        </label>
352
            <table id="orders">
349
            <table id="orders">
353
                <thead>
350
                <thead>
354
                    <tr>
351
                    <tr>
355
                        <th>No.</th>
352
                        <th>No.</th>
356
                        <th class="anti-the">Order</th>
353
                        <th>Order</th>
357
                        <th class="tax_excluded">RRP tax exc.</th>
354
                        <th>RRP tax exc.</th>
358
                        <th class="tax_excluded">ecost tax exc.</th>
355
                        <th>ecost tax exc.</th>
359
                        <th class="tax_included">RRP tax inc.</th>
356
                        <th>RRP tax inc.</th>
360
                        <th class="tax_included">ecost tax inc.</th>
357
                        <th>ecost tax inc.</th>
361
                        <th class="replacementprice">Replacement price</th>
358
                        <th>Replacement price</th>
362
                        <th>Qty.</th>
359
                        <th>Qty.</th>
363
                        <th class="tax_excluded">Total tax exc. ([% currency | html %])</th>
360
                        <th>Total tax exc. ([% currency | html %])</th>
364
                        <th class="tax_included">Total tax inc. ([% currency | html %])</th>
361
                        <th>Total tax inc. ([% currency | html %])</th>
365
                        <th>GST %</th>
362
                        <th>GST %</th>
366
                        <th>GST</th>
363
                        <th>GST</th>
367
                        <th>Fund</th>
364
                        <th>Fund</th>
368
                        <th>Supplier report</th>
365
                        <th>Supplier report</th>
369
                        [% IF ( active ) %]
366
                        [% IF ( active ) %]
370
                            [% UNLESS ( closedate ) %]
367
                            [% UNLESS ( closedate ) %]
371
                                <th>Modify</th>
368
                                <th class="NoSort">Modify</th>
372
                                <th>Cancel order</th>
369
                                <th class="NoSort">Cancel order</th>
373
                            [% END %]
370
                            [% END %]
374
                        [% END %]
371
                        [% END %]
375
                    </tr>
372
                    </tr>
Lines 379-392 Link Here
379
                    <tr>
376
                    <tr>
380
                        <th></th>
377
                        <th></th>
381
                        <th>Total (GST [% foot_loo.tax_rate * 100 | html %])</th>
378
                        <th>Total (GST [% foot_loo.tax_rate * 100 | html %])</th>
382
                        <th class="tax_excluded">&nbsp;</th>
379
                        <th>&nbsp;</th>
383
                        <th class="tax_excluded">&nbsp;</th>
380
                        <th>&nbsp;</th>
384
                        <th class="tax_included">&nbsp;</th>
381
                        <th>&nbsp;</th>
385
                        <th class="tax_included">&nbsp;</th>
382
                        <th>&nbsp;</th>
386
                        <th class="replacementprice">&nbsp;</th>
383
                        <th>&nbsp;</th>
387
                        <th>[% foot_loo.quantity | html %]</th>
384
                        <th>[% foot_loo.quantity | html %]</th>
388
                        <th class="tax_excluded">[% foot_loo.total_tax_excluded | $Price %]</th>
385
                        <th>[% foot_loo.total_tax_excluded | $Price %]</th>
389
                        <th class="tax_included">[% foot_loo.total_tax_included | $Price %]</th>
386
                        <th>[% foot_loo.total_tax_included | $Price %]</th>
390
                        <th>&nbsp;</th>
387
                        <th>&nbsp;</th>
391
                        <th>[% foot_loo.tax_value | $Price %]</th>
388
                        <th>[% foot_loo.tax_value | $Price %]</th>
392
                        <th>&nbsp;</th>
389
                        <th>&nbsp;</th>
Lines 402-415 Link Here
402
                <tr>
399
                <tr>
403
                    <th></th>
400
                    <th></th>
404
                    <th>Total ([% currency | html %])</th>
401
                    <th>Total ([% currency | html %])</th>
405
                    <th class="tax_excluded">&nbsp;</th>
402
                    <th>&nbsp;</th>
406
                    <th class="tax_excluded">&nbsp;</th>
403
                    <th>&nbsp;</th>
407
                    <th class="tax_included">&nbsp;</th>
404
                    <th>&nbsp;</th>
408
                    <th class="tax_included">&nbsp;</th>
405
                    <th>&nbsp;</th>
409
                    <th class="replacementprice">&nbsp;</th>
406
                    <th>&nbsp;</th>
410
                    <th>[% total_quantity | html %]</th>
407
                    <th>[% total_quantity | html %]</th>
411
                    <th class="tax_excluded">[% total_tax_excluded | $Price %]</th>
408
                    <th>[% total_tax_excluded | $Price %]</th>
412
                    <th class="tax_included">[% total_tax_included | $Price %]</th>
409
                    <th>[% total_tax_included | $Price %]</th>
413
                    <th>&nbsp;</th>
410
                    <th>&nbsp;</th>
414
                    <th>[% total_tax_value | $Price %]</th>
411
                    <th>[% total_tax_value | $Price %]</th>
415
                    <th>&nbsp;</th>
412
                    <th>&nbsp;</th>
Lines 478-491 Link Here
478
                        </td>
475
                        </td>
479
                        [% SET zero_regex = "^0{1,}\.?0{1,}[^1-9]" %] [%# 0 or 0.0 or 0.00 or 00 or 00.0 or 00.00 or 0.000 ... %]
476
                        [% SET zero_regex = "^0{1,}\.?0{1,}[^1-9]" %] [%# 0 or 0.0 or 0.00 or 00 or 00.0 or 00.00 or 0.000 ... %]
480
                        [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
477
                        [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
481
                        <td class="number tax_excluded [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_excluded | $Price %]</td>
478
                        <td class="number [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_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 %]</td>
479
                        <td class="number [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $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 %]</td>
480
                        <td class="number [% IF books_loo.rrp_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.rrp_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 %]</td>
481
                        <td class="number [% 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 %]</td>
482
                        <td class="number [% IF books_loo.replacementprice.search(zero_regex) %]error[% END %]">[% books_loo.replacementprice | $Price %]</td>
486
                        <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity | html %]</td>
483
                        <td class="number [% IF books_loo.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity | 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 %]</td>
484
                        <td class="number [% IF books_loo.total_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_excluded | $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 %]</td>
485
                        <td class="number [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price | html %]</td>
489
                        <td class="number">[% books_loo.tax_rate * 100 | html %]</td>
486
                        <td class="number">[% books_loo.tax_rate * 100 | html %]</td>
490
                        <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td>
487
                        <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td>
491
                        <td>[% books_loo.budget_name | html %]</td>
488
                        <td>[% books_loo.budget_name | html %]</td>
Lines 594-607 Link Here
594
                        </p>
591
                        </p>
595
                      [% END %]
592
                      [% END %]
596
                    </td>
593
                    </td>
597
                    <td class="number tax_excluded">[% order.rrp_tax_excluded | $Price %]</td>
594
                    <td class="number">[% order.rrp_tax_excluded | $Price | html %]</td>
598
                    <td class="number tax_excluded">[% order.ecost_tax_excluded | $Price %]</td>
595
                    <td class="number">[% order.ecost_tax_excluded | $Price | html %]</td>
599
                    <td class="number tax_included">[% order.rrp_tax_included | $Price %]</td>
596
                    <td class="number">[% order.rrp_tax_included | $Price | html %]</td>
600
                    <td class="number tax_included">[% order.ecost_tax_included | $Price %]</td>
597
                    <td class="number">[% order.ecost_tax_included | $Price | html %]</td>
601
                    <td class="number replacementprice">[% order.replacementprice | $Price %]</td>
598
                    <td class="number">[% order.replacementprice | $Price %]</td>
602
                    <td class="number">[% order.quantity | html %]</td>
599
                    <td class="number">[% order.quantity | html %]</td>
603
                    <td class="number tax_excluded">[% order.total_tax_excluded | $Price %]</td>
600
                    <td class="number">[% order.total_tax_excluded | $Price | html %]</td>
604
                    <td class="number tax_included">[% order.total_tax_included | $Price %]</td>
601
                    <td class="number">[% order.total_tax_included | $Price | html %]</td>
605
                    <td class="number">[% order.tax_rate * 100 | html %]</td>
602
                    <td class="number">[% order.tax_rate * 100 | html %]</td>
606
                    <td class="number">[% order.tax_value | $Price %]</td>
603
                    <td class="number">[% order.tax_value | $Price %]</td>
607
                    <td>[% order.budget_name | html %]
604
                    <td>[% order.budget_name | html %]
Lines 718-746 Link Here
718
715
719
[% MACRO jsinclude BLOCK %]
716
[% MACRO jsinclude BLOCK %]
720
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
717
    [% Asset.js("js/acquisitions-menu.js") | $raw %]
721
[% INCLUDE 'datatables.inc' %]
718
    [% INCLUDE 'datatables.inc' %]
719
    [% INCLUDE 'columns_settings.inc' %]
722
    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %]
720
    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %]
723
    <script type="text/javascript">
721
    <script>
724
        function updateColumnsVisibility(visible) {
725
            if ( visible ) {
726
                $("table .tax_excluded, .tax_included").show();
727
            } else {
728
                [% IF ( listincgst ) %]
729
                    $("table .tax_excluded").hide();
730
                [% ELSE %]
731
                    $("table .tax_included").hide();
732
                [% END %]
733
            }
734
        }
735
736
        $(document).ready(function() {
722
        $(document).ready(function() {
737
            if ( $('#toolbar').length ) {$('#toolbar').fixFloat();}
723
            if ( $('#toolbar').length ) {$('#toolbar').fixFloat();}
738
            $("#show_all_details").click(function(){
739
                updateColumnsVisibility($(this).is(":checked"));
740
            });
741
742
            $("#show_all_details").prop('checked', false);
743
            updateColumnsVisibility(false);
744
            [% UNLESS ( closedate ) %]
724
            [% UNLESS ( closedate ) %]
745
                $('#addtoBasket').on('show', function () {
725
                $('#addtoBasket').on('show', function () {
746
                   $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
726
                   $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
Lines 788-794 Link Here
788
    </script>
768
    </script>
789
769
790
    [% UNLESS ( closedate ) %]
770
    [% UNLESS ( closedate ) %]
791
        <script type="text/javascript">
771
        <script>
792
            function transfer_order_popup(ordernumber) {
772
            function transfer_order_popup(ordernumber) {
793
                var url = "/cgi-bin/koha/acqui/transferorder.pl?"
773
                var url = "/cgi-bin/koha/acqui/transferorder.pl?"
794
                    + "ordernumber=" + ordernumber
774
                    + "ordernumber=" + ordernumber
Lines 803-809 Link Here
803
            }
783
            }
804
        </script>
784
        </script>
805
    [% ELSE %]
785
    [% ELSE %]
806
        <script type="text/javascript">
786
        <script>
807
            $(document).ready(function(){
787
            $(document).ready(function(){
808
                $("#basketgroupid").change(function(){
788
                $("#basketgroupid").change(function(){
809
                    if($(this).val() == "new"){
789
                    if($(this).val() == "new"){
Lines 813-819 Link Here
813
            });
793
            });
814
        </script>
794
        </script>
815
        [% UNLESS ( grouped ) %]
795
        [% UNLESS ( grouped ) %]
816
            <script type="text/javascript">
796
            <script>
817
                function confirm_reopen() {
797
                function confirm_reopen() {
818
                    var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
798
                    var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
819
                    var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
799
                    var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
Lines 824-842 Link Here
824
            </script>
804
            </script>
825
        [% END %]
805
        [% END %]
826
    [% END %]
806
    [% END %]
827
    <script type="text/javascript">
807
    <script>
808
        var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) %];
828
        $(document).ready(function() {
809
        $(document).ready(function() {
829
            var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, {
810
            KohaTable("orders", {
830
                "sPaginationType": "four_button",
831
                [% IF ( active ) %]
811
                [% IF ( active ) %]
832
                    "aoColumnDefs": [
812
                    "aoColumnDefs": [
833
                        [% UNLESS ( closedate ) %]
813
                        { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
834
                            { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
835
                        [% END %]
836
                        { "sType": "anti-the", "aTargets": [ "anti-the" ] }
814
                        { "sType": "anti-the", "aTargets": [ "anti-the" ] }
837
                    ],
815
                    ],
838
                [% END %]
816
                [% END %]
839
            } ) );
817
                "sPaginationType": "four_button",
818
                "autoWidth": false
819
            }, columns_settings);
820
840
            var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
821
            var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
841
                "sPaginationType": "four_button"
822
                "sPaginationType": "four_button"
842
            } ) );
823
            } ) );
843
- 

Return to bug 20996