From baf95b9428d05113353745aaedfa974780aa1a76 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. --- installer/data/mysql/updatedatabase.pl | 8 ++++++++ koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt | 6 +++++- .../prog/en/modules/admin/preferences/acquisitions.pref | 7 ++++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index de77bf3..e68ea9e 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8613,6 +8613,14 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = 'XXX'; +if ( CheckVersion($DBversion) ) { + $dbh->do(" + INSERT INTO systempreferences (variable,value,explanation,type) VALUES ('AcqLateOrderUseCreationDate', 'closing', 'creation|closing', 'Change late order default sort.', 'Choice')"); + print "Upgrade to $DBversion done (Bug 12732 - Sort late orders by basket creation or closing date)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) 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 a1a3947..03ef411 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -111,7 +111,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 a6e9d11..618c235 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 @@ -58,11 +58,12 @@ Acquisitions: - "You can use the following fields: price, quantity, budget_code, discount, sort1, sort2" - "
For example:
price: 947$a|947$c
quantity: 969$h
budget_code: 922$a" - + - 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. Printing: - -- 1.9.1