Bug 23321: Add cash register preference
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 18 Jul 2019 07:02:31 +0000 (08:02 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 23 Sep 2019 10:39:21 +0000 (11:39 +0100)
Sponsored-by: PTFS Europe
Sponsored-by: Cheshire Libraries Shared Services

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

installer/data/mysql/atomicupdate/bug_23321_preferences.perl [new file with mode: 0644]
installer/data/mysql/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/includes/prefs-menu.inc
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/accounts.pref [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref

diff --git a/installer/data/mysql/atomicupdate/bug_23321_preferences.perl b/installer/data/mysql/atomicupdate/bug_23321_preferences.perl
new file mode 100644 (file)
index 0000000..b757933
--- /dev/null
@@ -0,0 +1,11 @@
+$DBversion = 'XXX';    # will be replaced by the RM
+if ( CheckVersion($DBversion) ) {
+
+    $dbh->do(qq{
+        INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES
+        ('UseCashRegisters','0','','Use cash registers with the accounting system and assign patron transactions to them.','YesNo')
+    });
+
+    SetVersion($DBversion);
+    print "Upgrade to $DBversion done (Bug 23321 - Add cash register system preference)\n";
+}
index 6ce6ee1..5b91642 100644 (file)
@@ -646,6 +646,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
 ('UseACQFrameworkForBiblioRecords','0','','Use the ACQ framework for the catalog details','YesNo'),
 ('UseAuthoritiesForTracings','1','0','Use authority record numbers for subject tracings instead of heading strings.','YesNo'),
 ('UseBranchTransferLimits','0','','If ON, Koha will will use the rules defined in branch_transfer_limits to decide if an item transfer should be allowed.','YesNo'),
+('UseCashRegisters','0','','Use cash registers with the accounting system and assign patron transactions to them.','YesNo'),
 ('UseControlNumber','0','','If ON, record control number (w subfields) and control number (001) are used for linking of bibliographic records.','YesNo'),
 ('UseCourseReserves','0',NULL,'Enable the course reserves feature.','YesNo'),
 ('useDaysMode','Calendar','Calendar|Days|Datedue','Choose the method for calculating due date: select Calendar to use the holidays module, and Days to ignore the holidays module','Choice'),
index 3b2e2f7..b337291 100644 (file)
@@ -1,5 +1,6 @@
 <div id="menu">
 <ul>
+[% IF ( accounts ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Accounts" href="/cgi-bin/koha/admin/preferences.pl?tab=accounts">Accounts</a></li>
 [% IF ( acquisitions ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Acquisitions" href="/cgi-bin/koha/admin/preferences.pl?tab=acquisitions">Acquisitions</a></li>
 [% IF ( admin ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Administration" href="/cgi-bin/koha/admin/preferences.pl?tab=admin">Administration</a></li>
 [% IF ( authorities ) %]<li class="active">[% ELSE %]<li>[% END %]<a title="Authority Control" href="/cgi-bin/koha/admin/preferences.pl?tab=authorities">Authorities</a></li>
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/accounts.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/accounts.pref
new file mode 100644 (file)
index 0000000..fb9ee5f
--- /dev/null
@@ -0,0 +1,21 @@
+Accounts:
+    Policy:
+        -
+            - pref: UseCashRegisters
+              default: no
+              choices:
+                yes: "Use"
+                no: "Don't use"
+            - " cash registers with the accounting system to track payments."
+        -
+            - pref: AccountAutoReconcile
+              choices:
+                  yes: "Do"
+                  no: "Do not"
+            - reconcile patron balances automatically on each transaction adding debits or credits.
+        -
+            - pref: FinePaymentAutoPopup
+              choices:
+                  yes: "Do"
+                  no: "Don't"
+            - automatically display a print dialog for a payment receipt when making a payment..
index 199809f..d5ea265 100644 (file)
@@ -158,14 +158,6 @@ 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: AutoReturnCheckedOutItems
@@ -889,12 +881,6 @@ Circulation:
             - pref: ProcessingFeeNote
               type: textarea
               class: code
-        -
-            - pref: FinePaymentAutoPopup
-              choices:
-                  yes: "Do"
-                  no: "Don't"
-            - automatically display a print dialog for a payment receipt when making a payment..
     Self check-in module:
         -
             - "Include the following HTML on the self check-in screen:"