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">
14 [% IF (AcqCreateItemOrdering) %]
15 // Remove last itemblock if it is not in items_list
16 var lastitemblock = $("#outeritemblock > div:last");
17 var tobedeleted = true;
18 var listitems = $("#items_list tr");
19 $(listitems).each(function(){
20 if($(this).attr('idblock') == $(lastitemblock).attr('id')){
25 $(lastitemblock).remove();
30 var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
32 _alertString +="-------------------------------------------------------------------\n\n";
34 if ( isNull(ff.title,1) && isNull(ff.entertitle,1) ){
36 _alertString += "\n- " + _("Title cannot be empty");
39 if(isNull(ff.budget_id,1)){
41 _alertString += "\n- "+ _("You must select a budget");
44 if (!(isNum(ff.quantity,0)) || ff.quantity.value == 0){
46 _alertString += "\n- " + _("Quantity must be greater than '0'");
49 if (!(isNum(ff.listprice,0))){
51 _alertString += "\n- " + _("Vendor price must be a number");
54 if (!(isNum(ff.total,0))){
56 _alertString += "\n- " + _("Total must be a number");
59 if (totalExceedsBudget(ff.budget_id.value, ff.total.value ) ) {
61 _alertString += "\n- " + _("Order total (") + ff.total.value +
62 _(") exceeds budget available (") + actTotal+")";
65 if ( ff.field_value ) {
66 var empty_item_mandatory = 0;
67 for (i = 0; i < ff.field_value.length; i++) {
68 //alert("i = " + i + " => " + ff.kohafield[i] );
69 if (ff.field_value[i].value.length == 0 && ff.mandatory[i].value == 1) {
70 empty_item_mandatory++;
73 if (empty_item_mandatory > 0) {
76 "\n- " + empty_item_mandatory + _(" item mandatory fields empty");
83 [% IF (AcqCreateItemOrdering) %]
85 $(lastitemblock).appendTo('#outeritemblock');
91 [% IF (AcqCreateItemOrdering) %]
92 if(check_additem('[% UniqueItemFields %]') == false) {
93 alert(_('Duplicate values detected. Please correct the errors and resubmit.') );
95 $(lastitemblock).appendTo('#outeritemblock');
102 $(document).ready(function()
104 [% IF (AcqCreateItemOrdering) %]
105 cloneItemBlock(0, '[% UniqueItemFields %]');
108 $("#quantity").change(function() {
112 //We apply the fonction only for modify option
113 [% IF ( quantityrec ) %]
114 $('#quantity').blur(function()
116 // if user decreases the quantity
117 if($(this).val() < [% quantityrec %])
119 alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"));
124 // if user increases the quantity
125 alert(_("You can't add a new item, please create a new order line"));
126 // and we replace the original value
127 $(this).val([% quantityrec %])
133 //keep a copy of all budgets before removing the inactives
134 disabledBudgetsCopy = $('#budget_id').html();
135 $('#budget_id .b_inactive').remove();
137 $('#showallbudgets').click(function() {
138 if ($(this).is(":checked")) {
139 $('#budget_id').html(disabledBudgetsCopy); //Puts back all the funds
142 $('#budget_id .b_inactive').remove();
149 <body id="acq_neworderempty" class="acq" onload="updateCosts()">
151 [% INCLUDE 'header.inc' %]
152 [% INCLUDE 'acquisitions-search.inc' %]
154 <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>
156 <div id="doc3" class="yui-t2">
163 [% IF ( ordernumber ) %]
170 <div class="error" style="display:none"></div>
172 [% IF ( basketno ) %]
173 <div id="acqui_basket_summary" class="yui-g">
174 <fieldset class="rows">
175 <legend>Basket details</legend>
177 [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %]
178 [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %]
179 [% IF ( basketcontractno ) %]
180 <li><span class="label">Contract number: </span>[% basketcontractno %]</li>
181 <li><span class="label">Contract name:</span> <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&contractnumber=[% basketcontractno %]">[% basketcontractname %]</a></li>
183 [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span> [% authorisedbyname %]</li>[% END %]
184 [% IF ( creationdate ) %]<li><span class="label">Open on:</span> [% creationdate | $KohaDates %]</li>[% END %]
185 [% IF ( closedate ) %]
186 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
187 <li><span class="label">Closed on:</span> [% closedate | $KohaDates %]</li>
188 [% IF ( basketgroups ) %]
189 <li>Basketgroup: <select id="basketgroupid" name="basketgroupid">
190 [% FOREACH basketgroup IN basketgroups %]
191 [% IF ( basketgroup.default ) %]
192 <option value="[% basketgroup.id %]" selected="selected">[% basketgroup.name %]</option>
194 <option value="[% basketgroup.id %]">[% basketgroup.name %]</option>
198 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
199 <input type="hidden" value="mod_basket" name="op" />
200 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
202 <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
211 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" id="Aform" onsubmit="return Check(this);">
213 <fieldset class="rows">
216 [% IF ( biblionumber ) %]
217 <span><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]"> Edit record</a></span>
220 [% UNLESS ( existing ) %]
221 <input type="hidden" name="existing" value="no" />
223 <input type="hidden" name="ordernumber" value="[% ordernumber %]" />
224 <input type="hidden" name="basketno" value="[% basketno %]" />
225 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
226 <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
227 <input type="hidden" name="biblioitemnumber" value="[% biblioitemnumber %]" />
228 <input type="hidden" name="listinc" id="listinc" value="[% listincgst %]" />
229 <input type="hidden" name="applygst" id="applygst" value="[% gstreg %]" />
230 <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst %]" />
231 <input type="hidden" name="suggestionid" value="[% suggestionid %]" />
232 <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
233 <input type="hidden" name="currency_rate" id="currency_rate" value="[% currency_rate %]" />
236 [% IF ( biblionumber ) %]
237 <span class="label">Title</span>
238 <input type="hidden" size="50" name="title" value="[% title |html %]" /> <span class="title">[% title |html %]</span>
240 <label for="entertitle" class="required">Title: </label>
241 <input type="text" id="entertitle" size="50" name="title" value="[% title |html %]" />
245 [% IF ( biblionumber ) %]
246 <span class="label">Author: </span>
247 <input type="hidden" size="50" name="author" id="author" value="[% author %]" />[% author %]
249 <label for="author">Author: </label>
250 <input type="text" size="50" name="author" id="author" value="[% author %]" />
254 [% IF ( biblionumber ) %]
255 <span class="label">Publisher: </span>
256 <input type="hidden" size="50" name="publishercode" id="publishercode" value="[% publishercode %]" />[% publishercode %]
258 <label for="publishercode"> Publisher: </label>
259 <input type="text" size="50" name="publishercode" id="publishercode" value="[% publishercode %]" />
263 [% IF ( biblionumber ) %]
264 <span class="label">Edition: </span>
265 <input type="hidden" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement %]" />[% editionstatement %]
268 <label for="editionstatement">Edition: </label>
269 <input type="text" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement %]" />
273 [% IF ( biblionumber ) %]
274 <span class="label">Publication year: </span>
275 <input type="hidden" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear %]" />[% publicationyear %]
277 <label for="publicationyear">Publication year: </label>
278 <input type="text" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear %]" />
282 [% IF ( biblionumber ) %]
283 <span class="label">ISBN: </span>
284 <input type="hidden" size="50" name="isbn" id="ISBN" value="[% isbn %]" />[% isbn %]
286 <label for="ISBN">ISBN: </label>
287 <input type="text" size="50" name="isbn" id="ISBN" value="[% isbn %]" />
292 [% IF ( biblionumber ) %]
293 <span class="label">EAN: </span>
294 <input type="hidden" size="20" name="ean" id="EAN" value="[% ean %]" />[% ean %]
296 <label for="EAN">EAN: </label>
297 <input type="text" size="20" name="ean" id="EAN" value="[% ean %]" />
302 [% IF ( biblionumber ) %]
303 <span class="label">Series: </span>
304 <input type="hidden" size="50" name="series" id="series" value="[% seriestitle %]" />[% seriestitle %]
306 <label for="series">Series: </label>
307 <input type="text" size="50" name="series" id="series" value="[% seriestitle %]" />
311 [% UNLESS ( biblionumber ) %]
312 [% IF ( itemtypeloop ) %]
314 <span class="label">Item type:</span>
315 <select name="itemtype" style="width:12em;">
316 [% FOREACH itemtype IN itemtypeloop %]
317 [% IF ( itemtype.selected ) %]
318 <option value="[% itemtype.itemtype %]" selected="selected">[% itemtype.description %]</option>
320 <option value="[% itemtype.itemtype %]">[% itemtype.description %]</option>
330 [% IF ( suggestionid ) %]
331 <fieldset class="rows">
332 <legend>Suggestion</legend>
335 <span class="label">Suggested by: </span>
336 [% surnamesuggestedby %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid %]&op=show">suggestion #[% suggestionid %]</a>)
342 [% IF (AcqCreateItemOrdering) %]
344 <div id="items_list" style="display:none">
345 <p><b>Items list</b></p>
346 <div style="width:100%;overflow:auto;">
354 <th>Holding branch</th>
355 <th>Not for loan</th>
360 <th>Stock number</th>
361 <th>Collection code</th>
373 <fieldset class="rows" id="itemfieldset">
374 <legend>Item</legend>
375 [% IF ( NoACQframework ) %]
376 <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
379 <div id="outeritemblock"></div>
382 [% END %][%# IF (AcqCreateItemOrdering) %]
383 <fieldset class="rows">
384 <legend>Accounting Details</legend>
388 <span class="label required">Quantity: </span>
389 <input type="hidden" size="20" name="quantity" value="[% quantity %]" />[% quantity %]
391 <label class="required" for="quantity">Quantity: </label>
392 [% IF (AcqCreateItemOrdering) %]
393 <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
395 <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec %]" onchange="updateCosts();" />
398 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
399 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
403 <span class="label required">Fund: </span>
404 <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %]
406 <label class="required" for="budget_id">Fund: </label>
407 <select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id">
408 <option value="">Select a budget</option>
409 [% FOREACH budget_loo IN budget_loop %]
410 [% IF ( budget_loo.b_sel ) %]
411 <option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
413 [% IF ( budget_loo.b_active ) %]<option value="[% budget_loo.b_id %]">[% budget_loo.b_txt %]</option>
414 [% ELSE %]<option value="[% budget_loo.b_id %]" class="b_inactive">[% budget_loo.b_txt %]</option>
419 <label for="showallbudgets" style="float:none;width:auto;"> Show all:</label>
420 <input type="checkbox" id="showallbudgets" />
425 <span class="label">Currency: </span>
426 <input type="hidden" size="10" name="currency" id="currency" value="[% currency %]" />[% currency %]
428 <label for="currency">Currency:</label>
429 <select name="currency" id="currency" onchange="updateCosts();">
430 [% FOREACH loop_currencie IN loop_currencies %]
431 [% 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 %]
437 <span class="label">Vendor price: </span>
438 <input type="hidden" size="20" name="listprice" id="listprice" value="[% listprice %]" />[% listprice %]
440 <label for="listprice">Vendor price: </label>
441 <input type="text" size="20" name="listprice" id="listprice" value="[% listprice %]" onchange="updateCosts()" />
444 [% UNLESS ( close ) %]
446 <label for="uncertainprice">Uncertain price: </label>
447 [% IF ( uncertainprice ) %]
448 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" checked="checked" />
450 <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
456 <span class="label">gstrate: </span>
457 <input type="hidden" size="20" name="gstrate" id="gstrate" value="[% gstrate %]" />[% gstrate %]%
459 <label for="gst">gstrate: </label>
460 <select name="gstrate" id="gstrate" onchange="updateCosts();">
461 [% FOREACH gst IN gst_values %]
462 [% IF ( gst.option == gstrate ) %]
463 <option value="[% gst.option %]" selected="selected">[% gst.option * 100 | format("%.1f") %]%</option>
465 <option value="[% gst.option %]">[% gst.option * 100 | format("%.1f") %]%</option>
472 <label for="discount">Discount: </label>
474 [% IF ( orderdiscount ) %]
475 <input type="hidden" name="discount" id="discount" value="[% orderdiscount %]" />[% orderdiscount_2dp %]%
477 <input type="hidden" name="discount" id="discount" value="[% discount %]" />[% discount_2dp %]%
480 [% IF ( orderdiscount ) %]
481 <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount %]" onchange="updateCosts();" />%
483 <input type="text" size="6" name="discount" id="discount" value="[% discount %]" onchange="updateCosts();" />%
489 <span class="label">Replacement cost: </span>
490 <input type="hidden" size="20" name="rrp" id="rrp" value="[% rrp %]" />[% rrp %]
492 <label for="rrp">Replacement cost: </label>
493 <input type="text" size="20" name="rrp" id="rrp" value="[% rrp %]" /> (adjusted for [% cur_active %])
498 <label for="ecost">Budgeted cost: </label>
499 <input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" readonly="readonly" />
501 <label for="ecost">Budgeted cost: </label>
502 <input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" />
507 <label for="total">Total: </label>
508 <input type="text" id="total" size="20" name="total" value="[% total %]" readonly="readonly" />
510 <label for="total">Total: </label>
511 <input type="text" id="total" size="20" name="total" value="[% total %]" /> (budgeted cost * quantity)
516 <label for="unitprice">Actual cost: </label>
517 <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice %]" readonly="readonly" />
519 <label for="unitprice">Actual cost: </label>
520 <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice %]" />
524 <label for="notes">Notes: </label>
525 <textarea id="notes" cols="30" rows="3" name="notes" >[% notes %]</textarea>
527 <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
528 <label for="sort1">Statistic 1: </label>
529 <span id="sort1_zone">
531 <select id="sort1" size="1" name="sort1">
532 [% FOREACH sort_opt IN CGIsort1 %]
533 [% IF sort_opt.default %]
534 <option value="[% sort_opt.value %]" selected="selected">[% sort_opt.label %]</option>
536 <option value="[% sort_opt.value %]">[% sort_opt.label %]</option>
541 <input type="text" id="sort1" size="20" name="sort1" value="[% sort1 %]" />
546 <label for="sort2">Statistic 2: </label>
547 <span id="sort2_zone">
549 <select id="sort2" size="1" name="sort2">
550 [% FOREACH sort_opt IN CGIsort2 %]
551 [% IF sort_opt.default %]
552 <option value="[% sort_opt.value %]" selected="selected">[% sort_opt.label %]</option>
554 <option value="[% sort_opt.value %]">[% sort_opt.label %]</option>
559 <input type="text" id="sort2" size="20" name="sort2" value="[% sort2 %]" />
565 <fieldset class="action">
566 <input type="submit" value="Save" />
567 [% IF (suggestionid) %]
568 <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">Cancel</a>
570 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
577 [% INCLUDE 'acquisitions-menu.inc' %]
580 [% INCLUDE 'intranet-bottom.inc' %]