Lieferschein: Kunden-/Lieferantenpicker nutzen
[kivitendo-erp.git] / templates / webpages / customer_vendor / tabs / shipto.html
1 [%- USE T8 %]
2 [%- USE LxERP %]
3 [%- USE L %]
4
5 <div id="shipto">
6   <table width="100%" id="shipto_table">
7     <tr>
8       <th align="right">[% 'Shipping Address' | $T8 %]</th>
9
10       <td>
11         [% L.select_tag(
12              'shipto.shipto_id',
13              SELF.shiptos,
14              default = SELF.shipto.shipto_id,
15              value_key = 'shipto_id',
16              title_key = 'displayable_id',
17              with_empty = 1,
18              empty_title = LxERP.t8('New shipto'),
19              onchange = "kivi.CustomerVendor.selectShipto({onFormSet: function(){ shiptoMapWidget.testInputs(); local_reinit_widgets(); }});",
20            )
21         %]
22       </td>
23     </tr>
24
25     <tr>
26       <th align="right" nowrap>[% 'Name' | $T8 %]</th>
27
28       <td>
29         [% L.input_tag('shipto.shiptoname', SELF.shipto.shiptoname,  size = 35) %]
30       </td>
31     </tr>
32
33     <tr>
34       <th align="right" nowrap>[% 'Department' | $T8 %]</th>
35
36       <td>
37         [% L.input_tag('shipto.shiptodepartment_1', SELF.shipto.shiptodepartment_1,  size = 16) %]
38         [% L.input_tag('shipto.shiptodepartment_2', SELF.shipto.shiptodepartment_2,  size = 16) %]
39       </td>
40     </tr>
41
42     <tr>
43       <th align="right" nowrap>[% 'Street' | $T8 %]</th>
44
45       <td>
46         [% L.input_tag('shipto.shiptostreet', SELF.shipto.shiptostreet,  size = 35) %]
47
48         <span id="shipto_map"></span>
49         <script type="text/javascript">
50           shiptoMapWidget = new kivi.CustomerVendor.MapWidget('shipto_shipto');
51           $(function() {
52             shiptoMapWidget.render($('#shipto_map'));
53           });
54         </script>
55       </td>
56     </tr>
57
58     <tr>
59       <th align="right" nowrap>[% 'Zipcode' | $T8 %]/[% 'City' | $T8 %]</th>
60
61       <td>
62         [% L.input_tag('shipto.shiptozipcode', SELF.shipto.shiptozipcode,  size = 5) %]
63         [% L.input_tag('shipto.shiptocity', SELF.shipto.shiptocity,  size = 30) %]
64       </td>
65     </tr>
66
67     <tr>
68       <th align="right" nowrap>[% 'Country' | $T8 %]</th>
69
70       <td>
71         [% L.input_tag('shipto.shiptocountry', SELF.shipto.shiptocountry,  size = 35) %]
72       </td>
73     </tr>
74
75     <tr>
76       <th align="right" nowrap>[% 'GLN' | $T8 %]</th>
77
78       <td>
79         [% L.input_tag('shipto.shiptogln', SELF.shipto.shiptogln,  size = 35) %]
80       </td>
81     </tr>
82
83     <tr>
84       <th align="right" nowrap>[% 'Contact' | $T8 %]</th>
85
86       <td>
87         [% L.input_tag('shipto.shiptocontact', SELF.shipto.shiptocontact,  size = 30) %]
88       </td>
89     </tr>
90
91     <tr>
92       <th align="right" nowrap>[% 'Phone' | $T8 %]</th>
93
94       <td>
95         [% L.input_tag('shipto.shiptophone', SELF.shipto.shiptophone,  size = 30) %]
96       </td>
97     </tr>
98
99     <tr>
100       <th align="right" nowrap>[% 'Fax' | $T8 %]</th>
101
102       <td>
103         [% L.input_tag('shipto.shiptofax', SELF.shipto.shiptofax,  size = 30) %]
104       </td>
105     </tr>
106
107     <tr>
108       <th align="right" nowrap>[% 'E-mail' | $T8 %]</th>
109
110       <td>
111         [% L.input_tag('shipto.shiptoemail', SELF.shipto.shiptoemail,  size = 45) %]
112       </td>
113     </tr>
114
115     [% shipto_cvars = SELF.shipto.cvars_by_config %]
116
117     [% IF ( shipto_cvars.size ) %]
118       <tr>
119         <td colspan="2">
120           <hr>
121         </td>
122       </tr>
123
124       [% FOREACH var = shipto_cvars %]
125         <tr>
126           <th align="right" valign="top" nowrap>[% var.config.description | html %]</th>
127
128           <td valign="top">
129             [% INCLUDE 'common/render_cvar_input.html'
130                        cvar_name_prefix = 'shipto_cvars.'
131             %]
132           </td>
133         </tr>
134       [% END %]
135     [% END %]
136   </table>
137
138   [% L.button_tag('submitInputButton(this);', LxERP.t8('Delete Shipto'), name = 'action_delete_shipto', class = 'submit') %]
139   [% IF ( !SELF.shipto.shipto_id ) %]
140     <script type="text/javascript">
141       $('#action_delete_shipto').hide();
142     </script>
143   [% END %]
144 </div>