Adding 2 new fields, called "sort1" and "sort2"
[koha.git] / koha-tmpl / intranet-tmpl / default / en / acqui / newbiblio.tmpl
1 <!-- TMPL_INCLUDE name="acquisitions-top.inc" -->
2 <script language="javascript" type="text/javascript">
3
4 <!--
5 function update(f){
6   //collect values
7   quantity=f.quantity.value
8   discount=f.discount.value
9   listinc=parseInt(f.listinc.value)
10   currency=f.currency.value
11   applygst=parseInt(f.applygst.value)
12   listprice=f.list_price.value
13   //  rrp=f.rrp.value
14   //  ecost=f.ecost.value  //budgetted cost
15   //  GST=f.GST.value
16   //  total=f.total.value
17   //make useful constants out of the above
18   exchangerate=f.elements[currency].value      //get exchange rate
19   gst_on=(!listinc && applygst);
20   //do real stuff
21   rrp=listprice*exchangerate;
22   ecost=rrp*(100-discount)/100
23   GST=0;
24   if (gst_on){
25     rrp=rrp*(1+<!-- TMPL_VAR name="gstrate" -->);
26     GST=ecost*(<!-- TMPL_VAR name="gstrate" -->);
27   }
28
29   total=(ecost+GST)*quantity
30
31   f.rrp.value=rrp;
32   f.ecost.value=ecost;
33   f.GST.value=GST;
34   f.total.value=total;
35
36 }
37
38
39
40 function messenger(X,Y,etc){
41 win=window.open("","mess","height="+X+",width="+Y+",screenX=150,screenY=0");
42 win.focus();
43 win.document.close();
44 win.document.write("<body link='#333333' bgcolor='#ffffff' text='#000000'><font size=2><p><br>");
45 win.document.write(etc);
46 win.document.write("<center><form><input type=button onclick='self.close()' value=Close></form></center>");
47 win.document.write("</font></body></html>");
48 }
49 //-->
50
51 </script>
52 <div id="mainbloc">
53         <form action="/cgi-bin/koha/acqui/addorder.pl" method=post name=frusin>
54         <!-- TMPL_UNLESS name="existing" --><input type=hidden name=existing value=no><!-- /TMPL_UNLESS -->
55         <!-- <!-- TMPL_VAR name="title" --> -->
56         <input type=hidden name=ordnum value="<!-- TMPL_VAR name="ordnum" -->">
57         <input type=hidden name=basket value="<!-- TMPL_VAR name="basket" -->">
58         <input type=hidden name=supplier value="<!-- TMPL_VAR name="id" -->">
59         <input type=hidden name=biblio value="<!-- TMPL_VAR name="biblio" -->">
60         <input type=hidden name=bibitemnum value="<!-- TMPL_VAR name="biblioitemnumber" -->">
61         <input type=hidden name=oldtype value="<!-- TMPL_VAR name="itemtype" -->">
62         <input type=hidden name=discount value="<!-- TMPL_VAR name="discount" -->">
63         <input type=hidden name=listinc value="<!-- TMPL_VAR name="listincgst" -->">
64         <input type=hidden name=currency value="<!-- TMPL_VAR name="currency" -->">
65         <input type=hidden name=applygst value="<!-- TMPL_VAR name="gstreg" -->">
66         <!-- TMPL_LOOP name="loop_currencies" -->
67                 <input type=hidden name="<!-- TMPL_VAR name="currency" -->" value="<!-- TMPL_VAR name="rate" -->">
68         <!-- /TMPL_LOOP -->
69         <!-- TMPL_IF name="orderexists" --><input type=hidden name=orderexists value=yes><!-- /TMPL_IF -->
70         <a href="basket.pl?basket=<!-- TMPL_VAR name=basket -->" class="button acquisition">View Basket</a>
71         <h1 class="acquisition"><!-- TMPL_VAR name="ordnum" --> - Order Details </h1>
72         Shopping Basket For <!-- TMPL_VAR name="name" -->
73         <div id="bloc25">
74                 <h2 class="acquisition">catalogue details</h2>
75                 <p>
76                         <label><b>Title *</b></label>
77                         <input type=text size=20 name=title value="<!-- TMPL_VAR name="title" -->">
78                 </p>
79                 <p>
80                         <label>Author</label>
81                         <input type=text size=20 name=author value="<!-- TMPL_VAR name="author" -->" >
82                 </p>
83                 <p>
84                         <label> Publisher</label>
85                         <input type=text size=30 name=publishercode value="<!-- TMPL_VAR name="publishercode" -->" >
86                 </p>
87                 <p>
88                         <label>Copyright Date</label>
89                         <input type=text size=20 name=copyrightdate value="<!-- TMPL_VAR name="copyrightdate" -->">
90                 </p>
91                 <p>
92                         <label>Format</label>
93                         <!-- TMPL_VAR name="CGIitemtype" -->
94                 </p>
95                 <p>
96                         <label>ISBN</label>
97                         <input type=text size=20 name=ISBN value="<!-- TMPL_VAR name="isbn" -->">
98                 </p>
99                 <p>
100                         <label>Series</label>
101                         <input type=text size=20 name=Series value="<!-- TMPL_VAR name="seriestitle" -->">
102                 </p>
103                 <p>
104                         <label>Branch</label>
105                         <!-- TMPL_VAR name="CGIbranch" -->
106                 </p>
107         </div>
108         <div id="bloc25">
109                 <h2 class="acquisition">Accounting details</h2>
110                 <p>
111                         <label>Quantity</label>
112                         <input type=text size=20 name=quantity value="<!-- TMPL_VAR name="quantity" -->" onchange='update(this.form)' >
113                 </p>
114                 <p>
115                         <label>Bookfund</label>
116                         <!-- TMPL_VAR name="CGIbookfund" -->
117                 </p>
118                 <p>
119                         <label>Suppliers List Price</label>
120                         <input type=text size=20 name=list_price value="<!-- TMPL_VAR name="listprice" -->" onchange='update(this.form)'>
121                 </p>
122                 <p>
123                         <label>Replacement Cost </label>
124                         <input type=text size=20 name=rrp value="<!-- TMPL_VAR name="rrp" -->" onchange='update(this.form)'>
125                 </p>
126                 <p>
127                         <label>Budgeted Cost</label>
128                         <input type=text size=20 name=ecost value="<!-- TMPL_VAR name="ecost" -->" onchange='update(this.form)'>
129                 </p>
130                 <p>
131                         <label>Budgeted GST</label>
132                         <input type=text size=20 name=GST value="" onchange='update(this.form)'>
133                 </p>
134                 <p>
135                         <label><B>BUDGETED TOTAL</B></label>
136                         <input type=text size=20 name=total value="" onchange='update(this.form)'>
137                 </p>
138                 <p>
139                         <label>Actual Cost</label>
140                         <input type=text size=20 name=cost>
141                 </p>
142                 <p>
143                         <label>Invoice Number *</label>
144                         <input type=text size=20 name=invoice >
145                 <p>
146                         <label>Notes</label>
147                         <input type=text size=20 name=notes value="<!-- TMPL_VAR name="notes" -->">
148                 </p>
149                 <p>The 2 following fields are available for your own usage. They can be useful for stat purposes</p>
150                 <p>
151                         <label>Sort field 1</label>
152                         <input type=text size=20 name=sort1 value="<!-- TMPL_VAR name="sort1" -->">
153                 </p>
154                 <p>
155                         <label>Sort field 2</label>
156                         <input type=text size=20 name=sort2 value="<!-- TMPL_VAR name="sort2" -->">
157                 </p>
158                 <p>
159                         <input type="submit" value="OK" class="button acquisition">
160                 </p>
161         </form>
162         </div>
163 </div>
164 <!-- TMPL_INCLUDE name="acquisitions-bottom.inc" -->