From fa914bab80b1e5bd1359dd23d6868e33b5695b01 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 --- admin/columns_settings.yml | 39 +++++++ .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 116 +++++++++------------ 2 files changed, 87 insertions(+), 68 deletions(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index 3e2a672..0108963 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 ec4ed9a..08e371d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -344,31 +344,27 @@
[% IF ( books_loop ) %] -

Orders

- +

Orders

- - - - - + + + + + - - + + [% IF ( active ) %] [% UNLESS ( closedate ) %] - - + + [% END %] [% END %] @@ -378,13 +374,13 @@ - - - - + + + + - - + + @@ -400,13 +396,13 @@ - - - - + + + + - - + + @@ -475,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 %] - - - - + + + + - - + + @@ -589,13 +585,13 @@

[% 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 | 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 | html %][% foot_loo.total_tax_included | $Price | html %][% foot_loo.total_tax_excluded | $Price | html %][% foot_loo.total_tax_included | $Price | html %]   [% foot_loo.tax_value | $Price | html %]  
Total ([% currency | html %])         [% total_quantity | html %][% total_tax_excluded | $Price | html %][% total_tax_included | $Price | html %][% total_tax_excluded | $Price | html %][% total_tax_included | $Price | html %]   [% total_tax_value | $Price | html %]  [% 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.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.quantity | html %][% books_loo.total_tax_excluded | $Price | html %][% books_loo.total_tax_included | $Price | html %][% 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 | html %] [% books_loo.budget_name | html %][% 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.rrp_tax_excluded | $Price | html %][% order.ecost_tax_excluded | $Price | html %][% order.rrp_tax_included | $Price | html %][% order.ecost_tax_included | $Price | html %] [% order.quantity | html %][% order.total_tax_excluded | $Price | html %][% order.total_tax_included | $Price | html %][% order.total_tax_excluded | $Price | html %][% order.total_tax_included | $Price | html %] [% order.tax_rate * 100 | html %] [% order.tax_value | $Price | html %] [% order.budget_name | html %] @@ -712,29 +708,12 @@ [% MACRO jsinclude BLOCK %] [% Asset.js("js/acquisitions-menu.js") | $raw %] -[% INCLUDE 'datatables.inc' %] + [% INCLUDE 'datatables.inc' %] + [% INCLUDE 'columns_settings.inc' %] [% Asset.js("lib/jquery/plugins/jquery.fixFloat.js") | $raw %] - [% UNLESS ( closedate ) %] - [% ELSE %] - [% UNLESS ( grouped ) %] - [% END %] [% END %] -