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