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 id="doc3" class="yui-t2">
24 <h1>Receive items from : [% name | html %] [% IF ( invoice ) %][[% invoice | html %]] [% END %] (order #[% ordernumber | html %])</h1>
27 <form action="/cgi-bin/koha/acqui/finishreceive.pl" method="post" onsubmit="return Check(this);">
29 <div class="yui-u first">
30 <div class="error" style="display:none"></div>
32 <fieldset class="rows">
33 <legend>Catalog details</legend>
34 <ol><li><span class="label">Title: </span><span class="title">[% title | html %]</span></li>
35 <li> <span class="label">Author: </span>
36 [% author | html %]</li>
37 <li><span class="label">Copyright: </span>
38 [% copyrightdate | html %]</li>
39 <li> <span class="label">ISBN: </span>
40 [% isbn | html %]</li>
41 <li> <span class="label">Series: </span>
42 [% seriestitle | html %]</li>
46 [% IF ( suggestionid ) %]
47 <fieldset class="rows">
48 <legend>Suggestion</legend>
51 <span class="label">Suggested by: </span>
52 [% surnamesuggestedby | html %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby | html %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid | html %]&op=show">suggestion #[% suggestionid | html %]</a>)
58 [% IF (AcqCreateItemReceiving) %]
59 <div id="items_list" style="display:none">
60 <p><b>Items list</b></p>
61 <div style="width:100%;overflow:auto;">
69 <th>Holding library</th>
75 <th>Inventory number</th>
76 <th>Collection code</th>
88 [% UNLESS subscriptionid %]
89 <fieldset class="rows" id="itemfieldset">
91 [% IF ( NoACQframework ) %]
93 No ACQ framework, using default. You should create a
94 framework with code ACQ, the items framework would be
98 <div id="outeritemblock"></div>
101 [% ELSIF (AcqCreateItem == 'ordering') %]
102 [% IF (items.size) %]
104 <div style="width:100%;overflow:auto">
112 <th>Holding branch</th>
113 <th>Not for loan</th>
118 <th>Inventory number</th>
119 <th>Collection code</th>
126 [% FOREACH item IN items %]
127 <tr id="item_[% item.itemnumber | html %]">
128 <td style="text-align:center"><input type="checkbox" name="items_to_receive" value="[% item.itemnumber | html %]" /></td>
129 <td><a style="cursor:pointer" onclick="PopupEditPage([% item.biblionumber | html %],[% item.itemnumber | html %]);">Edit</a></td>
130 <td>[% item.barcode | html %]</td>
131 <td>[% Branches.GetName( item.homebranch ) | html %]</td>
132 <td>[% Branches.GetName( item.holdingbranch ) | html %]</td>
133 <td>[% item.notforloan | html %]</td>
134 <td>[% item.restricted | html %]</td>
135 <td>[% item.location | html %]</td>
136 <td>[% item.itemcallnumber | html %]</td>
137 <td>[% item.copynumber | html %]</td>
138 <td>[% item.stocknumber | html %]</td>
139 <td>[% item.collection | html %]</td>
140 <td>[% item.itemtype | html %]</td>
141 <td>[% item.materials | html %]</td>
142 <td>[% item.itemnotes | html %]</td>
150 <input type="hidden" name="biblionumber" value="[% biblionumber | html %]" />
151 <input type="hidden" name="invoiceid" value="[% invoiceid | html %]" />
152 <input type="hidden" name="ordernumber" value="[% ordernumber | html %]" />
153 <input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
156 <fieldset class="rows">
157 <legend>Accounting details</legend>
160 <label for="datereceived">Date received: </label>
161 <input type="text" size="10" id="datereceived" name="datereceived" value="[% datereceived | $KohaDates %]" class="datepicker" />
163 <li><label for="bookfund">Fund: </label><select id="bookfund" name="bookfund">
164 <option value="">Keep current ([% budget_period_description | html %] - [% bookfund | html %])</option>
165 [% FOREACH period IN budget_loop %]
166 <optgroup label="[% period.description | html %]">
167 [% FOREACH fund IN period.funds %]
168 [% IF ( fund.b_sel ) %]
169 <option value="[% fund.b_id | html %]" selected="selected">[% fund.b_txt | html %]</option>
171 <option value="[% fund.b_id | html %]">[% fund.b_txt | html %]</option>
177 <li><label> </label><span>(Current: [% budget_period_description | html %] - [% bookfund | html %])</span></li>
179 <label for="creator">Ordered by: </label>
181 [% INCLUDE 'patron-title.inc' patron = creator %]
184 <li><label for="quantity_to_receive">Quantity to receive: </label><span class="label">
185 [% IF ( edit and not subscriptionid) %]
186 <input type="text" id="quantity_to_receive" name="quantity" value="[% quantity | html %]" />
188 <input type="text" readonly="readonly" id="quantity_to_receive" name="quantity" value="[% quantity | html %]" />
191 <li><label for="quantity">Quantity received: </label>
192 [% IF (AcqCreateItemReceiving) %]
193 [% IF ( subscriptionid ) %]
194 <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="1" />
196 <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="0" />
199 [% IF ( quantityreceived ) %]
201 <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceived | html %]" />
202 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived | html %]" />
205 <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 | html %]" />
207 <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 | html %]" />
209 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived | html %]" />
212 [% IF ( subscriptionid ) %]
213 <input type="text" readonly="readonly" id="quantity" size="20" name="quantityrec" value="1" />
215 <input type="text" id="quantity" size="20" name="quantityrec" value="1" />
217 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="0" />
219 <div id="qtyrecerror" style="display:none">
220 <p class="error">Warning, you have entered more items than expected.
221 Items will not be created.</p>
223 [% END %][%# IF (AcqCreateItemReceiving) %]
226 [% IF ( gst_values ) %]
228 <label for="tax_rate">Tax rate: </label>
229 <select name="tax_rate" id="tax_rate">
230 [% FOREACH gst IN gst_values %]
231 [% IF gst.option == tax_rate %]
232 <option value="[% gst.option | html %]" selected="selected">[% gst.option * 100 | html %]%</option>
234 <option value="[% gst.option | html %]">[% gst.option * 100 | html %]%</option>
240 <input type="hidden" name="tax_rate" value="0" />
243 <li><label for="rrp">Replacement cost: </label>[% rrp | $Price | html %]</li>
244 <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price | html %]</li>
246 <label for="unitprice">Actual cost:</label>
247 <input type="text" size="20" name="unitprice" id="unitprice" value="[% unitprice | $Price on_editing => 1 | html %]" />
249 <li><label for="order_internalnote">Internal note: </label><textarea name="order_internalnote" width="40" rows="8" >[% order_internalnote | html %]</textarea></li>
250 [% IF order_vendornote %]
251 <li><label for="order_vendornote">Vendor note: </label><span>[% order_vendornote | html %]</span></li>
257 </div><div class="yui-g"><fieldset class="action">
258 <input type="submit" value="Save" class="button" accesskey="w" />
259 <a class="cancel" href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid | html %]&sticky_filters=1">Cancel</a>
260 </fieldset></div> </form>
262 This ordernumber does not exist.
268 [% INCLUDE 'acquisitions-menu.inc' %]
272 [% MACRO jsinclude BLOCK %]
273 [% Asset.js("js/acquisitions-menu.js") | $raw %]
274 [% INCLUDE 'calendar.inc' %]
275 [% INCLUDE 'additem.js.inc' %]
276 [% Asset.js("js/additem.js") | $raw %]
277 [% Asset.js("js/cataloging.js") | $raw %]
278 [% Asset.js("js/prevent_submit.js") | $raw %]
279 <script type="text/javascript">
280 function Check(form) {
281 [% IF (AcqCreateItemReceiving) %]
282 var total_errors = CheckMandatorySubfields(form);
283 if (total_errors != 0) {
284 var alertString = _("Form not submitted because of the following problem(s)");
285 alertString += "\n------------------------------------------------------------------------------------\n";
286 alertString += "\n- " + _("%s mandatory fields empty (highlighted)").format(total_errors);
291 if(check_additem('[% UniqueItemFields | html %]') == false){
292 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
296 // Remove last itemblock if it is not in items_list
297 var lastitemblock = $("#outeritemblock > div:last");
298 var tobedeleted = true;
299 var listitems = $("#items_list tr");
300 $(listitems).each(function(){
301 if($(this).attr('idblock') == $(lastitemblock).attr('id')){
306 $(lastitemblock).remove();
309 if(check_additem('[% UniqueItemFields | html %]') == false){
310 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
312 $(lastitemblock).appendTo("#outeritemblock");
321 [% IF (AcqCreateItem == 'ordering') %]
322 var items_columns = [null, null, 'barcode', 'homebranchname',
323 'holdingbranchname', 'notforloan', 'restricted', 'location',
324 'itemcallnumber', 'copynumber', 'stocknumber', 'collection',
325 'itemtype', 'materials', 'itemnotes'];
327 function PopupEditPage(biblionumber, itemnumber) {
328 var url = "/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber="
329 + biblionumber + "&itemnumber=" + itemnumber + "&popup=1#edititem";
330 var w = window.open(url);
331 var watchClose = setInterval(function() {
333 clearTimeout(watchClose);
334 $.getJSON('/cgi-bin/koha/catalogue/getitem-ajax.pl',
336 'itemnumber': itemnumber
339 var tds = $("#item_"+itemnumber+" td");
340 for(var i=2; i<tds.length; i++) {
341 var column = items_columns[i];
342 var text = item[column];
343 if ( text == null ) text = '';
344 $(tds[i]).text(text);
352 function CalcQtyToReceive() {
353 var qty = $("input[name='items_to_receive']:checked").length;
354 $("#quantity").val(qty);
357 function CheckNItems(n) {
358 $("input[name='items_to_receive']").each(function() {
359 $(this).prop('checked', false);
361 $("input[name='items_to_receive']:lt("+n+")").each(function () {
362 $(this).prop('checked', true);
367 $(document).ready(function() {
368 [% IF (AcqCreateItemReceiving) %]
369 cloneItemBlock(0, '[% UniqueItemFields | html %]');
370 [% ELSIF (AcqCreateItem == 'ordering') && not subscriptionid %]
371 $("input[name='items_to_receive']").change(function() {
375 $("#quantity").keyup(function() {
376 var qty = parseInt($("#quantity").val());
377 var qtyto = parseInt($("#quantity_to_receive").val());
379 $("#qtyrecerror").show();
381 $("#qtyrecerror").hide();
383 CheckNItems($(this).val());
390 [% INCLUDE 'intranet-bottom.inc' %]