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