Merge branch 'bug_5343' into 3.12-master
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / neworderempty.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Acquisitions &rsaquo; Basket [% basketno %] &rsaquo; [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber %])[% ELSE %]New order[% END %]</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5
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;
11 if (nav) {
12     window.captureEvents(Event.KEYDOWN);
13     window.onkeydown = NetscapeEventHandler_KeyDown;
14 } else {
15     document.onkeydown = IEEventHandler_KeyDown;
16 }
17
18 function NetscapeEventHandler_KeyDown(e) {
19     if (e.which == 13 && e.target.type != 'textarea' && e.target.type != 'submit') { return false; }
20     return true;
21 }
22
23 function IEEventHandler_KeyDown() {
24     if (event.keyCode == 13 && event.srcElement.type != 'textarea' && event.srcElement.type != 'submit')
25         return false;
26     return true;
27 }
28 //<![CDATA[
29 actTotal = "";
30
31 function Check(ff) {
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')){
39                 tobedeleted = false;
40             }
41         });
42         if(tobedeleted){
43             $(lastitemblock).remove();
44         }
45     [% END %]
46
47     var ok=0;
48     var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
49
50     _alertString +="-------------------------------------------------------------------\n\n";
51
52     if ( isNull(ff.title,1)  &&  isNull(ff.entertitle,1)   ){
53         ok=1;
54                     _alertString += "\n- " + _("Title cannot be empty");
55     }
56     
57     if(isNull(ff.budget_id,1)){
58                 ok=1;
59                                         _alertString += "\n- "+ _("You must select a budget");
60     }
61
62     if (!(isNum(ff.quantity,0)) || ff.quantity.value == 0){
63         ok=1;
64                     _alertString += "\n- " + _("Quantity must be greater than '0'");
65     }
66
67     if (!(isNum(ff.listprice,0))){
68         ok=1;
69                     _alertString += "\n- " + _("Vendor price must be a number");
70     }
71
72     if (!(isNum(ff.total,0))){
73         ok=1;
74                     _alertString += "\n- " + _("Total must be a number");
75     }
76
77     if (totalExceedsBudget(ff.budget_id.value, ff.total.value  )  ) {
78         ok=1;
79         _alertString += "\n- " + _("Order total (") + ff.total.value +
80             _(") exceeds budget available (") + actTotal+")";
81     }
82
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++;
89             }
90         }
91         if (empty_item_mandatory > 0) {
92             ok = 1;
93             _alertString +=
94                 "\n- " + empty_item_mandatory + _(" item mandatory fields empty");
95         }
96
97     }
98
99     if (ok) {
100         alert(_alertString);
101         [% IF (AcqCreateItemOrdering) %]
102             if(tobedeleted) {
103                 $(lastitemblock).appendTo('#outeritemblock');
104             }
105         [% END %]
106         return false;
107     }
108
109     [% IF (AcqCreateItemOrdering) %]
110         if(check_additem('[% UniqueItemFields %]') == false) {
111             alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
112             if(tobedeleted) {
113                 $(lastitemblock).appendTo('#outeritemblock');
114             }
115             return false;
116         }
117     [% END %]
118 }
119
120 $(document).ready(function() 
121     {
122         [% IF (AcqCreateItemOrdering) %]
123             cloneItemBlock(0, '[% UniqueItemFields %]');
124         [% END %]
125
126         $("#quantity").change(function() {
127             updateCosts();
128         });
129
130         //We apply the fonction only for modify option
131         [% IF ( quantityrec ) %]
132         $('#quantity').blur(function() 
133         {
134             // if user decreases the quantity
135             if($(this).val() < [% quantityrec %]) 
136             {
137                 alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"));
138                 return true;
139             } 
140             else 
141             {
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
147                 return false;
148             }
149         });
150         [% END %]
151         
152         //keep a copy of all budgets before removing the inactives
153         disabledBudgetsCopy = $('#budget_id').html();
154         $('#budget_id .b_inactive').remove();
155
156         $('#showallbudgets').click(function() {
157             if ($(this).is(":checked")) {
158                 $('#budget_id').html(disabledBudgetsCopy); //Puts back all the funds
159             }
160             else {
161                 $('#budget_id .b_inactive').remove();
162             }
163         });
164     });
165 //]]>
166 </script>
167 </head>
168 <body id="acq_neworderempty" class="acq">
169
170 [% INCLUDE 'header.inc' %]
171 [% INCLUDE 'acquisitions-search.inc' %]
172
173 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> &rsaquo; [% IF ( ordernumber ) %]Modify order details (line #[% ordernumber %])[% ELSE %]New order[% END %]</div>
174
175 <div id="doc3" class="yui-t2">
176
177 <div id="bd">
178     <div id="yui-main">
179     <div class="yui-b">
180
181 <h2>
182     [% IF ( ordernumber ) %]
183         Modify order line
184     [% ELSE %]
185         New order
186     [% END %]
187 </h2>
188
189 <div class="error" style="display:none"></div>
190
191 [% IF ( basketno ) %]
192     <div id="acqui_basket_summary"  class="yui-g">
193     <fieldset class="rows">
194         <legend>Basket details</legend>
195         <ol>
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&amp;contractnumber=[% basketcontractno %]">[% basketcontractname %]</a></li>
201         [% END %]
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>
212                     [% ELSE %]
213                     <option value="[% basketgroup.id %]">[% basketgroup.name %]</option>
214                     [% END %]
215                 [% END %]
216                 </select>
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 %]" />
220             </li>
221             <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
222         [% END %]
223         </form>
224         [% END %]
225         </ol>
226     </fieldset>
227     </div>
228 [% END %]
229
230 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" id="Aform" onsubmit="return Check(this);">
231
232 <fieldset class="rows">
233         <legend>
234             Catalog details
235             [% IF ( biblionumber ) %]
236                 <span><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]"> Edit record</a></span>
237             [% END %]
238         </legend>
239         [% UNLESS ( existing ) %]
240         <input type="hidden" name="existing" value="no" />
241         [% END %]
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 %]" />
252
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 %]" />
255         [% END %]
256
257         <ol><li>
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>
261             [% ELSE %]
262             <label for="entertitle" class="required">Title: </label>
263                 <input type="text" id="entertitle" size="50" name="title" value="[% title |html %]" />
264             [% END %]
265         </li>
266         <li>
267             [% IF ( biblionumber ) %]
268             <span class="label">Author: </span>
269                 <input type="hidden" size="50" name="author" id="author" value="[% author %]" />[% author %]
270             [% ELSE %]
271             <label for="author">Author: </label>
272                 <input type="text" size="50" name="author" id="author" value="[% author %]" />
273             [% END %]
274         </li>
275         <li>
276             [% IF ( biblionumber ) %]
277             <span class="label">Publisher: </span>
278                 <input type="hidden" size="50" name="publishercode" id="publishercode" value="[% publishercode %]" />[% publishercode %]
279             [% ELSE %]
280             <label for="publishercode"> Publisher: </label>
281                 <input type="text" size="50" name="publishercode" id="publishercode" value="[% publishercode %]" />
282             [% END %]
283         </li>
284         <li>
285             [% IF ( biblionumber ) %]
286             <span class="label">Edition: </span>
287                 <input type="hidden" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement %]" />[% editionstatement %]
288
289             [% ELSE %]
290             <label for="editionstatement">Edition: </label>
291                 <input type="text" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement %]" />
292             [% END %]
293         </li>
294         <li>
295             [% IF ( biblionumber ) %]
296             <span class="label">Publication year: </span>
297                 <input type="hidden" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear %]" />[% publicationyear %]
298             [% ELSE %]
299             <label for="publicationyear">Publication year: </label>
300                 <input type="text" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear %]" />
301             [% END %]
302         </li>
303         <li>
304             [% IF ( biblionumber ) %]
305             <span class="label">ISBN: </span>
306                 <input type="hidden" size="50" name="isbn" id="ISBN" value="[% isbn %]" />[% isbn %]
307             [% ELSE %]
308             <label for="ISBN">ISBN: </label>
309                 <input type="text" size="50" name="isbn" id="ISBN" value="[% isbn %]" />
310             [% END %]
311         </li>
312         [% IF (UNIMARC) %]
313         <li>
314             [% IF ( biblionumber ) %]
315             <span class="label">EAN: </span>
316                 <input type="hidden" size="20" name="ean" id="EAN" value="[% ean %]" />[% ean %]
317             [% ELSE %]
318             <label for="EAN">EAN: </label>
319                 <input type="text" size="20" name="ean" id="EAN" value="[% ean %]" />
320             [% END %]
321         </li>
322         [% END %]
323         <li>
324             [% IF ( biblionumber ) %]
325             <span class="label">Series: </span>
326                 <input type="hidden" size="50" name="series" id="series" value="[% seriestitle %]" />[% seriestitle %]
327             [% ELSE %]
328             <label for="series">Series: </label>
329                 <input type="text" size="50" name="series" id="series" value="[% seriestitle %]" />
330             [% END %]
331         </li>
332         </li>
333             [% UNLESS ( biblionumber ) %]
334             [% IF ( itemtypeloop ) %]
335             <li>
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>
341                     [% ELSE %]
342                         <option value="[% itemtype.itemtype %]">[% itemtype.description %]</option>
343                     [% END %]
344                 [% END %]
345                 </select>
346             </li>
347             [% END %]
348             [% END %]
349         </ol>
350     </fieldset>
351
352     [% IF ( suggestionid ) %]
353         <fieldset class="rows">
354         <legend>Suggestion</legend>
355         <ol>
356           <li>
357             <span class="label">Suggested by: </span>
358             [% surnamesuggestedby %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid %]&amp;op=show">suggestion #[% suggestionid %]</a>)
359           </li>
360         </ol>
361         </fieldset>
362     [% END %]
363
364     [% UNLESS subscriptionid %][% # it is a suggestion, we have not items %]
365       [% IF (AcqCreateItemOrdering) %]
366
367       <div id="items_list" style="display:none">
368           <p><b>Items list</b></p>
369           <div style="width:100%;overflow:auto;">
370               <table>
371                   <thead>
372                       <tr>
373                           <th>&nbsp;</th>
374                           <th>&nbsp;</th>
375                           <th>Barcode</th>
376                           <th>Home library</th>
377                           <th>Holding library</th>
378                           <th>Not for loan</th>
379                           <th>Restricted</th>
380                           <th>Location</th>
381                           <th>Call number</th>
382                           <th>Copy number</th>
383                           <th>Stock number</th>
384                           <th>Collection code</th>
385                           <th>Item type</th>
386                           <th>Materials</th>
387                           <th>Notes</th>
388                       </tr>
389                   </thead>
390                   <tbody>
391                   </tbody>
392               </table>
393           </div>
394       </div>
395
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>
400           [% END %]
401
402           <div id="outeritemblock"></div>
403
404       </fieldset>
405       [% END %][%# UNLESS subscriptionid %]
406     [% END %][%# IF (AcqCreateItemOrdering) %]
407     <fieldset class="rows">
408         <legend>Accounting Details</legend>
409         <ol>
410             <li>
411                 [% IF ( close ) %]
412             <span class="label required">Quantity: </span>
413                     <input type="hidden" size="20" name="quantity" value="[% quantity %]" />[% quantity %]
414                 [% ELSE %]
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" />
419                         [% ELSE %]
420                             <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
421                         [% END %]
422                     [% ELSE %]
423                         [% IF subscriptionid %]
424                             <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
425                         [% ELSE %]
426                             <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec %]" onchange="updateCosts();" />
427                         [% END %]
428                     [% END %]
429                 [% END %]
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" />
432             </li>
433             <li>
434                 [% IF ( close ) %]
435             <span class="label required">Fund: </span>
436                     <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %]
437                 [% ELSE %]
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>
444                     [% ELSE %]
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>
447                         [% END %]
448                     [% END %]
449                 [% END %]
450                 </select>
451                 <label for="showallbudgets" style="float:none;width:auto;">&nbsp;Show all:</label>
452                 <input type="checkbox" id="showallbudgets" />
453                 [% END %]
454             </li>
455                 <li>
456                 [% IF ( close ) %]
457                         <span class="label">Currency: </span>
458                         <input type="hidden" size="10" name="currency" id="currency" value="[% currency %]" />[% currency %]
459                 [% ELSE %]
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 %]
464                         </select>
465                 [% END %]
466                 </li>
467             <li>
468                 [% IF ( close ) %]
469                     <span class="label">Vendor price: </span>
470                     <input type="hidden" size="20" name="listprice" id="listprice" value="[% listprice %]" />[% listprice %]
471                 [% ELSE %]
472                 <label for="listprice">Vendor price: </label>
473                     <input type="text" size="20" name="listprice" id="listprice" value="[% listprice %]" onchange="updateCosts()" />
474                 [% END %]
475             </li>
476             [% UNLESS ( close ) %]
477             <li>
478                     <label for="uncertainprice">Uncertain price: </label>
479                     [% IF ( uncertainprice ) %]
480                     <input type="checkbox" name="uncertainprice"  id="uncertainprice" value="1" checked="checked" />
481                     [% ELSE %]
482                     <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
483                 [% END %]
484             </li>
485             [% END %]
486             [% IF ( gst_values ) %]
487                 <li>
488                     [% IF ( close ) %]
489                         <span class="label">Tax rate: </span>
490                         <input type="hidden" size="20" name="gstrate" id="gstrate" value="[% gstrate %]" />[% gstrate %]%
491                     [% ELSE %]
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>
497                           [% ELSE %]
498                             <option value="[% gst.option %]">[% gst.option * 100 | format("%.1f") %]%</option>
499                           [% END %]
500                         [% END %]
501                         </select>
502                     [% END %]
503                 [% ELSE %]
504                     <input type="hidden" name="gstrate" value="0" />
505                 </li>
506             [% END %]
507             <li>
508                 <label for="discount">Discount: </label>
509                 [% IF ( close ) %]
510                     [% IF ( orderdiscount ) %]
511                         <input type="hidden" name="discount" id="discount" value="[% orderdiscount %]" />[% orderdiscount_2dp %]%
512                     [% ELSE %]
513                         <input type="hidden" name="discount" id="discount" value="[% discount %]" />[% discount_2dp %]%
514                     [% END %]
515                 [% ELSE %]
516                     [% IF ( orderdiscount ) %]
517                         <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount %]" onchange="updateCosts();" />%
518                     [% ELSE %]
519                         <input type="text" size="6" name="discount" id="discount" value="[% discount %]" onchange="updateCosts();" />%
520                     [% END %]
521                 [% END %]
522             </li>
523             <li>
524                 [% IF ( close ) %]
525                     <span class="label">Replacement cost: </span>
526                     <input type="hidden" size="20" name="rrp" id="rrp" value="[% rrp %]" />[% rrp %]
527                 [% ELSE %]
528                     <label for="rrp">Replacement cost: </label>
529                     <input type="text" size="20" name="rrp" id="rrp" value="[% rrp %]" /> (adjusted for [% cur_active %])
530                 [% END %]
531             </li>
532             <li>
533                 [% IF ( close ) %]
534                     <label for="ecost">Budgeted cost: </label>
535                     <input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" readonly="readonly"  />
536                 [% ELSE %]
537                     <label for="ecost">Budgeted cost: </label>
538                     <input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" />
539                 [% END %]
540             </li>
541             <li>
542                 [% IF ( close ) %]
543                     <label for="total">Total: </label>
544                     <input type="text" id="total" size="20" name="total" value="[% total %]" readonly="readonly" />
545                 [% ELSE %]
546                     <label for="total">Total: </label>
547                     <input type="text" id="total" size="20" name="total" value="[% total %]" /> (budgeted cost * quantity)
548                 [% END %]
549             </li>
550             <li>
551                 [% IF ( close ) %]
552                     <label for="unitprice">Actual cost: </label>
553                     <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice %]" readonly="readonly" />
554                 [% ELSE %]
555                     <label for="unitprice">Actual cost: </label>
556                     <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice %]" />
557                 [% END %]
558             </li>
559             <li>
560                 <label for="notes">Notes: </label>
561                 <textarea id="notes" cols="30" rows="3" name="notes" >[% IF ( notes ) %][% notes %][% END %]</textarea>
562             </li>
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">
566                 [% IF CGIsort1 %]
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>
571                         [% ELSE %]
572                           <option value="[% sort_opt.value %]">[% sort_opt.label %]</option>
573                         [% END %]
574                     [% END %]
575                     </select>
576                 [% ELSE %]
577                     <input type="text" id="sort1" size="20" name="sort1" value="[% sort1 %]" />
578                 [% END %]
579                 </span>
580             </li>
581             <li>
582                 <label for="sort2">Statistic 2: </label>
583                 <span id="sort2_zone">
584                 [% IF CGIsort2 %]
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>
589                         [% ELSE %]
590                           <option value="[% sort_opt.value %]">[% sort_opt.label %]</option>
591                         [% END %]
592                     [% END %]
593                     </select>
594                 [% ELSE %]
595                     <input type="text" id="sort2" size="20" name="sort2" value="[% sort2 %]" />
596                 [% END %]
597                 </span>
598             </li>
599         </ol>
600     </fieldset>
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 %]&amp;basketno=[% basketno %]">Cancel</a>
606         [% ELSE %]
607             [% IF subscriptionid %]
608                 <a class="cancel" href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Cancel</a>
609             [% ELSE %]
610                 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
611             [% END %]
612         [% END %]
613     </fieldset>
614 </form>
615 </div>
616 </div>
617 <div class="yui-b">
618 [% INCLUDE 'acquisitions-menu.inc' %]
619 </div>
620 </div>
621 [% INCLUDE 'intranet-bottom.inc' %]