1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Administration › Circulation and fine rules</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 [% INCLUDE 'calendar.inc' %]
5 <script type="text/javascript">
7 $(document).ready(function() {
8 $('#selectlibrary').find("input:submit").hide();
9 $('#branch').change(function() {
10 $('#selectlibrary').submit();
16 <body id="admin_smart-rules" class="admin">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'cat-search.inc' %]
20 <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>
22 <div id="doc3" class="yui-t1">
27 <h1 class="parameters">
28 [% IF ( humanbranch ) %]
29 Defining circulation and fine rules for "[% humanbranch %]"
31 Defining circulation and fine rules for all libraries
35 <p>The rules are applied from most specific to less specific, using the first found in this order:</p>
37 <li>same library, same patron type, same item type</li>
38 <li>same library, same patron type, all item types</li>
39 <li>same library, all patron types, same item type</li>
40 <li>same library, all patron types, all item types</li>
41 <li>default (all libraries), same patron type, same item type</li>
42 <li>default (all libraries), same patron type, all item types</li>
43 <li>default (all libraries), all patron types, same item type</li>
44 <li>default (all libraries), all patron types, all item types</li>
46 <p>To modify a rule, create a new one with the same patron type and item type.</p>
49 <form method="get" action="/cgi-bin/koha/admin/smart-rules.pl" id="selectlibrary">
51 <select name="branch" id="branch" style="width:20em;">
52 <option value="*">All libraries</option>
53 [% FOREACH branchloo IN branchloop %]
54 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
58 [% IF ( definedbranch ) %]<form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"><label
59 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidden" name="frombranch" value="[% current_branch %]" />
60 <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>
62 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
63 <input type="hidden" name="op" value="add" />
66 <th>Patron category</th>
68 <th>Current checkouts allowed</th>
71 <th>Hard due date</th>
73 <th>Fine charging interval</th>
74 <th>Fine grace period (day)</th>
75 <th>Overdue Fines Cap ($)</th>
76 <th>Suspension in days (day)</th>
77 <th>Renewals allowed (count)</th>
78 <th>Holds allowed (count)</th>
79 <th>Rental discount (%)</th>
82 [% FOREACH rule IN rules %]
83 [% UNLESS ( loop.odd ) %]
84 <tr class="highlight">
88 <td>[% IF ( rule.default_humancategorycode ) %]
91 [% rule.humancategorycode %]
94 <td>[% IF ( rule.default_humanitemtype ) %]
97 [% rule.humanitemtype %]
100 <td>[% IF ( rule.unlimited_maxissueqty ) %]
103 [% rule.maxissueqty %]
106 <td>[% rule.issuelength %]</td>
108 [% rule.lengthunit %]
110 <td>[% IF ( rule.hardduedate ) %]
111 [% IF ( rule.hardduedatebefore ) %]before [% rule.hardduedate %]</td>
112 [% ELSE %][% IF ( rule.hardduedateexact ) %]on [% rule.hardduedate %]</td>
113 [% ELSE %][% IF ( rule.hardduedateafter ) %]after [% rule.hardduedate %]</td>[% END %]
116 [% ELSE %]None defined[% END %]
117 <td>[% rule.fine %]</td>
118 <td>[% rule.chargeperiod %]</td>
119 <td>[% rule.firstremind %]</td>
120 <td>[% rule.overduefinescap FILTER format("%.2f") %]</td>
121 <td>[% rule.finedays %]</td>
122 <td>[% rule.renewalsallowed %]</td>
123 <td>[% rule.reservesallowed %]</td>
124 <td>[% rule.rentaldiscount %]</td>
126 <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>
132 <select name="categorycode">
133 <option value="*">All</option>
134 [% FOREACH categoryloo IN categoryloop %]
135 <option value="[% categoryloo.categorycode %]">[% categoryloo.description %]</option>
140 <select name="itemtype" style="width:13em;">
141 <option value="*">All</option>
142 [% FOREACH itemtypeloo IN itemtypeloop %]
143 <option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.description %]</option>
147 <td><input name="maxissueqty" size="3" /></td>
148 <td><input name="issuelength" size="3" /> </td>
150 <select name="lengthunit">
151 <option value="days" selected>Days</option>
152 <option value="hours">Hours</option>
155 <td><select name="hardduedatecompare">
156 <option value="-1">Before</option>
157 <option value="0">Exactly on</option>
158 <option value="1">After</option>
160 <input type="text" size="10" id="hardduedate" name="hardduedate" value="[% hardduedate %]" class="datepicker" />
161 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
163 <td><input name="fine" size="4" /></td>
164 <td><input name="chargeperiod" size="2" /></td>
165 <td><input name="firstremind" size="2" /> </td>
166 <td><input name="overduefinescap" size="6" /> </td>
167 <td><input name="finedays" size="3" /> </td>
168 <td><input name="renewalsallowed" size="2" /></td>
169 <td><input name="reservesallowed" size="2" /></td>
170 <td><input name="rentaldiscount" size="2" /></td>
171 <td><input type="hidden" name="branch" value="[% current_branch %]"/><input type="submit" value="Add" class="submit" /></td>
176 <div id="defaults-for-this-library" class="container">
177 <h3>Default checkout, hold and return policy[% IF ( humanbranch ) %] for [% humanbranch %][% END %]</h3>
178 <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>
179 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
180 <input type="hidden" name="op" value="set-branch-defaults" />
181 <input type="hidden" name="branch" value="[% current_branch %]"/>
185 <th>Total current checkouts allowed</th>
187 <th>Return policy</th>
192 <td><em>Defaults[% UNLESS ( default_rules ) %] (not set)[% END %]</em></td>
193 <td><input type="text" name="maxissueqty" size="3" value="[% default_maxissueqty %]"/></td>
195 <select name="holdallowed">
196 [% IF ( default_holdallowed_any ) %]
197 <option value="2" selected="selected">
203 [% IF ( default_holdallowed_same ) %]
204 <option value="1" selected="selected">
210 [% IF ( default_holdallowed_none ) %]
211 <option value="0" selected="selected">
220 <select name="returnbranch">
221 [% IF ( default_returnbranch == 'homebranch' ) %]
222 <option value="homebranch" selected="selected">
224 <option value="homebranch">
228 [% IF ( default_returnbranch == 'holdingbranch' ) %]
229 <option value="holdingbranch" selected="selected">
231 <option value="holdingbranch">
233 Item returns to issuing library
235 [% IF ( default_returnbranch == 'noreturn' ) %]
236 <option value="noreturn" selected="selected">
238 <option value="noreturn">
244 <td><input type="submit" value="Save" class="submit" /></td>
246 <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=*&branch=[% current_branch %]">Unset</a>
252 [% IF ( show_branch_cat_rule_form ) %]
253 <div id="holds-policy-by-patron-category" class="container">
254 <h3>[% IF humanbranch %]Checkout limit by patron category for [% humanbranch %][% ELSE %]Default checkout limit by patron category[% END %]</h3>
255 <p>For this library, you can specify the maximum number of loans that
256 a patron of a given category can make, regardless of the item type.
258 <p>If the total amount loanable for a given patron category is left blank,
259 no limit applies, except possibly for a limit you define for a specific item type.
261 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
262 <input type="hidden" name="op" value="add-branch-cat" />
263 <input type="hidden" name="branch" value="[% current_branch %]"/>
266 <th>Patron category</th>
267 <th>Total current checkouts allowed</th>
270 [% FOREACH branch_cat_rule_loo IN branch_cat_rule_loop %]
271 [% UNLESS ( loop.odd ) %]
272 <tr class="highlight">
276 <td>[% IF ( branch_cat_rule_loo.default_humancategorycode ) %]
279 [% branch_cat_rule_loo.humancategorycode %]
282 <td>[% IF ( branch_cat_rule_loo.unlimited_maxissueqty ) %]
285 [% branch_cat_rule_loo.maxissueqty %]
289 <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>
295 <select name="categorycode">
296 [% FOREACH categoryloo IN categoryloop %]
297 <option value="[% categoryloo.categorycode %]">[% categoryloo.description %]</option>
301 <td><input name="maxissueqty" size="3" /></td>
302 <td><input type="submit" value="Add" class="submit" /></td>
308 <div id="holds-policy-by-item-type" class="container">
309 <h3>[% IF humanbranch %]Holds policy by item type for [% humanbranch %][% ELSE %]Default holds policy by item type[% END %]</h3>
311 For this library, you can edit rules for given itemtypes, regardless
312 of the patron's category.
315 Currently, this means hold policies.
316 The various policies have the following effects:
319 <li><strong>From any library:</strong> Patrons from any library may put this item on hold. <cite>(default if none is defined)</cite></li>
320 <li><strong>From home library:</strong> Only patrons from the item's home library may put this book on hold.</li>
321 <li><strong>No holds allowed:</strong> No patron may put this book on hold.</li>
324 Note that if the system preference
325 <code>AllowHoldPolicyOverride</code> is enabled, these policies can
326 be overridden by your circulation staff. Also, these policies are
327 based on the patron's home library, <em>not</em> the library where the hold is being placed..
330 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
331 <input type="hidden" name="op" value="add-branch-item" />
332 <input type="hidden" name="branch" value="[% current_branch %]"/>
337 <th>Return policy</th>
340 [% FOREACH branch_item_rule_loo IN branch_item_rule_loop %]
341 [% UNLESS ( loop.odd ) %]
342 <tr class="highlight">
346 <td>[% IF ( branch_item_rule_loo.default_humanitemtype ) %]
349 [% branch_item_rule_loo.humanitemtype %]
352 <td>[% IF ( branch_item_rule_loo.holdallowed_any ) %]
354 [% ELSIF ( branch_item_rule_loo.holdallowed_same ) %]
360 <td>[% IF ( branch_item_rule_loo.returnbranch == 'homebranch' ) %]
362 [% ELSIF ( branch_item_rule_loo.returnbranch == 'holdingbranch' ) %]
363 Item returns to issuing branch
364 [% ELSIF ( branch_item_rule_loo.returnbranch == 'noreturn' ) %]
367 Error - unknown option
371 <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>
377 <select name="itemtype">
378 [% FOREACH itemtypeloo IN itemtypeloop %]
379 <option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.description %]</option>
384 <select name="holdallowed">
385 <option value="2">From any library</option>
386 <option value="1">From home library</option>
387 <option value="0">No holds allowed</option>
391 <select name="returnbranch">
392 <option value="homebranch">Item returns home</option>
393 <option value="holdingbranch">Item returns to issuing library</option>
394 <option value="noreturn">Item floats</option>
397 <td><input type="submit" value="Add" class="submit" /></td>
406 [% INCLUDE 'admin-menu.inc' %]
409 [% INCLUDE 'intranet-bottom.inc' %]