From 4c8406f3ed1111f7fd999f87ea392b1a3e140de5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 11 Jul 2014 12:08:07 +0200 Subject: [PATCH] Bug 12557: DB changes - Add the AcqItemSetSubfieldsWhenReceiptIsCancelled pref --- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 9 +++++++++ .../prog/en/modules/admin/preferences/acquisitions.pref | 3 +++ 3 files changed, 13 insertions(+) diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index ed427ea..33b5194 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -1,6 +1,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('AcqCreateItem','ordering','ordering|receiving|cataloguing','Define when the item is created : when ordering, when receiving, or in cataloguing module','Choice'), ('AcqEnableFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to invoice records.','YesNo'), +('AcqItemSetSubfieldsWhenReceiptIsCancelled','', '','Upon cancelling a receipt, update the items subfields if they were created when placing an order (e.g. o=5|a="bar foo")', 'Free'), ('AcqItemSetSubfieldsWhenReceived','','','Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar")','Free'), ('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'), ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'), diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 1030454..0c4d9cd 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8570,6 +8570,15 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.17.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES('AcqItemSetSubfieldsWhenReceiptIsCancelled','', '','Upon cancelling a receipt, update the items subfields if they were created when placing an order (e.g. o=5|a="bar foo")', 'Free') + }); + print "Upgrade to $DBversion done (Bug 11169 - Add AcqItemSetSubfieldsWhenReceiptIsCancelled syspref)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) 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 ac57f95..2babbad 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 @@ -46,6 +46,9 @@ Acquisitions: - Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar"). - pref: AcqItemSetSubfieldsWhenReceived - + - Upon cancelling a receipt, update the item's subfields if they were created when placing an order (e.g. o=5|a="bar foo""). + - pref: AcqItemSetSubfieldsWhenReceiptIsCancelled + - - pref: AcqEnableFiles choices: yes: Do -- 2.0.0.rc2