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