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.
The URL on the page did not have a branchcode, so the delete failed silently, and
returned the user to the "All" rules page. Turns out, the array for the rules was
not being populated with the branchcode!
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Implements the RFC found at http://wiki.koha-community.org/wiki/Hard_Due_Dates_Circ_Rule_RFC. See squashed commits
messages below for details of implementation.
Squashed commit of the following:
commit 871b91af00871146eb1216ebf5ce673dda2c5925
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date: Tue Dec 28 15:09:49 2010 -0500
Hard Due Dates dev part 3: implementing the due dates in circ
CalcDateDue now calls GetLoanLength, rather than each invocation running separately one after another. Therefore, instead of
the 'loanlength' param, CalcDateDue now takes 'itype', and uses the info to get both the issuelength and the hardduedate info (if it exists)
Global Due Date no longer populates in the sticky due date field in Circ, since it can't be determined before the item is scanned. Any specified
due date still overrides the circulation rules, if allowed.
Hard Due Dates in the past will return an error message, but can be manually specified if truly desired.
Also, a small fix to updatedatabase.pl to allow the old data to populate if possible.
commit 14d5505f3c01287a2464a759f0076c1d4b665c49
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date: Mon Dec 27 18:28:11 2010 -0500
HardDueDates dev part 2: adding admin interface
Adds columns to Smart Rules page, including calendar for easy date selection.
Removes globalDueDate and ceilingDueDates from system preferences editors
commit 76e3e3d86a7a54c6ce4253e7f68278b4dc75a0bb
Author: Ian Walls <ian.walls@bywatersolutions.com>
Date: Mon Dec 27 15:58:05 2010 -0500
HardDueDates dev part 1: database changes
Adds two new columns to issuingrules, a hardduedate and a hardduedatecompare. If globalduedate is set, use that as the universal value
for all circ rules. Else, if ceilingduedate is set, use that as the universal value. Adjust the comparison accordingly (-1 before, 0
exact, 1 after). the old system preferences globalDueDate and ceilingDueDate are then removed.
Rebased onto 3.03.00.032
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Jared Camins-Esakov <jcamins@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
The variable name for the current branch being edited was the same as the variable used in
cat-search.inc, which passed along the circ-rule library to circulation.pl, and then overriding
the set library from there.
This patch renames the template variable 'current_branch', so that it does not populate the 'branch'
param in cat-search.inc
Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Adding finedays and reservesallowed and renewalsallowed management in smart rules
Adding Clone Rules
Adding CanBookBeReserved and CanItemBeReserved in C4::Reserves
Manage Reservesallowed in opac and staff interface
Manage renewalsallowed in C4/Circulation.pm
Update Database follow
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
If the user isn't a super librarian load their library by default instead of
the default settings.
This would eliminate some confusion amoung my librarians.
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Removed unused toggle variable form smart-rules.pl and added highlighting to smart-rules.tmpl through template __odd__.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
This adds holds policy creation support to smart rules and read support to
C4/Circulation.pm, and the two reservation pages. It also adds a system
preference, AllowHoldPolicyOverride, to control whether the staff can override
these policies.
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Daniel Sweeney <daniel.sweeney@liblime.com>
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
* Added ability to specify total loans allowed at a library
for the default patron category. If set, the default
limit is applied if no rule for the specific library
and patron category is set.
* Added ability to specify default total loans allowed
for the default library; this is applied if no rule
for the specify library is set.
* Form now indicates if the number of current checkouts
allowed is unlimited.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
The alternate issuing rules editor can now allow
defining the maximum number of loans that a borrower
of a given category can take out per branch, regardless
of item type.
The form for entering this limit now appears below
the form for setting loan rules per patron category
and item type. The form only appears if a specific
branch is chosen, not if the default branch is used.
Also, some terminology changes:
* "Amount Loanable" => "Current Checkouts Allowed"
* "Amount" => "Fine Amount"
* "Grace Period" => "Fine Grace Period"
* "Charging Interval" => "Fine Charging Interval"
* "Loan time" => "Loan Period"
Documentation change: new screenshots for the alternate
loan rules form.
squashme terminology
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Issuing rules are now explicitly sorted by patron category,
then item type. The default patron category sorts last; within
a list of item types for a given patron category, the default
item type sorts last. This follows the order in which
the issuing rules are applied.
Since the primary sort is patron category, also moved that
to be the first column in the issuing rules table.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Improvements to smart-rules.pl to allow it to
replace issuingrules.pl.
* standardized "borrower type" to "patron category"
* made default item type and patron category ('Any')
translatable
* regularized construction of parameters for rule
deletion operatrion
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Also added template for "prog" set, and modified admin-home and -menu accordingly.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>