3 [% USE AuthorisedValues %]
9 [%- USE TablesSettings -%]
10 [% SET footerjs = 1 %]
11 [% INCLUDE 'doc-head-open.inc' %]
12 <title>Items overdue as of [% todaysdate | html %] › Circulation › Koha</title>
13 [% INCLUDE 'doc-head-close.inc' %]
17 .select2-container--open .select2-dropdown--below,
18 .select2-search.select2-search--dropdown {
19 border: 1px solid #AAA;
21 .select2-container--open .select2-dropdown--below,
22 .select2-search.select2-search--dropdown,
24 background-color: #FFF;
25 width: 20em !important;
31 <body id="circ_overdue" class="circ">
32 [% INCLUDE 'header.inc' %]
33 [% INCLUDE 'circ-search.inc' %]
35 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
38 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
41 <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
44 <a href="#" aria-current="page">
45 Overdues as of [% todaysdate | html %]
51 <div class="main container-fluid">
53 <div class="col-sm-10 col-sm-push-2">
57 <h2>Overdue report</h2>
58 <p>Please choose one or more filters to proceed.</p>
61 [% IF ( overdueloop ) %]
63 <h2>[% nnoverdue | html %] [% IF ( noverdue_is_plural ) %]Items[% ELSE %]Item[% END %] overdue as of [% todaysdate | html %][% IF ( isfiltered ) %] <span style="font-size:70%;">(Filtered. <a href="/cgi-bin/koha/circ/overdue.pl">Reset filter</a>)</span>[% END %]</h2>
66 [% IF ( isfiltered ) %]
67 [% SET url_params = '' %]
68 [% FOR var IN filters.keys %]
69 [% url_params = BLOCK %][% url_params | $raw %]&[% var | uri %]=[% filters.$var | uri %][% END %]
71 <a href="overdue.pl?op=csv[% url_params | $raw %]">Download file of displayed overdues</a>
73 <a href="overdue.pl?op=csv">Download file of all overdues</a>
77 <div class="sql"><pre>[% sql | html %]</pre></div>
78 <div class="searchresults">
79 <table id="overduest">
84 <th>Patron category</th>
85 <th>Patron library</th>
86 <th class="anti-the">Title</th>
88 <th>Holding library</th>
89 <th>Shelving location</th>
94 <th>Non-public note</th>
97 [%- BLOCK subject -%]Overdue:[%- END -%]
99 [% FOREACH overdueloo IN overdueloop %]
101 <td data-order="[% overdueloo.duedate | html %]">[% overdueloo.duedate | $KohaDates %]</td>
103 [% INCLUDE 'patron-title.inc' patron=overdueloo.patron hide_patron_infos_if_needed=1 %]
104 [% IF logged_in_user.can_see_patron_infos( overdueloo.patron ) %]
105 [% IF ( overdueloo.email ) %][<a href="mailto:[% overdueloo.email | uri %]?subject=[% INCLUDE subject %] [% overdueloo.title | uri %]">email</a>][% END %]
106 [% IF ( overdueloo.phone ) %]([% overdueloo.phone | html %])[% ELSIF ( overdueloo.mobile ) %]([% overdueloo.mobile | html %])[% ELSIF ( overdueloo.phonepro ) %]([% overdueloo.phonepro | html %])[% END %]</td>
108 <td>[% Categories.GetName( overdueloo.patron.categorycode ) | html %]</td>
109 <td>[% Branches.GetName( overdueloo.patron.branchcode ) | html %]</td>
110 <td>[% INCLUDE 'biblio-title.inc' biblio=overdueloo link = 1 %] [% IF ( overdueloo.author ) %], by [% overdueloo.author | html %][% END %][% IF ( overdueloo.enumchron ) %], [% overdueloo.enumchron | html %][% END %]</td>
111 <td>[% Branches.GetName( overdueloo.homebranchcode ) | html %]</td>
112 <td>[% Branches.GetName( overdueloo.holdingbranchcode ) | html %]</td>
113 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => overdueloo.location ) | html %]</td>
114 <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% overdueloo.biblionumber | uri %]&itemnumber=[% overdueloo.itemnum | uri %]#item[% overdueloo.itemnum | uri %]">[% overdueloo.barcode | html %]</a></td>
115 <td>[% overdueloo.itemcallnumber | html %]</td>
116 <td>[% ItemTypes.GetDescription( overdueloo.itemtype ) | html %]</td>
117 <td>[% overdueloo.replacementprice | $Price %]</td>
118 <td>[% overdueloo.itemnotes_nonpublic | html %]</td>
127 <h2>Overdue report</h2>
128 [% IF ( isfiltered ) %]
129 <p>There are no overdues matching your search. <a href="/cgi-bin/koha/circ/overdue.pl">Reset filter</a></p>
131 <p>There are no overdues.</p>
134 [% END %] <!-- overdueloop -->
135 [% END %] <!-- noreport -->
138 </div> <!-- /.col-sm-10.col-sm-push-2 -->
140 <div class="col-sm-2 col-sm-pull-10">
143 <form method="post" action="/cgi-bin/koha/circ/overdue.pl">
144 <fieldset class="brief">
146 <fieldset><legend>Date due:</legend>
149 <label for="showall">Show any items currently checked out:</label>
151 <input type="checkbox" id="showall" name="showall" value="show" checked="checked" />
153 <input type="checkbox" id="showall" name="showall" value="show" />
157 <li class="date_due_filter">
158 <label for="from">From:</label>
159 <input type="text" id="from" name="dateduefrom" size="10" value="[% filters.dateduefrom | $KohaDates %]" class="datepickerfrom" />
161 <li class="date_due_filter">
162 <label for="to">To:</label>
163 <input type="text" id="to" name="datedueto" size="10" value="[% filters.datedueto | $KohaDates %]" class="datepickerto" />
168 <li><label>Name or cardnumber:</label><input type="text" name="borname" value="[% filters.borname | html %]" /></li>
169 <li><label>Patron category:</label><select name="borcat" id="borcat"><option value="">Any</option>
170 [% FOREACH borcatloo IN borcatloop %]
171 [% IF ( borcatloo.selected ) %]<option value="[% borcatloo.value | html %]" selected="selected">[% borcatloo.catname | html %]</option>[% ELSE %]<option value="[% borcatloo.value | html %]">[% borcatloo.catname | html %]</option>[% END %]
176 <li><label>Patron flags:</label>
177 <select name="borflag" id="borflag">
178 <option value="">None</option>
179 [% IF ( borflag_gonenoaddress ) %]<option value="gonenoaddress" selected="selected">Address in question</option>
180 [% ELSE %]<option value="gonenoaddress">Address in question</option>[% END %]
181 [% IF ( borflag_debarred ) %]<option value="debarred" selected="selected">Restricted</option>
182 [% ELSE %]<option value="debarred">Restricted</option>[% END %]
183 [% IF ( borflag_lost ) %]<option value="lost" selected="selected">Lost card</option>
184 [% ELSE %]<option value="lost">Lost card</option>[% END %]
187 [% FOREACH patron_attr_filter_loo IN patron_attr_filter_loop %]
188 <!-- domid cgivalue ismany isclone ordinal code description repeatable authorised_value_category -->
190 <label>[% patron_attr_filter_loo.description | html %]:</label>
191 [% IF ( patron_attr_filter_loo.authorised_value_category ) %]
192 [% SET authvals = AuthorisedValues.GetAuthValueDropbox( patron_attr_filter_loo.authorised_value_category ) %]
193 <select id="pattrodue-input-[% patron_attr_filter_loo.domid | html %]" name="patron_attr_filter_[% patron_attr_filter_loo.code | html %]" class="pattrodue-input">
195 [% FOREACH authval IN authvals %]
196 [% IF ( patron_attr_filter_loo.cgivalue == authval.authorised_value ) -%]
197 <option value="[% authval.authorised_value | html %]" selected="selected">[% authval.lib | html %]</option>
199 <option value="[% authval.authorised_value | html %]">[% authval.lib | html %]</option>
204 <input type="text" name="patron_attr_filter_[% patron_attr_filter_loo.code | html %]" value="[% patron_attr_filter_loo.cgivalue | html %]"/>
206 [% IF ( patron_attr_filter_loo.repeatable ) %]
207 <a href="#" class="btn btn-link clone-attribute" data-original-id="pattrodue-input-[% patron_attr_filter_loo.domid | html %]"><i class="fa fa-plus"></i> Add</a>
208 [% IF ( patron_attr_filter_loo.isclone ) %]
209 <a href="#" class="btn btn-link delete_clone"><i class="fa fa-remove"></i> Delete</a>
210 [% ELSIF ( patron_attr_filter_loo.ismany ) %]
211 <a href="#" class="btn btn-link delete_clone"><i class="fa fa-remove"></i> Delete</a>
213 <a href="#" class="btn btn-link delete_clone" style="display:none"><i class="fa fa-remove"></i> Delete</a>
219 <li><label>Item type:</label><select name="itemtype" id="itemtype"><option value="">Any</option>
220 [% FOREACH itemtypeloo IN itemtypeloop %][% IF ( itemtypeloo.selected ) %]
221 <option value="[% itemtypeloo.value | html %]" selected="selected">[% itemtypeloo.itemtypename | html %]</option>[% ELSE %]
222 <option value="[% itemtypeloo.value | html %]">[% itemtypeloo.itemtypename | html %]</option>[% END %]
228 <label>Item home library:</label>
229 <select name="homebranch" id="homebranch">
230 <option value="">Any</option>
231 [% PROCESS options_for_libraries libraries => Branches.all( selected => filters.homebranch ) %]
236 <label>Item holding library:</label>
237 <select name="holdingbranch" id="holdingbranch">
238 <option value="">Any</option>
239 [% PROCESS options_for_libraries libraries => Branches.all( selected => filters.holdingbranch ) %]
244 <label>Library of the patron:</label>
245 <select name="branch" id="branch">
246 <option value="">Any</option>
247 [% PROCESS options_for_libraries libraries => Branches.all( selected => filters.branch, only_from_group => 1 ) %]
252 <fieldset class="action">
253 <input type="submit" value="Apply filter" class="submit" />
254 <input type="hidden" name="op" value="apply filter" />
260 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
261 </div> <!-- /.row -->
263 [% MACRO jsinclude BLOCK %]
264 [% INCLUDE 'calendar.inc' %]
265 [% INCLUDE 'datatables.inc' %]
266 [% INCLUDE 'columns_settings.inc' %]
267 [% INCLUDE 'select2.inc' %]
269 function clone_input( node, original_id ) {
271 var clone = original.clone();
272 var appendid = original_id + "-" + Math.floor(Math.random()*1000+1);
273 clone.find(".delete_clone").show();
274 if( clone.find("select").length ){
275 /* <select> element is present */
276 clone.find("select").removeClass("select2-hidden-accessible").removeAttr("data-select2-id").attr("id", appendid );
277 clone.find(".select2").remove();
278 original.after( clone );
279 $("#" + appendid ).select2();
281 clone.attr("id", appendid );
282 original.after( clone );
286 function update_date_due_filters_visibility(){
287 if( $("#showall").is(":checked")) {
288 $(".date_due_filter").hide();
289 $("#from").prop("disabled", true);
290 $("#to").prop("disabled", true);
292 $(".date_due_filter").show();
293 $("#from").prop("disabled", false);
294 $("#to").prop("disabled", false);
298 $(document).ready(function(){
299 var columns_settings = [% TablesSettings.GetColumns( 'circ', 'overdues', 'circ-overdues', 'json' ) | $raw %];
300 KohaTable("overduest", {
301 "sPaginationType": "full",
302 "aaSorting": [[0, 'asc']],
305 }, columns_settings);
307 $("#showall").on("change", function(){
308 update_date_due_filters_visibility();
310 update_date_due_filters_visibility();
312 $(".pattrodue-input").each(function(){
316 $("body").on("click", ".delete_clone", function(e){
318 $(this).parent().remove();
321 $("body").on("click", ".clone-attribute", function(e){
323 clone_input( $(this).parent(), $(this).data("original-id") );
329 [% INCLUDE 'intranet-bottom.inc' %]