2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Acquisitions › Basket [% basketno %] › [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber %])[% ELSE %]New order[% END %]</title>
4 [% INCLUDE 'doc-head-close.inc' %]
6 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
7 [% INCLUDE 'additem.js.inc' %]
8 <script type="text/javascript" src="[% themelang %]/js/additem.js"></script>
9 <script type="text/javascript">
10 var nav = window.Event ? true : false;
12 window.captureEvents(Event.KEYDOWN);
13 window.onkeydown = NetscapeEventHandler_KeyDown;
15 document.onkeydown = IEEventHandler_KeyDown;
18 function NetscapeEventHandler_KeyDown(e) {
19 if (e.which == 13 && e.target.type != 'textarea' && e.target.type != 'submit') { return false; }
23 function IEEventHandler_KeyDown() {
24 if (event.keyCode == 13 && event.srcElement.type != 'textarea' && event.srcElement.type != 'submit')
32 [% IF (AcqCreateItemOrdering) %]
33 // Remove last itemblock if it is not in items_list
34 var lastitemblock = $("#outeritemblock > div:last");
35 var tobedeleted = true;
36 var listitems = $("#items_list tr");
37 $(listitems).each(function(){
38 if($(this).attr('idblock') == $(lastitemblock).attr('id')){
43 $(lastitemblock).remove();
48 var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
50 _alertString +="-------------------------------------------------------------------\n\n";
52 if ( isNull(ff.title,1) && isNull(ff.entertitle,1) ){
54 _alertString += "\n- " + _("Title cannot be empty");
57 if(isNull(ff.budget_id,1)){
59 _alertString += "\n- "+ _("You must select a budget");
62 if (!(isNum(ff.quantity,0)) || ff.quantity.value == 0){
64 _alertString += "\n- " + _("Quantity must be greater than '0'");
67 if (!(isNum(ff.listprice,0))){
69 _alertString += "\n- " + _("Vendor price must be a number");
72 if (!(isNum(ff.total,0))){
74 _alertString += "\n- " + _("Total must be a number");
77 if (totalExceedsBudget(ff.budget_id.value, ff.total.value ) ) {
79 _alertString += "\n- " + _("Order total (") + ff.total.value +
80 _(") exceeds budget available (") + actTotal+")";
83 if ( ff.field_value ) {
84 var empty_item_mandatory = 0;
85 for (i = 0; i < ff.field_value.length; i++) {
86 //alert("i = " + i + " => " + ff.kohafield[i] );
87 if (ff.field_value[i].value.length == 0 && ff.mandatory[i].value == 1) {
88 empty_item_mandatory++;
91 if (empty_item_mandatory > 0) {
94 "\n- " + empty_item_mandatory + _(" item mandatory fields empty");
101 [% IF (AcqCreateItemOrdering) %]
103 $(lastitemblock).appendTo('#outeritemblock');
109 [% IF (AcqCreateItemOrdering) %]
110 if(check_additem('[% UniqueItemFields %]') == false) {
111 alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
113 $(lastitemblock).appendTo('#outeritemblock');
120 $(document).ready(function()
122 [% IF (AcqCreateItemOrdering) %]
123 cloneItemBlock(0, '[% UniqueItemFields %]');
126 $("#quantity").change(function() {
130 //We apply the fonction only for modify option
131 [% IF ( quantityrec ) %]
132 $('#quantity').blur(function()
134 // if user decreases the quantity
135 if($(this).val() < [% quantityrec %])
137 alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"));
142 // if user increases the quantity
143 alert(_("You can't add a new item, please create a new order line"));
144 // and we replace the original value
145 $(this).val([% quantityrec %])
146 updateCosts(); // blur is invoked after change which updated values
152 //keep a copy of all budgets before removing the inactives
153 disabledBudgetsCopy = $('#budget_id').html();
154 $('#budget_id .b_inactive').remove();
156 $('#showallbudgets').click(function() {
157 if ($(this).is(":checked")) {
158 $('#budget_id').html(disabledBudgetsCopy); //Puts back all the funds
161 $('#budget_id .b_inactive').remove();
168 <body id="acq_neworderempty" class="acq">
170 [% INCLUDE 'header.inc' %]
171 [% INCLUDE 'acquisitions-search.inc' %]
173 <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> › <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> › [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber %])[% ELSE %]New order[% END %]</div>
175 <div id="doc3" class="yui-t2">
182 [% IF ( ordernumber ) %]
189 <div class="error" style="display:none"></div>
191 [% IF ( basketno ) %]
192 <div id="acqui_basket_summary" class="yui-g">
193 <fieldset class="rows">
194 <legend>Basket details</legend>
196 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %]
197 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %]
198 [% IF ( basketcontractno ) %]
199 <li><span class="label">Contract number: </span>[% basketcontractno %]</li>
200 <li><span class="label">Contract name:</span> <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&contractnumber=[% basketcontractno %]">[% basketcontractname %]</a></li>
202 [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span> [% authorisedbyname %]</li>[% END %]
203 [% IF ( creationdate ) %]<li><span class="label">Open on:</span> [% creationdate | $KohaDates %]</li>[% END %]
204 [% IF ( closedate ) %]
205 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
206 <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
207 [% IF ( basketgroups ) %]
208 <li>Basketgroup: <select id="basketgroupid" name="basketgroupid">
209 [% FOREACH basketgroup IN basketgroups %]
210 [% IF ( basketgroup.default ) %]
211 <option value="[% basketgroup.id %]" selected="selected">[% basketgroup.name %]</option>
213 <option value="[% basketgroup.id %]">[% basketgroup.name %]</option>
217 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
218 <input type="hidden" value="mod_basket" name="op" />
219 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
221 <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
230 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" id="Aform" onsubmit="return Check(this);">
232 <fieldset class="rows">
235 [% IF ( biblionumber ) %]
236 <span><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]"> Edit record</a></span>
239 [% UNLESS ( existing ) %]
240 <input type="hidden" name="existing" value="no" />
242 <input type="hidden" name="ordernumber" value="[% ordernumber %]" />
243 <input type="hidden" name="basketno" value="[% basketno %]" />
244 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
245 <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
246 <input type="hidden" name="biblioitemnumber" value="[% biblioitemnumber %]" />
247 <input type="hidden" name="listinc" id="listinc" value="[% listincgst %]" />
248 <input type="hidden" name="applygst" id="applygst" value="[% gstreg %]" />
249 <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst %]" />
250 <input type="hidden" name="suggestionid" value="[% suggestionid %]" />
251 <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
253 [% FOREACH loop_currencie IN loop_currencies %]
254 <input type="hidden" id="currency_rate_[% loop_currencie.currcode %]" name="[% loop_currencie.currcode %]" value="[% loop_currencie.rate %]" />
258 [% IF ( biblionumber ) %]
259 <span class="label">Title</span>
260 <input type="hidden" size="50" name="title" value="[% title |html %]" /> <span class="title">[% title |html %]</span>
262 <label for="entertitle" class="required">Title: </label>
263 <input type="text" id="entertitle" size="50" name="title" value="[% title |html %]" />
267 [% IF ( biblionumber ) %]
268 <span class="label">Author: </span>
269 <input type="hidden" size="50" name="author" id="author" value="[% author %]" />[% author %]
271 <label for="author">Author: </label>
272 <input type="text" size="50" name="author" id="author" value="[% author %]" />
276 [% IF ( biblionumber ) %]
277 <span class="label">Publisher: </span>
278 <input type="hidden" size="50" name="publishercode" id="publishercode" value="[% publishercode %]" />[% publishercode %]
280 <label for="publishercode"> Publisher: </label>
281 <input type="text" size="50" name="publishercode" id="publishercode" value="[% publishercode %]" />
285 [% IF ( biblionumber ) %]
286 <span class="label">Edition: </span>
287 <input type="hidden" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement %]" />[% editionstatement %]
290 <label for="editionstatement">Edition: </label>
291 <input type="text" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement %]" />
295 [% IF ( biblionumber ) %]
296 <span class="label">Publication year: </span>
297 <input type="hidden" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear %]" />[% publicationyear %]
299 <label for="publicationyear">Publication year: </label>
300 <input type="text" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear %]" />
304 [% IF ( biblionumber ) %]
305 <span class="label">ISBN: </span>
306 <input type="hidden" size="50" name="isbn" id="ISBN" value="[% isbn %]" />[% isbn %]
308 <label for="ISBN">ISBN: </label>
309 <input type="text" size="50" name="isbn" id="ISBN" value="[% isbn %]" />
314 [% IF ( biblionumber ) %]
315 <span class="label">EAN: </span>
316 <input type="hidden" size="20" name="ean" id="EAN" value="[% ean %]" />[% ean %]
318 <label for="EAN">EAN: </label>
319 <input type="text" size="20" name="ean" id="EAN" value="[% ean %]" />
324 [% IF ( biblionumber ) %]
325 <span class="label">Series: </span>
326 <input type="hidden" size="50" name="series" id="series" value="[% seriestitle %]" />[% seriestitle %]
328 <label for="series">Series: </label>
329 <input type="text" size="50" name="series" id="series" value="[% seriestitle %]" />
333 [% UNLESS ( biblionumber ) %]
334 [% IF ( itemtypeloop ) %]
336 <span class="label">Item type:</span>
337 <select name="itemtype" style="width:12em;">
338 [% FOREACH itemtype IN itemtypeloop %]
339 [% IF ( itemtype.selected ) %]
340 <option value="[% itemtype.itemtype %]" selected="selected">[% itemtype.description %]</option>
342 <option value="[% itemtype.itemtype %]">[% itemtype.description %]</option>
352 [% IF ( suggestionid ) %]
353 <fieldset class="rows">
354 <legend>Suggestion</legend>
357 <span class="label">Suggested by: </span>
358 [% surnamesuggestedby %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid %]&op=show">suggestion #[% suggestionid %]</a>)
364 [% UNLESS subscriptionid %][% # it is a suggestion, we have not items %]
365 [% IF (AcqCreateItemOrdering) %]
367 <div id="items_list" style="display:none">
368 <p><b>Items list</b></p>
369 <div style="width:100%;overflow:auto;">
376 <th>Home library</th>
377 <th>Holding library</th>
378 <th>Not for loan</th>
383 <th>Stock number</th>
384 <th>Collection code</th>
396 <fieldset class="rows" id="itemfieldset">
397 <legend>Item</legend>
398 [% IF ( NoACQframework ) %]
399 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
402 <div id="outeritemblock"></div>
405 [% END %][%# UNLESS subscriptionid %]
406 [% END %][%# IF (AcqCreateItemOrdering) %]
407 <fieldset class="rows">
408 <legend>Accounting Details</legend>
412 <span class="label required">Quantity: </span>
413 <input type="hidden" size="20" name="quantity" value="[% quantity %]" />[% quantity %]
415 <label class="required" for="quantity">Quantity: </label>
416 [% IF (AcqCreateItemOrdering) %]
417 [% IF subscriptionid %]
418 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
420 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
423 [% IF subscriptionid %]
424 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
426 <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec %]" onchange="updateCosts();" />
430 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
431 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
435 <span class="label required">Fund: </span>
436 <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %]
438 <label class="required" for="budget_id">Fund: </label>
439 <select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id">
440 <option value="">Select a budget</option>
441 [% FOREACH budget_loo IN budget_loop %]
442 [% IF ( budget_loo.b_sel ) %]
443 <option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
445 [% IF ( budget_loo.b_active ) %]<option value="[% budget_loo.b_id %]">[% budget_loo.b_txt %]</option>
446 [% ELSE %]<option value="[% budget_loo.b_id %]" class="b_inactive">[% budget_loo.b_txt %]</option>
451 <label for="showallbudgets" style="float:none;width:auto;"> Show all:</label>
452 <input type="checkbox" id="showallbudgets" />
457 <span class="label">Currency: </span>
458 <input type="hidden" size="10" name="currency" id="currency" value="[% currency %]" />[% currency %]
460 <label for="currency">Currency:</label>
461 <select name="currency" id="currency" onchange="updateCosts();">
462 [% FOREACH loop_currencie IN loop_currencies %]
463 [% IF ( loop_currencie.selected ) %]<option value="[% loop_currencie.currcode %]" selected="selected">[% loop_currencie.currcode %]</option>[% ELSE %]<option value="[% loop_currencie.currcode %]">[% loop_currencie.currcode %]</option>[% END %][% END %]
469 <span class="label">Vendor price: </span>
470 <input type="hidden" size="20" name="listprice" id="listprice" value="[% listprice %]" />[% listprice %]
472 <label for="listprice">Vendor price: </label>
473 <input type="text" size="20" name="listprice" id="listprice" value="[% listprice %]" onchange="updateCosts()" />
476 [% UNLESS ( close ) %]
478 <label for="uncertainprice">Uncertain price: </label>
479 [% IF ( uncertainprice ) %]
480 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" checked="checked" />
482 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
486 [% IF ( gst_values ) %]
489 <span class="label">Tax rate: </span>
490 <input type="hidden" size="20" name="gstrate" id="gstrate" value="[% gstrate %]" />[% gstrate %]%
492 <label for="gst">Tax rate: </label>
493 <select name="gstrate" id="gstrate" onchange="updateCosts();">
494 [% FOREACH gst IN gst_values %]
495 [% IF ( gst.option == gstrate ) %]
496 <option value="[% gst.option %]" selected="selected">[% gst.option * 100 | format("%.1f") %]%</option>
498 <option value="[% gst.option %]">[% gst.option * 100 | format("%.1f") %]%</option>
504 <input type="hidden" name="gstrate" value="0" />
508 <label for="discount">Discount: </label>
510 [% IF ( orderdiscount ) %]
511 <input type="hidden" name="discount" id="discount" value="[% orderdiscount %]" />[% orderdiscount_2dp %]%
513 <input type="hidden" name="discount" id="discount" value="[% discount %]" />[% discount_2dp %]%
516 [% IF ( orderdiscount ) %]
517 <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount %]" onchange="updateCosts();" />%
519 <input type="text" size="6" name="discount" id="discount" value="[% discount %]" onchange="updateCosts();" />%
525 <span class="label">Replacement cost: </span>
526 <input type="hidden" size="20" name="rrp" id="rrp" value="[% rrp %]" />[% rrp %]
528 <label for="rrp">Replacement cost: </label>
529 <input type="text" size="20" name="rrp" id="rrp" value="[% rrp %]" /> (adjusted for [% cur_active %])
534 <label for="ecost">Budgeted cost: </label>
535 <input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" readonly="readonly" />
537 <label for="ecost">Budgeted cost: </label>
538 <input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" />
543 <label for="total">Total: </label>
544 <input type="text" id="total" size="20" name="total" value="[% total %]" readonly="readonly" />
546 <label for="total">Total: </label>
547 <input type="text" id="total" size="20" name="total" value="[% total %]" /> (budgeted cost * quantity)
552 <label for="unitprice">Actual cost: </label>
553 <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice %]" readonly="readonly" />
555 <label for="unitprice">Actual cost: </label>
556 <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice %]" />
560 <label for="notes">Notes: </label>
561 <textarea id="notes" cols="30" rows="3" name="notes" >[% IF ( notes ) %][% notes %][% END %]</textarea>
563 <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
564 <label for="sort1">Statistic 1: </label>
565 <span id="sort1_zone">
567 <select id="sort1" size="1" name="sort1">
568 [% FOREACH sort_opt IN CGIsort1 %]
569 [% IF sort_opt.default %]
570 <option value="[% sort_opt.value %]" selected="selected">[% sort_opt.label %]</option>
572 <option value="[% sort_opt.value %]">[% sort_opt.label %]</option>
577 <input type="text" id="sort1" size="20" name="sort1" value="[% sort1 %]" />
582 <label for="sort2">Statistic 2: </label>
583 <span id="sort2_zone">
585 <select id="sort2" size="1" name="sort2">
586 [% FOREACH sort_opt IN CGIsort2 %]
587 [% IF sort_opt.default %]
588 <option value="[% sort_opt.value %]" selected="selected">[% sort_opt.label %]</option>
590 <option value="[% sort_opt.value %]">[% sort_opt.label %]</option>
595 <input type="text" id="sort2" size="20" name="sort2" value="[% sort2 %]" />
601 <fieldset class="action">
602 <input type="hidden" name="subscriptionid" value="[% subscriptionid %]" />
603 <input type="submit" value="Save" />
604 [% IF (suggestionid) %]
605 <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">Cancel</a>
607 [% IF subscriptionid %]
608 <a class="cancel" href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">Cancel</a>
610 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
618 [% INCLUDE 'acquisitions-menu.inc' %]
621 [% INCLUDE 'intranet-bottom.inc' %]