Bug 10860: In-House Use
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 18 Sep 2013 12:16:49 +0000 (14:16 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 3 Nov 2014 13:26:19 +0000 (10:26 -0300)
commit2e72eb888016f60ce15958ecb37e0ae64f0c8454
tree1d38560a8b47440f66d07184432855de18f85ec4
parentc5a6a4f18a2c4eb2cb47bc302e539d3b05fcf9b1
Bug 10860: In-House Use

This patch implements the In-House Use feature for Koha.

It adds:
- 2 new sysprefs:
  'In-House Use' to enable/disable this feature
  'In-House Use Forced' to enable/disable the feature for *all* users.
- 2 new columns issues.inhouse_use and old_issues.inhouse_use
- Datatable on the circulation history pages (readingrec) at the OPAC
  and the intranet.

A new checkbox in the Circulation tab. If checked, the issue become a
in-house use (in the statistics and issues tables).
When you check it, the due date changes to the today date.

The syspref "In-House Use Force" allows to force the in-house use to
permit the checkout even if the borrower is debarred or others problems.

In the issue table, a new string (in red) marks the issue as "in-house use".

The circulation history contains 3 tabs : "all", "checkout" and
"in-house use" (OPAC and intranet).

The cronjob script:
If AutomaticItemReturn if off, a library would like not to do a transit
operation manually. This script (to launch each night) do returns
for a specific branches.

Test plan:
1/ Execute the updatedatabase entry
2/ Enable the 'In-House Use' pref.
3/ Checkout a biblio for a patron and check the 'in-house use' checkbox.
4/ Check that the due date is the today date (with 23:59) and is not modifiable.
5/ Click on the check out button and check that the new check out
appears in the table bellow with the "(In-house use)" string.
6/ Go on the circulation history pages (readingrec and opac-readingrec)
and try the 3 tabs. In the last one, your last checkout should appear.
7/ Check in.
8/ Check readingrec pages.
9/ Choose a debarred patron and check that you cannot checkout a biblio
for him.
10/ Switch on the 'In-House Use Forced' pref
11/ You are now allowed to checkout a biblio for the debarred patron.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
19 files changed:
C4/Circulation.pm
C4/Items.pm
C4/Stats.pm
circ/circulation.pl
installer/data/mysql/kohastructure.sql
installer/data/mysql/sysprefs.sql
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css
koha-tmpl/intranet-tmpl/prog/en/includes/strings.inc
koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js
koha-tmpl/intranet-tmpl/prog/en/js/pages/circulation.js
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
koha-tmpl/opac-tmpl/bootstrap/css/datatables.css
koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc
koha-tmpl/opac-tmpl/bootstrap/js/datatables.js
svc/checkouts