From 19819afd0d5f2ef66b9b03dca63c953952a6fd75 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 29 Nov 2018 14:55:53 -0300 Subject: [PATCH] Bug 21915: Add AccountAutoReconcile syspref This syspref will be used to call the reconcile_balance routing as needed. Signed-off-by: Kyle M Hall --- installer/data/mysql/atomicupdate/21915.perl | 9 +++++++++ installer/data/mysql/sysprefs.sql | 1 + .../prog/en/modules/admin/preferences/circulation.pref | 8 ++++++++ 3 files changed, 18 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/21915.perl diff --git a/installer/data/mysql/atomicupdate/21915.perl b/installer/data/mysql/atomicupdate/21915.perl new file mode 100644 index 0000000000..afd88eb9bb --- /dev/null +++ b/installer/data/mysql/atomicupdate/21915.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + INSERT IGNORE INTO `systempreferences` (`variable`,`value`,`explanation`,`options`,`type`) VALUES + ('AccountAutoReconcile','0','If enabled, patron balances will get reconciled automatically on each transaction.',NULL,'YesNo'), + }); + SetVersion($DBversion); + print "Upgrade to $DBversion done (Bug 21915 - Add a way to automatically reconcile balance for patrons)\n"; +} diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 1e36c306c6..b69faebcb7 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -1,4 +1,5 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES +('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'), ('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'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index e67fc81d7b..322badd6fc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -158,6 +158,14 @@ Circulation: no: "Don't allow" - patrons to submit notes about checked out items. + Accounts: + - + - pref: AccountAutoReconcile + choices: + yes: "Do" + no: "Do not" + - reconcile patron balances automatically on each transaction adding debits or credits. + Checkout Policy: - - pref: AllowTooManyOverride -- 2.17.2 (Apple Git-113)