test action
[kivitendo-erp.git] / templates / webpages / customer_vendor / tabs / billing.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5 [%- USE JavaScript -%]
6
7 <div id="billing">
8   <table width="100%">
9
10     <tr height="5"></tr>
11
12     [% IF ( INSTANCE_CONF.get_vertreter ) %]
13       <tr>
14         <th align="right">
15           [% IF SELF.is_vendor() %]
16             [% 'Type of Vendor' | $T8 %]
17           [% ELSE %]
18             [% 'Type of Customer' | $T8 %]
19           [% END %]
20         </th>
21
22         <td>
23           [% L.select_tag('cv.business_id', SELF.all_business, value_key = 'id', title_key = 'description', default = SELF.cv.business_id, with_empty = 1) %]
24         </td>
25       </tr>
26
27       <tr>
28         <th align="right">
29           [% 'Representative' | $T8 %]
30         </th>
31
32         <td>
33           [% L.select_tag('cv.salesman_id', SELF.all_salesman_customers, default = SELF.cv.salesman_id, value_key = 'id', title_key = 'name', with_empty = 1) %]
34         </td>
35       </tr>
36
37     [%- END %]
38
39     <tr>
40       [% IF SELF.is_vendor() %]
41         <th align="right" nowrap>[% 'Vendor Number' | $T8 %]</th>
42         <td>
43           [% L.input_tag('cv.vendornumber', SELF.cv.vendornumber) %]
44         </td>
45       [%- ELSE %]
46         <th align="right" nowrap>[% 'Customer Number' | $T8 %]</th>
47         <td>
48           [% L.input_tag('cv.customernumber', SELF.cv.customernumber) %]
49         </td>
50       [%- END %]
51     </tr>
52
53     <tr>
54       <th align="right" nowrap>[% 'Greeting' | $T8 %]</th>
55
56       <td>
57         [%- IF INSTANCE_CONF.get_vc_greetings_use_textfield -%]
58           [% L.input_tag('cv.greeting', SELF.cv.greeting) %]
59           [% L.select_tag('cv_greeting_select', SELF.all_greetings, default = SELF.cv.greeting, value_key = 'description', title_key = 'description', with_empty = 1, onchange = '$("#cv_greeting").val(this.value);') %]
60         [%- ELSE -%]
61           [% L.select_tag('cv.greeting', SELF.all_greetings, default = SELF.cv.greeting, value_key = 'description', title_key = 'description', with_empty = 1) %]
62         [%- END -%]
63       </td>
64     </tr>
65
66     <tr>
67       <th align="right" nowrap>
68         [% IF SELF.is_vendor() %]
69           [% 'Vendor Name' | $T8 %]
70         [%- ELSE %]
71           [% 'Customer Name' | $T8 %]
72         [%- END %]
73       </th>
74
75       <td>
76         [% L.input_tag('cv.name', SELF.cv.name) %]
77         <label for="cv_natural_person">[% 'natural person' | $T8 %]</label>
78         [% L.checkbox_tag('cv.natural_person', checked = SELF.cv.natural_person, for_submit=1) %]
79       </td>
80     </tr>
81
82     <tr>
83       <th align="right" nowrap>[% 'Department' | $T8 %]</th>
84
85       <td>
86         [% L.input_tag('cv.department_1', SELF.cv.department_1, size = 16) %]
87         [% L.input_tag('cv.department_2', SELF.cv.department_2, size = 16) %]
88       </td>
89     </tr>
90
91     <tr>
92       <th align="right" nowrap>[% 'Street' | $T8 %]</th>
93
94       <td>
95         [% L.input_tag('cv.street', SELF.cv.street, size = 35) %]
96         <span id="billing_map"></span>
97         <script type="text/javascript">
98           billingMapWidget = new kivi.CustomerVendor.MapWidget('cv_', '[% JavaScript.escape(SELF.home_address_for_google_maps) %]');
99           $(function() {
100             billingMapWidget.render($('#billing_map'));
101           });
102         </script>
103       </td>
104     </tr>
105
106     <tr>
107       <th align="right" nowrap>[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %]</th>
108
109       <td>
110         [% L.input_tag('cv.zipcode', SELF.cv.zipcode, size = 5) %]
111         [% L.input_tag('cv.city', SELF.cv.city, size = 30) %]
112       </td>
113     </tr>
114
115     <tr>
116       <th align="right" nowrap>[% 'Country' | $T8 %]</th>
117
118       <td>
119         [% L.input_tag('cv.country', SELF.cv.country, size = 30) %]
120       </td>
121     </tr>
122
123     <tr>
124       <th align="right" nowrap>[% 'GLN' | $T8 %]</th>
125
126       <td>
127         [% L.input_tag('cv.gln', SELF.cv.gln, size = 30) %]
128       </td>
129     </tr>
130
131     <tr>
132       <th align="right" nowrap>[% 'Contact' | $T8 %]</th>
133
134       <td>
135         [% L.input_tag('cv.contact', SELF.cv.contact, size = 28) %]
136       </td>
137     </tr>
138
139     <tr>
140       <th align="right" nowrap>[% 'Phone' | $T8 %]</th>
141
142       <td>
143         [% L.input_tag('cv.phone', SELF.cv.phone, size = 30) %]
144       </td>
145     </tr>
146
147     <tr>
148       <th align="right" nowrap>[% 'Fax' | $T8 %]</th>
149
150       <td>
151         [% L.input_tag('cv.fax', SELF.cv.fax, size = 30) %]
152       </td>
153     </tr>
154
155     <tr>
156       <th align="right" nowrap>[% 'E-mail' | $T8 %]</th>
157
158       <td>
159         [% L.input_tag('cv.email', SELF.cv.email, size = 45) %]
160       </td>
161     </tr>
162
163     <tr>
164       <th align="right">[% 'Cc E-mail' | $T8 %]</th>
165
166       <td>
167         [% L.input_tag('cv.cc', SELF.cv.cc, size = 45) %]
168       </td>
169     </tr>
170
171     <tr>
172       <th align="right">[% 'Bcc E-mail' | $T8 %]</th>
173
174       <td>
175         [% L.input_tag('cv.bcc', SELF.cv.bcc, size = 45) %]
176       </td>
177     </tr>
178     [% IF ( SELF.is_customer() ) %]
179     <tr>
180       <th align="right">[% 'Email of the invoice recipient' | $T8 %]</th>
181       <td>[% L.input_tag('cv.invoice_mail', SELF.cv.invoice_mail, size = 30) %] <label for="cv_postal_invoice">[% 'Postal Invoice' | $T8 %]</label>
182         [% L.checkbox_tag('cv.postal_invoice', checked = SELF.cv.postal_invoice, for_submit=1) %]</td>
183     </tr>
184     <tr>
185       <th align="right">[% 'Email of the delivery order recipient' | $T8 %]</th>
186       <td>[% L.input_tag('cv.delivery_order_mail', SELF.cv.delivery_order_mail, size = 45) %]</td>
187     </tr>
188     [% END %]
189     <tr>
190       <th align="right" nowrap>
191         [% IF SELF.cv.homepage %]
192           <a href="[% HTML.escape(SELF.cv.homepage) %]" title="[% 'Open this Website' | $T8 %]" target="_blank">[% 'Homepage' | $T8 %]</a>
193         [% ELSE %]
194           [% 'Homepage' | $T8 %]
195         [% END %]
196       </th>
197
198       <td>
199         [% L.input_tag('cv.homepage', SELF.cv.homepage, size = 45, title = LxERP.t8('Example: http://kivitendo.de')) %]
200       </td>
201     </tr>
202
203     <tr>
204       <th align="right" nowrap>[% 'Username' | $T8 %]</th>
205
206       <td>
207         [% L.input_tag('cv.username', SELF.cv.username, size = 45) %]
208       </td>
209     </tr>
210
211     <tr>
212       <th align="right" nowrap>[% 'Password' | $T8 %]</th>
213
214       <td>
215         [% L.input_tag('cv.user_password', SELF.cv.user_password, size = 45) %]
216       </td>
217     </tr>
218   </table>
219
220
221   <table>
222
223     <tr>
224       <th align="right">[% 'Credit Limit' | $T8 %]</th>
225
226       <td>
227         [% L.input_tag('cv.creditlimit_as_number', SELF.cv.creditlimit_as_number, size = 9) %]
228       </td>
229
230
231       <th align="right">[% 'Payment Terms' | $T8 %]</th>
232
233       <td>
234         [% L.select_tag('cv.payment_id', SELF.all_payment_terms, value_key = 'id', title_key = 'description', default = SELF.cv.payment_id, with_empty = 1) %]
235       </td>
236
237
238       <th align="right">[% 'Discount' | $T8 %]</th>
239
240       <td>
241         [% L.input_tag('cv.discount_as_percent', SELF.cv.discount_as_percent, size = 4) %]%
242       </td>
243     </tr>
244
245     <tr>
246       [% IF ( SELF.all_currencies.size ) %]
247         <th align="right">[% 'Currency' | $T8 %]</th>
248         <td>
249           [% L.select_tag('cv.currency_id', SELF.all_currencies, title_key = 'name', value_key = 'id', default = SELF.cv.currency_id) %]
250         </td>
251       [% END %]
252
253       <th align="right">[% 'Tax Number / SSN' | $T8 %]</th>
254
255       <td>
256         [% L.input_tag('cv.taxnumber', SELF.cv.taxnumber, size = 20) %]
257       </td>
258
259
260       <!-- Anm.: R&B 15.11.2008     VAT Reg No ist Ust-ID in GB, aber generell sollte es laut Richardson die sales tax id sein -->
261       <th align="right">[% 'sales tax identification number' | $T8 %]</th>
262
263       <td>
264         [% L.input_tag('cv.ustid', SELF.cv.ustid, size = 20 ) %]
265       </td>
266     </tr>
267
268     <tr>
269       [% IF ( SELF.is_customer() ) %]
270         <th align="right">[% 'Commercial court' | $T8 %]</th>
271         <td>
272           [% L.input_tag('cv.commercial_court', SELF.cv.commercial_court, size = 20) %]
273         </td>
274
275         <th align="right">[% 'our vendor number at customer' | $T8 %]</th>
276         <td>
277           [% L.input_tag('cv.c_vendor_id', SELF.cv.c_vendor_id, size = 20) %]
278         </td>
279
280         <th align="right">[% 'Our routing id at customer' | $T8 %]</th>
281         <td>
282           [% L.input_tag('cv.c_vendor_routing_id', SELF.cv.c_vendor_routing_id, size = 20) %]
283         </td>
284
285       [%- ELSE %]
286         <th align="right">[% 'Customer Number' | $T8 %]</th>
287         <td>
288           [% L.input_tag('cv.v_customer_id', SELF.cv.v_customer_id, size = 20) %]
289         </td>
290       [%- END %]
291     </tr>
292     <tr>
293       [% IF ( !INSTANCE_CONF.get_vertreter ) %]
294         <th align="right">
295           [% IF ( SELF.is_vendor() ) %]
296             [% 'Type of Vendor' | $T8 %]
297           [% ELSE %]
298             [% 'Type of Customer' | $T8 %]
299           [% END %]
300         </th>
301
302         <td>
303           [% L.select_tag('cv.business_id', SELF.all_business, default = SELF.cv.business_id, value_key = 'id', title_key = 'description', with_empty = 1) %]
304         </td>
305       [% END %]
306
307
308       <th align="right">[% 'Language' | $T8 %]</th>
309
310       <td>
311         [% L.select_tag('cv.language_id', SELF.all_languages, default = SELF.cv.language_id, value_key = 'id', title_key = 'description', with_empty = 1) %]
312       </td>
313
314       <th align="right">[% 'Delivery Terms' | $T8 %]</th>
315
316       <td>
317         [% L.select_tag('cv.delivery_term_id', SELF.all_delivery_terms, default = SELF.cv.delivery_term_id, value_key = 'id', title_key = 'description', with_empty = 1) %]
318       </td>
319
320     </tr>
321
322     <tr>
323       <td align="right">
324         <label for="cv_obsolete">[% 'Obsolete' | $T8 %]</label>
325       </td>
326
327       <td>
328         [% L.checkbox_tag('cv.obsolete', checked = SELF.cv.obsolete, for_submit=1) %]
329       </td>
330
331
332       <td align="right">
333         <label for="cv_direct_debit">[% 'direct debit' | $T8 %]</label>
334       </td>
335
336       <td>
337         [% L.checkbox_tag('cv.direct_debit', checked = SELF.cv.direct_debit, for_submit=1) %]
338       </td>
339
340       [% IF ( SELF.is_customer() ) %]
341         <th align="right">[% 'Price group' | $T8 %]</th>
342
343         <td>
344           [% L.select_tag('cv.pricegroup_id', SELF.all_pricegroups, default = SELF.cv.pricegroup_id, value_key = 'id', title_key = 'pricegroup', with_empty = 1) %]
345         </td>
346       [% END  %]
347
348     </tr>
349
350     <tr>
351       <th align="right">[% 'Tax rate' | $T8 %]</th>
352
353       <td>
354         [% L.select_tag('cv.taxzone_id', SELF.all_taxzones, default = SELF.cv.taxzone_id, value_key = 'id', title_key = 'description') %]
355       </td>
356
357
358       [% IF ( SELF.is_customer() && !INSTANCE_CONF.get_vertreter ) %]
359         <th align="right">[% 'Salesman' | $T8 %]</th>
360
361         <td>
362           [% L.select_tag('cv.salesman_id', SELF.all_salesmen, default = SELF.cv.salesman_id, value_key = 'id', title_key = 'safe_name', with_empty = 1) %]
363         </td>
364       [%- END %]
365
366       [% IF ( SELF.is_customer() ) %]
367         <td>[% 'taxincluded checked' | $T8 %]</td>
368
369         <td>
370           [% L.select_tag('cv.taxincluded_checked', [[undef, LxERP.t8('use user config')], ['1', LxERP.t8('Yes')], ['0', LxERP.t8('No')]], default = SELF.cv.taxincluded_checked) %]
371         </td>
372       [% END %]
373
374     </tr>
375
376     [% IF ( SELF.is_customer() ) %]
377      <tr>
378       <th align="right">[%- LxERP.t8("Hourly rate") %]</th>
379       <td>[% L.input_tag("cv.hourly_rate_as_number", SELF.cv.hourly_rate_as_number) %]</td>
380       <th align="right" valign="top" nowrap>[% 'Shoporderlock' | $T8 %]</th>
381       <td>
382         [% L.checkbox_tag('cv.order_lock', checked = SELF.cv.order_lock, for_submit=1) %]
383       </td>
384       <th align="right">[% LxERP.t8("Create sales invoices with Factur-X/ZUGFeRD data") %]</th>
385       <td>[% L.select_tag("cv.create_zugferd_invoices", SELF.zugferd_settings, default=SELF.cv.create_zugferd_invoices) %]</td>
386      </tr>
387     [% END %]
388   </table>
389
390   <table>
391     <tr>
392       <th align="left" nowrap>[% 'Internal Notes' | $T8 %]</th>
393     [% IF ( SELF.is_customer() ) %]
394       <th align="left">[% 'Origin of personal data' | $T8 %]</th>
395     [% END %]
396     </tr>
397     <tr>
398       <td>
399         [% L.textarea_tag('cv.notes', SELF.cv.notes, rows = 3 cols = 60 wrap = soft) %]
400       </td>
401     [% IF ( SELF.is_customer() ) %]
402       <td>
403         [% L.textarea_tag('cv.contact_origin', SELF.cv.contact_origin,  rows = 3 cols = 60 wrap = soft) %]
404       </td>
405     [% END %]
406     </tr>
407   </table>
408 </div>