5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Acquisitions › Receipt summary for : [% name %] [% IF ( invoice ) %]invoice, [% invoice %][% END %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
10 <body id="acq_orderreceive" class="acq">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'acquisitions-search.inc' %]
14 <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>
16 <div id="doc3" class="yui-t2">
22 <h1>Receive items from : [% name %] [% IF ( invoice ) %][[% invoice |html %]] [% END %] (order #[% ordernumber %])</h1>
25 <form action="/cgi-bin/koha/acqui/finishreceive.pl" method="post" onsubmit="return Check(this);">
27 <div class="yui-u first">
28 <div class="error" style="display:none"></div>
30 <fieldset class="rows">
31 <legend>Catalog details</legend>
32 <ol><li><span class="label">Title: </span><span class="title">[% title |html %]</span></li>
33 <li> <span class="label">Author: </span>
35 <li><span class="label">Copyright: </span>
36 [% copyrightdate %]</li>
37 <li> <span class="label">ISBN: </span>
39 <li> <span class="label">Series: </span>
40 [% seriestitle %]</li>
44 [% IF ( suggestionid ) %]
45 <fieldset class="rows">
46 <legend>Suggestion</legend>
49 <span class="label">Suggested by: </span>
50 [% surnamesuggestedby %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid %]&op=show">suggestion #[% suggestionid %]</a>)
56 [% IF (AcqCreateItemReceiving) %]
57 <div id="items_list" style="display:none">
58 <p><b>Items list</b></p>
59 <div style="width:100%;overflow:auto;">
67 <th>Holding library</th>
73 <th>Inventory number</th>
74 <th>Collection code</th>
86 [% UNLESS subscriptionid %]
87 <fieldset class="rows" id="itemfieldset">
89 [% IF ( NoACQframework ) %]
91 No ACQ framework, using default. You should create a
92 framework with code ACQ, the items framework would be
96 <div id="outeritemblock"></div>
99 [% ELSIF (AcqCreateItem == 'ordering') %]
100 [% IF (items.size) %]
102 <div style="width:100%;overflow:auto">
110 <th>Holding branch</th>
111 <th>Not for loan</th>
116 <th>Inventory number</th>
117 <th>Collection code</th>
124 [% FOREACH item IN items %]
125 <tr id="item_[% item.itemnumber %]">
126 <td style="text-align:center"><input type="checkbox" name="items_to_receive" value="[% item.itemnumber %]" /></td>
127 <td><a style="cursor:pointer" onclick="PopupEditPage([% item.biblionumber %],[% item.itemnumber %]);">Edit</a></td>
128 <td>[% item.barcode %]</td>
129 <td>[% Branches.GetName( item.homebranch )%]</td>
130 <td>[% Branches.GetName( item.holdingbranch ) %]</td>
131 <td>[% item.notforloan %]</td>
132 <td>[% item.restricted %]</td>
133 <td>[% item.location %]</td>
134 <td>[% item.itemcallnumber %]</td>
135 <td>[% item.copynumber %]</td>
136 <td>[% item.stocknumber %]</td>
137 <td>[% item.collection %]</td>
138 <td>[% item.itemtype %]</td>
139 <td>[% item.materials %]</td>
140 <td>[% item.itemnotes %]</td>
148 <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
149 <input type="hidden" name="invoiceid" value="[% invoiceid %]" />
150 <input type="hidden" name="ordernumber" value="[% ordernumber %]" />
151 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
154 <fieldset class="rows">
155 <legend>Accounting details</legend>
158 <label for="datereceived">Date received: </label>
159 <input type="text" size="10" id="datereceived" name="datereceived" value="[% datereceived | $KohaDates %]" class="datepicker" />
161 <li><label for="bookfund">Fund: </label><select id="bookfund" name="bookfund">
162 <option value="">Keep current ([% budget_period_description %] - [% bookfund %])</option>
163 [% FOREACH period IN budget_loop %]
164 <optgroup label="[% period.description %]">
165 [% FOREACH fund IN period.funds %]
166 [% IF ( fund.b_sel ) %]
167 <option value="[% fund.b_id %]" selected="selected">[% fund.b_txt %]</option>
169 <option value="[% fund.b_id %]">[% fund.b_txt %]</option>
174 <li><label> </label><span>(Current: [% budget_period_description %] - [% bookfund %])</span></li>
175 <li><label for="creator">Created by: </label><span> [% IF ( memberfirstname and membersurname ) %][% IF ( memberfirstname ) %][% memberfirstname %][% END %] [% membersurname %][% ELSE %]No name[% END %]</span></li>
176 <li><label for="quantity_to_receive">Quantity to receive: </label><span class="label">
177 [% IF ( edit and not subscriptionid) %]
178 <input type="text" id="quantity_to_receive" name="quantity" value="[% quantity %]" />
180 <input type="text" readonly="readonly" id="quantity_to_receive" name="quantity" value="[% quantity %]" />
183 <li><label for="quantity">Quantity received: </label>
184 [% IF (AcqCreateItemReceiving) %]
185 [% IF ( subscriptionid ) %]
186 <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="1" />
188 <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="0" />
191 [% IF ( quantityreceived ) %]
193 <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceived %]" />
194 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived %]" />
197 <input readonly="readonly" type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 %]" />
199 <input type="text" size="20" name="quantityrec" id="quantity" value="[% quantityreceivedplus1 %]" />
201 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="[% quantityreceived %]" />
204 [% IF ( subscriptionid ) %]
205 <input type="text" readonly="readonly" id="quantity" size="20" name="quantityrec" value="1" />
207 <input type="text" id="quantity" size="20" name="quantityrec" value="1" />
209 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="0" />
211 <div id="qtyrecerror" style="display:none">
212 <p class="error">Warning, you have entered more items than expected.
213 Items will not be created.</p>
215 [% END %][%# IF (AcqCreateItemReceiving) %]
218 [% IF ( gst_values ) %]
220 <label for="tax_rate">Tax rate: </label>
221 <select name="tax_rate" id="tax_rate">
222 [% FOREACH gst IN gst_values %]
223 [% IF gst.option == tax_rate %]
224 <option value="[% gst.option %]" selected="selected">[% gst.option * 100 %]%</option>
226 <option value="[% gst.option %]">[% gst.option * 100 %]%</option>
232 <input type="hidden" name="tax_rate" value="0" />
235 <li><label for="rrp">Replacement cost: </label>[% rrp | $Price %]</li>
236 <li><label for="ecost">Budgeted cost: </label>[% ecost | $Price %]</li>
238 <label for="unitprice">Actual cost:</label>
239 <input type="text" size="20" name="unitprice" id="unitprice" value="[% unitprice | $Price %]" />
241 <li><label for="order_internalnote">Internal note: </label><textarea name="order_internalnote" width="40" rows="8" >[% order_internalnote %]</textarea></li>
242 [% IF order_vendornote %]
243 <li><label for="order_vendornote">Vendor note: </label><span>[% order_vendornote %]</span></li>
249 </div><div class="yui-g"><fieldset class="action">
250 <input type="submit" value="Save" class="button" accesskey="w" />
251 <a class="cancel" href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]&sticky_filters=1">Cancel</a>
252 </fieldset></div> </form>
254 This ordernumber does not exist.
260 [% INCLUDE 'acquisitions-menu.inc' %]
264 [% MACRO jsinclude BLOCK %]
265 <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
266 [% INCLUDE 'calendar.inc' %]
267 [% INCLUDE 'additem.js.inc' %]
268 <script type="text/javascript" src="[% interface %]/[% theme %]/js/additem_[% KOHA_VERSION %].js"></script>
269 <script type="text/javascript" src="[% interface %]/[% theme %]/js/cataloging_[% KOHA_VERSION %].js"></script>
270 <script type="text/javascript" src="[% interface %]/[% theme %]/js/prevent_submit_[% KOHA_VERSION %].js"></script>
271 <script type="text/javascript">
272 function Check(form) {
273 [% IF (AcqCreateItemReceiving) %]
274 var total_errors = CheckMandatorySubfields(form);
275 if (total_errors != 0) {
276 var alertString = _("Form not submitted because of the following problem(s)");
277 alertString += "\n------------------------------------------------------------------------------------\n";
278 alertString += "\n- " + _("%s mandatory fields empty (highlighted)").format(total_errors);
283 if(check_additem('[% UniqueItemFields %]') == false){
284 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
288 // Remove last itemblock if it is not in items_list
289 var lastitemblock = $("#outeritemblock > div:last");
290 var tobedeleted = true;
291 var listitems = $("#items_list tr");
292 $(listitems).each(function(){
293 if($(this).attr('idblock') == $(lastitemblock).attr('id')){
298 $(lastitemblock).remove();
301 if(check_additem('[% UniqueItemFields %]') == false){
302 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
304 $(lastitemblock).appendTo("#outeritemblock");
313 [% IF (AcqCreateItem == 'ordering') %]
314 var items_columns = [null, null, 'barcode', 'homebranchname',
315 'holdingbranchname', 'notforloan', 'restricted', 'location',
316 'itemcallnumber', 'copynumber', 'stocknumber', 'collection',
317 'itemtype', 'materials', 'itemnotes'];
319 function PopupEditPage(biblionumber, itemnumber) {
320 var url = "/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber="
321 + biblionumber + "&itemnumber=" + itemnumber + "&popup=1#edititem";
322 var w = window.open(url);
323 var watchClose = setInterval(function() {
325 clearTimeout(watchClose);
326 $.getJSON('/cgi-bin/koha/catalogue/getitem-ajax.pl',
328 'itemnumber': itemnumber
331 var tds = $("#item_"+itemnumber+" td");
332 for(var i=2; i<tds.length; i++) {
333 var column = items_columns[i];
334 var text = item[column];
335 if ( text == null ) text = '';
336 $(tds[i]).text(text);
344 function CalcQtyToReceive() {
345 var qty = $("input[name='items_to_receive']:checked").length;
346 $("#quantity").val(qty);
349 function CheckNItems(n) {
350 $("input[name='items_to_receive']").each(function() {
351 $(this).prop('checked', false);
353 $("input[name='items_to_receive']:lt("+n+")").each(function () {
354 $(this).prop('checked', true);
359 $(document).ready(function() {
360 [% IF (AcqCreateItemReceiving) %]
361 cloneItemBlock(0, '[% UniqueItemFields %]');
362 [% ELSIF (AcqCreateItem == 'ordering') && not subscriptionid %]
363 $("input[name='items_to_receive']").change(function() {
367 $("#quantity").keyup(function() {
368 var qty = parseInt($("#quantity").val());
369 var qtyto = parseInt($("#quantity_to_receive").val());
371 $("#qtyrecerror").show();
373 $("#qtyrecerror").hide();
375 CheckNItems($(this).val());
382 [% INCLUDE 'intranet-bottom.inc' %]