Lines 73-78
Link Here
|
73 |
<p>The circulation and fine rules are applied based on the CircControl system preference which is set to <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=CircControl">[% Koha.Preference('CircControl') | html %]</a> and the HomeOrHoldingBranch system preference which is set to <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=HomeOrHoldingBranch">[% Koha.Preference('HomeOrHoldingBranch') | html %]</a>.</p> |
73 |
<p>The circulation and fine rules are applied based on the CircControl system preference which is set to <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=CircControl">[% Koha.Preference('CircControl') | html %]</a> and the HomeOrHoldingBranch system preference which is set to <a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=HomeOrHoldingBranch">[% Koha.Preference('HomeOrHoldingBranch') | html %]</a>.</p> |
74 |
</div> |
74 |
</div> |
75 |
|
75 |
|
|
|
76 |
<div id="issuing-rules-tester" class="page-section"> |
77 |
<a id="toggle-tester" class="btn btn-default btn-sm">Circulation and fine rules test tool</a> |
78 |
<div id="issuing-rules-tester-container"> |
79 |
<h3>Circulation and fine rules test tool</h3> |
80 |
<p>This test tool lets you search a row of circulation and fine rules for a specific patron, item and library.</p> |
81 |
<p>Dropdown value for <strong>Library</strong> is determined via system preference <strong>CircControl</strong>. If the preference is set to item's library, then system preference <strong>HomeOrHoldingBranch</strong> defines the branch to use. You can test with any library by selecting the last option <i>Library</i>.</p> |
82 |
<table> |
83 |
<thead> |
84 |
<tr> |
85 |
<th>Patron</th> |
86 |
<th>Item</th> |
87 |
<th>Library</th> |
88 |
<th>Actions</th> |
89 |
</tr> |
90 |
</thead> |
91 |
<tbody> |
92 |
<tr> |
93 |
<td> |
94 |
<select id="tester_patron" name="tester_patron"> |
95 |
<option value="cardnumber">Card number</option> |
96 |
<option value="borrowernumber">Borrowernumber</option> |
97 |
<option value="categorycode">Categorycode</option> |
98 |
</select> |
99 |
<span><input type="text" name="tester_input_cardnumber" placeholder="Card number" /></span> |
100 |
<span><input type="text" name="tester_input_borrowernumber" placeholder="Borrowernumber" /></span> |
101 |
<span> |
102 |
<select name="tester_input_patron_category_id" id="tester_categorycode"> |
103 |
<option value="">All</option> |
104 |
[% FOREACH patron_category IN patron_categories%] |
105 |
<option value="[% patron_category.categorycode %]">[% patron_category.description %]</option> |
106 |
[% END %] |
107 |
</select> |
108 |
</span> |
109 |
</td> |
110 |
<td> |
111 |
<select id="tester_item" name="tester_item"> |
112 |
<option value="barcode">Barcode</option> |
113 |
<option value="itemnumber">Itemnumber</option> |
114 |
<option value="itemtype">Item type</option> |
115 |
</select> |
116 |
<span><input type="text" name="tester_input_barcode" placeholder="Barcode" /></span> |
117 |
<span><input type="text" name="tester_input_itemnumber" placeholder="Itemnumber" /></span> |
118 |
<span> |
119 |
<select name="tester_input_item_type_id" id="tester_itemtype"> |
120 |
<option value="">All</option> |
121 |
[% FOREACH itemtypeloo IN itemtypeloop %] |
122 |
<option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.translated_description %]</option> |
123 |
[% END %] |
124 |
</select> |
125 |
</span> |
126 |
</td> |
127 |
<td> |
128 |
<select id="tester_branch" name="tester_branch"> |
129 |
[% IF Koha.Preference('CircControl') == 'PatronLibrary' %] |
130 |
<option value="patronlibrary">Patron's home library</option> |
131 |
[% ELSIF Koha.Preference('CircControl') == 'ItemHomeLibrary' %] |
132 |
[% IF Koha.Preference('HomeOrHoldingBranch') == 'homebranch' %] |
133 |
<option value="itemhomelibrary">Item's home library</option> |
134 |
[% ELSE %] |
135 |
<option value="itemholdinglibrary">Item's holding library</option> |
136 |
[% END %] |
137 |
[% ELSE %] |
138 |
<option value="pickuplibrary">Current library ([% LoginBranchname %])</option> |
139 |
[% END %] |
140 |
<option value="library">Library</option> |
141 |
</select> |
142 |
<span></span> |
143 |
<span> |
144 |
<select name="tester_input_library_id" id="tester_branchcode"> |
145 |
<option value="">All</option> |
146 |
[% PROCESS options_for_libraries libraries => Branches.all( unfiltered => 1 ) %] |
147 |
</select> |
148 |
</span> |
149 |
</td> |
150 |
<td><button type="submit" id="tester_submit" class="btn btn-default btn-xs"><i class="fa fa-search"></i> Find</button></td> |
151 |
</tr> |
152 |
</tbody> |
153 |
</table> |
154 |
<table> |
155 |
<thead> |
156 |
<tr> |
157 |
<th>Library</th> |
158 |
<th>Patron category</th> |
159 |
<th>Item type</th> |
160 |
<th>Current checkouts allowed</th> |
161 |
<th>Current on-site checkouts allowed</th> |
162 |
<th>Loan period</th> |
163 |
<th>Unit</th> |
164 |
<th>Hard due date</th> |
165 |
<th>Fine amount</th> |
166 |
<th>Fine charging interval</th> |
167 |
<th>When to charge</th> |
168 |
<th>Fine grace period</th> |
169 |
<th>Overdue fines cap (amount)</th> |
170 |
<th>Cap fine at replacement price</th> |
171 |
<th>Suspension in days (day)</th> |
172 |
<th>Max. suspension duration (day)</th> |
173 |
<th>Renewals allowed (count)</th> |
174 |
<th>Renewal period</th> |
175 |
<th>No renewal before</th> |
176 |
<th>Automatic renewal</th> |
177 |
<th>No automatic renewal after</th> |
178 |
<th>No automatic renewal after (hard limit)</th> |
179 |
<th>Holds allowed (count)</th> |
180 |
<th>Holds per record (count)</th> |
181 |
<th>On shelf holds allowed</th> |
182 |
<th>Item level holds</th> |
183 |
<th>Article requests</th> |
184 |
<th>Rental discount (%)</th> |
185 |
</tr> |
186 |
</thead> |
187 |
<tbody> |
188 |
<tr id="tester_res_results"> |
189 |
<td id="tester_res_branchcode"></td> |
190 |
<td id="tester_res_categorycode"></td> |
191 |
<td id="tester_res_itemtype"></td> |
192 |
<td id="tester_res_maxissueqty"></td> |
193 |
<td id="tester_res_maxonsiteissueqty"></td> |
194 |
<td id="tester_res_issuelength"></td> |
195 |
<td id="tester_res_lengthunit"></td> |
196 |
<td id="tester_res_hardduedate"></td> |
197 |
<td id="tester_res_fine"></td> |
198 |
<td id="tester_res_chargeperiod"></td> |
199 |
<td id="tester_res_chargeperiod_charge_at"></td> |
200 |
<td id="tester_res_firstremind"></td> |
201 |
<td id="tester_res_overduefinescap"></td> |
202 |
<td id="tester_res_cap_fine_to_replacement_price"></td> |
203 |
<td id="tester_res_finedays"></td> |
204 |
<td id="tester_res_maxsuspensiondays"></td> |
205 |
<td id="tester_res_renewalsallowed"></td> |
206 |
<td id="tester_res_renewalperiod"></td> |
207 |
<td id="tester_res_norenewalbefore"></td> |
208 |
<td id="tester_res_auto_renew"></td> |
209 |
<td id="tester_res_no_auto_renewal_after"></td> |
210 |
<td id="tester_res_no_auto_renewal_after_hard_limit"></td> |
211 |
<td id="tester_res_reservesallowed"></td> |
212 |
<td id="tester_res_holds_per_record"></td> |
213 |
<td id="tester_res_onshelfholds"></td> |
214 |
<td id="tester_res_opacitemholds"></td> |
215 |
<td id="tester_res_article_requests"></td> |
216 |
<td id="tester_res_rentaldiscount"></td> |
217 |
</tr> |
218 |
</tbody> |
219 |
</table> |
220 |
<div id="tester_error" class="alert alert-danger"></div> |
221 |
</div> |
222 |
</div> |
223 |
|
76 |
<div class="page-section"> |
224 |
<div class="page-section"> |
77 |
[% UNLESS restricted_to_own_library %] |
225 |
[% UNLESS restricted_to_own_library %] |
78 |
<form method="get" action="/cgi-bin/koha/admin/smart-rules.pl" id="selectlibrary"> |
226 |
<form method="get" action="/cgi-bin/koha/admin/smart-rules.pl" id="selectlibrary"> |
Lines 612-764
Link Here
|
612 |
</form> |
760 |
</form> |
613 |
</div><!-- ./page-section --> |
761 |
</div><!-- ./page-section --> |
614 |
|
762 |
|
615 |
<div id="issuing-rules-tester" class="container" style="width:auto;"> |
|
|
616 |
<a id="toggle-tester" class="btn btn-default btn-sm">Circulation and fine rules test tool</a> |
617 |
<div id="issuing-rules-tester-container"> |
618 |
<h3>Circulation and fine rules test tool</h3> |
619 |
<p>This test tool lets you search a row of circulation and fine rules for a specific patron, item and library.</p> |
620 |
<p>Dropdown value for <strong>Library</strong> is determined via system preference <strong>CircControl</strong>. If the preference is set to item's library, then system preference <strong>HomeOrHoldingBranch</strong> defines the branch to use. You can test with any library by selecting the last option <i>Library</i>.</p> |
621 |
<table> |
622 |
<thead> |
623 |
<tr> |
624 |
<th>Patron</th> |
625 |
<th>Item</th> |
626 |
<th>Library</th> |
627 |
<th>Actions</th> |
628 |
</tr> |
629 |
</thead> |
630 |
<tbody> |
631 |
<tr> |
632 |
<td> |
633 |
<select id="tester_patron" name="tester_patron"> |
634 |
<option value="cardnumber">Card number</option> |
635 |
<option value="borrowernumber">Borrowernumber</option> |
636 |
<option value="categorycode">Categorycode</option> |
637 |
</select> |
638 |
<span><input type="text" name="tester_input_cardnumber" placeholder="Card number" /></span> |
639 |
<span><input type="text" name="tester_input_borrowernumber" placeholder="Borrowernumber" /></span> |
640 |
<span> |
641 |
<select name="tester_input_categorycode" id="tester_categorycode"> |
642 |
<option value="">All</option> |
643 |
[% FOREACH patron_category IN patron_categories%] |
644 |
<option value="[% patron_category.categorycode %]">[% patron_category.description %]</option> |
645 |
[% END %] |
646 |
</select> |
647 |
</span> |
648 |
</td> |
649 |
<td> |
650 |
<select id="tester_item" name="tester_item"> |
651 |
<option value="barcode">Barcode</option> |
652 |
<option value="itemnumber">Itemnumber</option> |
653 |
<option value="itemtype">Item type</option> |
654 |
</select> |
655 |
<span><input type="text" name="tester_input_barcode" placeholder="Barcode" /></span> |
656 |
<span><input type="text" name="tester_input_itemnumber" placeholder="Itemnumber" /></span> |
657 |
<span> |
658 |
<select name="tester_input_itemtype" id="tester_itemtype"> |
659 |
<option value="">All</option> |
660 |
[% FOREACH itemtypeloo IN itemtypeloop %] |
661 |
<option value="[% itemtypeloo.itemtype %]">[% itemtypeloo.translated_description %]</option> |
662 |
[% END %] |
663 |
</select> |
664 |
</span> |
665 |
</td> |
666 |
<td> |
667 |
<select id="tester_branch" name="tester_branch"> |
668 |
[% IF Koha.Preference('CircControl') == 'PatronLibrary' %] |
669 |
<option value="patronlibrary">Patron's home library</option> |
670 |
[% ELSIF Koha.Preference('CircControl') == 'ItemHomeLibrary' %] |
671 |
[% IF Koha.Preference('HomeOrHoldingBranch') == 'homebranch' %] |
672 |
<option value="itemhomelibrary">Item's home library</option> |
673 |
[% ELSE %] |
674 |
<option value="itemholdinglibrary">Item's holding library</option> |
675 |
[% END %] |
676 |
[% ELSE %] |
677 |
<option value="pickuplibrary">Current library ([% LoginBranchname %])</option> |
678 |
[% END %] |
679 |
<option value="library">Library</option> |
680 |
</select> |
681 |
<span></span> |
682 |
<span> |
683 |
<select name="tester_input_branchcode" id="tester_branchcode"> |
684 |
<option value="">All</option> |
685 |
[% PROCESS options_for_libraries libraries => Branches.all( unfiltered => 1 ) %] |
686 |
</select> |
687 |
</span> |
688 |
</td> |
689 |
<td><button type="submit" id="tester_submit" class="btn btn-default btn-xs"><i class="fa fa-search"></i> Find</button></td> |
690 |
</tr> |
691 |
</tbody> |
692 |
</table> |
693 |
<table> |
694 |
<thead> |
695 |
<tr> |
696 |
<th>Library</th> |
697 |
<th>Patron category</th> |
698 |
<th>Item type</th> |
699 |
<th>Current checkouts allowed</th> |
700 |
<th>Current on-site checkouts allowed</th> |
701 |
<th>Loan period</th> |
702 |
<th>Unit</th> |
703 |
<th>Hard due date</th> |
704 |
<th>Fine amount</th> |
705 |
<th>Fine charging interval</th> |
706 |
<th>When to charge</th> |
707 |
<th>Fine grace period</th> |
708 |
<th>Overdue fines cap (amount)</th> |
709 |
<th>Cap fine at replacement price</th> |
710 |
<th>Suspension in days (day)</th> |
711 |
<th>Max. suspension duration (day)</th> |
712 |
<th>Renewals allowed (count)</th> |
713 |
<th>Renewal period</th> |
714 |
<th>No renewal before</th> |
715 |
<th>Automatic renewal</th> |
716 |
<th>No automatic renewal after</th> |
717 |
<th>No automatic renewal after (hard limit)</th> |
718 |
<th>Holds allowed (count)</th> |
719 |
<th>Holds per record (count)</th> |
720 |
<th>On shelf holds allowed</th> |
721 |
<th>Item level holds</th> |
722 |
<th>Article requests</th> |
723 |
<th>Rental discount (%)</th> |
724 |
</tr> |
725 |
</thead> |
726 |
<tbody> |
727 |
<tr id="tester_res_results"> |
728 |
<td id="tester_res_branchcode"></td> |
729 |
<td id="tester_res_categorycode"></td> |
730 |
<td id="tester_res_itemtype"></td> |
731 |
<td id="tester_res_maxissueqty"></td> |
732 |
<td id="tester_res_maxonsiteissueqty"></td> |
733 |
<td id="tester_res_issuelength"></td> |
734 |
<td id="tester_res_lengthunit"></td> |
735 |
<td id="tester_res_hardduedate"></td> |
736 |
<td id="tester_res_fine"></td> |
737 |
<td id="tester_res_chargeperiod"></td> |
738 |
<td id="tester_res_chargeperiod_charge_at"></td> |
739 |
<td id="tester_res_firstremind"></td> |
740 |
<td id="tester_res_overduefinescap"></td> |
741 |
<td id="tester_res_cap_fine_to_replacement_price"></td> |
742 |
<td id="tester_res_finedays"></td> |
743 |
<td id="tester_res_maxsuspensiondays"></td> |
744 |
<td id="tester_res_renewalsallowed"></td> |
745 |
<td id="tester_res_renewalperiod"></td> |
746 |
<td id="tester_res_norenewalbefore"></td> |
747 |
<td id="tester_res_auto_renew"></td> |
748 |
<td id="tester_res_no_auto_renewal_after"></td> |
749 |
<td id="tester_res_no_auto_renewal_after_hard_limit"></td> |
750 |
<td id="tester_res_reservesallowed"></td> |
751 |
<td id="tester_res_holds_per_record"></td> |
752 |
<td id="tester_res_onshelfholds"></td> |
753 |
<td id="tester_res_opacitemholds"></td> |
754 |
<td id="tester_res_article_requests"></td> |
755 |
<td id="tester_res_rentaldiscount"></td> |
756 |
</tr> |
757 |
</tbody> |
758 |
</table> |
759 |
<div id="tester_error" class="alert alert-danger"></div> |
760 |
</div> |
761 |
</div> |
762 |
|
763 |
|
763 |
<div id="defaults-for-this-library" class="page-section"> |
764 |
<div id="defaults-for-this-library" class="page-section"> |
764 |
<h2>Default checkout, hold and return policy[% IF humanbranch %] for [% Branches.GetName( humanbranch ) | html %][% END %]</h2> |
765 |
<h2>Default checkout, hold and return policy[% IF humanbranch %] for [% Branches.GetName( humanbranch ) | html %][% END %]</h2> |
Lines 1628-1634
Link Here
|
1628 |
} |
1629 |
} |
1629 |
|
1630 |
|
1630 |
function tester_submit() { |
1631 |
function tester_submit() { |
1631 |
var url = "/api/v1/issuingrules/effective"; |
|
|
1632 |
var query_params = {}; |
1632 |
var query_params = {}; |
1633 |
$.each($("input[name^=tester_input_], select[name^=tester_input_]"), function () { |
1633 |
$.each($("input[name^=tester_input_], select[name^=tester_input_]"), function () { |
1634 |
if ($(this).parent().css("display") === "none") { |
1634 |
if ($(this).parent().css("display") === "none") { |
Lines 1640-1646
Link Here
|
1640 |
} |
1640 |
} |
1641 |
}); |
1641 |
}); |
1642 |
$.ajax({ |
1642 |
$.ajax({ |
1643 |
url: "/api/v1/issuingrules/effective?"+$.param(query_params), |
1643 |
url: "/api/v1/circulation_rules?"+$.param(query_params), |
1644 |
method: "GET", |
1644 |
method: "GET", |
1645 |
statusCode: { |
1645 |
statusCode: { |
1646 |
200: function(response) { |
1646 |
200: function(response) { |
1647 |
- |
|
|