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 <h1>Overdue report</h1>
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 %]
109 <td>[% Categories.GetName( overdueloo.patron.categorycode ) | html %]</td>
110 <td>[% Branches.GetName( overdueloo.patron.branchcode ) | html %]</td>
111 <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>
112 <td>[% Branches.GetName( overdueloo.homebranchcode ) | html %]</td>
113 <td>[% Branches.GetName( overdueloo.holdingbranchcode ) | html %]</td>
114 <td>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => overdueloo.location ) | html %]</td>
115 <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>
116 <td>[% overdueloo.itemcallnumber | html %]</td>
117 <td>[% ItemTypes.GetDescription( overdueloo.itemtype ) | html %]</td>
118 <td>[% overdueloo.replacementprice | $Price %]</td>
119 <td>[% overdueloo.itemnotes_nonpublic | html %]</td>
128 <h1>Overdue report</h1>
129 [% IF ( isfiltered ) %]
130 <p>There are no overdues matching your search. <a href="/cgi-bin/koha/circ/overdue.pl">Reset filter</a></p>
132 <p>There are no overdues.</p>
135 [% END %] <!-- overdueloop -->
136 [% END %] <!-- noreport -->
139 </div> <!-- /.col-sm-10.col-sm-push-2 -->
141 <div class="col-sm-2 col-sm-pull-10">
144 <form method="post" action="/cgi-bin/koha/circ/overdue.pl">
145 <fieldset class="brief">
147 <fieldset><legend>Date due:</legend>
150 <label for="showall">Show any items currently checked out:</label>
152 <input type="checkbox" id="showall" name="showall" value="show" checked="checked" />
154 <input type="checkbox" id="showall" name="showall" value="show" />
158 <li class="date_due_filter">
159 <label for="from">From:</label>
160 <input type="text" id="from" name="dateduefrom" size="10" value="[% filters.dateduefrom | $KohaDates %]" class="flatpickr" data-date_to="to" />
162 <li class="date_due_filter">
163 <label for="to">To:</label>
164 <input type="text" id="to" name="datedueto" size="10" value="[% filters.datedueto | $KohaDates %]" class="flatpickr" />
169 <li><label>Name or cardnumber:</label><input type="text" name="borname" value="[% filters.borname | html %]" /></li>
170 <li><label>Patron category:</label><select name="borcat" id="borcat"><option value="">Any</option>
171 [% FOREACH borcatloo IN borcatloop %]
172 [% 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 %]
177 <li><label>Patron flags:</label>
178 <select name="borflag" id="borflag">
179 <option value="">None</option>
180 [% IF ( borflag_gonenoaddress ) %]<option value="gonenoaddress" selected="selected">Address in question</option>
181 [% ELSE %]<option value="gonenoaddress">Address in question</option>[% END %]
182 [% IF ( borflag_debarred ) %]<option value="debarred" selected="selected">Restricted</option>
183 [% ELSE %]<option value="debarred">Restricted</option>[% END %]
184 [% IF ( borflag_lost ) %]<option value="lost" selected="selected">Lost card</option>
185 [% ELSE %]<option value="lost">Lost card</option>[% END %]
188 [% FOREACH patron_attr_filter_loo IN patron_attr_filter_loop %]
189 <!-- domid cgivalue ismany isclone ordinal code description repeatable authorised_value_category -->
191 <label>[% patron_attr_filter_loo.description | html %]:</label>
192 [% IF ( patron_attr_filter_loo.authorised_value_category ) %]
193 [% SET authvals = AuthorisedValues.GetAuthValueDropbox( patron_attr_filter_loo.authorised_value_category ) %]
194 <select id="pattrodue-input-[% patron_attr_filter_loo.domid | html %]" name="patron_attr_filter_[% patron_attr_filter_loo.code | html %]" class="pattrodue-input">
196 [% FOREACH authval IN authvals %]
197 [% IF ( patron_attr_filter_loo.cgivalue == authval.authorised_value ) -%]
198 <option value="[% authval.authorised_value | html %]" selected="selected">[% authval.lib | html %]</option>
200 <option value="[% authval.authorised_value | html %]">[% authval.lib | html %]</option>
205 <input type="text" name="patron_attr_filter_[% patron_attr_filter_loo.code | html %]" value="[% patron_attr_filter_loo.cgivalue | html %]"/>
207 [% IF ( patron_attr_filter_loo.repeatable ) %]
208 <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>
209 [% IF ( patron_attr_filter_loo.isclone ) %]
210 <a href="#" class="btn btn-link delete_clone"><i class="fa fa-remove"></i> Delete</a>
211 [% ELSIF ( patron_attr_filter_loo.ismany ) %]
212 <a href="#" class="btn btn-link delete_clone"><i class="fa fa-remove"></i> Delete</a>
214 <a href="#" class="btn btn-link delete_clone" style="display:none"><i class="fa fa-remove"></i> Delete</a>
220 <li><label>Item type:</label><select name="itemtype" id="itemtype"><option value="">Any</option>
221 [% FOREACH itemtypeloo IN itemtypeloop %][% IF ( itemtypeloo.selected ) %]
222 <option value="[% itemtypeloo.value | html %]" selected="selected">[% itemtypeloo.itemtypename | html %]</option>[% ELSE %]
223 <option value="[% itemtypeloo.value | html %]">[% itemtypeloo.itemtypename | html %]</option>[% END %]
229 <label>Item home library:</label>
230 <select name="homebranch" id="homebranch">
231 <option value="">Any</option>
232 [% PROCESS options_for_libraries libraries => Branches.all( selected => filters.homebranch ) %]
237 <label>Item holding library:</label>
238 <select name="holdingbranch" id="holdingbranch">
239 <option value="">Any</option>
240 [% PROCESS options_for_libraries libraries => Branches.all( selected => filters.holdingbranch ) %]
245 <label>Library of the patron:</label>
246 <select name="branch" id="branch">
247 <option value="">Any</option>
248 [% PROCESS options_for_libraries libraries => Branches.all( selected => filters.branch, only_from_group => 1 ) %]
253 <fieldset class="action">
254 <input type="submit" value="Apply filter" class="submit" />
255 <input type="hidden" name="op" value="apply filter" />
261 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
262 </div> <!-- /.row -->
264 [% MACRO jsinclude BLOCK %]
265 [% INCLUDE 'calendar.inc' %]
266 [% INCLUDE 'datatables.inc' %]
267 [% INCLUDE 'columns_settings.inc' %]
268 [% INCLUDE 'select2.inc' %]
270 function clone_input( node, original_id ) {
272 var clone = original.clone();
273 var appendid = original_id + "-" + Math.floor(Math.random()*1000+1);
274 clone.find(".delete_clone").show();
275 if( clone.find("select").length ){
276 /* <select> element is present */
277 clone.find("select").removeClass("select2-hidden-accessible").removeAttr("data-select2-id").attr("id", appendid );
278 clone.find(".select2").remove();
279 original.after( clone );
280 $("#" + appendid ).select2();
282 clone.attr("id", appendid );
283 original.after( clone );
287 function update_date_due_filters_visibility(){
288 if( $("#showall").is(":checked")) {
289 $(".date_due_filter").hide();
290 $("#from").prop("disabled", true);
291 $("#to").prop("disabled", true);
293 $(".date_due_filter").show();
294 $("#from").prop("disabled", false);
295 $("#to").prop("disabled", false);
299 $(document).ready(function(){
300 var columns_settings = [% TablesSettings.GetColumns( 'circ', 'overdues', 'circ-overdues', 'json' ) | $raw %];
301 KohaTable("overduest", {
302 "sPaginationType": "full",
303 "aaSorting": [[0, 'asc']],
306 }, columns_settings);
308 $("#showall").on("change", function(){
309 update_date_due_filters_visibility();
311 update_date_due_filters_visibility();
313 $(".pattrodue-input").each(function(){
317 $("body").on("click", ".delete_clone", function(e){
319 $(this).parent().remove();
322 $("body").on("click", ".clone-attribute", function(e){
324 clone_input( $(this).parent(), $(this).data("original-id") );
330 [% INCLUDE 'intranet-bottom.inc' %]