removing useless code (copied from addbiblio)
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / neworderempty.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Acquisitions &rsaquo; Shopping Basket <!-- TMPL_VAR NAME="basketno" --> &rsaquo; <!-- TMPL_IF name="ordnum" -->Modify order details (line #<!-- TMPL_VAR NAME="ordnum" -->)<!-- TMPL_ELSE -->New order<!-- /TMPL_IF --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4
5 <script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/acq.js"></script>
6 <script type="text/javascript" src="<!-- TMPL_VAR NAME='themelang' -->/js/additem.js"></script>
7 <script type="text/javascript">
8 //<![CDATA[
9  actTotal = "";
10
11 function Check(ff) {
12     var ok=0;
13     var _alertString="Form not submitted because of the following problem(s)\n";
14
15     _alertString +="-------------------------------------------------------------------\n\n";
16
17     if ( isNull(ff.title,1)  &&  isNull(ff.entertitle,1)   ){
18         ok=1;
19                     _alertString += "\n- " + _("Title cannot be empty");
20     }
21
22     if (!(isNum(ff.quantity,0))){
23         ok=1;
24                     _alertString += "\n- " + _("Quanity must be greater than '0'");
25     }
26
27     if (!(isNum(ff.list_price,0))){
28         ok=1;
29                     _alertString += "\n- " + _("Vendor price must be a number");
30     }
31
32     if (!(isNum(ff.total,0))){
33         ok=1;
34                     _alertString += "\n- " + _("Total must be a number");
35     }
36
37         if (totalExceedsBudget(ff.budget_id.value, ff.total.value  )  ) {
38         ok=1;
39         _alertString += "\n- " + "Order total (" + ff.total.value + ") exceeds budget available ("+actTotal+")";
40     }
41
42    if (ok) {
43         alert(_alertString);
44     return false;
45     }
46
47    ff.submit();
48
49 }
50
51
52 //]]>
53 </script>
54 </head>
55 <body>
56
57 <div  name="<!-- TMPL_VAR NAME="ordnum" -->" >
58
59 <!-- TMPL_INCLUDE NAME="header.inc" -->
60 <!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
61
62 <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/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->">Shopping Basket <!-- TMPL_VAR NAME="basketno" --></a> &rsaquo; <!-- TMPL_IF name="ordnum" -->Modify order details (line #<!-- TMPL_VAR NAME="ordnum" -->)<!-- TMPL_ELSE -->New order<!-- /TMPL_IF --></div>
63
64 <div id="doc3" class="yui-t2">
65
66    <div id="bd">
67         <div id="yui-main">
68         <div class="yui-b">
69
70 <h1>
71     <!-- TMPL_IF name="ordnum" -->
72         Modify order details (line #<!-- TMPL_VAR NAME="ordnum" -->)
73     <!-- TMPL_ELSE -->
74         New order
75     <!-- /TMPL_IF -->
76         <!-- TMPL_IF name="suggestionid" -->(defined from suggestion #<!-- TMPL_VAR NAME="suggestionid" -->)<!-- /TMPL_IF -->
77 </h1>
78
79 <!-- TMPL_IF name="basketno" -->
80 <fieldset class="rows">
81 <div id="basket-details">Basket Details
82   <ul>  <li>Basket number: <!-- TMPL_VAR NAME="basketno" --></li>
83     <li>Managed by: <!-- TMPL_VAR NAME="authorisedbyname" --></li>
84     <li>Open on: <!-- TMPL_VAR NAME="creationdate" --></li>
85     <li>For vendor ID: <!-- TMPL_VAR NAME="booksellerid" --></li>
86     <li>Invoice number: <!-- TMPL_VAR NAME="booksellerinvoicenumber" --></li>
87     <!-- TMPL_IF name="closedate" --><li>Closed on: <!-- TMPL_VAR name="closedate" --></li><!-- /TMPL_IF --></ul>
88 </div>
89 </fieldset>
90 <!-- /TMPL_IF -->
91
92 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" name="Aform">
93
94
95
96 <fieldset class="rows">
97         <legend>Catalog details</legend>
98         <!-- TMPL_UNLESS name="existing" -->
99                 <input type="hidden" name="existing" value="no" />
100         <!-- /TMPL_UNLESS -->
101         <input type="hidden" name="ordnum" value="<!-- TMPL_VAR NAME="ordnum" -->" />
102         <input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
103         <input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
104         <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
105         <input type="hidden" name="biblioitemnumber" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->" />
106         <input type="hidden" name="oldtype" value="<!-- TMPL_VAR NAME="itemtype" -->" />
107         <input type="hidden" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" />
108         <input type="hidden" name="listinc" value="<!-- TMPL_VAR NAME="listincgst" -->" />
109         <input type="hidden" name="currency" value="<!-- TMPL_VAR NAME="currency" -->" />
110         <input type="hidden" name="applygst" value="<!-- TMPL_VAR NAME="gstreg" -->" />
111         <input type="hidden" name="invoiceincgst" value="<!-- TMPL_VAR NAME="invoiceincgst" -->" />
112
113
114         <input type="hidden" name="gstrate" value="<!-- TMPL_VAR NAME="gstrate" -->" />
115
116         <input type="hidden" name="suggestionid" value="<!-- TMPL_VAR NAME="suggestionid" -->" />
117         <!-- TMPL_LOOP NAME="loop_currencies" -->
118             <input type="hidden" name="<!-- TMPL_VAR NAME="currency" -->" value="<!-- TMPL_VAR NAME="rate" -->" />
119         <!-- /TMPL_LOOP -->
120         <ol><li>
121             <!-- TMPL_IF name="biblionumber" -->
122                         <span class="label">Title</span>
123                 <input type="hidden" size="20" name="title" value="<!-- TMPL_VAR NAME="title" ESCAPE="HTML" -->" /> <span class="title"><!-- TMPL_VAR NAME="title" --></span>
124             <!-- TMPL_ELSE -->
125             <label for="entertitle" class="required">Title: </label>
126                 <input type="text" id="entertitle" size="20" name="title" value="<!-- TMPL_VAR NAME="title" ESCAPE="HTML" -->" />
127             <!-- /TMPL_IF -->
128         </li>
129
130
131         <li>
132             <!-- TMPL_IF name="biblionumber" -->
133                         <span class="label">Author: </span>
134                 <input type="hidden" size="20" name="author" id="author" value="<!-- TMPL_VAR NAME="author" -->" /><!-- TMPL_VAR NAME="author" -->
135             <!-- TMPL_ELSE -->
136             <label for="author">Author: </label>
137                 <input type="text" size="20" name="author" id="author" value="<!-- TMPL_VAR NAME="author" -->" />
138             <!-- /TMPL_IF -->
139         </li>
140         <li>
141             <!-- TMPL_IF name="biblionumber" -->
142                         <span class="label">Publisher: </span>
143                 <input type="hidden" size="20" name="publishercode" id="publishercode" value="<!-- TMPL_VAR NAME="publishercode" -->" /><!-- TMPL_VAR NAME="publishercode" -->
144             <!-- TMPL_ELSE -->
145             <label for="publishercode"> Publisher: </label>
146                 <input type="text" size="20" name="publishercode" id="publishercode" value="<!-- TMPL_VAR NAME="publishercode" -->" />
147             <!-- /TMPL_IF -->
148         </li>
149         <li>
150             <!-- TMPL_IF name="biblionumber" -->
151                         <span class="label">Copyright date: </span>
152                 <input type="hidden" size="20" name="copyrightdate" id="copyrightdate" value="<!-- TMPL_VAR NAME="copyrightdate" -->" /><!-- TMPL_VAR NAME="copyrightdate" -->
153             <!-- TMPL_ELSE -->
154             <label for="copyrightdate">Copyright date: </label>
155                 <input type="text" size="20" name="copyrightdate" id="copyrightdate" value="<!-- TMPL_VAR NAME="copyrightdate" -->" />
156             <!-- /TMPL_IF -->
157         </li>
158         <li>
159             <!-- TMPL_IF name="biblionumber" -->
160                         <span class="label">Item type: </span>
161                 <input type="hidden" size="20" name="itemtype" id="itemtype" value="<!-- TMPL_VAR NAME="itemtype" -->" /><!-- TMPL_VAR NAME="itemtype_desc" -->
162                         <!-- TMPL_ELSE -->
163             <label for="format">Item type: </label>
164             <select name="format" id="format">
165             <!-- TMPL_LOOP name="itypeloop" -->
166                                 <option value="<!-- TMPL_VAR NAME="itemtype" -->"><!-- TMPL_VAR NAME="desc" --></option>
167             <!-- /TMPL_LOOP -->
168             </select>
169                          <!-- /TMPL_IF -->
170         </li>
171         <li>
172             <!-- TMPL_IF name="biblionumber" -->
173                         <span class="label">ISBN: </span>
174                 <input type="hidden" size="20" name="ISBN" id="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" /><!-- TMPL_VAR NAME="isbn" -->
175             <!-- TMPL_ELSE -->
176             <label for="ISBN">ISBN: </label>
177                 <input type="text" size="20" name="ISBN" id="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" />
178             <!-- /TMPL_IF -->
179         </li>
180         <li>
181             <!-- TMPL_IF name="biblionumber" -->
182                         <span class="label">Series: </span>
183                 <input type="hidden" size="20" name="series" id="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" /><span class="title"><!-- TMPL_VAR NAME="seriestitle" --></span>
184             <!-- TMPL_ELSE -->
185             <label for="series">Series: </label>
186                 <input type="text" size="20" name="series" id="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" />
187             <!-- /TMPL_IF -->
188         </li>
189                 </ol>
190     </fieldset>
191     <!-- TMPL_IF name="items" -->
192     <fieldset class="rows">
193         <legend>Item</legend>
194
195         <!-- TMPL_LOOP NAME="items" -->
196         <div id="outeritemblock">
197         <div id="itemblock">
198             <ol><!-- TMPL_LOOP NAME="iteminformation" --><li>
199                 <div class="subfield_line" style="<!-- TMPL_VAR NAME='hidden' -->;" id="subfield<!-- TMPL_VAR NAME='serialid' --><!-- TMPL_VAR NAME='countitems' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->">
200
201                     <label><!-- TMPL_VAR NAME="subfield" --> - <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF --><!-- TMPL_VAR NAME="marc_lib" --><!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF --></label>
202                     <!-- TMPL_VAR NAME="marc_value" -->
203                     <input type="hidden" name="itemid" value="1" />
204                     <input type="hidden" name="kohafield" value="<!-- TMPL_VAR NAME="kohafield" -->" />
205                     <input type="hidden" name="tag" value="<!-- TMPL_VAR NAME="tag" -->" />
206                     <input type="hidden" name="subfield" value="<!-- TMPL_VAR NAME="subfield" -->" />
207                     <input type="hidden" name="mandatory" value="<!-- TMPL_VAR NAME="mandatory" -->" />
208                     <!-- TMPL_IF NAME="ITEM_SUBFIELDS_ARE_NOT_REPEATABLE" -->
209                         <span class="buttonPlus" onclick="CloneSubfield('subfield<!-- TMPL_VAR NAME='serialid' --><!-- TMPL_VAR NAME='countitems' --><!-- TMPL_VAR NAME='subfield' --><!-- TMPL_VAR name="random" -->')">+</span>
210                     <!-- /TMPL_IF -->
211
212                 </div></li>
213             <!-- /TMPL_LOOP-->
214             </ol>
215             <a style="cursor: pointer; color: grey; font-size: 180%;" onclick="cloneItemBlock('itemblock<!-- TMPL_VAR name="itemBlockIndex" -->')">+</a>
216             <a style="display:none; cursor: pointer; color: grey; font-size: 180%;" onclick="deleteItemBlock('itemblock<!-- TMPL_VAR name="itemBlockIndex" -->')">-</a>
217         </div><!-- /iteminformation -->
218         </div>
219
220         <!--/TMPL_LOOP--> <!-- /items -->
221     </fieldset>
222     <!-- /TMPL_IF --> <!-- items -->
223         <fieldset class="rows">
224         <legend>Accounting Details</legend>
225                 <ol>
226             <li>
227                 <!-- TMPL_IF name="close" -->
228                         <span class="label required">Quantity: </span>
229                     <input type="hidden" size="20" id="quantity" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->" /><!-- TMPL_VAR NAME="quantity" -->
230                 <!-- TMPL_ELSE -->
231                 <label class="required" for="quantity">Quantity: </label>
232                     <!-- TMPL_IF name="items" -->
233                         <input type="text" READONLY size="20" id="quantityrec" name="quantity" value="1" onchange="calcNeworderTotal(this.form);" />
234                     <!-- TMPL_ELSE -->
235                         <input type="text" size="20" id="quantityrec" name="quantity" value="<!-- TMPL_VAR name="quantityrec" -->" onchange="calcNeworderTotal(this.form);" />
236                     <!-- /TMPL_IF -->
237                 <!--/TMPL_IF-->
238                 <!-- origquantityrec only here for javascript compatibility (additem.js needs it, useless here, usefull when receiveing an order -->
239                 <input id="origquantityrec" READONLY type="hidden" name="origquantityrec" value="1" />
240             </li>
241
242
243             <li>
244                 <!-- TMPL_IF name="close" -->
245                         <span class="label">Budget: </span>
246                     <input type="hidden" size="20" name="budget_id" id="budget_id" value="<!-- TMPL_VAR NAME="budget_id" -->" /><!-- TMPL_VAR NAME="Budget_name" -->
247                 <!-- TMPL_ELSE -->
248                 <label for="budget_id">Budget: </label>
249                     <!-- TMPL_VAR NAME="budget_dropbox" -->
250                 <!--/TMPL_IF-->
251             </li>
252
253             <li>
254                 <!-- TMPL_IF name="close" -->
255                         <span class="label">Vendor price: </span>
256                     <input type="hidden" size="20" name="list_price" id="list_price" value="<!-- TMPL_VAR NAME="list_price" -->" /><!-- TMPL_VAR NAME="list_price" -->
257                 <!-- TMPL_ELSE -->
258                 <label for="list_price">Vendor price: </label>
259                     <input type="text" size="20" name="list_price" id="list_price" value="<!-- TMPL_VAR NAME="list_price" -->" onchange="calcNeworderTotal(this.form)" /> (entered as <!-- TMPL_VAR NAME="currency" -->)
260
261                 <!--/TMPL_IF-->
262             </li>
263             <!-- TMPL_UNLESS NAME="close" -->
264             <li>
265                     <label for="uncertainprice">Uncertain price: </label>
266                     <!--TMPL_IF NAME="uncertainprice" -->
267                     <input type="checkbox" name="uncertainprice" value="1" checked />
268                     <!-- TMPL_ELSE -->
269                     <input type="checkbox" name="uncertainprice" value="1" />
270                    <!--/TMPL_IF-->
271             </li>
272             <!-- /TMPL_UNLESS -->
273                 <!-- TMPL_IF name="close" -->
274                         <span class="label">Replacement cost: </span>
275                     <input type="hidden" size="20" name="rrp" id="rrp" value="<!-- TMPL_VAR NAME="rrp" -->" /><!-- TMPL_VAR NAME="rrp" -->
276                 <!-- TMPL_ELSE -->
277                 <label for="rrp">Replacement cost: </label>
278                     <input type="text" size="20" name="rrp" id="rrp" value="<!-- TMPL_VAR NAME="rrp" -->" /> (adjusted for <!-- TMPL_VAR NAME="cur_active" -->)
279                 <!--/TMPL_IF-->
280             </li>
281             <li>
282                 <!-- TMPL_IF name="close" -->
283                         <label for="ecost">Budgeted cost: </label>
284                     <input type="text" size="20" name="ecost" id="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" readonly="readonly"  />
285                 <!-- TMPL_ELSE -->
286                 <label for="ecost">Budgeted cost: </label>
287                     <input type="text" size="20" name="ecost" id="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" />
288                 <!--/TMPL_IF-->
289                 <!-- TMPL_IF name="discount_2dp" -->  (adjusted for <!-- TMPL_VAR name="discount_2dp" -->% discount)  <!--/TMPL_IF-->
290
291             </li>
292             <!-- TMPL_IF NAME="GST"-->
293             <li>
294                                 <!-- TMPL_IF name="close" -->
295                         <label for="GST">Budgeted GST: </label>
296                 <input type="text" id="" size="20" name="GST" value="" id="GST" readonly="readonly" />
297                                 <!-- TMPL_ELSE -->
298                 <label for="GST">Budgeted GST: </label>
299                 <input type="text" size="20" name="GST" id="GST" value="" />
300                                 <!--/TMPL_IF-->
301             </li>
302             <!-- /TMPL_IF -->
303
304             <li>
305                 <!-- TMPL_IF name="close" -->
306                         <label for="total">Total: </label>
307                                 <input type="text" id="total" size="20" name="total" value="<!-- TMPL_VAR name="total" -->" readonly="readonly" />
308                                 <!-- TMPL_ELSE -->
309                 <label for="total">Total: </label>
310                 <input type="text" id="total" size="20" name="total" value="<!-- TMPL_VAR name="total" -->" /> (budgeted cost * quantity)
311                                 <!--/TMPL_IF-->
312             </li>
313             <li>
314                                 <!-- TMPL_IF name="close" -->
315                         <label for="cost">Actual cost: </label>
316                 <input type="text" id="cost" size="20" name="cost" value="<!-- TMPL_VAR name="ecost"-->" readonly="readonly" />
317                                 <!-- TMPL_ELSE -->
318                 <label for="cost">Actual cost: </label>
319                 <input type="text" id="cost" size="20" name="cost" value="<!-- TMPL_VAR name="ecost"-->" />
320                                 <!--/TMPL_IF-->
321             </li>
322             <li>
323                 <label for="purchaseordernumber">Purchase order: </label>
324                 <input type="text" id="purchaseordernumber" size="20" name="purchaseordernumber"  value="<!-- TMPL_VAR name="purchaseordernumber" -->" />
325             </li>
326             <li>
327                 <label for="invoice">Invoice number: </label>
328                 <input type="text" id="invoice" size="20" name="invoice"  value="<!-- TMPL_VAR name="invoice" -->" /> (Fill when receiving)
329             </li>
330             <li>
331                 <label for="notes">Notes: </label>
332                 <textarea id="notes" cols="30" rows="3" name="notes"><!-- TMPL_VAR NAME="notes" --></textarea>
333             </li>
334
335
336
337             <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
338                 <label for="sort1">Planning value1: </label>
339
340                 <!-- TMPL_IF Name="CGIsort1" -->
341                     <!-- TMPL_VAR Name="CGIsort1" -->
342                 <!-- TMPL_ELSE -->
343
344                     <input type="text" id="sort1" size="20" name="sort1" value="<!-- TMPL_VAR NAME="sort1" -->" />
345                 <!--/TMPL_IF -->
346             </li>
347
348
349             <li>
350                 <label for="sort2">Planning value2: </label>
351
352                 <!-- TMPL_IF Name="CGIsort2" -->
353                     <!-- TMPL_VAR Name="CGIsort2" -->
354                 <!-- TMPL_ELSE -->
355                     <input type="text" id="sort2" size="20" name="sort2" value="<!-- TMPL_VAR NAME="sort2" -->" />
356                 <!--/TMPL_IF -->
357             </li>
358
359
360
361 </ol>
362     </fieldset>
363     <fieldset class="action">
364         <input type="button" value="Save" onclick="Check(this.form)" /> <!-- TMPL_IF name="suggestionid" --><a class="cancel" href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=<!-- TMPL_VAR NAME="booksellerid" -->&basketno=<!-- TMPL_VAR NAME="basketno" -->">Cancel</a><!-- TMPL_ELSE --><a class="cancel" href="/cgi-bin/koha/acqui/basket.pl?basketno=<!-- TMPL_VAR NAME="basketno" -->">Cancel</a><!-- /TMPL_IF -->
365     </fieldset>
366 </form>
367 </div>
368 </div>
369 <div class="yui-b">
370 <!-- TMPL_INCLUDE NAME="acquisitions-menu.inc" -->
371 </div>
372 </div>
373 </div>
374 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->