Bug 9987: Remove DB field aqorders.biblioitemnunmber
[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" src="[% themelang %]/js/prevent_submit.js"></script>
10 <script type="text/javascript">
11 //<![CDATA[
12 actTotal = "";
13
14 function Check(ff) {
15     [% IF (AcqCreateItemOrdering) %]
16         // Remove last itemblock if it is not in items_list
17         var lastitemblock = $("#outeritemblock > div:last");
18         var tobedeleted = true;
19         var listitems = $("#items_list tr");
20         $(listitems).each(function(){
21             if($(this).attr('idblock') == $(lastitemblock).attr('id')){
22                 tobedeleted = false;
23             }
24         });
25         if(tobedeleted){
26             $(lastitemblock).remove();
27         }
28     [% END %]
29
30     var ok=0;
31     var _alertString= _("Form not submitted because of the following problem(s)")+"\n";
32
33     _alertString +="-------------------------------------------------------------------\n\n";
34
35     if ( isNull(ff.title,1)  &&  isNull(ff.entertitle,1)   ){
36         ok=1;
37                     _alertString += "\n- " + _("Title cannot be empty");
38     }
39     
40     if(isNull(ff.budget_id,1)){
41                 ok=1;
42                                         _alertString += "\n- "+ _("You must select a budget");
43     }
44
45     if (!(isNum(ff.quantity,0)) || ff.quantity.value == 0){
46         ok=1;
47                     _alertString += "\n- " + _("Quantity must be greater than '0'");
48     }
49
50     if (!(isNum(ff.listprice,0))){
51         ok=1;
52                     _alertString += "\n- " + _("Vendor price must be a number");
53     }
54
55     if (!(isNum(ff.total,0))){
56         ok=1;
57                     _alertString += "\n- " + _("Total must be a number");
58     }
59
60     if (totalExceedsBudget(ff.budget_id.value, ff.total.value  )  ) {
61         ok=1;
62         _alertString += "\n- " + _("Order total (") + ff.total.value +
63             _(") exceeds budget available (") + actTotal+")";
64     }
65
66     if ( ff.field_value ) {
67         var empty_item_mandatory = 0;
68         for (i = 0; i < ff.field_value.length; i++) {
69             //alert("i = " + i + " => " + ff.kohafield[i] );
70             if (ff.field_value[i].value.length == 0 && ff.mandatory[i].value == 1) {
71                 empty_item_mandatory++;
72             }
73         }
74         if (empty_item_mandatory > 0) {
75             ok = 1;
76             _alertString +=
77                 "\n- " + empty_item_mandatory + _(" item mandatory fields empty");
78         }
79
80     }
81
82     if (ok) {
83         alert(_alertString);
84         [% IF (AcqCreateItemOrdering) %]
85             if(tobedeleted) {
86                 $(lastitemblock).appendTo('#outeritemblock');
87             }
88         [% END %]
89         return false;
90     }
91
92     [% IF (AcqCreateItemOrdering) %]
93         if(check_additem('[% UniqueItemFields %]') == false) {
94             alert(_("Duplicate values detected. Please correct the errors and resubmit.") );
95             if(tobedeleted) {
96                 $(lastitemblock).appendTo('#outeritemblock');
97             }
98             return false;
99         }
100     [% END %]
101 }
102
103 $(document).ready(function() 
104     {
105         [% IF (AcqCreateItemOrdering) %]
106             cloneItemBlock(0, '[% UniqueItemFields %]');
107         [% END %]
108
109         $("#quantity").change(function() {
110             updateCosts();
111         });
112
113         //We apply the fonction only for modify option
114         [% IF ( quantityrec ) %]
115         [% IF ( acqcreate ) %]
116         $('#quantity').blur(function() 
117         {
118             // if user decreases the quantity
119             if($(this).val() < [% quantityrec %]) 
120             {
121                 alert(_("You have deleted item(s) in the order, don't forget to delete it(them) in the catalog"));
122                 return true;
123             } 
124             else 
125             {
126                 // if user increases the quantity
127                 alert(_("You can't add a new item, please create a new order line"));
128                 // and we replace the original value
129                 $(this).val([% quantityrec %])
130                 updateCosts(); // blur is invoked after change which updated values
131                 return false;
132             }
133         });
134         [% END %]
135         [% END %]
136         
137         //keep a copy of all budgets before removing the inactives
138         disabledBudgetsCopy = $('#budget_id').html();
139         $('#budget_id .b_inactive').remove();
140
141         $('#showallbudgets').click(function() {
142             if ($(this).is(":checked")) {
143                 $('#budget_id').html(disabledBudgetsCopy); //Puts back all the funds
144             }
145             else {
146                 $('#budget_id .b_inactive').remove();
147             }
148         });
149     });
150 //]]>
151 </script>
152 </head>
153 <body id="acq_neworderempty" class="acq">
154
155 [% INCLUDE 'header.inc' %]
156 [% INCLUDE 'acquisitions-search.inc' %]
157
158 <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>
159
160 <div id="doc3" class="yui-t2">
161
162 <div id="bd">
163     <div id="yui-main">
164     <div class="yui-b">
165
166 <h2>
167     [% IF ( ordernumber ) %]
168         Modify order line
169     [% ELSE %]
170         New order
171     [% END %]
172 </h2>
173
174 <div class="error" style="display:none"></div>
175
176 [% IF ( basketno ) %]
177     <div id="acqui_basket_summary"  class="yui-g">
178     <fieldset class="rows">
179         <legend>Basket details</legend>
180         <ol>
181         [% IF ( basketnote ) %]<li><span class="label">Internal note:</span> [% basketnote %]</li>[% END %]
182         [% IF ( basketbooksellernote ) %]<li><span class="label">Vendor note:</span> [% basketbooksellernote %]</li>[% END %]
183         [% IF ( basketcontractno ) %]
184             <li><span class="label">Contract number: </span>[% basketcontractno %]</li>
185             <li><span class="label">Contract name:</span> <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=[% basketcontractno %]">[% basketcontractname %]</a></li>
186         [% END %]
187         [% IF ( authorisedbyname ) %]<li><span class="label">Managed by:</span>  [% authorisedbyname %]</li>[% END %]
188         [% IF ( creationdate ) %]<li><span class="label">Open on:</span>  [% creationdate | $KohaDates %]</li>[% END %]
189         [% IF ( closedate ) %]
190         <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post">
191         <li><span class="label">Closed on:</span>  [% closedate | $KohaDates %]</li>
192         [% IF ( basketgroups ) %]
193             <li>Basketgroup: <select id="basketgroupid" name="basketgroupid">
194                 [% FOREACH basketgroup IN basketgroups %]
195                     [% IF ( basketgroup.default ) %]
196                     <option value="[% basketgroup.id %]" selected="selected">[% basketgroup.name %]</option>
197                     [% ELSE %]
198                     <option value="[% basketgroup.id %]">[% basketgroup.name %]</option>
199                     [% END %]
200                 [% END %]
201                 </select>
202                 <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" />
203                 <input type="hidden" value="mod_basket" name="op" />
204                 <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
205             </li>
206             <fieldset class="action"><input type="submit" value="Change basketgroup" /></fieldset>
207         [% END %]
208         </form>
209         [% END %]
210         </ol>
211     </fieldset>
212     </div>
213 [% END %]
214
215 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" id="Aform" onsubmit="return Check(this);">
216
217 <fieldset class="rows">
218         <legend>
219             Catalog details
220             [% IF ( biblionumber ) %]
221                 <span><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% biblionumber %]"> Edit record</a></span>
222             [% END %]
223         </legend>
224         [% UNLESS ( existing ) %]
225         <input type="hidden" name="existing" value="no" />
226         [% END %]
227         <input type="hidden" name="ordernumber" value="[% ordernumber %]" />
228         <input type="hidden" name="basketno" value="[% basketno %]" />
229         <input type="hidden" name="booksellerid" value="[% booksellerid %]" />
230         <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
231         <input type="hidden" name="listinc" id="listinc" value="[% listincgst %]" />
232         <input type="hidden" name="applygst" id="applygst" value="[% gstreg %]" />
233         <input type="hidden" name="invoiceincgst" id="invoiceincgst" value="[% invoiceincgst %]" />
234         <input type="hidden" name="suggestionid" value="[% suggestionid %]" />
235         <input type="hidden" name="import_batch_id" value="[% import_batch_id %]" />
236
237         [% FOREACH loop_currencie IN loop_currencies %]
238             <input type="hidden" id="currency_rate_[% loop_currencie.currcode %]"  name="[% loop_currencie.currcode %]" value="[% loop_currencie.rate %]" />
239         [% END %]
240
241         <ol><li>
242             [% IF ( biblionumber ) %]
243             <span class="label">Title</span>
244                 <input type="hidden" size="50" name="title" value="[% title |html %]" /> <span class="title">[% title |html %]</span>
245             [% ELSE %]
246             <label for="entertitle" class="required">Title: </label>
247                 <input type="text" id="entertitle" size="50" name="title" value="[% title |html %]" />
248             [% END %]
249         </li>
250         <li>
251             [% IF ( biblionumber ) %]
252             <span class="label">Author: </span>
253                 <input type="hidden" size="50" name="author" id="author" value="[% author %]" />[% author %]
254             [% ELSE %]
255             <label for="author">Author: </label>
256                 <input type="text" size="50" name="author" id="author" value="[% author %]" />
257             [% END %]
258         </li>
259         <li>
260             [% IF ( biblionumber ) %]
261             <span class="label">Publisher: </span>
262                 <input type="hidden" size="50" name="publishercode" id="publishercode" value="[% publishercode %]" />[% publishercode %]
263             [% ELSE %]
264             <label for="publishercode"> Publisher: </label>
265                 <input type="text" size="50" name="publishercode" id="publishercode" value="[% publishercode %]" />
266             [% END %]
267         </li>
268         <li>
269             [% IF ( biblionumber ) %]
270             <span class="label">Edition: </span>
271                 <input type="hidden" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement %]" />[% editionstatement %]
272
273             [% ELSE %]
274             <label for="editionstatement">Edition: </label>
275                 <input type="text" size="20" name="editionstatement" id="editionstatement" value="[% editionstatement %]" />
276             [% END %]
277         </li>
278         <li>
279             [% IF ( biblionumber ) %]
280             <span class="label">Publication year: </span>
281                 <input type="hidden" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear %]" />[% publicationyear %]
282             [% ELSE %]
283             <label for="publicationyear">Publication year: </label>
284                 <input type="text" size="10" name="publicationyear" id="publicationyear" value="[% publicationyear %]" />
285             [% END %]
286         </li>
287         <li>
288             [% IF ( biblionumber ) %]
289             <span class="label">ISBN: </span>
290                 <input type="hidden" size="50" name="isbn" id="ISBN" value="[% isbn %]" />[% isbn %]
291             [% ELSE %]
292             <label for="ISBN">ISBN: </label>
293                 <input type="text" size="50" name="isbn" id="ISBN" value="[% isbn %]" />
294             [% END %]
295         </li>
296         [% IF (UNIMARC) %]
297         <li>
298             [% IF ( biblionumber ) %]
299             <span class="label">EAN: </span>
300                 <input type="hidden" size="20" name="ean" id="EAN" value="[% ean %]" />[% ean %]
301             [% ELSE %]
302             <label for="EAN">EAN: </label>
303                 <input type="text" size="20" name="ean" id="EAN" value="[% ean %]" />
304             [% END %]
305         </li>
306         [% END %]
307         <li>
308             [% IF ( biblionumber ) %]
309             <span class="label">Series: </span>
310                 <input type="hidden" size="50" name="series" id="series" value="[% seriestitle %]" />[% seriestitle %]
311             [% ELSE %]
312             <label for="series">Series: </label>
313                 <input type="text" size="50" name="series" id="series" value="[% seriestitle %]" />
314             [% END %]
315         </li>
316         </li>
317             [% UNLESS ( biblionumber ) %]
318             [% IF ( itemtypeloop ) %]
319             <li>
320                 <span class="label">Item type:</span>
321                 <select name="itemtype" style="width:12em;">
322                 [% FOREACH itemtype IN itemtypeloop %]
323                     [% IF ( itemtype.selected ) %]
324                         <option value="[% itemtype.itemtype %]" selected="selected">[% itemtype.description %]</option>
325                     [% ELSE %]
326                         <option value="[% itemtype.itemtype %]">[% itemtype.description %]</option>
327                     [% END %]
328                 [% END %]
329                 </select>
330             </li>
331             [% END %]
332             [% END %]
333         </ol>
334     </fieldset>
335
336     [% IF ( suggestionid ) %]
337         <fieldset class="rows">
338         <legend>Suggestion</legend>
339         <ol>
340           <li>
341             <span class="label">Suggested by: </span>
342             [% surnamesuggestedby %][% IF ( firstnamesuggestedby ) %], [% firstnamesuggestedby %][% END %] (<a href="/cgi-bin/koha/suggestion/suggestion.pl?suggestionid=[% suggestionid %]&amp;op=show">suggestion #[% suggestionid %]</a>)
343           </li>
344         </ol>
345         </fieldset>
346     [% END %]
347
348     [% UNLESS subscriptionid %][% # it is a suggestion, we have not items %]
349       [% IF (AcqCreateItemOrdering) %]
350
351       <div id="items_list" style="display:none">
352           <p><b>Items list</b></p>
353           <div style="width:100%;overflow:auto;">
354               <table>
355                   <thead>
356                       <tr>
357                           <th>&nbsp;</th>
358                           <th>&nbsp;</th>
359                           <th>Barcode</th>
360                           <th>Home library</th>
361                           <th>Holding library</th>
362                           <th>Not for loan</th>
363                           <th>Restricted</th>
364                           <th>Location</th>
365                           <th>Call number</th>
366                           <th>Copy number</th>
367                           <th>Stock number</th>
368                           <th>Collection code</th>
369                           <th>Item type</th>
370                           <th>Materials</th>
371                           <th>Notes</th>
372                       </tr>
373                   </thead>
374                   <tbody>
375                   </tbody>
376               </table>
377           </div>
378       </div>
379
380       <fieldset class="rows" id="itemfieldset">
381           <legend>Item</legend>
382           [% IF ( NoACQframework ) %]
383               <div class="dialog message">No ACQ framework, using default. You should create a framework with code ACQ, the items framework would be used</div>
384           [% END %]
385
386           <div id="outeritemblock"></div>
387
388       </fieldset>
389       [% END %][%# UNLESS subscriptionid %]
390     [% END %][%# IF (AcqCreateItemOrdering) %]
391     <fieldset class="rows">
392         <legend>Accounting Details</legend>
393         <ol>
394             <li>
395                 [% IF ( close ) %]
396             <span class="label required">Quantity: </span>
397                     <input type="hidden" size="20" name="quantity" value="[% quantity %]" />[% quantity %]
398                 [% ELSE %]
399                     <label class="required" for="quantity">Quantity: </label>
400                     [% IF (AcqCreateItemOrdering) %]
401                         [% IF subscriptionid %]
402                             <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
403                         [% ELSE %]
404                             <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="0" />
405                         [% END %]
406                     [% ELSE %]
407                         [% IF subscriptionid %]
408                             <input type="text" readonly="readonly" size="20" id="quantity" name="quantity" value="1" />
409                         [% ELSE %]
410                             <input type="text" size="20" id="quantity" name="quantity" value="[% quantityrec %]" onchange="updateCosts();" />
411                         [% END %]
412                     [% END %]
413                 [% END %]
414                 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
415                 <input id="origquantityrec" readonly="readonly" type="hidden" name="origquantityrec" value="1" />
416             </li>
417             <li>
418                 [% IF ( close ) %]
419             <span class="label required">Fund: </span>
420                     <input type="hidden" size="20" name="budget_id" id="budget_id" value="[% budget_id %]" />[% Budget_name %]
421                 [% ELSE %]
422                 <label class="required" for="budget_id">Fund: </label>
423                 <select id="budget_id" onchange="fetchSortDropbox(this.form)" size="1" name="budget_id">
424                         <option value="">Select a budget</option>
425                 [% FOREACH budget_loo IN budget_loop %]
426                     [% IF ( budget_loo.b_sel ) %]
427                         <option value="[% budget_loo.b_id %]" selected="selected">[% budget_loo.b_txt %]</option>
428                     [% ELSE %]
429                         [% IF ( budget_loo.b_active ) %]<option value="[% budget_loo.b_id %]">[% budget_loo.b_txt %]</option>
430                         [% ELSE %]<option value="[% budget_loo.b_id %]" class="b_inactive">[% budget_loo.b_txt %]</option>
431                         [% END %]
432                     [% END %]
433                 [% END %]
434                 </select>
435                 <label for="showallbudgets" style="float:none;width:auto;">&nbsp;Show all:</label>
436                 <input type="checkbox" id="showallbudgets" />
437                 [% END %]
438             </li>
439                 <li>
440                 [% IF ( close ) %]
441                         <span class="label">Currency: </span>
442                         <input type="hidden" size="10" name="currency" id="currency" value="[% currency %]" />[% currency %]
443                 [% ELSE %]
444                         <label for="currency">Currency:</label>
445                         <select name="currency" id="currency" onchange="updateCosts();">
446                         [% FOREACH loop_currencie IN loop_currencies %]
447                         [% 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 %]
448                         </select>
449                 [% END %]
450                 </li>
451             <li>
452                 [% IF ( close ) %]
453                     <span class="label">Vendor price: </span>
454                     <input type="hidden" size="20" name="listprice" id="listprice" value="[% listprice %]" />[% listprice %]
455                 [% ELSE %]
456                 <label for="listprice">Vendor price: </label>
457                     <input type="text" size="20" name="listprice" id="listprice" value="[% listprice %]" onchange="updateCosts()" />
458                 [% END %]
459             </li>
460             [% UNLESS ( close ) %]
461             <li>
462                     <label for="uncertainprice">Uncertain price: </label>
463                     [% IF ( uncertainprice ) %]
464                     <input type="checkbox" name="uncertainprice"  id="uncertainprice" value="1" checked="checked" />
465                     [% ELSE %]
466                     <input type="checkbox" name="uncertainprice" id="uncertainprice" value="1" />
467                 [% END %]
468             </li>
469             [% END %]
470             [% IF ( gst_values ) %]
471                 <li>
472                     [% IF ( close ) %]
473                         <span class="label">Tax rate: </span>
474                         <input type="hidden" size="20" name="gstrate" id="gstrate" value="[% gstrate %]" />[% gstrate %]%
475                     [% ELSE %]
476                         <label for="gst">Tax rate: </label>
477                         <select name="gstrate" id="gstrate" onchange="updateCosts();">
478                         [% FOREACH gst IN gst_values %]
479                           [% IF ( gst.option == gstrate ) %]
480                             <option value="[% gst.option %]" selected="selected">[% gst.option * 100 | format("%.1f") %]%</option>
481                           [% ELSE %]
482                             <option value="[% gst.option %]">[% gst.option * 100 | format("%.1f") %]%</option>
483                           [% END %]
484                         [% END %]
485                         </select>
486                     [% END %]
487                 [% ELSE %]
488                     <input type="hidden" name="gstrate" value="0" />
489                 </li>
490             [% END %]
491             <li>
492                 <label for="discount">Discount: </label>
493                 [% IF ( close ) %]
494                     [% IF ( orderdiscount ) %]
495                         <input type="hidden" name="discount" id="discount" value="[% orderdiscount %]" />[% orderdiscount_2dp %]%
496                     [% ELSE %]
497                         <input type="hidden" name="discount" id="discount" value="[% discount %]" />[% discount_2dp %]%
498                     [% END %]
499                 [% ELSE %]
500                     [% IF ( orderdiscount ) %]
501                         <input type="text" size="6" name="discount" id="discount" value="[% orderdiscount %]" onchange="updateCosts();" />%
502                     [% ELSE %]
503                         <input type="text" size="6" name="discount" id="discount" value="[% discount %]" onchange="updateCosts();" />%
504                     [% END %]
505                 [% END %]
506             </li>
507             <li>
508                 [% IF ( close ) %]
509                     <span class="label">Replacement cost: </span>
510                     <input type="hidden" size="20" name="rrp" id="rrp" value="[% rrp %]" />[% rrp %]
511                 [% ELSE %]
512                     <label for="rrp">Replacement cost: </label>
513                     <input type="text" size="20" name="rrp" id="rrp" value="[% rrp %]" /> (adjusted for [% cur_active %])
514                 [% END %]
515             </li>
516             <li>
517                 [% IF ( close ) %]
518                     <label for="ecost">Budgeted cost: </label>
519                     <input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" readonly="readonly"  />
520                 [% ELSE %]
521                     <label for="ecost">Budgeted cost: </label>
522                     <input type="text" size="20" name="ecost" id="ecost" value="[% ecost %]" />
523                 [% END %]
524             </li>
525             <li>
526                 [% IF ( close ) %]
527                     <label for="total">Total: </label>
528                     <input type="text" id="total" size="20" name="total" value="[% total %]" readonly="readonly" />
529                 [% ELSE %]
530                     <label for="total">Total: </label>
531                     <input type="text" id="total" size="20" name="total" value="[% total %]" /> (budgeted cost * quantity)
532                 [% END %]
533             </li>
534             <li>
535                 [% IF ( close ) %]
536                     <label for="unitprice">Actual cost: </label>
537                     <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice %]" readonly="readonly" />
538                 [% ELSE %]
539                     <label for="unitprice">Actual cost: </label>
540                     <input type="text" id="unitprice" size="20" name="unitprice" value="[% unitprice %]" />
541                 [% END %]
542             </li>
543             <li>
544                 <label for="notes">Notes: </label>
545                 <textarea id="notes" cols="30" rows="3" name="notes" >[% IF ( notes ) %][% notes %][% END %]</textarea>
546             </li>
547             <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
548                 <label for="sort1">Statistic 1: </label>
549                 <span id="sort1_zone">
550                 [% IF CGIsort1 %]
551                     <select id="sort1" size="1" name="sort1">
552                     [% FOREACH sort_opt IN CGIsort1 %]
553                        [% IF sort_opt.default %]
554                           <option value="[% sort_opt.value %]" selected="selected">[% sort_opt.label %]</option>
555                         [% ELSE %]
556                           <option value="[% sort_opt.value %]">[% sort_opt.label %]</option>
557                         [% END %]
558                     [% END %]
559                     </select>
560                 [% ELSE %]
561                     <input type="text" id="sort1" size="20" name="sort1" value="[% sort1 %]" />
562                 [% END %]
563                 </span>
564             </li>
565             <li>
566                 <label for="sort2">Statistic 2: </label>
567                 <span id="sort2_zone">
568                 [% IF CGIsort2 %]
569                     <select id="sort2" size="1" name="sort2">
570                     [% FOREACH sort_opt IN CGIsort2 %]
571                        [% IF sort_opt.default %]
572                           <option value="[% sort_opt.value %]" selected="selected">[% sort_opt.label %]</option>
573                         [% ELSE %]
574                           <option value="[% sort_opt.value %]">[% sort_opt.label %]</option>
575                         [% END %]
576                     [% END %]
577                     </select>
578                 [% ELSE %]
579                     <input type="text" id="sort2" size="20" name="sort2" value="[% sort2 %]" />
580                 [% END %]
581                 </span>
582             </li>
583         </ol>
584     </fieldset>
585     <fieldset class="action">
586         <input type="hidden" name="subscriptionid" value="[% subscriptionid %]" />
587         <input type="submit" value="Save" />
588         [% IF (suggestionid) %]
589             <a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Cancel</a>
590         [% ELSE %]
591             [% IF subscriptionid %]
592                 <a class="cancel" href="/cgi-bin/koha/acqui/newordersubscription.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]">Cancel</a>
593             [% ELSE %]
594                 <a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Cancel</a>
595             [% END %]
596         [% END %]
597     </fieldset>
598 </form>
599 </div>
600 </div>
601 <div class="yui-b">
602 [% INCLUDE 'acquisitions-menu.inc' %]
603 </div>
604 </div>
605 [% INCLUDE 'intranet-bottom.inc' %]