6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Tools › Inventory</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% Asset.css("css/datatables.css") | $raw %]
12 <body id="tools_inventory" class="tools">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'cat-search.inc' %]
16 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › [% IF (loop) %]<a href="/cgi-bin/koha/tools/inventory.pl">Inventory</a> › Results[% ELSE %]Inventory[% END %]</div>
18 <div id="doc3" class="yui-t2">
24 [% IF (moddatecount) %]<div class="dialog message">[% moddatecount | html %] items modified : datelastseen set to [% date | $KohaDates %]</div>
25 <div class="dialog alert">Number of potential barcodes read: [% LinesRead | html %]</div>[% END %]
26 [% IF (errorfile) %]<div class="dialog alert">[% errorfile | html %] can't be opened</div>[% END %]
27 [% IF (err_length && err_length==1) %]<div class="dialog alert">There was 1 barcode that was too long.</div>[% END %]
28 [% IF (err_length && err_length>1) %]<div class="dialog alert">There were [% err_length | html %] barcodes that were too long.</div>[% END %]
29 [% IF (err_data && err_data==1) %]<div class="dialog alert">There was 1 barcode that contained at least one unprintable character.</div>[% END %]
30 [% IF (err_data && err_data>1) %]<div class="dialog alert">There were [% err_data | html %] barcodes that contained at least one unprintable character.</div>[% END %]
31 [% FOREACH error IN errorloop %]
32 <div class="dialog alert">
33 [% error.barcode | html %]
34 [% IF (error.ERR_BARCODE) %]: barcode not found[% END %]
35 [% IF (error.ERR_WTHDRAWN) %]: item withdrawn[% END %]
36 [% IF (error.ERR_ONLOAN_RET) %]: item was on loan. It was returned before marked as seen[% END %]
37 [% IF (error.ERR_ONLOAN_NOT_RET) %]: item was on loan. couldn't be returned.[% END %]
42 <form method="post" id="inventory_form" action="/cgi-bin/koha/tools/inventory.pl" enctype="multipart/form-data">
43 <fieldset class="rows">
44 <legend>Use a barcode file</legend>
46 <li><label for="uploadbarcodes">Barcode file: </label> <input type="file" id="uploadbarcodes" name="uploadbarcodes" /></li>
47 <li><label for="setdate">Set inventory date to:</label> <input type="text" id="setdate" name="setdate" value="[% today | $KohaDates %]" class="datepicker" disabled /></li>
48 <li><label for="compareinv2barcd">Compare barcodes list to results: </label><input type="checkbox" name="compareinv2barcd" id="compareinv2barcd" disabled /></li>
49 <li><label for="dont_checkin">Do not check in items scanned during inventory: </label><input type="checkbox" name="dont_checkin" id="dont_checkin" disabled /></li>
53 <fieldset class="rows">
54 <legend>Item location filters</legend>
56 <label for="branch">Library: </label>
57 <input type="radio" name="branch" value="homebranch"> Home library</input>
58 <input type="radio" name="branch" value="holdingbranch"> Current library</input>
60 <label for="branchloop">Library: </label><select id="branchloop" name="branchcode" style="width:12em;">
61 <option value="">All libraries</option>
62 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %]
65 [% IF (authorised_values) %]
67 <label for="locationloop">Shelving location (items.location) is: </label>
68 <select id="locationloop" name="location">
69 <option value="">Filter location</option>
70 [% FOREACH value IN authorised_values %]
71 [% IF (value.selected) %]
72 <option value="[% value.authorised_value | html %]" selected="selected">[% value.lib | html %]</option>
74 <option value="[% value.authorised_value | html %]">[% value.lib | html %]</option>
80 <label for="minlocation">Item callnumber between: </label>
81 <input type="text" name="minlocation" id="minlocation" value="[% minlocation | html %]" /> (items.itemcallnumber) </li>
82 <li><label for="maxlocation">...and: </label>
83 <input type="text" name="maxlocation" id="maxlocation" value="[% maxlocation | html %]" />
88 <fieldset class="rows" id="optionalfilters">
89 <legend>Optional filters for inventory list or comparing barcodes</legend>
91 <div id="statuses" style="display: block;">
92 [% FOREACH status IN statuses %]
93 [% IF (status.values) %]
94 <fieldset style="float: left; padding: 5px; margin: 5px;text-align:right">
95 <legend>[% status.fieldname | html %]</legend>
96 <ul id="statuses-[% fieldname | html %]" style="display: inline;">
97 [% FOREACH value IN status.values %]
100 <label for="[% value.id | html %]">
101 [% IF value.authorised_value==0 %]
104 [% value.lib | html %]
107 <input type="checkbox" name="status-[% status.fieldname | html %]-[% value.authorised_value | html %]" id="[% value.authorised_value | html %]" />
119 <label for="datelastseen">Last inventory date:</label>
120 <input type="text" id="datelastseen" name="datelastseen" value="[% datelastseen | $KohaDates %]" class="datepicker" />
121 (Skip records marked as seen on or after this date.)
124 <label for="ignoreissued">Skip items on loan: </label>
125 [% IF (ignoreissued) %]
126 <input type="checkbox" id="ignoreissued" name="ignoreissued" checked="checked" />
128 <input type="checkbox" id="ignoreissued" name="ignoreissued" />
134 <fieldset class="rows">
135 <legend>Additional options</legend>
139 <label for="CSVexport">Export to CSV file: </label>
140 <input type="checkbox" name="CSVexport" id="CSVexport" />
144 <input type="hidden" name="op" value="do_it" />
146 <fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset>
152 <form method="post" action="/cgi-bin/koha/tools/inventory.pl" class="checkboxed">
153 <input type="hidden" name="minlocation" value="[% minlocation | html %]" />
154 <input type="hidden" name="maxlocation" value="[% maxlocation | html %]" />
155 <input type="hidden" name="location" value="[% location | html %]" />
156 <input type="hidden" name="branchcode" value="[% branchcode | html %]" />
157 <input type="hidden" name="datelastseen" value="[% datelastseen | html %]" />
159 [% UNLESS uploadedbarcodesflag %]
160 <div><a href="#" class="checkall"><i class="fa fa-check"></i> Select all</a> <a href="#" class="clearall"><i class="fa fa-remove"></i> Clear all</a></div>
163 <table id="inventoryt">
166 [% UNLESS uploadedbarcodesflag %]<th>Seen</th>[% END %]
171 <th>Not for loan</th>
180 [% FOREACH result IN loop %]
182 [% UNLESS uploadedbarcodesflag %]
184 <input type="checkbox" name="SEEN-[% result.itemnumber | html %]" value="1" />
188 [% result.barcode | html %]
190 <td>[% result.itemcallnumber | html %]</td>
192 [% Branches.GetName( result.homebranch ) | html %]
193 <span class="shelvingloc">[% result.location | html %]</span>
196 <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% result.biblionumber | html %]" class="openWin">[% result.title | html %]</a>
197 [% IF ( result.author ) %]
198 by <span class="author">[% result.author | html %]</span>
202 [% result.notforloan | html %]
205 [% result.itemlost | html %]
208 [% result.damaged | html %]
211 [% result.withdrawn | html %]
214 [% result.datelastseen | $KohaDates %]
217 [% FOREACH problem IN result.problems %]
218 [% IF problem.key == 'wrongplace' %]
219 Found in wrong place<br/>
220 [% ELSIF problem.key == 'changestatus' %]
221 Unknown not-for-loan status<br/>
222 [% ELSIF problem.key == 'not_scanned' %]
223 Missing (not scanned)<br/>
224 [% ELSIF problem.key == 'checkedout' %]
225 Still checked out<br/>
226 [% ELSIF problem.key == 'no_barcode' %]
235 <div class="spacer"></div>
236 [% UNLESS uploadedbarcodesflag %]
237 <div style="padding : .3em 0"><a href="#" class="checkall"><i class="fa fa-check"></i> Select all</a> <a href="#" class="clearall"><i class="fa fa-remove"></i> Clear all</a></div>
238 <input type="submit" id="markseenandquit" value="Mark seen and quit" />
239 <input type="submit" value="Mark seen and continue >>" id="markseenandcontinuebutton" />
240 <input type="submit" value="Continue without marking >>" id="continuewithoutmarkingbutton" class="submit" />
249 [% INCLUDE 'tools-menu.inc' %]
253 [% MACRO jsinclude BLOCK %]
254 [% Asset.js("js/tools-menu.js") | $raw %]
255 [% INCLUDE 'datatables.inc' %]
256 [% INCLUDE 'calendar.inc' %]
257 [% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") | $raw %]
258 <script type="text/javascript">
259 function checkForm() {
260 if ( $('#uploadbarcodes').val() ) {
262 $('#branchloop').val() ||
263 $('#locationloop').val() ||
264 $('#minlocation').val() ||
265 $('#maxlocation').val() ||
266 $('#statuses input:checked').length
269 _("You have not selected any catalog filters and are about to compare a file of barcodes to your entire catalog.") + "\n\n" +
270 _("For large catalogs this can result in unexpected behavior") + "\n\n" +
271 _("Are you sure you want to do this?")
279 $(document).ready(function(){
280 inventorydt = $('#inventoryt').dataTable($.extend(true, {}, dataTablesDefaults, {
281 'sPaginationType': 'full_numbers',
282 [% IF compareinv2barcd %]
283 // sort on callnumber
284 "aaSorting": [[ 1, "asc" ]],
286 // first column contains checkboxes
288 { "bSortable": false, "bSearchable": false, "aTargets": [ 0 ] },
290 // 3rd column is callnumber
291 "aaSorting": [[ 2, "asc" ]],
293 'fnDrawCallback': function() {
294 //bind the click handler script to the newly created elements held in the table
295 $('.openWin').bind('click',function(e){
297 openWindow(this.href,'marcview',800,600);
303 $("#continuewithoutmarkingbutton").click(function(){
304 inventorydt.fnPageChange( 'next' );
308 $("#markseenandcontinuebutton").click(function(){
310 $("input:checked").each(function() {
311 param += "|" + $(this).attr('name');
313 $.post('/cgi-bin/koha/tools/ajax-inventory.pl', { seen: param });
314 inventorydt.fnPageChange( 'next' );
318 $("#markseenandquit").click(function(){
320 $("input:checked").each(function() {
321 param += "|" + $(this).attr('name');
325 url: '/cgi-bin/koha/tools/ajax-inventory.pl',
326 data: { seen: param},
329 document.location.href = '/cgi-bin/koha/tools/inventory.pl';
334 $(".checkall").click(function(){
335 $(".checkboxed").checkCheckboxes();
338 $(".clearall").click(function(){
339 $(".checkboxed").unCheckCheckboxes();
342 $("#inventory_form").on("submit",function(){
346 // #uploadbarcodes and #compareinv2barcd determine the behavior of
347 // the controls within the barcode fieldset and the optional filters
348 $("#uploadbarcodes").change(function() {
349 if( $("#uploadbarcodes").val() ) {
350 $("#setdate").prop('disabled',false);
351 $("#compareinv2barcd").prop('disabled',false);
352 $("#compareinv2barcd").attr('checked',true); // default
353 $("#dont_checkin").prop('disabled',false);
354 if( $("#compareinv2barcd").attr('checked') ) {
355 $("fieldset#optionalfilters").show();
356 $("#ignoreissued").attr('checked',true); // default
358 $("fieldset#optionalfilters").hide();
359 $("#ignoreissued").attr('checked',false);
362 $("#setdate").prop('disabled',true);
363 $("#compareinv2barcd").prop('disabled',true);
364 $("#compareinv2barcd").attr('checked',false);
365 $("#dont_checkin").prop('disabled',true);
366 $("#dont_checkin").attr('checked',false);
367 $("fieldset#optionalfilters").show();
370 $("#compareinv2barcd").click(function() {
371 if( $("#compareinv2barcd").attr('checked') ) {
372 $("fieldset#optionalfilters").show();
373 $("#ignoreissued").attr('checked',true); // default
375 $("#ignoreissued").attr('checked',false);
376 $("fieldset#optionalfilters").hide();
383 [% INCLUDE 'intranet-bottom.inc' %]