Fix for Bug 4278, canceling vendor add refreshes wrong
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / supplier.tmpl
1 <!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
2 <title>Koha &rsaquo; Vendor <!-- TMPL_VAR name="bookselname" --></title>
3 <!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
4 <script type="text/javascript">
5 //<![CDATA[
6 function confirm_deletion() {
7     if (confirm(_("Confirm deletion of this vendor ?"))) {
8         window.location="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!--TMPL_VAR Name="id"-->&op=delete";
9     }
10 }
11 function check(f) {
12 if (f.company.value == "") {
13     alert(_("You must specify a name for this vendor."));
14     return false;
15 }
16     f.submit();
17 }
18 //]]>
19 </script>
20 </head>
21 <body>
22 <!-- TMPL_INCLUDE NAME="header.inc" -->
23 <!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
24
25 <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; <!--TMPL_IF Name="enter"--><!-- TMPL_IF name="id" --> <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!-- TMPL_VAR NAME="id" -->"><!-- TMPL_VAR NAME="name" --></a> &rsaquo; Update: <!-- TMPL_VAR NAME="name" --><!-- TMPL_ELSE -->Add vendor<!-- /TMPL_IF --> <!-- TMPL_ELSE --><!-- TMPL_VAR NAME="name" --><!-- /TMPL_IF --></div>
26
27 <div id="doc" class="yui-t7">
28
29 <div id="bd">
30     <div id="yui-main">
31     <!--TMPL_IF Name="enter"-->
32         <!-- TMPL_IF name="id" -->
33         <h1>Update: <!-- TMPL_VAR NAME="name" --></h1>
34     <!-- TMPL_ELSE -->
35         <h1>Add vendor</h1>
36     <!-- /TMPL_IF -->
37     <!-- /TMPL_IF -->
38 <!-- TMPL_UNLESS NAME="enter" --><!-- TMPL_INCLUDE NAME="acquisitions-toolbar.inc" --><!-- /TMPL_UNLESS -->
39 <!--TMPL_IF Name="enter"-->
40     <form action="updatesupplier.pl" name="updatesupplier" method="post">
41     <div class="yui-g">
42         <input type="hidden" name="id" value="<!-- TMPL_VAR NAME="id" -->" />
43         <fieldset class="rows">
44             <legend>Company details</legend>
45             <ol><li><label for="company" class="required">Name * </label>
46                 <input type="text" size="40" id="company" name="company" value="<!-- TMPL_VAR NAME="name" -->" /></li>
47             <li><label for="company_postal">Postal address</label>
48                     <textarea id="company_postal" name="company_postal" cols="40" rows="3"><!-- TMPL_VAR NAME="postal" --></textarea></li>
49             <li><label for="physical">Physical address</label>
50                 <textarea id="physical" name="physical" cols="40" rows="3"><!-- TMPL_VAR NAME="address1" --><!-- TMPL_VAR NAME="address2" --><!-- TMPL_VAR NAME="address3" --><!-- TMPL_VAR NAME="address4" --></textarea></li>
51             <li><label for="company_phone">Phone</label>
52                 <input type="text" size="20" id="company_phone" name="company_phone" value="<!-- TMPL_VAR NAME="phone" -->" /></li>
53             <li><label for="company_fax">Fax</label>
54                 <input type="text" size="20" id="company_fax" name="company_fax" value="<!-- TMPL_VAR NAME="fax" -->" /></li>
55             <li><label for="website">Website</label>
56                 <input type="text" size="40" id="website" name="website" value="<!-- TMPL_VAR NAME="url" -->" /></li></ol>
57         </fieldset>
58         <fieldset class="rows">
59             <legend>Contact details</legend>
60         <ol> <li><label for="company_contact_name">Contact Name</label>
61                 <input type="text" size="40" id="company_contact_name" name="company_contact_name" value="<!-- TMPL_VAR NAME="contact" -->" /></li>
62             <li><label for="company_contact_position">Position</label>
63                 <input type="text" size="40" id="company_contact_position" name="company_contact_position" value="<!-- TMPL_VAR NAME="contpos" -->" /></li>
64             <li><label for="contact_phone">Phone</label>
65                 <input type="text" size="20" id="contact_phone" name="contact_phone" value="<!-- TMPL_VAR NAME="contphone" -->" /> </li>
66             <li><label for="contact_phone_2">Alternative phone</label>
67                 <input type="text" size="20" id="contact_phone_2" name="contact_phone_2" value="<!-- TMPL_VAR NAME="contaltphone" -->" /></li>
68             <li><label for="contact_fax">Fax</label>
69                 <input type="text" size="20" id="contact_fax" name="contact_fax" value="<!-- TMPL_VAR NAME="contfax" -->" /></li>
70             <li><label for="company_email">Email</label>
71                 <input type="text" size="40" id="company_email" name="company_email" value="<!-- TMPL_VAR NAME="contemail" -->" /></li>
72             <li><label for="contact_notes">Notes</label>
73                 <textarea id="contact_notes" name="contact_notes" cols="40" rows="4"><!-- TMPL_VAR NAME="contnotes" --></textarea></li></ol>
74         </fieldset>
75     </div>
76         <div class="yui-g">
77         <fieldset class="rows">
78             <legend>Ordering information</legend>
79             <ol class="radio"><li><label for="activestatus" class="radio">Vendor is:</label>
80                     <!-- TMPL_IF name="active" -->
81                         <label for="activestatus">Active</label> <input type="radio" id="activestatus" name="status" value="1" checked="checked" />
82                         <label for="inactivestatus">Inactive</label> <input type="radio" id="inactivestatus" name="status" value="0" />
83                     <!-- TMPL_ELSE -->
84                         <label for="activestatus">Active</label> <input type="radio" id="activestatus" name="status" value="1" />
85                         <label for="inactivestatus">Inactive</label> <input type="radio" id="inactivestatus" name="status" value="0" checked="checked" />
86                     <!-- /TMPL_IF --></li>
87             </ol>
88             <ol>
89             <li><label for="list_currency">List Prices are</label>
90                     <select name="list_currency" id="list_currency">
91                     <!-- TMPL_LOOP NAME="loop_currency" -->
92                         <option value="<!-- TMPL_VAR  NAME="currency" -->"
93                             <!-- TMPL_IF NAME="listprice" -->selected="1"<!-- /TMPL_IF -->>
94                             <!--TMPL_VAR NAME="currency" --></option>
95                     <!-- /TMPL_LOOP -->
96                     </select>
97             </li>
98             <li><label for="invoice_currency">Invoice Prices are</label>
99                     <select name="invoice_currency" id="invoice_currency">
100                     <!-- TMPL_LOOP NAME="loop_currency" -->
101                         <option value="<!-- TMPL_VAR  NAME="currency" -->"
102                             <!-- TMPL_IF NAME="invoiceprice" -->selected="1"<!-- /TMPL_IF -->>
103                             <!--TMPL_VAR NAME="currency" --></option>
104                     <!-- /TMPL_LOOP -->
105                     </select>
106             </li>
107             </ol>
108             <ol class="radio">
109             <!-- TMPL_IF NAME="GST" --><li><label for="gstyes" class="radio">Tax Number Registered:</label>
110                 <!-- TMPL_IF name="gstreg" -->
111                     <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" checked="checked" />
112                     <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" />
113                 <!-- TMPL_ELSE -->
114                     <label for="gstyes">Yes</label> <input type="radio" name="gst" id="gstyes" value="1" />
115                     <label for="gstno">No</label> <input type="radio" name="gst" id="gstno" value="0" checked="checked" />
116                 <!-- /TMPL_IF --></li><!-- /TMPL_IF -->
117             
118             <!-- TMPL_IF NAME="GST" --><li><label for="list_gstyes" class="radio">Ordering prices:</label>
119                 <!-- TMPL_IF name="listincgst" -->
120                     <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" checked="checked" />
121                     <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" />
122                 <!-- TMPL_ELSE -->
123                     <label for="list_gstyes">Include tax</label> <input type="radio" id="list_gstyes" name="list_gst" value="1" />
124                     <label for="list_gstno">Don't include tax</label> <input type="radio" id="list_gstno" name="list_gst" value="0" checked="checked" />
125                 <!-- /TMPL_IF --></li><!-- /TMPL_IF -->
126             
127             <!-- TMPL_IF NAME="GST" --><li><label for="invoice_gstyes" class="radio">Invoice prices:</label>
128                 <!-- TMPL_IF name= "invoiceincgst" -->
129                     <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" checked="checked" />
130                     <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" />
131                     <!-- TMPL_ELSE -->
132                     <label for="invoice_gstyes">Include tax</label> <input type="radio" id="invoice_gstyes" name="invoice_gst" value="1" />
133                     <label for="invoice_gstno">Don't include tax</label> <input type="radio" id="invoice_gstno" name="invoice_gst" value="0" checked="checked" />
134                 <!-- /TMPL_IF --></li><!-- /TMPL_IF -->
135             </ol>
136             <ol>
137             <li><label for="discount">Discount</label>
138                 <input type="text" size="6" id="discount" name="discount" value="<!-- TMPL_VAR NAME="discount" -->" /> %</li>
139             <!-- TMPL_IF NAME="GST" --><li><label for="gstrate">Tax rate</label><input type="text" name="gstrate" id="gstrate" size="5" value="<!-- TMPL_VAR name="gstrate" -->"/>%</li><!-- /TMPL_IF -->
140             <li><label for="notes">Notes</label>
141                 <textarea cols="40" rows="4" id="notes" name="notes" ><!-- TMPL_VAR NAME="notes" --></textarea></li></ol>                       
142             <!-- TMPL_UNLESS NAME="GST" -->
143                 <input type="hidden" name="gst" value="0" />
144                 <input type="hidden" name="list_gst" value="0" />
145                 <input type="hidden"  name="invoice_gst" value="0" />
146             <!-- /TMPL_UNLESS -->
147         </fieldset>
148         <fieldset class="action"><input type="button" value="Save" onclick="check(this.form);" /> <!--TMPL_IF Name="id"-->
149         <a class="cancel" href="/cgi-bin/koha/acqui/supplier.pl?supplierid=<!--TMPL_VAR Name="id"-->"><!--TMPL_ELSE--><a class="cancel" href="/cgi-bin/koha/acqui/acqui-home.pl">
150         <!--/TMPL_IF-->Cancel</a></fieldset>
151         </div>
152     </form>
153 <!--TMPL_ELSE-->
154     <h1><!-- TMPL_VAR NAME="name" --></h1>
155         <div class="yui-g">
156             <div id="supplier-company-details" class="yui-u first">
157                 <h2>Supplier details</h2>
158                 <p><span class="label">Company Name: </span><!-- TMPL_VAR NAME="name" --></p>
159                 <p><span class="label">Postal Address: </span><!-- TMPL_VAR NAME="postal" --></p>
160                 <p><span class="label">Physical Address: </span><!-- TMPL_VAR NAME="address1" --><!-- TMPL_VAR NAME="address2" --><!-- TMPL_VAR NAME="address3" --><!-- TMPL_VAR NAME="address4" --></p>
161                 <p><span class="label">Phone: </span><!-- TMPL_VAR NAME="phone" --></p>
162                 <p><span class="label">Fax: </span><!-- TMPL_VAR NAME="fax" --></p>
163                 <!-- TMPL_IF NAME="url" -->
164                     <p><span class="label">Web site: </span><a href="<!-- TMPL_VAR NAME="url" -->"><!-- TMPL_VAR NAME="url" --></a></p>
165                 <!-- /TMPL_IF -->
166             </div>
167             <div id="supplier-contact-details" class="yui-u">
168                 <h2>Contact details</h2>
169                 <p><span class="label">Contact name: </span><!-- TMPL_VAR NAME="contact" --></p>
170                 <p><span class="label">Position: </span><!-- TMPL_VAR NAME="contpos" --></p>
171                 <p><span class="label">Phone: </span><!-- TMPL_VAR NAME="contphone" --></p>
172                 <p><span class="label">Alternative phone: </span><!-- TMPL_VAR NAME="contaltphone" --></p>
173                 <p><span class="label">Fax: </span><!-- TMPL_VAR NAME="contfax" --></p>
174                 <!-- TMPL_IF NAME="contemail" -->
175                     <p><span class="label">Email: </span><a href="mailto:<!-- TMPL_VAR NAME="contemail" -->"><!-- TMPL_VAR NAME="contemail" --></a></p>
176                 <!-- /TMPL_IF -->
177                 <!-- TMPL_IF NAME="contnotes" -->
178                     <p><span class="label">Notes: </span><!-- TMPL_VAR NAME="contnotes" --></p>
179                 <!-- /TMPL_IF -->
180             </div>
181         </div>
182         <div id="supplier-ordering-information" class="yui-g">
183         <h3>Ordering information</h3>
184             <p><strong>Vendor is: </strong>
185                     <!-- TMPL_IF name="active" -->
186                         Active
187                     <!-- TMPL_ELSE -->
188                         Inactive
189                     <!-- /TMPL_IF --></p>
190             <p><strong>List Prices are: </strong><!--TMPL_VAR Name="listprice"--></p>
191             <p><strong>Invoice Prices are: </strong><!--TMPL_VAR Name="invoiceprice"--></p>
192             <!-- TMPL_IF NAME="GST" --><p><strong>Tax Number Registered: </strong>
193                     <!-- TMPL_IF name="gstreg" -->Yes<!--TMPL_ELSE-->No<!-- /TMPL_IF --></p>
194             <p><strong>List Item Price Includes Tax: </strong>
195                     <!-- TMPL_IF name="listincgst" -->Yes<!--TMPL_ELSE-->No<!-- /TMPL_IF --></p>
196             <p><strong>Invoice Item Price Includes Tax: </strong>
197                     <!-- TMPL_IF name= "invoiceincgst" -->Yes<!--TMPL_ELSE-->No<!-- /TMPL_IF --></p><!-- /TMPL_IF -->
198             <p><strong>Discount: </strong>
199                 <!-- TMPL_VAR NAME="discount" --> %</p>
200             <!-- TMPL_IF NAME="GST" --><p><strong>Tax rate: </strong>
201                 <!-- TMPL_VAR name="GST" -->%</p><!-- /TMPL_IF -->
202             <!-- TMPL_IF NAME="notes" --><p><strong>Notes: </strong>
203                 <!-- TMPL_VAR NAME="notes" --></p><!-- /TMPL_IF -->
204         </div>
205         <!-- TMPL_IF name="contracts" -->
206             <div id="supplier-contracts" class="yui-g">
207                 <h2>Contract(s)</h2>
208                 <table>
209                     <tr>
210                         <th scope="col">Name</th>
211                         <th scope="col">Description</th>
212                         <th scope="col">Start date</th>
213                         <th scope="col">End date</th>
214                         <th scope="col" colspan="2">&nbsp; </th>
215                     </tr>
216                     <!-- TMPL_LOOP NAME="contracts" -->
217                         <!-- TMPL_IF NAME="__even__" --><tr class="highlight"><!-- TMPL_ELSE --><tr><!-- /TMPL_IF -->
218                         <td>
219                             <a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=<!-- TMPL_VAR NAME="contractnumber" -->&amp;booksellerid=<!-- TMPL_VAR name="booksellerid" -->"><!-- TMPL_VAR NAME="contractname" --></a>
220                         </td>
221                         <td><!-- TMPL_VAR NAME="contractdescription" --></td>
222                         <td><!-- TMPL_VAR NAME="contractstartdate" --></td>
223                         <td><!-- TMPL_VAR NAME="contractenddate" --></td>
224                         <td><a href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&amp;contractnumber=<!-- TMPL_VAR NAME="contractnumber" -->&amp;booksellerid=<!-- TMPL_VAR name="booksellerid" -->">Edit</a></td>
225                         <td><a href="/cgi-bin/koha/admin/aqcontract.pl?op=delete_confirm&amp;contractnumber=<!-- TMPL_VAR NAME="contractnumber" -->&amp;booksellerid=<!-- TMPL_VAR name="booksellerid" -->">Delete</a></td>
226                         </tr>
227                     <!-- /TMPL_LOOP -->
228                 </table>
229             </div>
230         <!-- /TMPL_IF -->
231
232 <!--/TMPL_IF-->
233
234 </div>
235 </div>
236 <!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->