Koha/admin
Ian Walls d92c595dc4 Enhancement 7144: Floating Collections (per branch/itemtype)
Adds support for Floating Collections (i.e. items that don't automatically return
home when checked in at another branch) on a per branchcode/itemtype basis.

This patch adds a new column (returnbranch) to the default_circ_rules, default_branch_item_rules,
default_branch_circ_rules and branch_item_rules tables, after the 'holdsallowed' column.  While
this is coded as a varchar(15), the only currently supported values are 'homebranch', 'holdingbranch',
'noreturn' and NULL.

On upgrade, the value of HomeOrHoldingBranchReturn is used to populate the global default (which is
stored in default_circ_rules.returnbranch).

To access this value, use C4::Circulation::GetBranchItemRule.  This subroutine is altered to supply
an additional key, "returnbranch", containing this value (or 'homebranch' as a default).  No existing
usage of GetBranchItemRule should need to be modified.

The use of HomeOrHoldingBranchReturn is removed in AddReturn to instead use this subroutine.  This will
determine, on a more granular level, where the item should be transferred, after all is said and done.  If
'noreturn' is specified, then the material will remain at the branch doing the checking in.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Passes prove t xt t/db_dependent

I was able to make this feature work as advertised.
As noted above, if you want a floating rule applied across all branches, adding a single default rule won't suffice, you'll need to add the rule to all branches. That issue is not related to the functioning of *this* patch however.
2012-03-21 10:28:26 +01:00
..
admin-home.pl Bug 2505: Enabled warnings in admin-home.pl and roadtype.pl. 2009-09-06 09:13:14 -04:00
aqbudget_owner_search.pl bug_6253: Unified member Search() 2011-10-19 16:23:02 +13:00
aqbudgetperiods.pl Bug 6943: Added ability to duplicate a budget tree (from the edit sub menu) 2012-02-03 17:53:59 +01:00
aqbudgets.pl Bug 6834 : Removing last of the $template->{param_map} 2011-09-03 06:37:50 +12:00
aqcontract.pl Bug 7113: Standardize vendor id name in templates and scripts 2012-02-17 19:04:00 +01:00
aqplan.pl Bug 6752: Be stricter with utf-8 encoding of output 2012-01-27 12:11:06 +01:00
auth_subfields_structure.pl Bug 5462: modified intranet scripts to match templates 2011-02-03 09:57:24 +00:00
auth_tag_structure.pl Bug 5453: Move declarations out of conditionals 2011-07-15 15:50:20 +12:00
authorised_values.pl bug 7450 small follow-up, removing warn 2012-02-03 12:09:24 +01:00
authtypes.pl Fix FSF address in directory admin/ 2010-03-16 20:17:50 -04:00
biblio_framework.pl Fix for Bug 4424, MARC Framework deletion incorrectly reports usage count 2010-04-29 20:59:29 -04:00
branch_transfer_limits.pl Bug 6842 FU : library transfer limits edits not stored 2012-02-01 22:47:56 +01:00
branches.pl Fix for Bug 6458 - incorrect parsing result in translation processing / branches 2011-09-14 10:08:47 +12:00
categorie.pl Fix for Bug 6872 - Can't set default SMS messaging options for patron category 2011-09-27 21:35:41 +13:00
check_budget_parent.pl Bug 5385: POD Cleanups (part 1) 2010-11-12 10:06:55 +13:00
check_parent_total.pl bug4438/MT5496 budget Exceeds total allocation 2011-03-14 20:45:58 +13:00
checkmarc.pl Bug 3768 (Bibliographic Framework Test) 2010-05-17 08:26:21 -04:00
cities.pl Fix for Bug 5433 - Separate state field for cities 2011-08-04 20:54:49 +12:00
classsources.pl Bug 2505 - Add commented use warnings where missing in the admin/ directory 2010-04-21 20:20:11 +12:00
clone-rules.pl Bug 2505 - Add commented use warnings where missing in the admin/ directory 2010-04-21 20:20:11 +12:00
currency.pl bug 4333 followup - fix an uninitialized value warning 2010-04-30 05:50:45 -04:00
env_tz_test.pl Bug 2617: Add strict (and warnings), partial fix. 2009-03-11 08:36:55 -05:00
fieldmapping.pl Fix for Bug 4261 - keyword mapping should show which framework the map is for 2010-11-01 20:34:36 +13:00
import_export_framework.pl Bug 5478 - Automate MARC framework import/export 2011-04-01 21:17:33 +13:00
item_circulation_alerts.pl bug 3581: fix staff permission for item circ alerts 2009-09-06 09:46:39 -04:00
itemtypes.pl BUG6436 Don't allow deletion of an itemtype used in items.itype 2011-06-03 14:24:54 +12:00
koha2marclinks.pl Using only default framework for koha2marclinks 2010-03-16 21:27:20 -04:00
marc_subfields_structure.pl Bug 6475 - Edit it's not possible in subfield "0" in MARC framework 2011-11-18 22:32:35 +01:00
marctagstructure.pl Bug 5462: modified intranet scripts to match templates 2011-02-03 09:57:24 +00:00
matching-rules.pl Bug 6713, editing matching rules broken 2011-08-13 20:06:41 +12:00
oai_set_mappings.pl Bug 6440: Implement OAI-PMH Sets 2012-03-20 11:38:26 +01:00
oai_sets.pl Bug 6440: Implement OAI-PMH Sets 2012-03-20 11:38:26 +01:00
patron-attr-types.pl Fix for Bug 5436 - Extended patron attributes display improvements 2011-09-23 15:35:54 +12:00
preferences.pl Bug 7330 - System preferences editor generates errors in the log with each search 2011-12-15 17:24:44 +01:00
printers.pl Bug 2505 - Add commented use warnings where missing in the admin/ directory 2010-04-21 20:20:11 +12:00
roadtype.pl Another bug 5004 fix, this time for road types 2010-11-19 09:29:48 +13:00
smart-rules.pl Enhancement 7144: Floating Collections (per branch/itemtype) 2012-03-21 10:28:26 +01:00
stopwords.pl Fix FSF address in directory admin/ 2010-03-16 20:17:50 -04:00
systempreferences.pl Bug 6190: BorrowerUnwantedField syspref and removing fields from the patron entry 2012-01-06 17:30:25 +01:00
z3950servers.pl Bug 7582 - When adding a Z39.50 server the "checked" option should use a checkbox 2012-02-27 18:33:12 +01:00