2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Administration › Circulation and fine rules</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% INCLUDE 'calendar.inc' %]
6 <script type="text/javascript">
10 var cancel = confirm(_("Are you sure you want to cancel your changes?"));
11 if ( !cancel ) return;
12 $('#default-circulation-rules td').removeClass('highlighted-row');
13 var edit_row = $("#edit_row");
14 $(edit_row).find("input").each(function(){
15 var type = $(this).attr("type");
16 if (type != "button" && type != "submit" ) {
18 $(this).prop('disabled', false);
20 if ( type == "checkbox" ) {
21 $(this).prop('checked', false);
24 $(edit_row).find("select").prop('disabled', false);
25 $(edit_row).find("select option:first").attr("selected", "selected");
26 $(edit_row).find("td:last input[name='clear']").remove();
29 var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this rule? This cannot be undone.");
32 $(document).ready(function() {
33 $(".delete").on("click",function(){
34 return confirmDelete(MSG_CONFIRM_DELETE);
37 $("#clone_rules").on("click",function(){
38 var library_dropdown = document.getElementById("branch");
39 var selected_library = library_dropdown.options[library_dropdown.selectedIndex].value;
40 var selected_library_text = $("#branch option:selected").text();
41 var to_library = $("#tobranch option:selected").text();
42 var MSG_CONFIRM_CLONE;
43 if (selected_library === "*") {
44 MSG_CONFIRM_CLONE = _("Are you sure you want to clone this standard rule to %s library? This will override the existing rules in this library.").format(to_library);
45 return confirmClone(MSG_CONFIRM_CLONE);
47 MSG_CONFIRM_CLONE = _("Are you sure you want to clone this circulation and fine rule from %s to %s library? This will override the existing rules in this library.").format(selected_library_text, to_library);
48 return confirmClone(MSG_CONFIRM_CLONE);
52 $('#cap_fine_to_replacement_price').on('change', function(){
53 $('#overduefinescap').prop('disabled', $(this).is(':checked') );
55 $('#selectlibrary').find("input:submit").hide();
56 $('#branch').change(function() {
57 $('#selectlibrary').submit();
59 $(".editrule").click(function(){
60 if ( $("#edit_row").find("input[type='text']").filter(function(){return this.value.length > 0 }).length > 0 ) {
61 var edit = confirm(_("Are you sure you want to edit another rule?"));
62 if (!edit) return false;
64 $('#default-circulation-rules td').removeClass('highlighted-row');
65 $(this).parent().parent().find("td").each(function (i) {
66 $(this).addClass('highlighted-row');
68 itm = itm.replace(/^\s*|\s*$/g,'');
69 var current_column = $("#edit_row td:eq("+i+")");
71 // specific processing for the Hard due date column
72 var select_value = $(this).find("input[type='hidden'][name='hardduedatecomparebackup']").val();
74 if (typeof select_value === 'undefined'){
77 input_value = itm.split(' ')[1];
79 $(current_column).find("input[type='text']").val(input_value);
80 $(current_column).find("select").val(select_value);
81 } else if ( i == 12 ) {
82 // specific processing for cap_fine_to_replacement_price
83 var cap_fine_to_replacement_price = $(this).find("input[type='checkbox']");
84 $('#cap_fine_to_replacement_price').prop('checked', cap_fine_to_replacement_price.is(':checked') );
85 $('#overduefinescap').prop('disabled', cap_fine_to_replacement_price.is(':checked') );
87 $(current_column).find("input[type='text']").val(itm);
88 // select the corresponding option
89 $(current_column).find("select option").each(function(){
90 opt = $(this).text().toLowerCase();
91 opt = opt.replace(/^\s*|\s*$/g,'');
92 if ( opt == itm.toLowerCase() ) {
93 $(this).attr('selected', 'selected');
96 if ( i == 0 || i == 1 ) {
97 // Disable the 2 first columns, we cannot update them.
98 var val = $(current_column).find("select option:selected").val();
99 var name = "categorycode";
103 // Remove potential previous input added
104 $(current_column).find("input").remove();
105 $(current_column).append("<input type='hidden' name='"+name+"' value='"+val+"' />");
106 } else if ( i == 3 || i == 4 ) {
107 // If the value is not an integer for "Current checkouts allowed" or "Current on-site checkouts allowed"
108 // The value is "Unlimited" (or an equivalent translated string)
109 // an it should be set to an empty string
110 if( !((parseFloat(itm) == parseInt(itm)) && !isNaN(itm)) ) {
111 $(current_column).find("input[type='text']").val("");
116 $("#default-circulation-rules tr:last td:eq(0) select").prop('disabled', true);
117 $("#default-circulation-rules tr:last td:eq(1) select").prop('disabled', true);
120 $(".clear_edit").on("click",function(e){
128 <body id="admin_smart-rules" class="admin">
129 [% INCLUDE 'header.inc' %]
130 [% INCLUDE 'prefs-admin-search.inc' %]
132 <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>
134 <div id="doc3" class="yui-t1">
139 <h1 class="parameters">
141 Defining circulation and fine rules for "[% Branches.GetName( humanbranch ) %]"
143 Defining circulation and fine rules for all libraries
147 <p>The rules are applied from most specific to less specific, using the first found in this order:</p>
149 <li>same library, same patron category, same item type</li>
150 <li>same library, same patron category, all item types</li>
151 <li>same library, all patron categories, same item type</li>
152 <li>same library, all patron categories, all item types</li>
153 <li>default (all libraries), same patron category, same item type</li>
154 <li>default (all libraries), same patron category, all item types</li>
155 <li>default (all libraries), all patron categories, same item type</li>
156 <li>default (all libraries), all patron categories, all item types</li>
158 <p>To modify a rule, create a new one with the same patron category and item type.</p>
161 <form method="get" action="/cgi-bin/koha/admin/smart-rules.pl" id="selectlibrary">
163 <select name="branch" id="branch" style="width:20em;">
164 <option value="*">Standard rules for all libraries</option>
165 [% PROCESS options_for_libraries libraries => Branches.all( selected => current_branch, unfiltered => 1 ) %]
168 [% IF ( definedbranch ) %]
169 <form action="/cgi-bin/koha/admin/clone-rules.pl" method="post">
170 <label for="tobranch"><strong>Clone these rules to:</strong></label>
171 <input type="hidden" name="frombranch" value="[% current_branch %]" />
172 <select name="tobranch" id="tobranch">
173 [% PROCESS options_for_libraries libraries => Branches.all( unfiltered => 1 ) %]
175 <input type="submit" id="clone_rules" value="Clone" />
179 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
180 <input type="hidden" name="op" value="add" />
181 <input type="hidden" name="branch" value="[% current_branch %]"/>
182 <table id="default-circulation-rules">
185 <th>Patron category</th>
188 <th>Current checkouts allowed</th>
189 <th>Current on-site checkouts allowed</th>
192 <th>Hard due date</th>
194 <th>Fine charging interval</th>
195 <th>When to charge</th>
196 <th>Fine grace period</th>
197 <th>Overdue fines cap (amount)</th>
198 <th>Cap fine at replacement price</th>
199 <th>Suspension in days (day)</th>
200 <th>Max. suspension duration (day)</th>
201 <th>Renewals allowed (count)</th>
202 <th>Renewal period</th>
203 <th>No renewal before</th>
204 <th>Automatic renewal</th>
205 <th>No automatic renewal after</th>
206 <th>No automatic renewal after (hard limit)</th>
207 <th>Holds allowed (count)</th>
208 <th>Holds per record (count)</th>
209 <th>On shelf holds allowed</th>
210 <th>Item level holds</th>
211 <th>Article requests</th>
212 <th>Rental discount (%)</th>
217 [% FOREACH rule IN rules %]
218 <tr id="row_[% loop.count %]">
219 <td>[% IF ( rule.default_humancategorycode ) %]
222 [% rule.humancategorycode %]
225 <td>[% IF rule.default_translated_description %]
228 [% rule.translated_description %]
232 <a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
233 <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% rule.itemtype %]&categorycode=[% rule.categorycode %]&branch=[% rule.current_branch %]"><i class="fa fa-trash"></i> Delete</a>
236 <td>[% IF ( rule.unlimited_maxissueqty ) %]
239 [% rule.maxissueqty %]
242 <td>[% IF rule.unlimited_maxonsiteissueqty %]
245 [% rule.maxonsiteissueqty %]
248 <td>[% rule.issuelength %]</td>
250 [% rule.lengthunit %]
253 [% IF ( rule.hardduedate ) %]
254 [% IF ( rule.hardduedatebefore ) %]
255 before [% rule.hardduedate %]
256 <input type="hidden" name="hardduedatecomparebackup" value="-1" />
257 [% ELSIF ( rule.hardduedateexact ) %]
258 on [% rule.hardduedate %]
259 <input type="hidden" name="hardduedatecomparebackup" value="0" />
260 [% ELSIF ( rule.hardduedateafter ) %]
261 after [% rule.hardduedate %]
262 <input type="hidden" name="hardduedatecomparebackup" value="1" />
268 <td>[% rule.fine %]</td>
269 <td>[% rule.chargeperiod %]</td>
270 <td>[% IF rule.chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td>
271 <td>[% rule.firstremind %]</td>
272 <td>[% rule.overduefinescap FILTER format("%.2f") %]</td>
274 [% IF rule.cap_fine_to_replacement_price %]
275 <input type="checkbox" checked="checked" disabled="disabled" />
277 <input type="checkbox" disabled="disabled" />
280 <td>[% rule.finedays %]</td>
281 <td>[% rule.maxsuspensiondays %]</td>
282 <td>[% rule.renewalsallowed %]</td>
283 <td>[% rule.renewalperiod %]</td>
284 <td>[% rule.norenewalbefore %]</td>
286 [% IF ( rule.auto_renew ) %]
292 <td>[% rule.no_auto_renewal_after %]</td>
293 <td>[% rule.no_auto_renewal_after_hard_limit %]</td>
294 <td>[% rule.reservesallowed %]</td>
295 <td>[% rule.holds_per_record %]</td>
297 [% IF rule.onshelfholds == 1 %]
299 [% ELSIF rule.onshelfholds == 2 %]
304 <td>[% IF rule.opacitemholds == 'F'%]Force[% ELSIF rule.opacitemholds == 'Y'%]Allow[% ELSE %]Don't allow[% END %]</td>
306 [% IF rule.article_requests == 'no' %]
308 [% ELSIF rule.article_requests == 'yes' %]
310 [% ELSIF rule.article_requests == 'bib_only' %]
312 [% ELSIF rule.article_requests == 'item_only' %]
316 <td>[% rule.rentaldiscount %]</td>
318 <a href="#" class="editrule btn btn-default btn-xs"><i class="fa fa-pencil"></i> Edit</a>
319 <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete&itemtype=[% rule.itemtype %]&categorycode=[% rule.categorycode %]&branch=[% rule.current_branch %]"><i class="fa fa-trash"></i> Delete</a>
326 <select name="categorycode" id="categorycode">
327 <option value="*">All</option>
328 [% FOREACH patron_category IN patron_categories%]
329 <option value="[% patron_category.categorycode %]">[% patron_category.description %]</option>
334 <select name="itemtype" id="matrixitemtype" style="width:13em;">
335 <option value="*">All</option>
336 [% FOREACH itemtypeloo IN itemtypeloop %]
337 <option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.translated_description %]</option>
342 <input type="hidden" name="branch" value="[% current_branch %]"/>
343 <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
344 <button name="cancel" class="clear_edit btn btn-default btn-xs"><i class="fa fa-undo"></i> Clear</button>
346 <td><input type="text" name="maxissueqty" id="maxissueqty" size="3" /></td>
347 <td><input type="text" name="maxonsiteissueqty" id="maxonsiteissueqty" size="3" /></td>
348 <td><input type="text" name="issuelength" id="issuelength" size="3" /> </td>
350 <select name="lengthunit" id="lengthunit">
351 <option value="days" selected="selected">Days</option>
352 <option value="hours">Hours</option>
356 <select name="hardduedatecompare" id="hardduedatecompare">
357 <option value="-1">Before</option>
358 <option value="0">Exactly on</option>
359 <option value="1">After</option>
361 <input type="text" size="10" id="hardduedate" name="hardduedate" value="[% hardduedate %]" class="datepicker" />
362 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
364 <td><input type="text" name="fine" id="fine" size="4" /></td>
365 <td><input type="text" name="chargeperiod" id="chargeperiod" size="2" /></td>
367 <select name="chargeperiod_charge_at" id="chargeperiod_charge_at">
368 <option value="0">End of interval</option>
369 <option value="1">Start of interval</option>
372 <td><input type="text" name="firstremind" id="firstremind" size="2" /> </td>
373 <td><input type="text" name="overduefinescap" id="overduefinescap" size="6" /> </td>
374 <td><input type="checkbox" name="cap_fine_to_replacement_price" id="cap_fine_to_replacement_price" /></td>
375 <td><input type="text" name="finedays" id="fined" size="3" /> </td>
376 <td><input type="text" name="maxsuspensiondays" id="maxsuspensiondays" size="3" /> </td>
377 <td><input type="text" name="renewalsallowed" id="renewalsallowed" size="2" /></td>
378 <td><input type="text" name="renewalperiod" id="renewalperiod" size="3" /></td>
379 <td><input type="text" name="norenewalbefore" id="norenewalbefore" size="3" /></td>
381 <select name="auto_renew" id="auto_renew">
382 <option value="no" selected>No</option>
383 <option value="yes">Yes</option>
386 <td><input type="text" name="no_auto_renewal_after" id="no_auto_renewal_after" size="3" /></td>
388 <input type="text" size="10" name="no_auto_renewal_after_hard_limit" id="no_auto_renewal_after_hard_limit" value="[% no_auto_renewal_after_hard_limit %]" class="datepicker"/>
389 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
391 <td><input type="text" name="reservesallowed" id="reservesallowed" size="2" /></td>
392 <td><input type="text" name="holds_per_record" id="holds_per_record" size="2" /></td>
394 <select name="onshelfholds" id="onshelfholds">
395 <option value="1">Yes</option>
396 <option value="0">If any unavailable</option>
397 <option value="2">If all unavailable</option>
401 <select id="opacitemholds" name="opacitemholds">
402 <option value="N">Don't allow</option>
403 <option value="Y">Allow</option>
404 <option value="F">Force</option>
408 <select id="article_requests" name="article_requests">
409 <option value="no">No</option>
410 <option value="yes">Yes</option>
411 <option value="bib_only">Record only</option>
412 <option value="item_only">Item only</option>
415 <td><input type="text" name="rentaldiscount" id="rentaldiscount" size="2" /></td>
417 <input type="hidden" name="branch" value="[% current_branch %]"/>
418 <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
419 <button name="cancel" class="clear_edit btn btn-default btn-xs"><i class="fa fa-undo"></i> Clear</button>
424 <th>Patron category</th>
427 <th>Current checkouts allowed</th>
428 <th>Current on-site checkouts allowed</th>
431 <th>Hard due date</th>
433 <th>Fine charging interval</th>
434 <th>Charge when?</th>
435 <th>Fine grace period</th>
436 <th>Overdue fines cap (amount)</th>
437 <th>Cap fine at replacement price</th>
438 <th>Suspension in days (day)</th>
439 <th>Max. suspension duration (day)</th>
440 <th>Renewals allowed (count)</th>
441 <th>Renewal period</th>
442 <th>No renewal before</th>
443 <th>Automatic renewal</th>
444 <th>No automatic renewal after</th>
445 <th>No automatic renewal after (hard limit)</th>
446 <th>Holds allowed (count)</th>
447 <th>Holds per record (count)</th>
448 <th>On shelf holds allowed</th>
449 <th>Item level holds</th>
450 <th>Article requests</th>
451 <th>Rental discount (%)</th>
459 <div id="defaults-for-this-library" class="container">
460 <h3>Default checkout, hold and return policy[% IF humanbranch %] for [% Branches.GetName( humanbranch ) %][% END %]</h3>
461 <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>
462 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
463 <input type="hidden" name="op" value="set-branch-defaults" />
464 <input type="hidden" name="branch" value="[% current_branch %]"/>
468 <th>Total current checkouts allowed</th>
469 <th>Total current on-site checkouts allowed</th>
471 <th>Hold pickup library match</th>
472 <th>Return policy</th>
476 <td><em>Defaults[% UNLESS ( default_rules ) %] (not set)[% END %]</em></td>
477 <td><input type="text" name="maxissueqty" size="3" value="[% default_maxissueqty %]"/></td>
478 <td><input type="text" name="maxonsiteissueqty" size="3" value="[% default_maxonsiteissueqty %]"/></td>
480 <select name="holdallowed">
481 [% IF ( default_holdallowed_any ) %]
482 <option value="2" selected="selected">
488 [% IF ( default_holdallowed_same ) %]
489 <option value="1" selected="selected">
495 [% IF ( default_holdallowed_none ) %]
496 <option value="0" selected="selected">
505 <select name="hold_fulfillment_policy">
506 [% IF default_hold_fulfillment_policy == 'any' %]
507 <option value="any" selected="selected">
516 [% IF default_hold_fulfillment_policy == 'homebranch' %]
517 <option value="homebranch" selected="selected">
521 <option value="homebranch">
526 [% IF default_hold_fulfillment_policy == 'holdingbranch' %]
527 <option value="holdingbranch" selected="selected">
528 item's holding library
531 <option value="holdingbranch">
532 item's holding library
538 <select name="returnbranch">
539 [% IF ( default_returnbranch == 'homebranch' ) %]
540 <option value="homebranch" selected="selected">
542 <option value="homebranch">
546 [% IF ( default_returnbranch == 'holdingbranch' ) %]
547 <option value="holdingbranch" selected="selected">
549 <option value="holdingbranch">
551 Item returns to issuing library
553 [% IF ( default_returnbranch == 'noreturn' ) %]
554 <option value="noreturn" selected="selected">
556 <option value="noreturn">
563 <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
564 <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=*&branch=[% current_branch %]" id="unset"><i class="fa fa-undo"></i> Unset</a>
570 [% IF ( show_branch_cat_rule_form ) %]
571 <div id="holds-policy-by-patron-category" class="container">
572 <h3>[% IF humanbranch %]Checkout limit by patron category for [% Branches.GetName( humanbranch ) %][% ELSE %]Default checkout limit by patron category[% END %]</h3>
573 <p>For this library, you can specify the maximum number of loans that
574 a patron of a given category can make, regardless of the item type.
576 <p>If the total amount loanable for a given patron category is left blank,
577 no limit applies, except possibly for a limit you define for a specific item type.
579 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
580 <input type="hidden" name="op" value="add-branch-cat" />
581 <input type="hidden" name="branch" value="[% current_branch %]"/>
584 <th>Patron category</th>
585 <th>Total current checkouts allowed</th>
586 <th>Total current on-site checkouts allowed</th>
589 [% FOREACH branch_cat_rule_loo IN branch_cat_rule_loop %]
590 [% UNLESS ( loop.odd ) %]
591 <tr class="highlight">
595 <td>[% IF ( branch_cat_rule_loo.default_humancategorycode ) %]
598 [% branch_cat_rule_loo.humancategorycode %]
601 <td>[% IF ( branch_cat_rule_loo.unlimited_maxissueqty ) %]
604 [% branch_cat_rule_loo.maxissueqty %]
607 <td>[% IF ( branch_cat_rule_loo.unlimited_maxonsiteissueqty ) %]
610 [% branch_cat_rule_loo.maxonsiteissueqty %]
615 <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-cat&categorycode=[% branch_cat_rule_loo.categorycode %]&branch=[% current_branch %]"><i class="fa fa-trash"></i> Delete</a>
621 <select name="categorycode">
622 [% FOREACH patron_category IN patron_categories%]
623 <option value="[% patron_category.categorycode %]">[% patron_category.description %]</option>
627 <td><input name="maxissueqty" size="3" /></td>
628 <td><input name="maxonsiteissueqty" size="3" /></td>
629 <td class="actions"><button type="submit" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add</td>
636 <div id="refund-lost-item-fee-on-return" class="container">
637 [% IF current_branch == '*' %]
638 <h3>Default lost item fee refund on return policy</h3>
640 <h3>Lost item fee refund on return policy for [% Branches.GetName(current_branch) %]</h3>
642 <p>Specify the default policy for lost item fees on return.
644 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
645 <input type="hidden" name="op" value="mod-refund-lost-item-fee-rule" />
646 <input type="hidden" name="branch" value="[% current_branch %]" />
649 <th>Refund lost item fee</th>
654 <select name="refund">
655 [#% Default branch %#]
656 [% IF ( current_branch == '*' ) %]
657 [% IF ( refundLostItemFeeRule.refund ) %]
658 <option value="1" selected="selected">
664 [% IF ( not refundLostItemFeeRule.refund ) %]
665 <option value="0" selected="selected">
672 [#% Branch-specific %#]
673 [% IF ( not refundLostItemFeeRule ) %]
674 <option value="*" selected="selected">
678 [% IF defaultRefundRule %]
684 [% IF ( not refundLostItemFeeRule ) %]
685 <option value="1">Yes</option>
686 <option value="0">No</option>
688 [% IF ( refundLostItemFeeRule.refund ) %]
689 <option value="1" selected="selected">
695 [% IF ( not refundLostItemFeeRule.refund ) %]
696 <option value="0" selected="selected">
707 <button type="submit" class="btn btn-default btn-xs"><i class="fa fa-save"></i> Save</button>
715 <div id="holds-policy-by-item-type" class="container">
716 <h3>[% IF humanbranch %]Holds policy by item type for [% Branches.GetName( humanbranch ) %][% ELSE %]Default holds policy by item type[% END %]</h3>
718 For this library, you can edit rules for given itemtypes, regardless
719 of the patron's category.
722 Currently, this means hold policies.
723 The various policies have the following effects:
726 <li><strong>From any library:</strong> Patrons from any library may put this item on hold. <cite>(default if none is defined)</cite></li>
727 <li><strong>From home library:</strong> Only patrons from the item's home library may put this book on hold.</li>
728 <li><strong>No holds allowed:</strong> No patron may put this book on hold.</li>
730 <p><strong>Note: </strong>If the system preference 'AllowHoldPolicyOverride' is enabled, these policies can be overridden by your circulation staff.</br />
731 <strong>Important: </strong>The policies are based on the patron's home library, not the library where the hold is being placed.
734 <form method="post" action="/cgi-bin/koha/admin/smart-rules.pl">
735 <input type="hidden" name="op" value="add-branch-item" />
736 <input type="hidden" name="branch" value="[% current_branch %]"/>
741 <th>Hold pickup library match</th>
742 <th>Return policy</th>
745 [% FOREACH branch_item_rule_loo IN branch_item_rule_loop %]
746 [% UNLESS ( loop.odd ) %]
747 <tr class="highlight">
751 <td>[% IF ( branch_item_rule_loo.default_translated_description ) %]
754 [% branch_item_rule_loo.translated_description %]
757 <td>[% IF ( branch_item_rule_loo.holdallowed_any ) %]
759 [% ELSIF ( branch_item_rule_loo.holdallowed_same ) %]
765 <td>[% IF ( branch_item_rule_loo.hold_fulfillment_policy == 'any' ) %]
767 [% ELSIF ( branch_item_rule_loo.hold_fulfillment_policy == 'homebranch' ) %]
769 [% ELSIF ( branch_item_rule_loo.hold_fulfillment_policy == 'holdingbranch' ) %]
770 item's holding library
773 <td>[% IF ( branch_item_rule_loo.returnbranch == 'homebranch' ) %]
775 [% ELSIF ( branch_item_rule_loo.returnbranch == 'holdingbranch' ) %]
776 Item returns to issuing branch
777 [% ELSIF ( branch_item_rule_loo.returnbranch == 'noreturn' ) %]
780 Error - unknown option
784 <a class="btn btn-default btn-xs delete" href="/cgi-bin/koha/admin/smart-rules.pl?op=delete-branch-item&itemtype=[% branch_item_rule_loo.itemtype %]&branch=[% current_branch %]"><i class="fa fa-trash"></i> Delete</a>
790 <select name="itemtype">
791 [% FOREACH itemtypeloo IN itemtypeloop %]
792 <option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.translated_description %]</option>
797 <select name="holdallowed">
798 <option value="2">From any library</option>
799 <option value="1">From home library</option>
800 <option value="0">No holds allowed</option>
804 <select name="hold_fulfillment_policy">
809 <option value="homebranch">
813 <option value="holdingbranch">
814 item's holding library
819 <select name="returnbranch">
820 <option value="homebranch">Item returns home</option>
821 <option value="holdingbranch">Item returns to issuing library</option>
822 <option value="noreturn">Item floats</option>
825 <td class="actions"><button type="submit" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Add</button></td>
834 [% INCLUDE 'admin-menu.inc' %]
837 [% INCLUDE 'intranet-bottom.inc' %]