From 6e011676d3da26e7ad35cd351b774e43270affd3 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. Signed-off-by: Claire Gravely Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize https://bugs.koha-community.org/show_bug.cgi?id=20996 --- admin/columns_settings.yml | 39 ++++++++ .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 106 ++++++++++----------- 2 files changed, 90 insertions(+), 55 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 14800190c3..a372fc172c 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 243ac8ef80..6d19ad73ed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -18,6 +18,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 %] @@ -387,32 +388,28 @@
[% IF ( books_loop ) %] -

Orders

- +

Orders

- - - - - - + + + + + + - - + + [% IF ( active ) %] [% UNLESS ( closedate ) %] - - + + [% END %] [% END %] @@ -422,14 +419,14 @@ - - - - - + + + + + - - + + @@ -445,14 +442,14 @@ - - - - - + + + + + - - + + @@ -521,14 +518,14 @@ [% 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 %] - - - - - + + + + + - - + + @@ -637,14 +634,14 @@

[% END %] - - - - - + + + + + - - + +
No.OrderRRP tax exc.ecost tax exc.RRP tax inc.ecost tax inc.Replacement priceOrderRRP tax exc.ecost tax exc.RRP tax inc.ecost tax inc.Replacement price Qty.Total tax exc. ([% currency | html %])Total tax inc. ([% currency | html %])Total tax exc. ([% currency | html %])Total tax inc. ([% currency | html %]) GST % GST Fund Supplier reportModifyCancel orderModifyCancel order
Total (GST [% foot_loo.tax_rate * 100 | html %])           [% foot_loo.quantity | html %][% 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 | html %])           [% total_quantity | html %][% 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.replacementprice | $Price %][% books_loo.rrp_tax_excluded | $Price | html %][% books_loo.ecost_tax_excluded | $Price | html %][% books_loo.rrp_tax_included | $Price | html %][% books_loo.ecost_tax_included | $Price | html %][% books_loo.replacementprice | $Price %] [% books_loo.quantity | html %][% books_loo.total_tax_excluded | $Price %][% books_loo.total_tax_included | $Price %][% books_loo.total_tax_excluded | $Price | html %][% books_loo.total_tax_included | $Price | html %] [% books_loo.tax_rate * 100 | html %] [% books_loo.tax_value | $Price %] [% books_loo.budget_name | html %][% order.rrp_tax_excluded | $Price %][% order.ecost_tax_excluded | $Price %][% order.rrp_tax_included | $Price %][% order.ecost_tax_included | $Price %][% order.replacementprice | $Price %][% order.rrp_tax_excluded | $Price | html %][% order.ecost_tax_excluded | $Price | html %][% order.rrp_tax_included | $Price | html %][% order.ecost_tax_included | $Price | html %][% order.replacementprice | $Price %] [% order.quantity | html %][% order.total_tax_excluded | $Price %][% order.total_tax_included | $Price %][% order.total_tax_excluded | $Price | html %][% order.total_tax_included | $Price | html %] [% order.tax_rate * 100 | html %] [% order.tax_value | $Price %] [% order.budget_name | html %] @@ -763,6 +760,7 @@ [% MACRO jsinclude BLOCK %] [% Asset.js("js/acquisitions-menu.js") | $raw %] [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %]