3 [% USE AuthorisedValues %]
9 [%- USE TablesSettings -%]
10 [% SET footerjs = 1 %]
11 [% INCLUDE 'doc-head-open.inc' %]
12 <title>Koha › Circulation › Items overdue as of [% todaysdate | html %]</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 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> › Overdues as of [% todaysdate | html %]</div>
37 <div class="main container-fluid">
39 <div class="col-sm-10 col-sm-push-2">
43 <h2>Overdue report</h2>
44 <p>Please choose one or more filters to proceed.</p>
47 [% IF ( overdueloop ) %]
49 <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>
52 [% IF ( isfiltered ) %]
53 [% SET url_params = '' %]
54 [% FOR var IN filters.keys %]
55 [% url_params = BLOCK %][% url_params | $raw %]&[% var | uri %]=[% filters.$var | uri %][% END %]
57 <a href="overdue.pl?op=csv[% url_params | $raw %]">Download file of displayed overdues</a>
59 <a href="overdue.pl?op=csv">Download file of all overdues</a>
63 <div class="sql"><pre>[% sql | html %]</pre></div>
64 <div class="searchresults">
65 <table id="overduest">
68 <th class="title-string">Due date</th>
70 <th>Patron category</th>
71 <th>Patron library</th>
72 <th class="anti-the">Title</th>
74 <th>Holding library</th>
79 <th>Non-public note</th>
82 [%- BLOCK subject -%]Overdue:[%- END -%]
84 [% FOREACH overdueloo IN overdueloop %]
86 <td><span title="[% overdueloo.duedate | html %]">[% overdueloo.duedate | $KohaDates %]</span></td>
88 [% INCLUDE 'patron-title.inc' patron=overdueloo.patron hide_patron_infos_if_needed=1 %]
89 [% IF logged_in_user.can_see_patron_infos( overdueloo.patron ) %]
90 [% IF ( overdueloo.email ) %][<a href="mailto:[% overdueloo.email | uri %]?subject=[% INCLUDE subject %] [% overdueloo.title | uri %]">email</a>][% END %]
91 [% IF ( overdueloo.phone ) %]([% overdueloo.phone | html %])[% ELSIF ( overdueloo.mobile ) %]([% overdueloo.mobile | html %])[% ELSIF ( overdueloo.phonepro ) %]([% overdueloo.phonepro | html %])[% END %]</td>
93 <td>[% Categories.GetName( overdueloo.patron.categorycode ) | html %]</td>
94 <td>[% Branches.GetName( overdueloo.patron.branchcode ) | html %]</td>
95 <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>
96 <td>[% Branches.GetName( overdueloo.homebranchcode ) | html %]</td>
97 <td>[% Branches.GetName( overdueloo.holdingbranchcode ) | html %]</td>
98 <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>
99 <td>[% overdueloo.itemcallnumber | html %]</td>
100 <td>[% ItemTypes.GetDescription( overdueloo.itemtype ) | html %]</td>
101 <td>[% overdueloo.replacementprice | $Price %]</td>
102 <td>[% overdueloo.itemnotes_nonpublic | html %]</td>
111 <h2>Overdue report</h2>
112 [% IF ( isfiltered ) %]
113 <p>There are no overdues matching your search. <a href="/cgi-bin/koha/circ/overdue.pl">Reset filter</a></p>
115 <p>There are no overdues.</p>
118 [% END %] <!-- overdueloop -->
119 [% END %] <!-- noreport -->
122 </div> <!-- /.col-sm-10.col-sm-push-2 -->
124 <div class="col-sm-2 col-sm-pull-10">
127 <form method="post" action="/cgi-bin/koha/circ/overdue.pl">
128 <fieldset class="brief">
130 <fieldset><legend>Date due:</legend>
133 <label for="showall">Show any items currently checked out:</label>
135 <input type="checkbox" id="showall" name="showall" value="show" checked="checked" />
137 <input type="checkbox" id="showall" name="showall" value="show" />
141 <li class="date_due_filter">
142 <label for="from">From:</label>
143 <input type="text" id="from" name="dateduefrom" size="10" value="[% filters.dateduefrom | $KohaDates %]" class="datepickerfrom" />
145 <li class="date_due_filter">
146 <label for="to">To:</label>
147 <input type="text" id="to" name="datedueto" size="10" value="[% filters.datedueto | $KohaDates %]" class="datepickerto" />
152 <li><label>Name or cardnumber:</label><input type="text" name="borname" value="[% filters.borname | html %]" /></li>
153 <li><label>Patron category:</label><select name="borcat" id="borcat"><option value="">Any</option>
154 [% FOREACH borcatloo IN borcatloop %]
155 [% 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 %]
160 <li><label>Patron flags:</label>
161 <select name="borflag" size="1" id="borflag">
162 <option value="">None</option>
163 [% IF ( borflag_gonenoaddress ) %]<option value="gonenoaddress" selected="selected">Address in question</option>
164 [% ELSE %]<option value="gonenoaddress">Address in question</option>[% END %]
165 [% IF ( borflag_debarred ) %]<option value="debarred" selected="selected">Restricted</option>
166 [% ELSE %]<option value="debarred">Restricted</option>[% END %]
167 [% IF ( borflag_lost ) %]<option value="lost" selected="selected">Lost card</option>
168 [% ELSE %]<option value="lost">Lost card</option>[% END %]
171 [% FOREACH patron_attr_filter_loo IN patron_attr_filter_loop %]
172 <!-- domid cgivalue ismany isclone ordinal code description repeatable authorised_value_category -->
174 <label>[% patron_attr_filter_loo.description | html %]:</label>
175 [% IF ( patron_attr_filter_loo.authorised_value_category ) %]
176 [% SET authvals = AuthorisedValues.GetAuthValueDropbox( patron_attr_filter_loo.authorised_value_category ) %]
177 <select id="pattrodue-input-[% patron_attr_filter_loo.domid | html %]" name="patron_attr_filter_[% patron_attr_filter_loo.code | html %]" class="pattrodue-input">
179 [% FOREACH authval IN authvals %]
180 [% IF ( patron_attr_filter_loo.cgivalue == authval.authorised_value ) -%]
181 <option value="[% authval.authorised_value | html %]" selected="selected">[% authval.lib | html %]</option>
183 <option value="[% authval.authorised_value | html %]">[% authval.lib | html %]</option>
188 <input type="text" name="patron_attr_filter_[% patron_attr_filter_loo.code | html %]" value="[% patron_attr_filter_loo.cgivalue | html %]"/>
190 [% IF ( patron_attr_filter_loo.repeatable ) %]
191 <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>
192 [% IF ( patron_attr_filter_loo.isclone ) %]
193 <a href="#" class="btn btn-link delete_clone"><i class="fa fa-remove"></i> Delete</a>
194 [% ELSIF ( patron_attr_filter_loo.ismany ) %]
195 <a href="#" class="btn btn-link delete_clone"><i class="fa fa-remove"></i> Delete</a>
197 <a href="#" class="btn btn-link delete_clone" style="display:none"><i class="fa fa-remove"></i> Delete</a>
203 <li><label>Item type:</label><select name="itemtype" id="itemtype"><option value="">Any</option>
204 [% FOREACH itemtypeloo IN itemtypeloop %][% IF ( itemtypeloo.selected ) %]
205 <option value="[% itemtypeloo.value | html %]" selected="selected">[% itemtypeloo.itemtypename | html %]</option>[% ELSE %]
206 <option value="[% itemtypeloo.value | html %]">[% itemtypeloo.itemtypename | html %]</option>[% END %]
212 <label>Item home library:</label>
213 <select name="homebranch" id="homebranch">
214 <option value="">Any</option>
215 [% PROCESS options_for_libraries libraries => Branches.all( selected => filters.homebranch ) %]
220 <label>Item holding library:</label>
221 <select name="holdingbranch" id="holdingbranch">
222 <option value="">Any</option>
223 [% PROCESS options_for_libraries libraries => Branches.all( selected => filters.holdingbranch ) %]
228 <label>Library of the patron:</label>
229 <select name="branch" id="branch">
230 <option value="">Any</option>
231 [% PROCESS options_for_libraries libraries => Branches.all( selected => filters.branch, only_from_group => 1 ) %]
236 <fieldset class="action">
237 <input type="submit" value="Apply filter" class="submit" />
238 <input type="hidden" name="op" value="apply filter" />
244 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
245 </div> <!-- /.row -->
247 [% MACRO jsinclude BLOCK %]
248 [% INCLUDE 'calendar.inc' %]
249 [% INCLUDE 'datatables.inc' %]
250 [% INCLUDE 'columns_settings.inc' %]
251 [% INCLUDE 'select2.inc' %]
253 function clone_input( node, original_id ) {
255 var clone = original.clone();
256 var appendid = original_id + "-" + Math.floor(Math.random()*1000+1);
257 clone.find(".delete_clone").show();
258 if( clone.find("select").length ){
259 /* <select> element is present */
260 clone.find("select").removeClass("select2-hidden-accessible").removeAttr("data-select2-id").attr("id", appendid );
261 clone.find(".select2").remove();
262 original.after( clone );
263 $("#" + appendid ).select2();
265 clone.attr("id", appendid );
266 original.after( clone );
270 function update_date_due_filters_visibility(){
271 if( $("#showall").is(":checked")) {
272 $(".date_due_filter").hide();
273 $("#from").prop("disabled", true);
274 $("#to").prop("disabled", true);
276 $(".date_due_filter").show();
277 $("#from").prop("disabled", false);
278 $("#to").prop("disabled", false);
282 $(document).ready(function(){
283 var columns_settings = [% TablesSettings.GetColumns( 'circ', 'overdues', 'circ-overdues', 'json' ) | $raw %];
284 KohaTable("overduest", {
285 "sPaginationType": "full",
286 "aaSorting": [[0, 'asc']],
289 }, columns_settings);
291 $("#showall").on("change", function(){
292 update_date_due_filters_visibility();
294 update_date_due_filters_visibility();
296 $(".pattrodue-input").each(function(){
300 $("body").on("click", ".delete_clone", function(e){
302 $(this).parent().remove();
305 $("body").on("click", ".clone-attribute", function(e){
307 clone_input( $(this).parent(), $(this).data("original-id") );
313 [% INCLUDE 'intranet-bottom.inc' %]