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 %]
36 "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 1 ] } ],
38 "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ],
40 'fnDrawCallback': function() {
41 //bind the click handler script to the newly created elements held in the table
42 $('.openWin').bind('click',function(e){
44 openWindow(this.href,'marcview',800,600);
50 $("#continuewithoutmarkingbutton").click(function(){
51 inventorydt.fnPageChange( 'next' );
55 $("#markseenandcontinuebutton").click(function(){
57 $("input:checked").each(function() {
58 param += "|" + $(this).attr('name');
60 $.post('/cgi-bin/koha/tools/ajax-inventory.pl', { seen: param });
61 inventorydt.fnPageChange( 'next' );
65 $("#markseenandquit").click(function(){
67 $("input:checked").each(function() {
68 param += "|" + $(this).attr('name');
72 url: '/cgi-bin/koha/tools/ajax-inventory.pl',
76 document.location.href = '/cgi-bin/koha/tools/inventory.pl';
81 $(".checkall").click(function(){
82 $(".checkboxed").checkCheckboxes();
85 $(".clearall").click(function(){
86 $(".checkboxed").unCheckCheckboxes();
89 $("#inventory_form").on("submit",function(){
93 // #uploadbarcodes and #compareinv2barcd determine the behavior of
94 // the controls within the barcode fieldset and the optional filters
95 $("#uploadbarcodes").change(function() {
96 if( $("#uploadbarcodes").val() ) {
97 $("#setdate").prop('disabled',false);
98 $("#compareinv2barcd").prop('disabled',false);
99 $("#dont_checkin").prop('disabled',false);
100 if( $("#compareinv2barcd").attr('checked') ) {
101 $("fieldset#optionalfilters").show();
103 $("fieldset#optionalfilters").hide();
106 $("#setdate").prop('disabled',true);
107 $("#compareinv2barcd").prop('disabled',true);
108 $("#compareinv2barcd").attr('checked',false);
109 $("#dont_checkin").prop('disabled',true);
110 $("#dont_checkin").attr('checked',false);
111 $("fieldset#optionalfilters").show();
114 $("#compareinv2barcd").click(function() {
115 if( $("#compareinv2barcd").attr('checked') ) {
116 $("fieldset#optionalfilters").show();
118 $("fieldset#optionalfilters").hide();
125 <body id="tools_inventory" class="tools">
126 [% INCLUDE 'header.inc' %]
127 [% INCLUDE 'cat-search.inc' %]
129 <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>
131 <div id="doc3" class="yui-t2">
137 [% IF (moddatecount) %]<div class="dialog message">[% moddatecount %] items modified : datelastseen set to [% date | $KohaDates %]</div>
138 <div class="dialog alert">Number of potential barcodes read: [% LinesRead %]</div>[% END %]
139 [% IF (errorfile) %]<div class="dialog alert">[% errorfile %] can't be opened</div>[% END %]
140 [% IF (err_length && err_length==1) %]<div class="dialog alert">There was 1 barcode that was too long.</div>[% END %]
141 [% IF (err_length && err_length>1) %]<div class="dialog alert">There were [% err_length %] barcodes that were too long.</div>[% END %]
142 [% IF (err_data && err_data==1) %]<div class="dialog alert">There was 1 barcode that contained at least one unprintable character.</div>[% END %]
143 [% IF (err_data && err_data>1) %]<div class="dialog alert">There were [% err_data %] barcodes that contained at least one unprintable character.</div>[% END %]
144 [% FOREACH error IN errorloop %]
145 <div class="dialog alert">
147 [% IF (error.ERR_BARCODE) %]: barcode not found[% END %]
148 [% IF (error.ERR_WTHDRAWN) %]: item withdrawn[% END %]
149 [% IF (error.ERR_ONLOAN_RET) %]: item was on loan. It was returned before marked as seen[% END %]
150 [% IF (error.ERR_ONLOAN_NOT_RET) %]: item was on loan. couldn't be returned.[% END %]
155 <form method="post" id="inventory_form" action="/cgi-bin/koha/tools/inventory.pl" enctype="multipart/form-data">
156 <fieldset class="rows">
157 <legend>Use a barcode file</legend>
159 <li><label for="uploadbarcodes">Barcode file: </label> <input type="file" id="uploadbarcodes" name="uploadbarcodes" /></li>
160 <li><label for="setdate">Set inventory date to:</label> <input type="text" id="setdate" name="setdate" value="[% today | $KohaDates %]" class="datepicker" disabled /></li>
161 <li><label for="compareinv2barcd">Compare barcodes list to results: </label><input type="checkbox" name="compareinv2barcd" id="compareinv2barcd" disabled /></li>
162 <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>
166 <fieldset class="rows">
167 <legend>Item location filters</legend>
169 <label for="branch">Library: </label>
170 <input type="radio" name="branch" value="homebranch"> Home library</input>
171 <input type="radio" name="branch" value="holdingbranch"> Current library</input>
173 <label for="branchloop">Library: </label><select id="branchloop" name="branchcode" style="width:12em;">
174 <option value="">All libraries</option>
175 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %]
178 [% IF (authorised_values) %]
180 <label for="locationloop">Shelving location (items.location) is: </label>
181 <select id="locationloop" name="location">
182 <option value="">Filter location</option>
183 [% FOREACH value IN authorised_values %]
184 [% IF (value.selected) %]
185 <option value="[% value.authorised_value %]" selected="selected">[% value.lib %]</option>
187 <option value="[% value.authorised_value %]">[% value.lib %]</option>
193 <label for="minlocation">Item callnumber between: </label>
194 <input type="text" name="minlocation" id="minlocation" value="[% minlocation %]" /> (items.itemcallnumber) </li>
195 <li><label for="maxlocation">...and: </label>
196 <input type="text" name="maxlocation" id="maxlocation" value="[% maxlocation %]" />
201 <fieldset class="rows" id="optionalfilters">
202 <legend>Optional filters for inventory list or comparing barcodes</legend>
204 <div id="statuses" style="display: block;">
205 [% FOREACH status IN statuses %]
206 [% IF (status.values) %]
207 <fieldset style="float: left; padding: 5px; margin: 5px;text-align:right">
208 <legend>[% status.fieldname %]</legend>
209 <ul id="statuses-[% fieldname %]" style="display: inline;">
210 [% FOREACH value IN status.values %]
213 <label for="[% value.id %]">
214 [% IF value.authorised_value==0 %]
220 <input type="checkbox" name="status-[% status.fieldname %]-[% value.authorised_value %]" id="[% value.authorised_value %]" />
232 <label for="datelastseen">Last inventory date:</label>
233 <input type="text" id="datelastseen" name="datelastseen" value="[% datelastseen | $KohaDates %]" class="datepicker" />
234 (Skip records marked as seen on or after this date.)
237 <label for="ignoreissued">Skip items on loan: </label>
238 [% IF (ignoreissued) %]
239 <input type="checkbox" id="ignoreissued" name="ignoreissued" checked="checked" />
241 <input type="checkbox" id="ignoreissued" name="ignoreissued" />
247 <fieldset class="rows">
248 <legend>Additional options</legend>
252 <label for="CSVexport">Export to CSV file: </label>
253 <input type="checkbox" name="CSVexport" id="CSVexport" />
257 <input type="hidden" name="op" value="do_it" />
259 <fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset>
265 <form method="post" action="/cgi-bin/koha/tools/inventory.pl" class="checkboxed">
266 <input type="hidden" name="minlocation" value="[% minlocation %]" />
267 <input type="hidden" name="maxlocation" value="[% maxlocation %]" />
268 <input type="hidden" name="location" value="[% location %]" />
269 <input type="hidden" name="branchcode" value="[% branchcode %]" />
270 <input type="hidden" name="datelastseen" value="[% datelastseen %]" />
272 [% UNLESS uploadedbarcodesflag %]
273 <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>
276 <table id="inventoryt">
279 [% UNLESS uploadedbarcodesflag %]<th>Seen</th>[% END %]
293 [% FOREACH result IN loop %]
295 [% UNLESS uploadedbarcodesflag %]
297 <input type="checkbox" name="SEEN-[% result.itemnumber %]" value="1" />
301 [% result.barcode | html %]
303 <td>[% result.itemcallnumber | html %]</td>
305 [% Branches.GetName( result.homebranch ) %]
306 [% result.location | html %]
309 <a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% result.biblionumber %]" class="openWin">[% result.title | html %]</a>
310 <p>[% result.author | html %]</p>
313 [% result.notforloan | html %]
316 [% result.itemlost | html %]
319 [% result.damaged | html %]
322 [% result.withdrawn | html %]
325 [% result.datelastseen | $KohaDates | html %]
328 [% FOREACH problem IN result.problems %]
329 [% IF problem.key == 'wrongplace' %]
330 Found in wrong place<br/>
331 [% ELSIF problem.key == 'changestatus' %]
332 Unknown not-for-loan status<br/>
333 [% ELSIF problem.key == 'not_scanned' %]
334 Missing (not scanned)<br/>
335 [% ELSIF problem.key == 'checkedout' %]
336 Still checked out<br/>
337 [% ELSIF problem.key == 'no_barcode' %]
346 <div class="spacer"></div>
347 [% UNLESS uploadedbarcodesflag %]
348 <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>
349 <input type="submit" id="markseenandquit" value="Mark seen and quit" />
350 <input type="submit" value="Mark seen and continue >>" id="markseenandcontinuebutton" />
351 <input type="submit" value="Continue without marking >>" id="continuewithoutmarkingbutton" class="submit" />
360 [% INCLUDE 'tools-menu.inc' %]
363 [% INCLUDE 'intranet-bottom.inc' %]