@@ -, +, @@ --- .../bug_26693_dateaccessioned_update.perl | 11 +++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 1 + .../en/modules/admin/preferences/acquisitions.pref | 8 ++++++++ 3 files changed, 20 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_26693_dateaccessioned_update.perl --- a/installer/data/mysql/atomicupdate/bug_26693_dateaccessioned_update.perl +++ a/installer/data/mysql/atomicupdate/bug_26693_dateaccessioned_update.perl @@ -0,0 +1,11 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + + $dbh->do(q{ + INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) + VALUES + ('AcqItemSetDateAccessionedsWhenReceived','0','Upon receiving items, update their dateaccessioned field value',NULL,'YesNo'); + }); + + NewVersion( $DBversion, 26693, "Add option to update dateaccessioned when receiving an order"); +} --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -3,6 +3,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AccountAutoReconcile','0',NULL,'If enabled, patron balances will get reconciled automatically on each transaction.','YesNo'), ('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'), +('AcqItemSetDateAccessionedsWhenReceived','0',NULL,'Upon receiving items, update their dateaccessioned field value','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'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref @@ -48,6 +48,14 @@ 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 receiving items, " + - pref: AcqItemSetDateAccessionedsWhenReceived + default: no + choices: + yes: update + no: don't update + - "update their dateaccessioned field value (can be overriden on receiving)." - - "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 --