View | Details | Raw Unified | Return to bug 20966
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 (-69 / +49 lines)
Lines 17-22 Link Here
17
[% USE Branches %]
17
[% USE Branches %]
18
[% USE Price %]
18
[% USE Price %]
19
[% USE AuthorisedValues %]
19
[% USE AuthorisedValues %]
20
[% USE ColumnsSettings %]
20
[% SET footerjs = 1 %]
21
[% SET footerjs = 1 %]
21
[% INCLUDE 'doc-head-open.inc' %]
22
[% INCLUDE 'doc-head-open.inc' %]
22
<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for [% booksellername|html %]</title>
23
<title>Koha &rsaquo; Acquisitions &rsaquo; [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for [% booksellername|html %]</title>
Lines 343-373 Link Here
343
344
344
        <div id="acqui_basket_content" class="yui-g">
345
        <div id="acqui_basket_content" class="yui-g">
345
        [% IF ( books_loop ) %]
346
        [% IF ( books_loop ) %]
346
        <h2>Orders</h2>
347
            <h2>Orders</h2>
347
        <label for="show_all_details">
348
            <input type="checkbox" style="vertical-align: middle;" id="show_all_details" />
349
            Show all details
350
        </label>
351
            <table id="orders">
348
            <table id="orders">
352
                <thead>
349
                <thead>
353
                    <tr>
350
                    <tr>
354
                        <th>No.</th>
351
                        <th>No.</th>
355
                        <th class="anti-the">Order</th>
352
                        <th>Order</th>
356
                        <th class="tax_excluded">RRP tax exc.</th>
353
                        <th>RRP tax exc.</th>
357
                        <th class="tax_excluded">ecost tax exc.</th>
354
                        <th>ecost tax exc.</th>
358
                        <th class="tax_included">RRP tax inc.</th>
355
                        <th>RRP tax inc.</th>
359
                        <th class="tax_included">ecost tax inc.</th>
356
                        <th>ecost tax inc.</th>
360
                        <th>Qty.</th>
357
                        <th>Qty.</th>
361
                        <th class="tax_excluded">Total tax exc. ([% currency %])</th>
358
                        <th>Total tax exc. ([% currency %])</th>
362
                        <th class="tax_included">Total tax inc. ([% currency %])</th>
359
                        <th>Total tax inc. ([% currency %])</th>
363
                        <th>GST %</th>
360
                        <th>GST %</th>
364
                        <th>GST</th>
361
                        <th>GST</th>
365
                        <th>Fund</th>
362
                        <th>Fund</th>
366
                        <th>Supplier report</th>
363
                        <th>Supplier report</th>
367
                        [% IF ( active ) %]
364
                        [% IF ( active ) %]
368
                            [% UNLESS ( closedate ) %]
365
                            [% UNLESS ( closedate ) %]
369
                                <th>Modify</th>
366
                                <th class="NoSort">Modify</th>
370
                                <th>Cancel order</th>
367
                                <th class="NoSort">Cancel order</th>
371
                            [% END %]
368
                            [% END %]
372
                        [% END %]
369
                        [% END %]
373
                    </tr>
370
                    </tr>
Lines 377-389 Link Here
377
                    <tr>
374
                    <tr>
378
                        <th></th>
375
                        <th></th>
379
                        <th>Total (GST [% foot_loo.tax_rate * 100 %])</th>
376
                        <th>Total (GST [% foot_loo.tax_rate * 100 %])</th>
380
                        <th class="tax_excluded">&nbsp;</th>
377
                        <th>&nbsp;</th>
381
                        <th class="tax_excluded">&nbsp;</th>
378
                        <th>&nbsp;</th>
382
                        <th class="tax_included">&nbsp;</th>
379
                        <th>&nbsp;</th>
383
                        <th class="tax_included">&nbsp;</th>
380
                        <th>&nbsp;</th>
384
                        <th>[% foot_loo.quantity %]</th>
381
                        <th>[% foot_loo.quantity %]</th>
385
                        <th class="tax_excluded">[% foot_loo.total_tax_excluded | $Price%]</th>
382
                        <th>[% foot_loo.total_tax_excluded | $Price%]</th>
386
                        <th class="tax_included">[% foot_loo.total_tax_included | $Price %]</th>
383
                        <th>[% foot_loo.total_tax_included | $Price %]</th>
387
                        <th>&nbsp;</th>
384
                        <th>&nbsp;</th>
388
                        <th>[% foot_loo.tax_value | $Price %]</th>
385
                        <th>[% foot_loo.tax_value | $Price %]</th>
389
                        <th>&nbsp;</th>
386
                        <th>&nbsp;</th>
Lines 399-411 Link Here
399
                <tr>
396
                <tr>
400
                    <th></th>
397
                    <th></th>
401
                    <th>Total ([% currency %])</th>
398
                    <th>Total ([% currency %])</th>
402
                    <th class="tax_excluded">&nbsp;</th>
399
                    <th>&nbsp;</th>
403
                    <th class="tax_excluded">&nbsp;</th>
400
                    <th>&nbsp;</th>
404
                    <th class="tax_included">&nbsp;</th>
401
                    <th>&nbsp;</th>
405
                    <th class="tax_included">&nbsp;</th>
402
                    <th>&nbsp;</th>
406
                    <th>[% total_quantity %]</th>
403
                    <th>[% total_quantity %]</th>
407
                    <th class="tax_excluded">[% total_tax_excluded | $Price %]</th>
404
                    <th>[% total_tax_excluded | $Price %]</th>
408
                    <th class="tax_included">[% total_tax_included | $Price %]</th>
405
                    <th>[% total_tax_included | $Price %]</th>
409
                    <th>&nbsp;</th>
406
                    <th>&nbsp;</th>
410
                    <th>[% total_tax_value | $Price %]</th>
407
                    <th>[% total_tax_value | $Price %]</th>
411
                    <th>&nbsp;</th>
408
                    <th>&nbsp;</th>
Lines 474-486 Link Here
474
                        </td>
471
                        </td>
475
                        [% 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 ... %]
472
                        [% 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
                        [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
473
                        [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %]
477
                        <td class="number tax_excluded [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_excluded | $Price %]</td>
474
                        <td class="number [% IF books_loo.rrp_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.rrp_tax_excluded | $Price %]</td>
478
                        <td class="number tax_excluded [% IF books_loo.ecost_tax_excluded.search(zero_regex) %]error[% END %]">[% books_loo.ecost_tax_excluded | $Price%]</td>
475
                        <td class="number [% 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>
476
                        <td class="number [% 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>
477
                        <td class="number [% 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.quantity.search(zero_regex) %]error[% END %]">[% books_loo.quantity %]</td>
478
                        <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>
479
                        <td class="number [% 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>
480
                        <td class="number [% IF books_loo.total_tax_included.search(zero_regex) %]error[% END %]">[% books_loo.total_tax_included | $Price %]</td>
484
                        <td class="number">[% books_loo.tax_rate * 100 %]</td>
481
                        <td class="number">[% books_loo.tax_rate * 100 %]</td>
485
                        <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td>
482
                        <td class="number [% IF books_loo.tax_value.search(zero_regex) %]error[% END %]">[% books_loo.tax_value | $Price %]</td>
486
                        <td>[% books_loo.budget_name %]</td>
483
                        <td>[% books_loo.budget_name %]</td>
Lines 536-548 Link Here
536
                <tr>
533
                <tr>
537
                  <th>No.</th>
534
                  <th>No.</th>
538
                  <th>Order</th>
535
                  <th>Order</th>
539
                  <th class="tax_excluded">RRP tax exc.</th>
536
                  <th>RRP tax exc.</th>
540
                  <th class="tax_excluded">ecost tax exc.</th>
537
                  <th>ecost tax exc.</th>
541
                  <th class="tax_included">RRP tax inc.</th>
538
                  <th>RRP tax inc.</th>
542
                  <th class="tax_included">ecost tax inc.</th>
539
                  <th>ecost tax inc.</th>
543
                  <th>Qty.</th>
540
                  <th>Qty.</th>
544
                  <th class="tax_excluded">Total tax exc. ([% currency %])</th>
541
                  <th>Total tax exc. ([% currency %])</th>
545
                  <th class="tax_included">Total tax inc. ([% currency %])</th>
542
                  <th>Total tax inc. ([% currency %])</th>
546
                  <th>GST %</th>
543
                  <th>GST %</th>
547
                  <th>GST</th>
544
                  <th>GST</th>
548
                  <th>Fund</th>
545
                  <th>Fund</th>
Lines 687-715 Link Here
687
684
688
[% MACRO jsinclude BLOCK %]
685
[% MACRO jsinclude BLOCK %]
689
    [% Asset.js("js/acquisitions-menu.js") %]
686
    [% Asset.js("js/acquisitions-menu.js") %]
690
[% INCLUDE 'datatables.inc' %]
687
    [% INCLUDE 'datatables.inc' %]
688
    [% INCLUDE 'columns_settings.inc' %]
691
    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
689
    [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %]
692
    <script type="text/javascript">
690
    <script>
693
        function updateColumnsVisibility(visible) {
694
            if ( visible ) {
695
                $("table .tax_excluded, .tax_included").show();
696
            } else {
697
                [% IF ( listincgst ) %]
698
                    $("table .tax_excluded").hide();
699
                [% ELSE %]
700
                    $("table .tax_included").hide();
701
                [% END %]
702
            }
703
        }
704
705
        $(document).ready(function() {
691
        $(document).ready(function() {
706
            if ( $('#toolbar').length ) {$('#toolbar').fixFloat();}
692
            if ( $('#toolbar').length ) {$('#toolbar').fixFloat();}
707
            $("#show_all_details").click(function(){
708
                updateColumnsVisibility($(this).is(":checked"));
709
            });
710
711
            $("#show_all_details").prop('checked', false);
712
            updateColumnsVisibility(false);
713
            [% UNLESS ( closedate ) %]
693
            [% UNLESS ( closedate ) %]
714
                $('#addtoBasket').on('show', function () {
694
                $('#addtoBasket').on('show', function () {
715
                   $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
695
                   $(this).find(".modal-body").html($(".acqui_basket_add")[0].outerHTML);
Lines 734-740 Link Here
734
    </script>
714
    </script>
735
715
736
    [% UNLESS ( closedate ) %]
716
    [% UNLESS ( closedate ) %]
737
        <script type="text/javascript">
717
        <script>
738
            function transfer_order_popup(ordernumber) {
718
            function transfer_order_popup(ordernumber) {
739
                var url = "/cgi-bin/koha/acqui/transferorder.pl?"
719
                var url = "/cgi-bin/koha/acqui/transferorder.pl?"
740
                    + "ordernumber=" + ordernumber
720
                    + "ordernumber=" + ordernumber
Lines 749-755 Link Here
749
            }
729
            }
750
        </script>
730
        </script>
751
    [% ELSE %]
731
    [% ELSE %]
752
        <script type="text/javascript">
732
        <script>
753
            $(document).ready(function(){
733
            $(document).ready(function(){
754
                $("#basketgroupid").change(function(){
734
                $("#basketgroupid").change(function(){
755
                    if($(this).val() == "new"){
735
                    if($(this).val() == "new"){
Lines 759-765 Link Here
759
            });
739
            });
760
        </script>
740
        </script>
761
        [% UNLESS ( grouped ) %]
741
        [% UNLESS ( grouped ) %]
762
            <script type="text/javascript">
742
            <script>
763
                function confirm_reopen() {
743
                function confirm_reopen() {
764
                    var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
744
                    var skip = [% IF ( skip_confirm_reopen ) %] 1 [% ELSE %] 0 [% END %];
765
                    var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
745
                    var is_confirmed = skip || confirm(_("Are you sure you want to reopen this basket?"));
Lines 770-788 Link Here
770
            </script>
750
            </script>
771
        [% END %]
751
        [% END %]
772
    [% END %]
752
    [% END %]
773
    <script type="text/javascript">
753
    <script>
754
        var columns_settings = [% ColumnsSettings.GetColumns( 'acqui', 'basket', 'orders', 'json' ) %];
774
        $(document).ready(function() {
755
        $(document).ready(function() {
775
            var orderst = $("#orders").dataTable($.extend(true, {}, dataTablesDefaults, {
756
            KohaTable("orders", {
776
                "sPaginationType": "four_button",
777
                [% IF ( active ) %]
757
                [% IF ( active ) %]
778
                    "aoColumnDefs": [
758
                    "aoColumnDefs": [
779
                        [% UNLESS ( closedate ) %]
759
                        { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
780
                            { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
781
                        [% END %]
782
                        { "sType": "anti-the", "aTargets": [ "anti-the" ] }
760
                        { "sType": "anti-the", "aTargets": [ "anti-the" ] }
783
                    ],
761
                    ],
784
                [% END %]
762
                [% END %]
785
            } ) );
763
                "sPaginationType": "four_button",
764
                "autoWidth": false
765
            }, columns_settings);
766
786
            var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
767
            var cancelledorderst = $("#cancelledorderst").dataTable($.extend(true, {}, dataTablesDefaults, {
787
                "sPaginationType": "four_button"
768
                "sPaginationType": "four_button"
788
            } ) );
769
            } ) );
789
- 

Return to bug 20966