7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Acquisitions › Receipt summary for : [% name | html %] [% IF ( invoice ) %]invoice, [% invoice | html %][% END %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
12 <body id="acq_orderreceive" class="acq">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'acquisitions-search.inc' %]
16 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% name | html %]</a> › Receive items from : [% name | html %] [% IF ( invoice ) %][[% invoice | html %]][% END %] (order #[% ordernumber | html %])</div>
18 <div class="main container-fluid">
20 <div class="col-sm-10 col-sm-push-2">
23 <h1>Receive items from : [% name | html %] [% IF ( invoice ) %][[% invoice | html %]] [% END %] (order #[% ordernumber | html %])</h1>
26 <form action="/cgi-bin/koha/acqui/finishreceive.pl" method="post" onsubmit="return Check(this);">
28 <div class="col-sm-6">
29 <div class="error" style="display:none"></div>
31 <fieldset class="rows">
32 <legend>Catalog details</legend>
33 <ol><li><span class="label">Title: </span><span class="title">[% title | html %]</span></li>
34 <li> <span class="label">Author: </span>
35 [% author | html %]</li>
36 <li><span class="label">Copyright: </span>
37 [% copyrightdate | html %]</li>
38 <li> <span class="label">ISBN: </span>
39 [% isbn | html %]</li>
40 <li> <span class="label">Series: </span>
41 [% seriestitle | html %]</li>
45 [% IF ( suggestionid ) %]
46 <fieldset class="rows">
47 <legend>Suggestion</legend>
50 <span class="label">Suggested by: </span>
51 [% surnamesuggestedby | html %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby | html %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid | html %]&op=show">suggestion #[% suggestionid | html %]</a>)
57 [% IF (AcqCreateItemReceiving) %]
58 <div id="items_list" style="display:none">
59 <p><b>Items list</b></p>
60 <div style="width:100%;overflow:auto;">
68 <th>Holding library</th>
74 <th>Inventory number</th>
75 <th>Collection code</th>
87 [% UNLESS subscriptionid %]
88 <fieldset class="rows" id="itemfieldset">
90 [% IF ( NoACQframework ) %]
92 No ACQ framework, using default. You should create a
93 framework with code ACQ, the items framework would be
97 <div id="outeritemblock"></div>
100 [% ELSIF (AcqCreateItem == 'ordering') %]
101 [% IF (items.size) %]
103 <div style="width:100%;overflow:auto">
111 <th>Holding branch</th>
112 <th>Not for loan</th>
117 <th>Inventory number</th>
118 <th>Collection code</th>
125 [% FOREACH item IN items %]
126 <tr id="item_[% item.itemnumber | html %]">
127 <td style="text-align:center"><input type="checkbox" name="items_to_receive" value="[% item.itemnumber | html %]" /></td>
128 <td><a style="cursor:pointer" onclick="PopupEditPage([% item.biblionumber | html %],[% item.itemnumber | html %]);">Edit</a></td>
129 <td>[% item.barcode | html %]</td>
130 <td>[% Branches.GetName( item.homebranch ) | html %]</td>
131 <td>[% Branches.GetName( item.holdingbranch ) | html %]</td>
132 <td>[% item.notforloan | html %]</td>
133 <td>[% item.restricted | html %]</td>
134 <td>[% item.location | html %]</td>
135 <td>[% item.itemcallnumber | html %]</td>
136 <td>[% item.copynumber | html %]</td>
137 <td>[% item.stocknumber | html %]</td>
138 <td>[% item.collection | html %]</td>
139 <td>[% item.itemtype | html %]</td>
140 <td>[% item.materials | html %]</td>
141 <td>[% item.itemnotes | html %]</td>
149 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
150 <input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
151 <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
152 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
154 <div class="col-sm-6">
155 <fieldset class="rows">
156 <legend>Accounting details</legend>
159 <label for="datereceived">Date received: </label>
160 <input type="text" size="10" id="datereceived" name="datereceived" value="[% datereceived | $KohaDates %]" class="datepicker" />
162 <li><label for="bookfund">Fund: </label><select id="bookfund" name="bookfund">
163 <option value="">Keep current ([% budget_period_description | html %] - [% bookfund | html %])</option>
164 [% FOREACH period IN budget_loop %]
165 <optgroup label="[% period.description | html %]">
166 [% FOREACH fund IN period.funds %]
167 [% IF ( fund.b_sel ) %]
168 <option value="[% fund.b_id | html %]" selected="selected">[% fund.b_txt | html %]</option>
170 <option value="[% fund.b_id | html %]">[% fund.b_txt | html %]</option>
176 <li><label> </label><span>(Current: [% budget_period_description | html %] - [% bookfund | html %])</span></li>
178 <label for="creator">Ordered by: </label>
180 [% INCLUDE 'patron-title.inc' patron = creator %]
183 <li><label for="quantity_to_receive">Quantity to receive: </label><span class="label">
184 [% IF ( edit and not subscriptionid) %]
185 <input type="text" id="quantity_to_receive" name="quantity" value="[% quantity | html %]" />
187 <input type="text" readonly="readonly" id="quantity_to_receive" name="quantity" value="[% quantity | html %]" />
190 <li><label for="quantity">Quantity received: </label>
191 [% IF (AcqCreateItemReceiving) %]
192 [% IF ( subscriptionid ) %]
193 <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="1" />
195 <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="0" />
198 [% IF ( quantityreceived ) %]
200 <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceived | html %]" />
201 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived | html %]" />
204 <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 | html %]" />
206 <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 | html %]" />
208 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived | html %]" />
211 [% IF ( subscriptionid ) %]
212 <input type="text" readonly="readonly" id="quantity" size="20" name="quantityrec" value="1" />
214 <input type="text" id="quantity" size="20" name="quantityrec" value="1" />
216 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="0" />
218 <div id="qtyrecerror" style="display:none">
219 <p class="error">Warning, you have entered more items than expected.
220 Items will not be created.</p>
222 [% END %][%# IF (AcqCreateItemReceiving) %]
225 [% IF ( gst_values ) %]
227 <label for="tax_rate">Tax rate: </label>
228 <select name="tax_rate" id="tax_rate">
229 [% FOREACH gst IN gst_values %]
230 [% IF gst.option == tax_rate %]
231 <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
233 <option value="[% gst.option | html %]">[% gst.option * 100 | html %]%</option>
239 <input type="hidden" name="tax_rate" value="0" />
242 <li><label for="rrp">Retail price: </label>[% rrp | $Price | html %]</li>
244 <label for="replacementprice">Replacement price:</label>
245 <input type="text" size="20" name="replacementprice" id="replacementprice" value="[% replacementprice | $Price | html %]" />
247 <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price | html %]</li>
249 <label for="unitprice">Actual cost:</label>
250 <input type="text" size="20" name="unitprice" id="unitprice" value="[% unitprice | $Price on_editing => 1 | html %]" />
252 <li><label for="order_internalnote">Internal note: </label><textarea name="order_internalnote" width="40" rows="8" >[% order_internalnote | html %]</textarea></li>
253 [% IF order_vendornote %]
254 <li><label for="order_vendornote">Vendor note: </label><span>[% order_vendornote | html %]</span></li>
260 </div><div class="row"><fieldset class="action">
261 <input type="submit" value="Save" class="button" accesskey="w" />
262 <a class="cancel" href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | html %]&sticky_filters=1">Cancel</a>
263 </fieldset></div> </form>
265 This ordernumber does not exist.
269 </div> <!-- /.col-sm-10.col-sm-push-2 -->
271 <div class="col-sm-2 col-sm-pull-10">
273 [% INCLUDE 'acquisitions-menu.inc' %]
275 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
276 </div> <!-- /.row -->
277 [% MACRO jsinclude BLOCK %]
278 [% Asset.js("js/acquisitions-menu.js") | $raw %]
279 [% INCLUDE 'calendar.inc' %]
280 [% INCLUDE 'additem.js.inc' %]
281 [% Asset.js("js/additem.js") | $raw %]
282 [% Asset.js("js/cataloging.js") | $raw %]
283 [% Asset.js("js/prevent_submit.js") | $raw %]
285 function Check(form) {
286 [% IF (AcqCreateItemReceiving) %]
287 var total_errors = CheckMandatorySubfields(form);
288 if (total_errors != 0) {
289 var alertString = _("Form not submitted because of the following problem(s)");
290 alertString += "\n------------------------------------------------------------------------------------\n";
291 alertString += "\n- " + _("%s mandatory fields empty (highlighted)").format(total_errors);
296 if(check_additem('[% UniqueItemFields | html %]') == false){
297 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
301 // Remove last itemblock if it is not in items_list
302 var lastitemblock = $("#outeritemblock > div:last");
303 var tobedeleted = true;
304 var listitems = $("#items_list tr");
305 $(listitems).each(function(){
306 if($(this).attr('idblock') == $(lastitemblock).attr('id')){
311 $(lastitemblock).remove();
314 if(check_additem('[% UniqueItemFields | html %]') == false){
315 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
317 $(lastitemblock).appendTo("#outeritemblock");
326 [% IF (AcqCreateItem == 'ordering') %]
327 var items_columns = [null, null, 'barcode', 'homebranchname',
328 'holdingbranchname', 'notforloan', 'restricted', 'location',
329 'itemcallnumber', 'copynumber', 'stocknumber', 'collection',
330 'itemtype', 'materials', 'itemnotes'];
332 function PopupEditPage(biblionumber, itemnumber) {
333 var url = "/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber="
334 + biblionumber + "&itemnumber=" + itemnumber + "&popup=1#edititem";
335 var w = window.open(url);
336 var watchClose = setInterval(function() {
338 clearTimeout(watchClose);
339 $.getJSON('/cgi-bin/koha/catalogue/getitem-ajax.pl',
341 'itemnumber': itemnumber
344 var tds = $("#item_"+itemnumber+" td");
345 for(var i=2; i<tds.length; i++) {
346 var column = items_columns[i];
347 var text = item[column];
348 if ( text == null ) text = '';
349 $(tds[i]).text(text);
357 function CalcQtyToReceive() {
358 var qty = $("input[name='items_to_receive']:checked").length;
359 $("#quantity").val(qty);
362 function CheckNItems(n) {
363 $("input[name='items_to_receive']").each(function() {
364 $(this).prop('checked', false);
366 $("input[name='items_to_receive']:lt("+n+")").each(function () {
367 $(this).prop('checked', true);
372 $(document).ready(function() {
373 [% IF (AcqCreateItemReceiving) %]
374 cloneItemBlock(0, '[% UniqueItemFields | html %]');
375 [% ELSIF (AcqCreateItem == 'ordering') && not subscriptionid %]
376 $("input[name='items_to_receive']").change(function() {
380 $("#quantity").keyup(function() {
381 var qty = parseInt($("#quantity").val());
382 var qtyto = parseInt($("#quantity_to_receive").val());
384 $("#qtyrecerror").show();
386 $("#qtyrecerror").hide();
388 CheckNItems($(this).val());
395 [% INCLUDE 'intranet-bottom.inc' %]