From b7965565657f75573b7ba7a3881e29158a8db30a Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 19 Jun 2018 17:02:14 +0000 Subject: [PATCH] Bug 20966: Add column configuration to table of orders in a basket This patch adds column configuration to the table of orders in a basket. It replaces the "Show all details" checkbox which previously was used to show the hidden "tax included" columns. Now those columns are hidden by default in the columns configuration file. To test, apply the patch and view a basket with multiple orders. Test all DataTables functionality (paging, sorting, filtering) including showing and hiding columns. Test with both an open and a closed basket. --- admin/columns_settings.yml | 39 +++++++ .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 117 +++++++++------------ 2 files changed, 88 insertions(+), 68 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 8f0628f..4c7d7fe 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -59,6 +59,45 @@ modules: columnname: claims_count - columnname: claimed_date + basket: + orders: + - + columnname: basket_number + - + columnname: order_information + - + columnname: recommended_retail_price_tax_excluded + - + columnname: ecost_tax_excluded + - + columnname: recommended_retail_price_tax_included + is_hidden: 1 + - + columnname: ecost_tax_included + is_hidden: 1 + - + columnname: quantity + - + columnname: total_tax_excluded + - + columnname: total_tax_included + is_hidden: 1 + - + columnname: goods_and_services_tax_percentage + - + columnname: goods_and_services_tax + - + columnname: fund + - + columnname: supplier_report + - + columnname: modify + cannot_be_toggled: 1 + cannot_be_modified: 1 + - + columnname: cancel + cannot_be_toggled: 1 + cannot_be_modified: 1 admin: currency: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index e9a94f8..021335e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -17,6 +17,7 @@ [% USE Branches %] [% USE Price %] [% USE AuthorisedValues %] +[% USE ColumnsSettings %] [% SET footerjs = 1 %] [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno |html %]) for [% booksellername|html %] @@ -343,31 +344,27 @@
[% IF ( books_loop ) %] -

Orders

- +

Orders

- - - - - + + + + + - - + + [% IF ( active ) %] [% UNLESS ( closedate ) %] - - + + [% END %] [% END %] @@ -377,13 +374,13 @@ - - - - + + + + - - + + @@ -399,13 +396,13 @@ - - - - + + + + - - + + @@ -474,13 +471,13 @@ [% 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 ... %] [%# FIXME: use of a regexp is not ideal; bugs 9410 and 10929 suggest better way of handling this %] - - - - + + + + - - + + @@ -536,13 +533,13 @@ - - - - + + + + - - + + @@ -687,29 +684,12 @@ [% MACRO jsinclude BLOCK %] [% Asset.js("js/acquisitions-menu.js") %] -[% INCLUDE 'datatables.inc' %] + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") %] - [% UNLESS ( closedate ) %] - [% ELSE %] - [% UNLESS ( grouped ) %] - [% END %] [% END %] -
No.OrderRRP tax exc.ecost tax exc.RRP tax inc.ecost tax inc.OrderRRP tax exc.ecost tax exc.RRP tax inc.ecost tax inc. Qty.Total tax exc. ([% currency %])Total tax inc. ([% currency %])Total tax exc. ([% currency %])Total tax inc. ([% currency %]) GST % GST Fund Supplier reportModifyCancel orderModifyCancel order
Total (GST [% foot_loo.tax_rate * 100 %])         [% foot_loo.quantity %][% foot_loo.total_tax_excluded | $Price%][% foot_loo.total_tax_included | $Price %][% foot_loo.total_tax_excluded | $Price%][% foot_loo.total_tax_included | $Price %]   [% foot_loo.tax_value | $Price %]  
Total ([% currency %])         [% total_quantity %][% total_tax_excluded | $Price %][% total_tax_included | $Price %][% total_tax_excluded | $Price %][% total_tax_included | $Price %]   [% total_tax_value | $Price %]  [% books_loo.rrp_tax_excluded | $Price %][% books_loo.ecost_tax_excluded | $Price%][% books_loo.rrp_tax_included | $Price %][% books_loo.ecost_tax_included | $Price %][% books_loo.rrp_tax_excluded | $Price %][% books_loo.ecost_tax_excluded | $Price%][% books_loo.rrp_tax_included | $Price %][% books_loo.ecost_tax_included | $Price %] [% books_loo.quantity %][% books_loo.total_tax_excluded | $Price %][% books_loo.total_tax_included | $Price %][% books_loo.total_tax_excluded | $Price %][% books_loo.total_tax_included | $Price %] [% books_loo.tax_rate * 100 %] [% books_loo.tax_value | $Price %] [% books_loo.budget_name %]
No. OrderRRP tax exc.ecost tax exc.RRP tax inc.ecost tax inc.RRP tax exc.ecost tax exc.RRP tax inc.ecost tax inc. Qty.Total tax exc. ([% currency %])Total tax inc. ([% currency %])Total tax exc. ([% currency %])Total tax inc. ([% currency %]) GST % GST Fund