Cleaning up acquisitions, adding breadcrumbs, adding resident search. Other minor...
[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){
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="cat-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
83 <h1>
84     <!-- TMPL_IF name="ordnum" -->
85         Modify order details (line #<!-- TMPL_VAR NAME="ordnum" -->)
86     <!-- TMPL_ELSE -->
87         New order
88     <!-- /TMPL_IF -->
89         <!-- TMPL_IF name="suggestionid" -->(defined from suggestion #<!-- TMPL_VAR NAME="suggestionid" -->)<!-- /TMPL_IF -->
90 </h1>
91
92 <!-- TMPL_IF name="basketno" -->
93 <div id="basket-details">Basket Details
94     <p>Basket Number: <!-- TMPL_VAR NAME="basketno" --></p>
95     <p>Managed By: <!-- TMPL_VAR NAME="authorisedbyname" --></p>
96     <p>Open On: <!-- TMPL_VAR NAME="creationdate" --></p>
97     <p>ForSupplier Id: <!-- TMPL_VAR NAME="booksellerid" --></p>
98     <p>Invoice Number: <!-- TMPL_VAR NAME="booksellerinvoicenumber" --></p>
99     <!-- TMPL_IF name="closedate" --><p>Closed On: <!-- TMPL_VAR name="closedate" --></p><!-- /TMPL_IF -->
100 </div>
101 <!-- /TMPL_IF -->
102
103 <form action="/cgi-bin/koha/acqui/addorder.pl" method="post" name="frusin">
104     <fieldset>
105         <legend>Catalogue details</legend>
106         <!-- TMPL_UNLESS name="existing" -->
107                 <input type="hidden" name="existing" value="no" />
108         <!-- /TMPL_UNLESS -->
109         <input type="hidden" name="ordnum" value="<!-- TMPL_VAR NAME="ordnum" -->" />
110         <input type="hidden" name="basketno" value="<!-- TMPL_VAR NAME="basketno" -->" />
111         <input type="hidden" name="booksellerid" value="<!-- TMPL_VAR NAME="booksellerid" -->" />
112         <input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
113         <input type="hidden" name="biblioitemnumber" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->" />
114         <input type="hidden" name="oldtype" value="<!-- TMPL_VAR NAME="itemtype" -->" />
115         <input type="hidden" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" />
116         <input type="hidden" name="listinc" value="<!-- TMPL_VAR NAME="listincgst" -->" />
117         <input type="hidden" name="currency" value="<!-- TMPL_VAR NAME="currency" -->" />
118         <input type="hidden" name="applygst" value="<!-- TMPL_VAR NAME="gstreg" -->" />
119         <input type="hidden" name="suggestionid" value="<!-- TMPL_VAR NAME="suggestionid" -->" />
120         <!-- TMPL_LOOP NAME="loop_currencies" -->
121             <input type="hidden" name="<!-- TMPL_VAR NAME="currency" -->" value="<!-- TMPL_VAR NAME="rate" -->" />
122         <!-- /TMPL_LOOP -->
123         <p>
124             <!-- TMPL_IF name="biblio" -->
125                         <strong>Title</strong>
126                 <input type="hidden" size="20" name="title" value="<!-- TMPL_VAR NAME="title" -->" /><!-- TMPL_VAR NAME="title" -->
127             <!-- TMPL_ELSE -->
128             <label for="title" class="required">Title</label>
129                 <input type="text" id="title" size="20" name="title" value="<!-- TMPL_VAR NAME="title" -->" />
130             <!-- /TMPL_IF -->
131         </p>
132         <p>
133             <!-- TMPL_IF name="biblio" -->
134                         <strong>Author</strong>
135                 <input type="hidden" size="20" name="author" value="<!-- TMPL_VAR NAME="author" -->" /><!-- TMPL_VAR NAME="author" -->
136             <!-- TMPL_ELSE -->
137             <label for="author">Author</label>
138                 <input type="text" id="author" size="20" name="author" value="<!-- TMPL_VAR NAME="author" -->" />
139             <!-- /TMPL_IF -->
140         </p>
141         <p>
142             <!-- TMPL_IF name="biblio" -->
143                         <strong>Publisher</strong>
144                 <input type="hidden" size="20" name="publishercode" value="<!-- TMPL_VAR NAME="publishercode" -->" /><!-- TMPL_VAR NAME="publishercode" -->
145             <!-- TMPL_ELSE -->
146             <label for="publishercode"> Publisher</label>
147                 <input type="text" id="publishercode" size="20" name="publishercode" value="<!-- TMPL_VAR NAME="publishercode" -->" />
148             <!-- /TMPL_IF -->
149         </p>
150         <p>
151             <!-- TMPL_IF name="biblio" -->
152                         <strong>Copyright Date</strong>
153                 <input type="hidden" size="20" name="copyrightdate" value="<!-- TMPL_VAR NAME="copyrightdate" -->" /><!-- TMPL_VAR NAME="copyrightdate" -->
154             <!-- TMPL_ELSE -->
155             <label for="copyrightdate">Copyright Date</label>
156                 <input type="text" id="copyrightdate" size="20" name="copyrightdate" value="<!-- TMPL_VAR NAME="copyrightdate" -->" />
157             <!-- /TMPL_IF -->
158         </p>
159         <p>
160             <label for="format">Format</label>
161             <!-- TMPL_VAR NAME="CGIitemtype" -->
162         </p>
163         <p>
164             <!-- TMPL_IF name="biblio" -->
165                         <strong>ISBN</strong>
166                 <input type="hidden" size="20" name="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" /><!-- TMPL_VAR NAME="isbn" -->
167             <!-- TMPL_ELSE -->
168             <label for="ISBN">ISBN</label>
169                 <input type="text" id="ISBN" size="20" name="ISBN" value="<!-- TMPL_VAR NAME="isbn" -->" />
170             <!-- /TMPL_IF -->
171         </p>
172         <p>
173             <!-- TMPL_IF name="biblio" -->
174                         <strong>Series</strong>
175                 <input type="hidden" size="20" name="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" /><!-- TMPL_VAR NAME="seriestitle" -->
176             <!-- TMPL_ELSE -->
177             <label for="series">Series</label>
178                 <input type="text" id="series" size="20" name="series" value="<!-- TMPL_VAR NAME="seriestitle" -->" />
179             <!-- /TMPL_IF -->
180         </p>
181         <p>
182             <label for="branch">Branch</label>
183             <select name="branch" id="branch">
184             <!-- TMPL_LOOP name="branchloop" -->
185                 <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option>
186                                 <!-- TMPL_ELSE -->
187                                 <option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option>
188                                 <!-- /TMPL_IF -->
189             <!-- /TMPL_LOOP -->
190             </select>
191         </p>
192     </fieldset>
193     <fieldset>
194         <legend>Accounting details</legend>
195             <p>
196                 <!-- TMPL_IF name="close" -->
197                         <strong>Quantity</strong>
198                     <input type="hidden" size="20" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->" /><!-- TMPL_VAR NAME="quantity" -->
199                 <!-- TMPL_ELSE -->
200                 <label for="quantity">Quantity</label>
201                     <input type="text" id="quantity" size="20" name="quantity" value="<!-- TMPL_VAR NAME="quantity" -->" onchange="update(this.form);" />
202                 <!--/TMPL_IF-->
203             </p>
204             <p>
205                 <!-- TMPL_IF name="close" -->
206                         <strong>Bookfund</strong>
207                     <input type="hidden" size="20" name="bookfund" value="<!-- TMPL_VAR NAME="bookfundid" -->" /><!-- TMPL_VAR NAME="bookfundname" -->
208                 <!-- TMPL_ELSE -->
209                 <label for="bookfund">Bookfund</label>
210                     <!-- TMPL_VAR NAME="CGIbookfund" -->
211                 <!--/TMPL_IF-->
212             </p>
213             <p>
214                 <!-- TMPL_IF name="close" -->
215                         <strong>Supplier price</strong>
216                     <input type="hidden" size="20" name="list_price" value="<!-- TMPL_VAR NAME="listprice" -->" /><!-- TMPL_VAR NAME="listprice" -->
217                 <!-- TMPL_ELSE -->
218                 <label for="list_price">Supplier price</label>
219                     <input type="text" id="list_price" size="20" name="list_price" value="<!-- TMPL_VAR NAME="listprice" -->" onchange="update(this.form)" />
220                 <!--/TMPL_IF-->
221             </p>
222             <p>
223                 <!-- TMPL_IF name="close" -->
224                         <strong>Replacement Cost</strong>
225                     <input type="hidden" size="20" name="rrp" value="<!-- TMPL_VAR NAME="rrp" -->" /><!-- TMPL_VAR NAME="rrp" -->
226                 <!-- TMPL_ELSE -->
227                 <label for="rrp">Replacement Cost </label>
228                     <input type="text" id="rrp" size="20" name="rrp" value="<!-- TMPL_VAR NAME="rrp" -->" />
229                 <!--/TMPL_IF-->
230             </p>
231             <p>
232                 <!-- TMPL_IF name="close" -->
233                         <strong>Budgeted Cost</strong>
234                     <input type="text" id="" size="20" name="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" readonly="readonly"  />
235                 <!-- TMPL_ELSE -->
236                 <label for="ecost">Budgeted Cost</label>
237                     <input type="text" id="ecost" size="20" name="ecost" value="<!-- TMPL_VAR NAME="ecost" -->" />
238                 <!--/TMPL_IF-->
239             </p>
240             <!-- TMPL_IF NAME="GST"-->
241             <p>
242                                 <!-- TMPL_IF name="close" -->
243                         <strong>Budgeted GST</strong>
244                 <input type="text" id="" size="20" name="GST" value="" readonly="readonly" />
245                                 <!-- TMPL_ELSE -->
246                 <label for="GST">Budgeted GST</label>
247                 <input type="text" id="GST" size="20" name="GST" value="" />
248                                 <!--/TMPL_IF-->
249             </p>
250             <!-- /TMPL_IF -->
251             <p>
252                 <!-- TMPL_IF name="close" -->
253                         <strong>Total</strong>
254                                 <input type="text" id="" size="20" name="total" value="<!-- TMPL_VAR name="total" -->" readonly="readonly" />
255                                 <!-- TMPL_ELSE -->
256                 <label for="total"><strong>Total</strong></label>
257                 <input type="text" id="total" size="20" name="total" value="<!-- TMPL_VAR name="total" -->" />
258                                 <!--/TMPL_IF-->
259             </p>
260             <p>
261                                 <!-- TMPL_IF name="close" -->
262                         <strong>Actual Cost</strong>
263                 <input type="text" id="" size="20" name="cost" value="<!-- TMPL_VAR name="ecost"-->" readonly="readonly" />
264                                 <!-- TMPL_ELSE -->
265                 <label for="cost">Actual Cost</label>
266                 <input type="text" id="cost" size="20" name="cost" value="<!-- TMPL_VAR name="ecost"-->" />
267                                 <!--/TMPL_IF-->
268             </p>
269             <p>
270                 <label for="invoice">Invoice Number</label>
271                 <input type="text" id="invoice" size="20" name="invoice"  value="<!-- TMPL_VAR name="invoice" -->" />(usually empty)
272             </p>
273             <p>
274                 <label for="notes">Notes</label>
275                 <input type="text" id="notes" size="20" name="notes" value="<!-- TMPL_VAR NAME="notes" -->" />
276             </p>
277             <p>The 2 following fields are available for your own usage. They can be useful for stat purposes</p>
278             <p>
279                 <!-- TMPL_IF Name="CGIsort1" -->
280                     <!-- TMPL_VAR Name="CGIsort1" -->
281                 <!-- TMPL_ELSE -->
282                 <label for="sort1">Sort field 1</label>
283                     <input type="text" id="sort1" size="20" name="sort1" value="<!-- TMPL_VAR NAME="sort1" -->" />
284                 <!--/TMPL_IF -->
285             </p>
286             <p>
287                 <!-- TMPL_IF Name="CGIsort2" -->
288                     <!-- TMPL_VAR Name="CGIsort2" -->
289                 <!-- TMPL_ELSE -->
290                 <label for="sort2">Sort field 2</label>
291                     <input type="text" id="sort2" size="20" name="sort2" value="<!-- TMPL_VAR NAME="sort2" -->" />
292                 <!--/TMPL_IF -->
293             </p>
294     </fieldset>
295     <p>
296         <input type="button" value="OK" onclick="check(this.form)" />
297     </p>
298 </form>
299 </div>
300 </div>
301 <div class="yui-b">
302 <!-- TMPL_INCLUDE NAME="acquisitions-menu.inc" -->
303 </div>
304 </div>
305 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->