3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Tools › Inventory</title>
5 [% INCLUDE 'doc-head-close.inc' %]
6 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
7 [% INCLUDE 'datatables.inc' %]
8 [% INCLUDE 'calendar.inc' %]
9 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script>
10 <script type="text/javascript">
12 function checkForm() {
13 if ( $('#uploadbarcodes').val() ) {
15 $('#branchloop').val() ||
16 $('#locationloop').val() ||
17 $('#minlocation').val() ||
18 $('#maxlocation').val() ||
19 $('#statuses input:checked').length
22 _("You have not selected any catalog filters and are about to compare a file of barcodes to your entire catalog.") + "\n\n" +
23 _("For large catalogs this can result in unexpected behavior") + "\n\n" +
24 _("Are you sure you want to do this?")
32 $(document).ready(function(){
33 inventorydt = $('#inventoryt').dataTable($.extend(true, {}, dataTablesDefaults, {
34 'sPaginationType': 'full_numbers',
35 [% IF compareinv2barcd %]
37 "aaSorting": [[ 1, "asc" ]],
39 // first column contains checkboxes
41 { "bSortable": false, "bSearchable": false, "aTargets": [ 0 ] },
43 // 3rd column is callnumber
44 "aaSorting": [[ 2, "asc" ]],
46 'fnDrawCallback': function() {
47 //bind the click handler script to the newly created elements held in the table
48 $('.openWin').bind('click',function(e){
50 openWindow(this.href,'marcview',800,600);
56 $("#continuewithoutmarkingbutton").click(function(){
57 inventorydt.fnPageChange( 'next' );
61 $("#markseenandcontinuebutton").click(function(){
63 $("input:checked").each(function() {
64 param += "|" + $(this).attr('name');
66 $.post('/cgi-bin/koha/tools/ajax-inventory.pl', { seen: param });
67 inventorydt.fnPageChange( 'next' );
71 $("#markseenandquit").click(function(){
73 $("input:checked").each(function() {
74 param += "|" + $(this).attr('name');
78 url: '/cgi-bin/koha/tools/ajax-inventory.pl',
82 document.location.href = '/cgi-bin/koha/tools/inventory.pl';
87 $(".checkall").click(function(){
88 $(".checkboxed").checkCheckboxes();
91 $(".clearall").click(function(){
92 $(".checkboxed").unCheckCheckboxes();
95 $("#inventory_form").on("submit",function(){
99 // #uploadbarcodes and #compareinv2barcd determine the behavior of
100 // the controls within the barcode fieldset and the optional filters
101 $("#uploadbarcodes").change(function() {
102 if( $("#uploadbarcodes").val() ) {
103 $("#setdate").prop('disabled',false);
104 $("#compareinv2barcd").prop('disabled',false);
105 $("#dont_checkin").prop('disabled',false);
106 if( $("#compareinv2barcd").attr('checked') ) {
107 $("fieldset#optionalfilters").show();
109 $("fieldset#optionalfilters").hide();
112 $("#setdate").prop('disabled',true);
113 $("#compareinv2barcd").prop('disabled',true);
114 $("#compareinv2barcd").attr('checked',false);
115 $("#dont_checkin").prop('disabled',true);
116 $("#dont_checkin").attr('checked',false);
117 $("fieldset#optionalfilters").show();
120 $("#compareinv2barcd").click(function() {
121 if( $("#compareinv2barcd").attr('checked') ) {
122 $("fieldset#optionalfilters").show();
124 $("fieldset#optionalfilters").hide();
131 <body id="tools_inventory" class="tools">
132 [% INCLUDE 'header.inc' %]
133 [% INCLUDE 'cat-search.inc' %]
135 <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>
137 <div id="doc3" class="yui-t2">
143 [% IF (moddatecount) %]<div class="dialog message">[% moddatecount %] items modified : datelastseen set to [% date | $KohaDates %]</div>
144 <div class="dialog alert">Number of potential barcodes read: [% LinesRead %]</div>[% END %]
145 [% IF (errorfile) %]<div class="dialog alert">[% errorfile %] can't be opened</div>[% END %]
146 [% IF (err_length && err_length==1) %]<div class="dialog alert">There was 1 barcode that was too long.</div>[% END %]
147 [% IF (err_length && err_length>1) %]<div class="dialog alert">There were [% err_length %] barcodes that were too long.</div>[% END %]
148 [% IF (err_data && err_data==1) %]<div class="dialog alert">There was 1 barcode that contained at least one unprintable character.</div>[% END %]
149 [% IF (err_data && err_data>1) %]<div class="dialog alert">There were [% err_data %] barcodes that contained at least one unprintable character.</div>[% END %]
150 [% FOREACH error IN errorloop %]
151 <div class="dialog alert">
153 [% IF (error.ERR_BARCODE) %]: barcode not found[% END %]
154 [% IF (error.ERR_WTHDRAWN) %]: item withdrawn[% END %]
155 [% IF (error.ERR_ONLOAN_RET) %]: item was on loan. It was returned before marked as seen[% END %]
156 [% IF (error.ERR_ONLOAN_NOT_RET) %]: item was on loan. couldn't be returned.[% END %]
161 <form method="post" id="inventory_form" action="/cgi-bin/koha/tools/inventory.pl" enctype="multipart/form-data">
162 <fieldset class="rows">
163 <legend>Use a barcode file</legend>
165 <li><label for="uploadbarcodes">Barcode file: </label> <input type="file" id="uploadbarcodes" name="uploadbarcodes" /></li>
166 <li><label for="setdate">Set inventory date to:</label> <input type="text" id="setdate" name="setdate" value="[% today | $KohaDates %]" class="datepicker" disabled /></li>
167 <li><label for="compareinv2barcd">Compare barcodes list to results: </label><input type="checkbox" name="compareinv2barcd" id="compareinv2barcd" disabled /></li>
168 <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>
172 <fieldset class="rows">
173 <legend>Item location filters</legend>
175 <label for="branch">Library: </label>
176 <input type="radio" name="branch" value="homebranch"> Home library</input>
177 <input type="radio" name="branch" value="holdingbranch"> Current library</input>
179 <label for="branchloop">Library: </label><select id="branchloop" name="branchcode" style="width:12em;">
180 <option value="">All libraries</option>
181 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %]
184 [% IF (authorised_values) %]
186 <label for="locationloop">Shelving location (items.location) is: </label>
187 <select id="locationloop" name="location">
188 <option value="">Filter location</option>
189 [% FOREACH value IN authorised_values %]
190 [% IF (value.selected) %]
191 <option value="[% value.authorised_value %]" selected="selected">[% value.lib %]</option>
193 <option value="[% value.authorised_value %]">[% value.lib %]</option>
199 <label for="minlocation">Item callnumber between: </label>
200 <input type="text" name="minlocation" id="minlocation" value="[% minlocation %]" /> (items.itemcallnumber) </li>
201 <li><label for="maxlocation">...and: </label>
202 <input type="text" name="maxlocation" id="maxlocation" value="[% maxlocation %]" />
207 <fieldset class="rows" id="optionalfilters">
208 <legend>Optional filters for inventory list or comparing barcodes</legend>
210 <div id="statuses" style="display: block;">
211 [% FOREACH status IN statuses %]
212 [% IF (status.values) %]
213 <fieldset style="float: left; padding: 5px; margin: 5px;text-align:right">
214 <legend>[% status.fieldname %]</legend>
215 <ul id="statuses-[% fieldname %]" style="display: inline;">
216 [% FOREACH value IN status.values %]
219 <label for="[% value.id %]">
220 [% IF value.authorised_value==0 %]
226 <input type="checkbox" name="status-[% status.fieldname %]-[% value.authorised_value %]" id="[% value.authorised_value %]" />
238 <label for="datelastseen">Last inventory date:</label>
239 <input type="text" id="datelastseen" name="datelastseen" value="[% datelastseen | $KohaDates %]" class="datepicker" />
240 (Skip records marked as seen on or after this date.)
243 <label for="ignoreissued">Skip items on loan: </label>
244 [% IF (ignoreissued) %]
245 <input type="checkbox" id="ignoreissued" name="ignoreissued" checked="checked" />
247 <input type="checkbox" id="ignoreissued" name="ignoreissued" />
253 <fieldset class="rows">
254 <legend>Additional options</legend>
258 <label for="CSVexport">Export to CSV file: </label>
259 <input type="checkbox" name="CSVexport" id="CSVexport" />
263 <input type="hidden" name="op" value="do_it" />
265 <fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset>
271 <form method="post" action="/cgi-bin/koha/tools/inventory.pl" class="checkboxed">
272 <input type="hidden" name="minlocation" value="[% minlocation %]" />
273 <input type="hidden" name="maxlocation" value="[% maxlocation %]" />
274 <input type="hidden" name="location" value="[% location %]" />
275 <input type="hidden" name="branchcode" value="[% branchcode %]" />
276 <input type="hidden" name="datelastseen" value="[% datelastseen %]" />
278 [% UNLESS uploadedbarcodesflag %]
279 <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>
282 <table id="inventoryt">
285 [% UNLESS uploadedbarcodesflag %]<th>Seen</th>[% END %]
299 [% FOREACH result IN loop %]
301 [% UNLESS uploadedbarcodesflag %]
303 <input type="checkbox" name="SEEN-[% result.itemnumber %]" value="1" />
307 [% result.barcode | html %]
309 <td>[% result.itemcallnumber | html %]</td>
311 [% Branches.GetName( result.homebranch ) %]
312 <span class="shelvingloc">[% result.location | html %]</span>
315 <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% result.biblionumber %]" class="openWin">[% result.title | html %]</a>
316 [% IF ( result.author ) %]
317 by <span class="author">[% result.author | html %]</span>
321 [% result.notforloan | html %]
324 [% result.itemlost | html %]
327 [% result.damaged | html %]
330 [% result.withdrawn | html %]
333 [% result.datelastseen | $KohaDates | html %]
336 [% FOREACH problem IN result.problems %]
337 [% IF problem.key == 'wrongplace' %]
338 Found in wrong place<br/>
339 [% ELSIF problem.key == 'changestatus' %]
340 Unknown not-for-loan status<br/>
341 [% ELSIF problem.key == 'not_scanned' %]
342 Missing (not scanned)<br/>
343 [% ELSIF problem.key == 'checkedout' %]
344 Still checked out<br/>
345 [% ELSIF problem.key == 'no_barcode' %]
354 <div class="spacer"></div>
355 [% UNLESS uploadedbarcodesflag %]
356 <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>
357 <input type="submit" id="markseenandquit" value="Mark seen and quit" />
358 <input type="submit" value="Mark seen and continue >>" id="markseenandcontinuebutton" />
359 <input type="submit" value="Continue without marking >>" id="continuewithoutmarkingbutton" class="submit" />
368 [% INCLUDE 'tools-menu.inc' %]
371 [% INCLUDE 'intranet-bottom.inc' %]