Koha/koha-tmpl/intranet-tmpl/prog/en/modules
Ian Walls 850b4eeab9 Bug 6151: Add AllowReturnToBranch system preference
In order to solve the issue of IndependantBranches being incompatible with HomeOrHoldingBranchReturn,
this patch changes the mechanism by which the question "can I return this material here?" is answered.  Before,
the conditions were "if IndependantBranches is on, and this branch isn't HomeOrHoldingBranchReturn for the item,
then no, otherwise yes".  Now, the question is answered by consulting CanBookBeReturned (new subroutine)

New system preference:  AllowReturnToBranch
Possible values:
  - anywhere (default for new installs, and for existing systems with IndependantBranches turned off)
  - homebranch
  - holdingbranch (which is also the issuing branch in all normal circumstances)
  - homeorholdingbranch (default for existing systems with IndependantBranches turned on)

New subroutine:  CanBookBeReturned
Input:  $item hash (from GetItems), and $branchcode
Output: 0 or 1 to indicate "allowed" or not, and an optional message if not allowed.  Message is the 'correct' branchcode
to return the material to

To Test:
1.  Install patch and new syspref
2.  Check that default value of the preference:
    - if IndependantBranches was OFF at install time, should be 'anywhere'
    - if IndependantBranches was ON at install time, should be 'homeorholdingbranch'

Case:  'anywhere'
1.  Checkout a Library A book at Library A.  Return at Library A should be successful
2.  Repeat step 1, returning to Library B.  Return should be successful
3.  Checkout a Library A book at Library B.  Return to A should be successful
4.  Repeat step 3 with Library B and Library C

Case: 'homebranch'
1.  Checkout a Library A book at Library A.  Return at Library A should be successful
2.  Repeat step 1, returning to Library B.  Return should FAIL (returning message to return at A)
3.  Checkout a Library A book at Library B.  Return to Library A should be successful
4.  Repeat step 3 with Library B and Library C.  Both should FAIL (returning message to return at A)

Case: 'holdingbranch'
1.  Checkout a Library A book at Library A.  Return at Library A should be successful
2.  Repeat step 1, returning to Library B.  Return should FAIL (returning message to return at A)
3.  Checkout a Library A book at Library B.  Return to A should FAIL (returning message to return at B)
4.  Repeat step 3 with Library B. Return should be successful
5.  Repeat step 3 with Library C. Return should FAIL (returning message to return at B)

Case: 'homeorholdingbranch'
1.  Checkout a Library A book at Library A.  Return at Library A should be successful
2.  Repeat step 1, returning to Library B.  Return should FAIL (returning message to return at A)
3.  Checkout a Library A book at Library B.  Return to A should be successful
4.  Repeat step 3 with Library B. Return should be successful
5.  Repeat step 3 with Library C. Return should FAIL (returning message to return at A)

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2012-09-17 19:17:41 +02:00
..
acqui Bug 8629: update of statistics fields on fund selection in order creation/edition 2012-09-14 16:57:02 +02:00
admin Bug 6151: Add AllowReturnToBranch system preference 2012-09-17 19:17:41 +02:00
authorities Bug 8071: link between bib and authorities with the authid 2012-09-14 13:29:14 +02:00
basket
batch
catalogue Bug 8765 follow-up replace tabs by spaces 2012-09-17 19:00:05 +02:00
cataloguing Bug 8550: restore ISSN field to Z39.50 search 2012-09-05 15:53:46 +02:00
circ Bug 8677 - table overlapping to the right on holds waiting 2012-09-13 18:27:04 +02:00
errors
help Bug 7368 - General staff client typo omnibus 2012-06-25 17:59:29 +02:00
installer
labels Bug 8181 [REVISED] Replace DynArch calendar widget with jQueryUI version 2012-06-25 18:26:26 +02:00
members Bug 7671 : add a real primary key accountlines_id in accountlines 2012-09-15 07:31:58 +02:00
offline_circ
patroncards
reports Bug 2553 [Serials report] alphabetize dropdown menus 2012-09-04 18:28:59 +02:00
reserve Bug 8181 [REVISED] Replace DynArch calendar widget with jQueryUI version 2012-06-25 18:26:26 +02:00
reviews
rotating_collections
serials Bug 8428 - can't save contracts 2012-09-14 17:30:44 +02:00
services Bug 8637: Lack of control on mandatory in orderreveive.tt 2012-08-31 13:48:52 +02:00
sms
suggestion Bug 8440: Dates does not appear in suggestions management 2012-09-03 17:52:18 +02:00
tags Bug 8181 [REVISED] Replace DynArch calendar widget with jQueryUI version 2012-06-25 18:26:26 +02:00
test
tools Bug 7986: Export issues for patron 2012-09-13 17:58:30 +02:00
virtualshelves
z3950
about.tt Bug 8641 - Add information warning about log-in as root user to About->System information 2012-09-13 18:56:31 +02:00
auth.tt
intranet-main.tt Bug 8593 - Follow-up - Add unique IDs to pending approval markup on staff client home page 2012-08-31 23:40:53 +02:00