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