1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Administration › Circulation and fine rules</title>
3 [% INCLUDE 'doc-head-close.inc' %]
5 <script type="text/javascript">
7 $(document).ready(function() {
8 $('#selectlibrary').find("input:submit").hide();
9 $('#branch').change(function() {
10 $('#selectlibrary').submit();
15 <!-- Enable Calendar system -->
16 <link rel="stylesheet" type="text/css" href="[% themelang %]/lib/calendar/calendar-system.css" />
17 <script type="text/javascript" src="[% themelang %]/lib/calendar/calendar.js"></script>
18 <script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-en.js"></script>
19 <script type="text/javascript" src="[% themelang %]/lib/calendar/calendar-setup.js"></script>
20 <!-- End Calendar system additions -->
22 <body id="admin_smart-rules" class="admin">
23 [% INCLUDE 'header.inc' %]
24 [% INCLUDE 'cat-search.inc' %]
26 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › Circulation and fine rules</div>
28 <div id="doc3" class="yui-t1">
33 <h1 class="parameters">
34 [% IF ( humanbranch ) %]
35 Defining circulation and fine rules for "[% humanbranch %]"
37 Defining circulation and fine rules for all libraries
41 <p>The rules are applied from most specific to less specific, using the first found in this order:</p>
43 <li>same library, same patron type, same item type</li>
44 <li>same library, same patron type, all item types</li>
45 <li>same library, all patron types, same item type</li>
46 <li>same library, all patron types, all item types</li>
47 <li>all libraries, same patron type, same item type</li>
48 <li>all libraries, same patron type, all item types</li>
49 <li>all libraries, all patron types, same item type</li>
50 <li>all libraries, all patron types, all item types</li>
52 <p>To modify a rule, create a new one with the same patron type and item type.</p>
55 <form method="get" action="/cgi-bin/koha/admin/smart-rules.pl" id="selectlibrary">
57 <select name="branch" id="branch" style="width:20em;">
58 <option value="*">All libraries</option>
59 [% FOREACH branchloo IN branchloop %]
60 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
64 [% IF ( definedbranch ) %]<form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"><label
65 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidden" name="frombranch" value="[% current_branch %]" />
66 <select name="tobranch" id="tobranch">[% FOREACH branchloo IN branchloop %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]</select> <input type="submit" value="Clone" /></form>[% END %]</fieldset>
68 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
69 <input type="hidden" name="op" value="add" />
72 <th>Patron category</th>
74 <th>Current checkouts allowed</th>
77 <th>Hard due date</th>
79 <th>Fine charging interval</th>
80 <th>Fine grace period (day)</th>
81 <th>Suspension in days (day)</th>
82 <th>Renewals allowed (count)</th>
83 <th>Holds allowed (count)</th>
84 <th>Rental discount (%)</th>
87 [% FOREACH rule IN rules %]
88 [% UNLESS ( loop.odd ) %]
89 <tr class="highlight">
93 <td>[% IF ( rule.default_humancategorycode ) %]
96 [% rule.humancategorycode %]
99 <td>[% IF ( rule.default_humanitemtype ) %]
102 [% rule.humanitemtype %]
105 <td>[% IF ( rule.unlimited_maxissueqty ) %]
108 [% rule.maxissueqty %]
111 <td>[% rule.issuelength %]</td>
113 [% rule.lengthunit %]
115 <td>[% IF ( rule.hardduedate ) %]
116 [% IF ( rule.hardduedatebefore ) %]before [% rule.hardduedate %]</td>
117 [% ELSE %][% IF ( rule.hardduedateexact ) %]on [% rule.hardduedate %]</td>
118 [% ELSE %][% IF ( rule.hardduedateafter ) %]after [% rule.hardduedate %]</td>[% END %]
121 [% ELSE %]None defined[% END %]
122 <td>[% rule.fine %]</td>
123 <td>[% rule.chargeperiod %]</td>
124 <td>[% rule.firstremind %]</td>
125 <td>[% rule.finedays %]</td>
126 <td>[% rule.renewalsallowed %]</td>
127 <td>[% rule.reservesallowed %]</td>
128 <td>[% rule.rentaldiscount %]</td>
130 <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% rule.itemtype %]&categorycode=[% rule.categorycode %]&branch=[% rule.current_branch %]">Delete</a>
136 <select name="categorycode">
137 <option value="*">All</option>
138 [% FOREACH categoryloo IN categoryloop %]
139 <option value="[% categoryloo.categorycode %]">[% categoryloo.description %]</option>
144 <select name="itemtype" style="width:13em;">
145 <option value="*">All</option>
146 [% FOREACH itemtypeloo IN itemtypeloop %]
147 <option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.description %]</option>
151 <td><input name="maxissueqty" size="3" /></td>
152 <td><input name="issuelength" size="3" /> </td>
154 <select name="lengthunit">
155 <option value="days" selected>Days</option>
156 <option value="hours">Hours</option>
159 <td><select name="hardduedatecompare">
160 <option value="-1">Before</option>
161 <option value="0">Exactly on</option>
162 <option value="1">After</option>
164 <input type="text" size="10" id="hardduedate" name="hardduedate" value="[% hardduedate %]" />
165 [% INCLUDE 'date-format.inc' %]
166 <img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="CalendarDueDate" style="cursor: pointer;"/>
167 <script language="JavaScript" type="text/javascript">
168 function refocus(calendar) {
169 document.getElementById('hardduedate').focus();
174 inputField : "hardduedate",
175 ifFormat : "%m/%d/%Y",
176 button : "CalendarDueDate",
182 <td><input name="fine" size="4" /></td>
183 <td><input name="chargeperiod" size="2" /></td>
184 <td><input name="firstremind" size="2" /> </td>
185 <td><input name="finedays" size="3" /> </td>
186 <td><input name="renewalsallowed" size="2" /></td>
187 <td><input name="reservesallowed" size="2" /></td>
188 <td><input name="rentaldiscount" size="2" /></td>
189 <td><input type="hidden" name="branch" value="[% current_branch %]"/><input type="submit" value="Add" class="submit" /></td>
194 <div id="defaults-for-this-library" class="container">
195 <h3>Default checkout, hold and return policy for [% IF ( humanbranch ) %][% humanbranch %][% ELSE %]all libraries[% END %]</h3>
196 <p>You can set a default maximum number of checkouts, hold policy and return policy that will be used if none is defined below for a particular item type or category.</p>
197 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
198 <input type="hidden" name="op" value="set-branch-defaults" />
199 <input type="hidden" name="branch" value="[% current_branch %]"/>
203 <th>Total current checkouts allowed</th>
205 <th>Return policy</th>
210 <td><em>Defaults[% UNLESS ( default_rules ) %] (not set)[% END %]</em></td>
211 <td><input type="text" name="maxissueqty" size="3" value="[% default_maxissueqty %]"/></td>
213 <select name="holdallowed">
214 [% IF ( default_holdallowed_any ) %]
215 <option value="2" selected="selected">
221 [% IF ( default_holdallowed_same ) %]
222 <option value="1" selected="selected">
228 [% IF ( default_holdallowed_none ) %]
229 <option value="0" selected="selected">
238 <select name="returnbranch">
239 [% IF ( default_returnbranch == 'homebranch' ) %]
240 <option value="homebranch" selected="selected">
242 <option value="homebranch">
246 [% IF ( default_returnbranch == 'holdingbranch' ) %]
247 <option value="holdingbranch" selected="selected">
249 <option value="holdingbranch">
251 Item returns to issuing branch
253 [% IF ( default_returnbranch == 'noreturn' ) %]
254 <option value="noreturn" selected="selected">
256 <option value="noreturn">
262 <td><input type="submit" value="Save" class="submit" /></td>
264 <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=*&branch=[% current_branch %]">Unset</a>
270 [% IF ( show_branch_cat_rule_form ) %]
271 <div id="holds-policy-by-patron-category" class="container">
272 <h3>Checkout limit by patron category for [% IF ( humanbranch ) %][% humanbranch %][% ELSE %]all libraries[% END %]</h3>
273 <p>For this library, you can specify the maximum number of loans that
274 a patron of a given category can make, regardless of the item type.
276 <p>If the total amount loanable for a given patron category is left blank,
277 no limit applies, except possibly for a limit you define for a specific item type.
279 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
280 <input type="hidden" name="op" value="add-branch-cat" />
281 <input type="hidden" name="branch" value="[% current_branch %]"/>
284 <th>Patron category</th>
285 <th>Total current checkouts allowed</th>
288 [% FOREACH branch_cat_rule_loo IN branch_cat_rule_loop %]
289 [% UNLESS ( loop.odd ) %]
290 <tr class="highlight">
294 <td>[% IF ( branch_cat_rule_loo.default_humancategorycode ) %]
297 [% branch_cat_rule_loo.humancategorycode %]
300 <td>[% IF ( branch_cat_rule_loo.unlimited_maxissueqty ) %]
303 [% branch_cat_rule_loo.maxissueqty %]
307 <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=[% branch_cat_rule_loo.categorycode %]&branch=[% current_branch %]">Delete</a>
313 <select name="categorycode">
314 [% FOREACH categoryloo IN categoryloop %]
315 <option value="[% categoryloo.categorycode %]">[% categoryloo.description %]</option>
319 <td><input name="maxissueqty" size="3" /></td>
320 <td><input type="submit" value="Add" class="submit" /></td>
326 <div id="holds-policy-by-item-type" class="container">
327 <h3>Holds policy by item type for [% IF ( humanbranch ) %][% humanbranch %][% ELSE %]all libraries[% END %]</h3>
329 For this library, you can edit rules for given itemtypes, regardless
330 of the patron's category.
333 Currently, this means hold policies.
334 The various policies have the following effects:
337 <li><strong>From any library:</strong> Patrons from any library may put this item on hold. <cite>(default if none is defined)</cite></li>
338 <li><strong>From home library:</strong> Only patrons from the item's home library may put this book on hold.</li>
339 <li><strong>No holds allowed:</strong> No patron may put this book on hold.</li>
342 Note that if the system preference
343 <code>AllowHoldPolicyOverride</code> is enabled, these policies can
344 be overridden by your circulation staff. Also, these policies are
345 based on the patron's home library, <em>not</em> the library where the hold is being placed..
348 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
349 <input type="hidden" name="op" value="add-branch-item" />
350 <input type="hidden" name="branch" value="[% current_branch %]"/>
355 <th>Return policy</th>
358 [% FOREACH branch_item_rule_loo IN branch_item_rule_loop %]
359 [% UNLESS ( loop.odd ) %]
360 <tr class="highlight">
364 <td>[% IF ( branch_item_rule_loo.default_humanitemtype ) %]
367 [% branch_item_rule_loo.humanitemtype %]
370 <td>[% IF ( branch_item_rule_loo.holdallowed_any ) %]
372 [% ELSIF ( branch_item_rule_loo.holdallowed_same ) %]
378 <td>[% IF ( branch_item_rule_loo.returnbranch == 'homebranch' ) %]
380 [% ELSIF ( branch_item_rule_loo.returnbranch == 'holdingbranch' ) %]
381 Item returns to issuing branch
382 [% ELSIF ( branch_item_rule_loo.returnbranch == 'noreturn' ) %]
385 Error - unknown option
389 <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-item&itemtype=[% branch_item_rule_loo.itemtype %]&branch=[% current_branch %]">Delete</a>
395 <select name="itemtype">
396 [% FOREACH itemtypeloo IN itemtypeloop %]
397 <option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.description %]</option>
402 <select name="holdallowed">
403 <option value="2">From any library</option>
404 <option value="1">From home library</option>
405 <option value="0">No holds allowed</option>
409 <select name="returnbranch">
410 <option value="homebranch">Item returns home</option>
411 <option value="holdingbranch">Item returns to issuing branch</option>
412 <option value="noreturn">Item floats</option>
415 <td><input type="submit" value="Add" class="submit" /></td>
424 [% INCLUDE 'admin-menu.inc' %]
427 [% INCLUDE 'intranet-bottom.inc' %]