6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Acquisitions › Receipt summary for : [% name %] [% IF ( invoice ) %]invoice, [% invoice %][% END %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
11 <body id="acq_orderreceive" class="acq">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'acquisitions-search.inc' %]
15 <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 %]">[% name %]</a> › Receive items from : [% name %] [% IF ( invoice ) %][[% invoice |html %]][% END %] (order #[% ordernumber %])</div>
17 <div id="doc3" class="yui-t2">
23 <h1>Receive items from : [% name %] [% IF ( invoice ) %][[% invoice |html %]] [% END %] (order #[% ordernumber %])</h1>
26 <form action="/cgi-bin/koha/acqui/finishreceive.pl" method="post" onsubmit="return Check(this);">
28 <div class="yui-u first">
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>
36 <li><span class="label">Copyright: </span>
37 [% copyrightdate %]</li>
38 <li> <span class="label">ISBN: </span>
40 <li> <span class="label">Series: </span>
41 [% seriestitle %]</li>
45 [% IF ( suggestionid ) %]
46 <fieldset class="rows">
47 <legend>Suggestion</legend>
50 <span class="label">Suggested by: </span>
51 [% surnamesuggestedby %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid %]&op=show">suggestion #[% suggestionid %]</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 %]">
127 <td style="text-align:center"><input type="checkbox" name="items_to_receive" value="[% item.itemnumber %]" /></td>
128 <td><a style="cursor:pointer" onclick="PopupEditPage([% item.biblionumber %],[% item.itemnumber %]);">Edit</a></td>
129 <td>[% item.barcode %]</td>
130 <td>[% Branches.GetName( item.homebranch )%]</td>
131 <td>[% Branches.GetName( item.holdingbranch ) %]</td>
132 <td>[% item.notforloan %]</td>
133 <td>[% item.restricted %]</td>
134 <td>[% item.location %]</td>
135 <td>[% item.itemcallnumber %]</td>
136 <td>[% item.copynumber %]</td>
137 <td>[% item.stocknumber %]</td>
138 <td>[% item.collection %]</td>
139 <td>[% item.itemtype %]</td>
140 <td>[% item.materials %]</td>
141 <td>[% item.itemnotes %]</td>
149 <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
150 <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
151 <input type="hidden" name="ordernumber" value="[% ordernumber %]" />
152 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
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 %] - [% bookfund %])</option>
164 [% FOREACH period IN budget_loop %]
165 <optgroup label="[% period.description %]">
166 [% FOREACH fund IN period.funds %]
167 [% IF ( fund.b_sel ) %]
168 <option value="[% fund.b_id %]" selected="selected">[% fund.b_txt %]</option>
170 <option value="[% fund.b_id %]">[% fund.b_txt %]</option>
175 <li><label> </label><span>(Current: [% budget_period_description %] - [% bookfund %])</span></li>
176 <li><label for="creator">Created by: </label><span> [% IF ( memberfirstname and membersurname ) %][% IF ( memberfirstname ) %][% memberfirstname %][% END %] [% membersurname %][% ELSE %]No name[% END %]</span></li>
177 <li><label for="quantity_to_receive">Quantity to receive: </label><span class="label">
178 [% IF ( edit and not subscriptionid) %]
179 <input type="text" id="quantity_to_receive" name="quantity" value="[% quantity %]" />
181 <input type="text" readonly="readonly" id="quantity_to_receive" name="quantity" value="[% quantity %]" />
184 <li><label for="quantity">Quantity received: </label>
185 [% IF (AcqCreateItemReceiving) %]
186 [% IF ( subscriptionid ) %]
187 <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="1" />
189 <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="0" />
192 [% IF ( quantityreceived ) %]
194 <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceived %]" />
195 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived %]" />
198 <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 %]" />
200 <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 %]" />
202 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived %]" />
205 [% IF ( subscriptionid ) %]
206 <input type="text" readonly="readonly" id="quantity" size="20" name="quantityrec" value="1" />
208 <input type="text" id="quantity" size="20" name="quantityrec" value="1" />
210 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="0" />
212 <div id="qtyrecerror" style="display:none">
213 <p class="error">Warning, you have entered more items than expected.
214 Items will not be created.</p>
216 [% END %][%# IF (AcqCreateItemReceiving) %]
219 [% IF ( gst_values ) %]
221 <label for="tax_rate">Tax rate: </label>
222 <select name="tax_rate" id="tax_rate">
223 [% FOREACH gst IN gst_values %]
224 [% IF gst.option == tax_rate %]
225 <option value="[% gst.option %]" selected="selected">[% gst.option * 100 %]%</option>
227 <option value="[% gst.option %]">[% gst.option * 100 %]%</option>
233 <input type="hidden" name="tax_rate" value="0" />
236 <li><label for="rrp">Replacement cost: </label>[% rrp | $Price %]</li>
237 <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price %]</li>
239 <label for="unitprice">Actual cost:</label>
240 <input type="text" size="20" name="unitprice" id="unitprice" value="[% unitprice | $Price on_editing => 1 %]" />
242 <li><label for="order_internalnote">Internal note: </label><textarea name="order_internalnote" width="40" rows="8" >[% order_internalnote %]</textarea></li>
243 [% IF order_vendornote %]
244 <li><label for="order_vendornote">Vendor note: </label><span>[% order_vendornote %]</span></li>
250 </div><div class="yui-g"><fieldset class="action">
251 <input type="submit" value="Save" class="button" accesskey="w" />
252 <a class="cancel" href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]&sticky_filters=1">Cancel</a>
253 </fieldset></div> </form>
255 This ordernumber does not exist.
261 [% INCLUDE 'acquisitions-menu.inc' %]
265 [% MACRO jsinclude BLOCK %]
266 [% Asset.js("js/acquisitions-menu.js") %]
267 [% INCLUDE 'calendar.inc' %]
268 [% INCLUDE 'additem.js.inc' %]
269 [% Asset.js("js/additem.js") %]
270 [% Asset.js("js/cataloging.js") %]
271 [% Asset.js("js/prevent_submit.js") %]
272 <script type="text/javascript">
273 function Check(form) {
274 [% IF (AcqCreateItemReceiving) %]
275 var total_errors = CheckMandatorySubfields(form);
276 if (total_errors != 0) {
277 var alertString = _("Form not submitted because of the following problem(s)");
278 alertString += "\n------------------------------------------------------------------------------------\n";
279 alertString += "\n- " + _("%s mandatory fields empty (highlighted)").format(total_errors);
284 if(check_additem('[% UniqueItemFields %]') == false){
285 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
289 // Remove last itemblock if it is not in items_list
290 var lastitemblock = $("#outeritemblock > div:last");
291 var tobedeleted = true;
292 var listitems = $("#items_list tr");
293 $(listitems).each(function(){
294 if($(this).attr('idblock') == $(lastitemblock).attr('id')){
299 $(lastitemblock).remove();
302 if(check_additem('[% UniqueItemFields %]') == false){
303 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
305 $(lastitemblock).appendTo("#outeritemblock");
314 [% IF (AcqCreateItem == 'ordering') %]
315 var items_columns = [null, null, 'barcode', 'homebranchname',
316 'holdingbranchname', 'notforloan', 'restricted', 'location',
317 'itemcallnumber', 'copynumber', 'stocknumber', 'collection',
318 'itemtype', 'materials', 'itemnotes'];
320 function PopupEditPage(biblionumber, itemnumber) {
321 var url = "/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber="
322 + biblionumber + "&itemnumber=" + itemnumber + "&popup=1#edititem";
323 var w = window.open(url);
324 var watchClose = setInterval(function() {
326 clearTimeout(watchClose);
327 $.getJSON('/cgi-bin/koha/catalogue/getitem-ajax.pl',
329 'itemnumber': itemnumber
332 var tds = $("#item_"+itemnumber+" td");
333 for(var i=2; i<tds.length; i++) {
334 var column = items_columns[i];
335 var text = item[column];
336 if ( text == null ) text = '';
337 $(tds[i]).text(text);
345 function CalcQtyToReceive() {
346 var qty = $("input[name='items_to_receive']:checked").length;
347 $("#quantity").val(qty);
350 function CheckNItems(n) {
351 $("input[name='items_to_receive']").each(function() {
352 $(this).prop('checked', false);
354 $("input[name='items_to_receive']:lt("+n+")").each(function () {
355 $(this).prop('checked', true);
360 $(document).ready(function() {
361 [% IF (AcqCreateItemReceiving) %]
362 cloneItemBlock(0, '[% UniqueItemFields %]');
363 [% ELSIF (AcqCreateItem == 'ordering') && not subscriptionid %]
364 $("input[name='items_to_receive']").change(function() {
368 $("#quantity").keyup(function() {
369 var qty = parseInt($("#quantity").val());
370 var qtyto = parseInt($("#quantity_to_receive").val());
372 $("#qtyrecerror").show();
374 $("#qtyrecerror").hide();
376 CheckNItems($(this).val());
383 [% INCLUDE 'intranet-bottom.inc' %]