From b007303b797612b0db268168694a5564311e5ada Mon Sep 17 00:00:00 2001 From: simith Date: Thu, 21 Aug 2014 13:29:28 -0400 Subject: [PATCH] Bug 12732 - Sort late orders by basket creation or closing date - This patch fixs the numbers 0, 3 and 4 in comment 4 Add: installer/data/mysql/updatedatabase.pl Modified: koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref - AcqLateOrderUseCreationDate preference modified. koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt - translation problem fixed. --- ...Z12732_SORT_LATE_ORDERS_BY_BASKET_CREATION_OR_CLOSING_DATE.perl | 6 ++++++ koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt | 6 +++++- .../prog/en/modules/admin/preferences/acquisitions.pref | 7 ++++--- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/BZ12732_SORT_LATE_ORDERS_BY_BASKET_CREATION_OR_CLOSING_DATE.perl diff --git a/installer/data/mysql/atomicupdate/BZ12732_SORT_LATE_ORDERS_BY_BASKET_CREATION_OR_CLOSING_DATE.perl b/installer/data/mysql/atomicupdate/BZ12732_SORT_LATE_ORDERS_BY_BASKET_CREATION_OR_CLOSING_DATE.perl new file mode 100644 index 0000000..15a8af8 --- /dev/null +++ b/installer/data/mysql/atomicupdate/BZ12732_SORT_LATE_ORDERS_BY_BASKET_CREATION_OR_CLOSING_DATE.perl @@ -0,0 +1,6 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do("INSERT INTO systempreferences (variable,value,explanation,type) VALUES ('AcqLateOrderUseCreationDate', 'closing', 'creation|closing', 'Change late order default sort.', 'Choice')"); + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 12732 - Sort late orders by basket creation or closing date)\n"; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt index b53058c..293374d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -116,7 +116,11 @@ $(document).ready(function() { [% ELSE %] [% END %] - Order [% lateOrderSort %] date + [% IF ( lateOrderSort == "creation") %] + Order creation date + [% ELSE %] + Order closing date + [% END %] Estimated delivery date Vendor Information diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref index 33a3a6d..771d9fb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref @@ -20,11 +20,12 @@ Acquisitions: 1: always ask for confirmation. 2: do not ask for confirmation. - + - Use - pref: AcqLateOrderUseCreationDate choices: - creation: Do - closing: Don't - - Use the creation date of the basket to sort late order. + creation: creation date + closing: closing date + - of the basket to sort late order. - - Show baskets - pref: AcqViewBaskets -- 1.9.1