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(){
96 <body id="tools_inventory" class="tools">
97 [% INCLUDE 'header.inc' %]
98 [% INCLUDE 'cat-search.inc' %]
100 <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>
102 <div id="doc3" class="yui-t2">
108 [% IF (moddatecount) %]<div class="dialog message">[% moddatecount %] items modified : datelastseen set to [% date | $KohaDates %]</div>
109 <div class="dialog alert">Number of potential barcodes read: [% LinesRead %]</div>[% END %]
110 [% IF (errorfile) %]<div class="dialog alert">[% errorfile %] can't be opened</div>[% END %]
111 [% IF (err_length && err_length==1) %]<div class="dialog alert">There was 1 barcode that was too long.</div>[% END %]
112 [% IF (err_length && err_length>1) %]<div class="dialog alert">There were [% err_length %] barcodes that were too long.</div>[% END %]
113 [% IF (err_data && err_data==1) %]<div class="dialog alert">There was 1 barcode that contained at least one unprintable character.</div>[% END %]
114 [% IF (err_data && err_data>1) %]<div class="dialog alert">There were [% err_data %] barcodes that contained at least one unprintable character.</div>[% END %]
115 [% FOREACH error IN errorloop %]
116 <div class="dialog alert">
118 [% IF (error.ERR_BARCODE) %]: barcode not found[% END %]
119 [% IF (error.ERR_WTHDRAWN) %]: item withdrawn[% END %]
120 [% IF (error.ERR_ONLOAN_RET) %]: item was on loan. It was returned before marked as seen[% END %]
121 [% IF (error.ERR_ONLOAN_NOT_RET) %]: item was on loan. couldn't be returned.[% END %]
126 <form method="post" id="inventory_form" action="/cgi-bin/koha/tools/inventory.pl" enctype="multipart/form-data">
127 <fieldset class="rows">
128 <legend>Use a barcode file</legend>
130 <li><label for="uploadbarcodes">Barcode file: </label> <input type="file" id="uploadbarcodes" name="uploadbarcodes" /></li>
131 <li><label for="setdate">Set inventory date to:</label> <input type="text" id="setdate" name="setdate" value="[% today | $KohaDates %]" class="datepickerfrom" />
136 <fieldset class="rows">
137 <legend>Select items you want to check</legend>
139 <label for="branch">Library: </label>
140 <input type="radio" name="branch" value="homebranch"> Home library</input>
141 <input type="radio" name="branch" value="holdingbranch"> Current library</input>
143 <label for="branchloop">Library: </label><select id="branchloop" name="branchcode" style="width:12em;">
144 <option value="">All libraries</option>
145 [% PROCESS options_for_libraries libraries => Branches.all( selected => branchcode, unfiltered => 1, ) %]
148 [% IF (authorised_values) %]
150 <label for="locationloop">Shelving location (items.location) is: </label>
151 <select id="locationloop" name="location">
152 <option value="">Filter location</option>
153 [% FOREACH value IN authorised_values %]
154 [% IF (value.selected) %]
155 <option value="[% value.authorised_value %]" selected="selected">[% value.lib %]</option>
157 <option value="[% value.authorised_value %]">[% value.lib %]</option>
163 <label for="minlocation">Item callnumber between: </label>
164 <input type="text" name="minlocation" id="minlocation" value="[% minlocation %]" /> (items.itemcallnumber) </li>
165 <li><label for="maxlocation">...and: </label>
166 <input type="text" name="maxlocation" id="maxlocation" value="[% maxlocation %]" />
171 <fieldset class="rows">
172 <legend>Item statuses</legend>
173 <div id="statuses" style="display: block;">
174 [% FOREACH status IN statuses %]
175 [% IF (status.values) %]
176 <fieldset style="float: left; padding: 5px; margin: 5px;text-align:right">
177 <legend>[% status.fieldname %]</legend>
178 <ul id="statuses-[% fieldname %]" style="display: inline;">
179 [% FOREACH value IN status.values %]
180 [% IF (value.lib) %]<li>
181 <label for="[% value.id %]">
184 <input type="checkbox" name="status-[% status.fieldname %]-[% value.authorised_value %]" id="[% value.authorised_value %]" />
193 <fieldset class="rows">
197 <li><label for="datelastseen">Inventory date:</label>
198 <input type="text" id="datelastseen" name="datelastseen" value="[% datelastseen | $KohaDates %]" class="datepickerfrom" />
200 <li><label for="ignoreissued">Skip items on loan: </label>
201 [% IF (ignoreissued) %]
202 <input type="checkbox" id="ignoreissued" name="ignoreissued" checked="checked" /></li>
204 <input type="checkbox" id="ignoreissued" name="ignoreissued" /></li>
207 <label for="CSVexport">Export to CSV file: </label>
208 <input type="checkbox" name="CSVexport" id="CSVexport" />
211 <label for="compareinv2barcd">Compare barcodes list to results: </label>
212 <input type="checkbox" name="compareinv2barcd" id="compareinv2barcd" />
215 <label for="dont_checkin">Do not check in items scanned during inventory: </label>
216 <input type="checkbox" name="dont_checkin" id="dont_checkin" />
220 <input type="hidden" name="op" value="do_it" />
222 <fieldset class="action"><input type="submit" value="Submit" class="button" /></fieldset>
228 <form method="post" action="/cgi-bin/koha/tools/inventory.pl" class="checkboxed">
229 <input type="hidden" name="markseen" value="1" />
230 <input type="hidden" name="minlocation" value="[% minlocation %]" />
231 <input type="hidden" name="maxlocation" value="[% maxlocation %]" />
232 <input type="hidden" name="location" value="[% location %]" />
233 <input type="hidden" name="branchcode" value="[% branchcode %]" />
234 <input type="hidden" name="datelastseen" value="[% datelastseen %]" />
236 [% UNLESS compareinv2barcd %]
237 <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>
240 <table id="inventoryt">
243 [% UNLESS compareinv2barcd %]<th>Seen</th>[% END %]
256 [% FOREACH result IN loop %]
258 [% UNLESS compareinv2barcd %]
260 <input type="checkbox" name="SEEN-[% result.itemnumber %]" value="1" />
264 [% result.barcode | html %]
267 [% Branches.GetName( result.homebranch ) %]
268 [% result.location | html %] [% IF ( result.itemcallnumber ) %][[% result.itemcallnumber | html %]][% ELSE %][% END %]
271 <p><a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% result.biblionumber %]" class="openWin">[% result.title | html %]</a></p><p>[% result.author | html %]</p>
274 [% result.notforloan | html %]
277 [% result.itemlost | html %]
280 [% result.damaged | html %]
283 [% result.withdrawn | html %]
286 [% result.datelastseen | $KohaDates | html %]
289 [% IF result.problem == 'wrongplace' %]
290 <p>Item should not have been scanned</p>
291 [% ELSIF result.problem == 'missingitem' %]
293 [% ELSIF result.problem == 'changestatus' %]
294 <p>Change item status</p>
295 [% ELSIF result.problem == 'not_scanned' %]
296 <p>Item should have been scanned</p>
303 <div class="spacer"></div>
304 [% UNLESS compareinv2barcd %]
305 <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>
306 <input type="submit" id="markseenandquit" value="Mark seen and quit" />
307 <input type="submit" value="Mark seen and continue >>" id="markseenandcontinuebutton" />
308 <input type="submit" value="Continue without marking >>" id="continuewithoutmarkingbutton" class="submit" />
317 [% INCLUDE 'tools-menu.inc' %]
320 [% INCLUDE 'intranet-bottom.inc' %]