Spelling corrections: organisation->organization, authorise->authorize, catalogue...
[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 <script type="text/javascript">
5 //<![CDATA[
6 function update(f){
7 //collect values
8 quantity=f.quantity.value
9 if (quantity ==0) {
10     alert("Quantity must be >0");
11 }
12 discount=f.discount.value
13 listinc=parseInt(f.listinc.value)
14 currency=f.currency.value
15 applygst=parseInt(f.applygst.value)
16 listprice=f.list_price.value
17 //  rrp=f.rrp.value
18 //  ecost=f.ecost.value  //budgetted cost
19 //  GST=f.GST.value
20 //  total=f.total.value
21 //make useful constants out of the above
22 exchangerate=f.elements[currency].value      //get exchange rate
23 gst_on=(!listinc && applygst);
24 //do real stuff
25 rrp=listprice*exchangerate;
26 ecost=rrp*(100-discount)/100
27 GST=0;
28 if (gst_on){
29     rrp=rrp*(1+<!-- TMPL_VAR NAME="gstrate" -->);
30     GST=ecost*(<!-- TMPL_VAR NAME="gstrate" -->);
31 }
32
33 total=(ecost+GST)*quantity
34
35 f.rrp.value=rrp;
36 f.ecost.value=ecost;
37 f.total.value=total;
38 <!-- TMPL_IF NAME="GST"-->
39 f.GST.value=GST;
40 <!-- /TMPL_IF -->
41 return true;
42 }
43
44 function messenger(X,Y,etc){    // FIXME: unused?
45     win=window.open("","mess","height="+X+",width="+Y+",screenX=150,screenY=0");
46     win.focus();
47     win.document.close();
48     win.document.write("<body link='#333333' bgcolor='#ffffff' text='#000000'><font size='2'><p><br />");
49     win.document.write(etc);
50     win.document.write("<center><form><input type=button onclick='self.close()' value='Close'></form></center>");
51     win.document.write("</font></body></html>");
52 }
53
54 function check(f) {
55 quantity=f.quantity.value
56 title=f.title.value
57 if (title == "") {
58     alert("Title can't be empty");
59     return false;
60 }
61 if (quantity ==0) {
62     alert("Quantity must be >0");
63     return false;
64 }
65     document.frusin.submit();
66 }
67 //]]>
68 </script>
69 </head>
70 <body>
71 <!-- TMPL_INCLUDE NAME="header.inc" -->
72 <!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
73
74 <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>
75
76 <div id="doc3" class="yui-t2">
77    
78    <div id="bd">
79         <div id="yui-main">
80         <div class="yui-b">
81         
82 <h1>
83     <!-- TMPL_IF name="ordnum" -->
84         Modify order details (line #<!-- TMPL_VAR NAME="ordnum" -->)
85     <!-- TMPL_ELSE -->
86         New order
87     <!-- /TMPL_IF -->
88         <!-- TMPL_IF name="suggestionid" -->(defined from suggestion #<!-- TMPL_VAR NAME="suggestionid" -->)<!-- /TMPL_IF -->
89 </h1>
90
91 <!-- TMPL_IF name="basketno" -->
92 <div id="basket-details">Basket Details
93   <ul>  <li>Basket number: <!-- TMPL_VAR NAME="basketno" --></li>
94     <li>Managed by: <!-- TMPL_VAR NAME="authorisedbyname" --></li>
95     <li>Open on: <!-- TMPL_VAR NAME="creationdate" --></li>
96     <li>For vendor ID: <!-- TMPL_VAR NAME="booksellerid" --></li>
97     <li>Invoice number: <!-- TMPL_VAR NAME="booksellerinvoicenumber" --></li>
98     <!-- TMPL_IF name="closedate" --><li>Closed on: <!-- TMPL_VAR name="closedate" --></li><!-- /TMPL_IF --></ul>
99 </div>
100 <!-- /TMPL_IF -->
101
102 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" name="frusin">
103 <fieldset class="rows">
104         <legend>Catalog details</legend>
105         <!-- TMPL_UNLESS name="existing" -->
106                 <input type="hidden" name="existing" value="no" />
107         <!-- /TMPL_UNLESS -->
108         <input type="hidden" name="ordnum" value="<!-- TMPL_VAR NAME="ordnum" -->" />
109         <input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
110         <input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
111         <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
112         <input type="hidden" name="biblioitemnumber" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->" />
113         <input type="hidden" name="oldtype" value="<!-- TMPL_VAR NAME="itemtype" -->" />
114         <input type="hidden" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" />
115         <input type="hidden" name="listinc" value="<!-- TMPL_VAR NAME="listincgst" -->" />
116         <input type="hidden" name="currency" value="<!-- TMPL_VAR NAME="currency" -->" />
117         <input type="hidden" name="applygst" value="<!-- TMPL_VAR NAME="gstreg" -->" />
118         <input type="hidden" name="suggestionid" value="<!-- TMPL_VAR NAME="suggestionid" -->" />
119         <!-- TMPL_LOOP NAME="loop_currencies" -->
120             <input type="hidden" name="<!-- TMPL_VAR NAME="currency" -->" value="<!-- TMPL_VAR NAME="rate" -->" />
121         <!-- /TMPL_LOOP -->
122         <ol><li>
123             <!-- TMPL_IF name="biblionumber" -->
124                         <span class="label">Title</span>
125                 <input type="hidden" size="20" name="title" value="<!-- TMPL_VAR NAME="title" -->" /> <span class="title"><!-- TMPL_VAR NAME="title" --></span>
126             <!-- TMPL_ELSE -->
127             <label for="entertitle" class="required">Title: </label>
128                 <input type="text" id="entertitle" size="20" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
129             <!-- /TMPL_IF -->
130         </li>
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         <li>
190             <label for="branch">Library: </label>
191             <select name="branch" id="branch">
192             <!-- TMPL_LOOP name="branchloop" -->
193                 <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
194                                 <!-- TMPL_ELSE -->
195                                 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
196                                 <!-- /TMPL_IF -->
197             <!-- /TMPL_LOOP -->
198             </select>
199         </li>
200                 </ol>
201     </fieldset>
202         <fieldset class="rows">
203         <legend>Accounting Details</legend>
204                 <ol>
205             <li>
206                 <!-- TMPL_IF name="close" -->
207                         <span class="label required">Quantity: </span>
208                     <input type="hidden" size="20" id="quantity" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->" /><!-- TMPL_VAR NAME="quantity" -->
209                 <!-- TMPL_ELSE -->
210                 <label class="required" for="quantity">Quantity: </label>
211                     <input type="text" size="20" id="quantity" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->" onchange="update(this.form);" />
212                 <!--/TMPL_IF-->
213             </li>
214             <li>
215                 <!-- TMPL_IF name="close" -->
216                         <span class="label">Fund: </span>
217                     <input type="hidden" size="20" name="bookfund" id="bookfund" value="<!-- TMPL_VAR NAME="bookfundid" -->" /><!-- TMPL_VAR NAME="bookfundname" -->
218                 <!-- TMPL_ELSE -->
219                 <label for="bookfund">Fund: </label>
220                     <!-- TMPL_VAR NAME="CGIbookfund" -->
221                 <!--/TMPL_IF-->
222             </li>
223             <li>
224                 <!-- TMPL_IF name="close" -->
225                         <span class="label">Vendor price: </span>
226                     <input type="hidden" size="20" name="list_price" id="list_price" value="<!-- TMPL_VAR NAME="listprice" -->" /><!-- TMPL_VAR NAME="listprice" -->
227                 <!-- TMPL_ELSE -->
228                 <label for="list_price">Vendor price: </label>
229                     <input type="text" size="20" name="list_price" id="list_price" value="<!-- TMPL_VAR NAME="listprice" -->" onchange="update(this.form)" />
230                 <!--/TMPL_IF-->
231             </li>
232             <li>
233                 <!-- TMPL_IF name="close" -->
234                         <span class="label">Replacement cost: </span>
235                     <input type="hidden" size="20" name="rrp" id="rrp" value="<!-- TMPL_VAR NAME="rrp" -->" /><!-- TMPL_VAR NAME="rrp" -->
236                 <!-- TMPL_ELSE -->
237                 <label for="rrp">Replacement cost : </label>
238                     <input type="text" size="20" name="rrp" id="rrp" value="<!-- TMPL_VAR NAME="rrp" -->" />
239                 <!--/TMPL_IF-->
240             </li>
241             <li>
242                 <!-- TMPL_IF name="close" -->
243                         <label for="ecost">Budgeted cost: </label>
244                     <input type="text" size="20" name="ecost" id="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" readonly="readonly"  />
245                 <!-- TMPL_ELSE -->
246                 <label for="ecost">Budgeted cost: </label>
247                     <input type="text" size="20" name="ecost" id="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" />
248                 <!--/TMPL_IF-->
249             </li>
250             <!-- TMPL_IF NAME="GST"-->
251             <li>
252                                 <!-- TMPL_IF name="close" -->
253                         <label for="GST">Budgeted GST: </label>
254                 <input type="text" id="" size="20" name="GST" value="" id="GST" readonly="readonly" />
255                                 <!-- TMPL_ELSE -->
256                 <label for="GST">Budgeted GST: </label>
257                 <input type="text" size="20" name="GST" id="GST" value="" />
258                                 <!--/TMPL_IF-->
259             </li>
260             <!-- /TMPL_IF -->
261             <li>
262                 <!-- TMPL_IF name="close" -->
263                         <label for="total">Total: </label>
264                                 <input type="text" id="total" size="20" name="total" value="<!-- TMPL_VAR name="total" -->" readonly="readonly" />
265                                 <!-- TMPL_ELSE -->
266                 <label for="total">Total: </label>
267                 <input type="text" id="total" size="20" name="total" value="<!-- TMPL_VAR name="total" -->" />
268                                 <!--/TMPL_IF-->
269             </li>
270             <li>
271                                 <!-- TMPL_IF name="close" -->
272                         <label for="cost">Actual cost: </label>
273                 <input type="text" id="cost" size="20" name="cost" value="<!-- TMPL_VAR name="ecost"-->" readonly="readonly" />
274                                 <!-- TMPL_ELSE -->
275                 <label for="cost">Actual cost: </label>
276                 <input type="text" id="cost" size="20" name="cost" value="<!-- TMPL_VAR name="ecost"-->" />
277                                 <!--/TMPL_IF-->
278             </li>
279             <li>
280                 <label for="purchaseordernumber">Purchase order: </label>
281                 <input type="text" id="purchaseordernumber" size="20" name="purchaseordernumber"  value="<!-- TMPL_VAR name="purchaseordernumber" -->" /> 
282             </li>
283             <li>
284                 <label for="invoice">Invoice number: </label>
285                 <input type="text" id="invoice" size="20" name="invoice"  value="<!-- TMPL_VAR name="invoice" -->" /> (Fill when receiving)
286             </li>
287             <li>
288                 <label for="notes">Notes: </label>
289                 <textarea id="notes" cols="30" rows="3" name="notes"><!-- TMPL_VAR NAME="notes" --></textarea>
290             </li>
291             <li><div class="hint">The 2 following fields are available for your own usage. They can be useful for statistical purposes</div>
292                 <!-- TMPL_IF Name="CGIsort1" -->
293                     <!-- TMPL_VAR Name="CGIsort1" -->
294                 <!-- TMPL_ELSE -->
295                 <label for="sort1">Sort field 1: </label>
296                     <input type="text" id="sort1" size="20" name="sort1" value="<!-- TMPL_VAR NAME="sort1" -->" />
297                 <!--/TMPL_IF -->
298             </li>
299             <li>
300                 <!-- TMPL_IF Name="CGIsort2" -->
301                     <!-- TMPL_VAR Name="CGIsort2" -->
302                 <!-- TMPL_ELSE -->
303                 <label for="sort2">Sort field 2: </label>
304                     <input type="text" id="sort2" size="20" name="sort2" value="<!-- TMPL_VAR NAME="sort2" -->" />
305                 <!--/TMPL_IF -->
306             </li></ol>
307     </fieldset>
308     <fieldset class="action">
309         <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 -->
310     </fieldset>
311 </form>
312 </div>
313 </div>
314 <div class="yui-b">
315 <!-- TMPL_INCLUDE NAME="acquisitions-menu.inc" -->
316 </div>
317 </div>
318 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->