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