From 1cb6bb664c13cf0b0092bde50885c19c397de46e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 25 Jul 2025 10:27:27 +0200 Subject: [PATCH] Bug 39930: Fix SaveState on the orders table Test plan: Open and close a basket --- .../prog/en/modules/acqui/basket.tt | 102 +++++++++--------- 1 file changed, 53 insertions(+), 49 deletions(-) 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 8561c5fe75d..9723511a80d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -564,35 +564,29 @@ - - - - - - - - - - - - - - - - - - - - [% IF Koha.Preference('EDIFACT') && ediaccount %] - - [% END %] - - [% IF ( active && !closedate ) %] - - [% END %] - [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %] - - [% END %] + + + + + + + + + + + + + + + + + + + + + + + @@ -617,16 +611,10 @@ - [% IF Koha.Preference('EDIFACT') && ediaccount %] - - [% END %] - [% IF ( active && !closedate ) %] - - [% END %] - [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %] - - [% END %] + + + [% END %] @@ -649,16 +637,10 @@ - [% IF Koha.Preference('EDIFACT') && ediaccount %] - - [% END %] - [% IF ( active && !closedate ) %] - - [% END %] - [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %] - - [% END %] + + + @@ -802,6 +784,8 @@ [% IF Koha.Preference('EDIFACT') && ediaccount %] + [% ELSE %] + [% END %] + [% ELSE %] + [% END %] [% IF ( !closedate || Koha.Preference('CancelOrdersInClosedBaskets') ) %] + [% ELSE %] + [% END %] [% END %] @@ -1255,10 +1243,26 @@ $(document).ready(function() { var table_settings = [% TablesSettings.GetTableSettings( 'acqui', 'basket', 'orders', 'json' ) | $raw %]; [% IF !(Koha.Preference('EDIFACT') && ediaccount) %] - // FIXME This cannot work correctly without bKohaColumnsUseNames - table_settings['columns'].splice(18, 1); + table_settings.columns.find(c => c.columnname == 'supplier_report').is_hidden = 1; + table_settings.columns.find(c => c.columnname == 'supplier_report').cannot_be_toggled = 1; + [% ELSE %] + table_settings.columns.find(c => c.columnname == 'supplier_report').is_hidden = 0; + [% END %] + [% IF ( active && !closedate ) %] + table_settings.columns.find(c => c.columnname == 'modify').is_hidden = 1; + table_settings.columns.find(c => c.columnname == 'modify').cannot_be_toggled = 1; + [% ELSE %] + table_settings.columns.find(c => c.columnname == 'modify').is_hidden = 0; + [% END %] + [% IF !closedate || Koha.Preference('CancelOrdersInClosedBaskets') %] + table_settings.columns.find(c => c.columnname == 'cancel').is_hidden = 1; + table_settings.columns.find(c => c.columnname == 'modify').cannot_be_toggled = 1; + [% ELSE %] + table_settings.columns.find(c => c.columnname == 'cancel').is_hidden = 0; [% END %] + $("#orders").kohaTable({ + bKohaColumnsUseNames: true, pagingType: "full", autoWidth: false, }, table_settings); -- 2.34.1
No.[% tp('noun', 'Order') | html %]RRP tax exc.Actual cost tax exc.Budgeted cost tax exc.RRP tax inc.Actual cost tax inc.Budgeted cost tax inc.Replacement priceQty.Total tax exc. ([% currency | html %])Total tax inc. ([% currency | html %])GST %GSTFundEstimated delivery dateStatistic 1Statistic 2InvoiceSupplier reportPlace holdModifyCancel orderNo.[% tp('noun', 'Order') | html %]RRP tax exc.Actual cost tax exc.Budgeted cost tax exc.RRP tax inc.Actual cost tax inc.Budgeted cost tax inc.Replacement priceQty.Total tax exc. ([% currency | html %])Total tax inc. ([% currency | html %])GST %GSTFundEstimated delivery dateStatistic 1Statistic 2InvoiceSupplier reportPlace holdModifyCancel order
            
            
[% books_loo.suppliers_report | html %] [% IF ( books_loo.biblionumber && CAN_user_reserveforothers_place_holds ) %] @@ -829,6 +813,8 @@ > [% END %] @@ -865,6 +851,8 @@ [% END %] [% END %]