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();
12 $(".editrule").click(function(){
13 $('#default-circulation-rules td').removeClass('highlighted-row');
14 $(this).parent().parent().find("td").each(function (i) {
15 $(this).addClass('highlighted-row');
17 itm = itm.replace(/^\s*|\s*$/g,'');
18 var current = $("#default-circulation-rules tr:last td:eq("+i+")");
20 $(current).find("input").val(itm);
21 // select the corresponding option
22 $(current).find("select option").each(function(){
23 if ( $(this).text().toLowerCase() == itm.toLowerCase() ) {
24 $(this).attr('selected', 'selected');
27 if ( i == 0 || i == 1 ) {
28 // Disable the 2 first columns, we cannot update them.
29 var val = $(current).find("select option:selected").val();
30 var name = "categorycode";
34 // Remove potential previous input added
35 $(current).find("input").remove();
36 $(current).append("<input type='hidden' name='"+name+"' value='"+val+"' />");
39 // specific processing for the Hard due date column
40 var s = itm.split(' ');
42 if ( s[0] == "before" ) {
44 } else if ( s[0] == "on" ) {
46 } else if ( s[0] == "after" ) {
49 $(current).find("input").val(s[1]);
50 $(current).find("select").val(select_value);
53 $("#default-circulation-rules tr:last td:eq(0) select").attr('disabled', 'disabled');
54 $("#default-circulation-rules tr:last td:eq(1) select").attr('disabled', 'disabled');
55 $("#default-circulation-rules tr:last td:last input").val(_("Save"));
62 <body id="admin_smart-rules" class="admin">
63 [% INCLUDE 'header.inc' %]
64 [% INCLUDE 'cat-search.inc' %]
66 <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>
68 <div id="doc3" class="yui-t1">
73 <h1 class="parameters">
74 [% IF ( humanbranch ) %]
75 Defining circulation and fine rules for "[% humanbranch %]"
77 Defining circulation and fine rules for all libraries
81 <p>The rules are applied from most specific to less specific, using the first found in this order:</p>
83 <li>same library, same patron type, same item type</li>
84 <li>same library, same patron type, all item types</li>
85 <li>same library, all patron types, same item type</li>
86 <li>same library, all patron types, all item types</li>
87 <li>default (all libraries), same patron type, same item type</li>
88 <li>default (all libraries), same patron type, all item types</li>
89 <li>default (all libraries), all patron types, same item type</li>
90 <li>default (all libraries), all patron types, all item types</li>
92 <p>To modify a rule, create a new one with the same patron type and item type.</p>
95 <form method="get" action="/cgi-bin/koha/admin/smart-rules.pl" id="selectlibrary">
97 <select name="branch" id="branch" style="width:20em;">
98 <option value="*">All libraries</option>
99 [% FOREACH branchloo IN branchloop %]
100 [% IF ( branchloo.selected ) %]<option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>[% ELSE %]<option value="[% branchloo.value %]">[% branchloo.branchname %]</option>[% END %]
104 [% IF ( definedbranch ) %]<form action="/cgi-bin/koha/admin/clone-rules.pl" method="post"><label
105 for="tobranch"><strong>Clone these rules to:</strong></label> <input type="hidden" name="frombranch" value="[% current_branch %]" />
106 <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 %]
108 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
109 <input type="hidden" name="op" value="add" />
110 <input type="hidden" name="branch" value="[% branch %]"/>
111 <table id="default-circulation-rules">
113 <th>Patron category</th>
115 <th>Current checkouts allowed</th>
118 <th>Hard due date</th>
120 <th>Fine charging interval</th>
121 <th>Fine grace period (day)</th>
122 <th>Overdue Fines Cap ($)</th>
123 <th>Suspension in days (day)</th>
124 <th>Renewals allowed (count)</th>
125 <th>Holds allowed (count)</th>
126 <th>Rental discount (%)</th>
127 <th colspan="2"> </th>
129 [% FOREACH rule IN rules %]
130 [% UNLESS ( loop.odd ) %]
131 <tr class="highlight">
135 <td>[% IF ( rule.default_humancategorycode ) %]
138 [% rule.humancategorycode %]
141 <td>[% IF ( rule.default_humanitemtype ) %]
144 [% rule.humanitemtype %]
147 <td>[% IF ( rule.unlimited_maxissueqty ) %]
150 [% rule.maxissueqty %]
153 <td>[% rule.issuelength %]</td>
155 [% rule.lengthunit %]
157 <td>[% IF ( rule.hardduedate ) %]
158 [% IF ( rule.hardduedatebefore ) %]before [% rule.hardduedate %]</td>
159 [% ELSE %][% IF ( rule.hardduedateexact ) %]on [% rule.hardduedate %]</td>
160 [% ELSE %][% IF ( rule.hardduedateafter ) %]after [% rule.hardduedate %]</td>[% END %]
163 [% ELSE %]None defined[% END %]
164 <td>[% rule.fine %]</td>
165 <td>[% rule.chargeperiod %]</td>
166 <td>[% rule.firstremind %]</td>
167 <td>[% rule.overduefinescap FILTER format("%.2f") %]</td>
168 <td>[% rule.finedays %]</td>
169 <td>[% rule.renewalsallowed %]</td>
170 <td>[% rule.reservesallowed %]</td>
171 <td>[% rule.rentaldiscount %]</td>
172 <td><a href="#" class="editrule">Edit</a></td>
174 <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>
180 <select name="categorycode" id="categorycode">
181 <option value="*">All</option>
182 [% FOREACH categoryloo IN categoryloop %]
183 <option value="[% categoryloo.categorycode %]">[% categoryloo.description %]</option>
188 <select name="itemtype" id="matrixitemtype" style="width:13em;">
189 <option value="*">All</option>
190 [% FOREACH itemtypeloo IN itemtypeloop %]
191 <option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.description %]</option>
195 <td><input name="maxissueqty" id="maxissueqty" size="3" /></td>
196 <td><input name="issuelength" id="issuelength" size="3" /> </td>
198 <select name="lengthunit" id="lengthunit">
199 <option value="days" selected>Days</option>
200 <option value="hours">Hours</option>
204 <select name="hardduedatecompare" id="hardduedatecompare">
205 <option value="-1">Before</option>
206 <option value="0">Exactly on</option>
207 <option value="1">After</option>
209 <input type="text" size="10" id="hardduedate" name="hardduedate" value="[% hardduedate %]" class="datepicker" />
210 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
212 <td><input name="fine" id="fine" size="4" /></td>
213 <td><input name="chargeperiod" id="chargeperiod" size="2" /></td>
214 <td><input name="firstremind" id="firstremind" size="2" /> </td>
215 <td><input name="overduefinescap" id="overduefinescap" size="6" /> </td>
216 <td><input name="finedays" id="fined" size="3" /> </td>
217 <td><input name="renewalsallowed" id="renewalsallowed" size="2" /></td>
218 <td><input name="reservesallowed" id="reservesallowed" size="2" /></td>
219 <td><input name="rentaldiscount" id="rentaldiscount" size="2" /></td>
221 <input type="hidden" name="branch" value="[% current_branch %]"/>
222 <input type="submit" value="Save" class="submit" />
228 <div id="defaults-for-this-library" class="container">
229 <h3>Default checkout, hold and return policy[% IF ( humanbranch ) %] for [% humanbranch %][% END %]</h3>
230 <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>
231 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
232 <input type="hidden" name="op" value="set-branch-defaults" />
233 <input type="hidden" name="branch" value="[% current_branch %]"/>
237 <th>Total current checkouts allowed</th>
239 <th>Return policy</th>
244 <td><em>Defaults[% UNLESS ( default_rules ) %] (not set)[% END %]</em></td>
245 <td><input type="text" name="maxissueqty" size="3" value="[% default_maxissueqty %]"/></td>
247 <select name="holdallowed">
248 [% IF ( default_holdallowed_any ) %]
249 <option value="2" selected="selected">
255 [% IF ( default_holdallowed_same ) %]
256 <option value="1" selected="selected">
262 [% IF ( default_holdallowed_none ) %]
263 <option value="0" selected="selected">
272 <select name="returnbranch">
273 [% IF ( default_returnbranch == 'homebranch' ) %]
274 <option value="homebranch" selected="selected">
276 <option value="homebranch">
280 [% IF ( default_returnbranch == 'holdingbranch' ) %]
281 <option value="holdingbranch" selected="selected">
283 <option value="holdingbranch">
285 Item returns to issuing library
287 [% IF ( default_returnbranch == 'noreturn' ) %]
288 <option value="noreturn" selected="selected">
290 <option value="noreturn">
296 <td><input type="submit" value="Save" class="submit" /></td>
298 <a class="button" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=*&branch=[% current_branch %]">Unset</a>
304 [% IF ( show_branch_cat_rule_form ) %]
305 <div id="holds-policy-by-patron-category" class="container">
306 <h3>[% IF humanbranch %]Checkout limit by patron category for [% humanbranch %][% ELSE %]Default checkout limit by patron category[% END %]</h3>
307 <p>For this library, you can specify the maximum number of loans that
308 a patron of a given category can make, regardless of the item type.
310 <p>If the total amount loanable for a given patron category is left blank,
311 no limit applies, except possibly for a limit you define for a specific item type.
313 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
314 <input type="hidden" name="op" value="add-branch-cat" />
315 <input type="hidden" name="branch" value="[% current_branch %]"/>
318 <th>Patron category</th>
319 <th>Total current checkouts allowed</th>
322 [% FOREACH branch_cat_rule_loo IN branch_cat_rule_loop %]
323 [% UNLESS ( loop.odd ) %]
324 <tr class="highlight">
328 <td>[% IF ( branch_cat_rule_loo.default_humancategorycode ) %]
331 [% branch_cat_rule_loo.humancategorycode %]
334 <td>[% IF ( branch_cat_rule_loo.unlimited_maxissueqty ) %]
337 [% branch_cat_rule_loo.maxissueqty %]
341 <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>
347 <select name="categorycode">
348 [% FOREACH categoryloo IN categoryloop %]
349 <option value="[% categoryloo.categorycode %]">[% categoryloo.description %]</option>
353 <td><input name="maxissueqty" size="3" /></td>
354 <td><input type="submit" value="Add" class="submit" /></td>
360 <div id="holds-policy-by-item-type" class="container">
361 <h3>[% IF humanbranch %]Holds policy by item type for [% humanbranch %][% ELSE %]Default holds policy by item type[% END %]</h3>
363 For this library, you can edit rules for given itemtypes, regardless
364 of the patron's category.
367 Currently, this means hold policies.
368 The various policies have the following effects:
371 <li><strong>From any library:</strong> Patrons from any library may put this item on hold. <cite>(default if none is defined)</cite></li>
372 <li><strong>From home library:</strong> Only patrons from the item's home library may put this book on hold.</li>
373 <li><strong>No holds allowed:</strong> No patron may put this book on hold.</li>
376 Note that if the system preference
377 <code>AllowHoldPolicyOverride</code> is enabled, these policies can
378 be overridden by your circulation staff. Also, these policies are
379 based on the patron's home library, <em>not</em> the library where the hold is being placed..
382 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
383 <input type="hidden" name="op" value="add-branch-item" />
384 <input type="hidden" name="branch" value="[% current_branch %]"/>
389 <th>Return policy</th>
392 [% FOREACH branch_item_rule_loo IN branch_item_rule_loop %]
393 [% UNLESS ( loop.odd ) %]
394 <tr class="highlight">
398 <td>[% IF ( branch_item_rule_loo.default_humanitemtype ) %]
401 [% branch_item_rule_loo.humanitemtype %]
404 <td>[% IF ( branch_item_rule_loo.holdallowed_any ) %]
406 [% ELSIF ( branch_item_rule_loo.holdallowed_same ) %]
412 <td>[% IF ( branch_item_rule_loo.returnbranch == 'homebranch' ) %]
414 [% ELSIF ( branch_item_rule_loo.returnbranch == 'holdingbranch' ) %]
415 Item returns to issuing branch
416 [% ELSIF ( branch_item_rule_loo.returnbranch == 'noreturn' ) %]
419 Error - unknown option
423 <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>
429 <select name="itemtype">
430 [% FOREACH itemtypeloo IN itemtypeloop %]
431 <option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.description %]</option>
436 <select name="holdallowed">
437 <option value="2">From any library</option>
438 <option value="1">From home library</option>
439 <option value="0">No holds allowed</option>
443 <select name="returnbranch">
444 <option value="homebranch">Item returns home</option>
445 <option value="holdingbranch">Item returns to issuing library</option>
446 <option value="noreturn">Item floats</option>
449 <td><input type="submit" value="Add" class="submit" /></td>
458 [% INCLUDE 'admin-menu.inc' %]
461 [% INCLUDE 'intranet-bottom.inc' %]