5025d749c0889733f366b70f930b4d8487a502c3
[kivitendo-erp.git] / templates / webpages / oe / form_header.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5
6   <form method="post" name="oe" action="[% script %]">
7
8     <script type="text/javascript" src="js/delivery_customer_selection.js"></script>
9     <script type="text/javascript" src="js/vendor_selection.js"></script>
10     <script type="text/javascript" src="js/calculate_qty.js"></script>
11     <script type="text/javascript" src="js/customer_or_vendor_selection.js"></script>
12     <script type="text/javascript" src="js/follow_up.js"></script>
13     [%- IF is_sales_ord %]
14      [% L.javascript_tag("js/edit_periodic_invoices_config") %]
15     [%- END %]
16
17 [%- FOREACH row = HIDDENS %]
18    <input type="hidden" name="[% HTML.escape(row.name) %]" value="[% HTML.escape(row.value) %]" >
19 [%- END %]
20
21     <input type="hidden" name="convert_from_oe_ids" value="[% HTML.escape(convert_from_oe_ids) %]">
22
23     <input type="hidden" name="follow_up_trans_id_1" value="[% HTML.escape(id) %]">
24     <input type="hidden" name="follow_up_trans_type_1" value="[% HTML.escape(type) %]">
25     <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
26     <input type="hidden" name="follow_up_rowcount" value="1">
27
28     <h1>[% title %]</h1>
29
30 [%- INCLUDE 'common/flash.html' %]
31
32     <div class="tabwidget">
33      <ul>
34       <li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
35 [%- IF INSTANCE_CONF.get_webdav %]
36       <li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
37 [%- END %]
38 [%- IF id %]
39       <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Order&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
40 [%- END %]
41      </ul>
42
43      <div id="ui-tabs-basic-data">
44
45     <table width="100%">
46       <tr>
47         <td>
48           <table width="100%">
49             <tr valign="top">
50               <td width="50%">
51                 <table width="100%">
52                   <tr>
53                     <th align="right">[% IF vc == 'customer' %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]</th>
54                     <td>
55                       [%- INCLUDE 'generic/multibox.html'
56                            name          = vc,
57                            style         = 'width: 250px',
58                            class         = 'initial_focus',
59                            DATA          = vc == 'customer' ? ALL_CUSTOMERS : ALL_VENDORS,
60                            id_sub        = 'vc_keys',
61                            label_key     = 'name',
62                            select        = vc_select,
63                            limit         = vclimit,
64                            allow_textbox = 1,
65                            onChange      = "document.getElementById('update_button').click();" -%]
66                       <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('[% HTML.escape(vc) %]')">
67                     </td>
68                   </tr>
69 [%- IF ALL_CONTACTS.size %]
70                   <tr>
71                     <th align="right">[% 'Contact Person' | $T8 %]</th>
72                     <td>
73                       [% L.select_tag('cp_id', ALL_CONTACTS, default=cp_id, value_key='cp_id', title_key='full_name_dep', with_empty=1, style='width: 250px') %]
74                     </td>
75                   </tr>
76 [%- END %]
77 [%- IF ALL_SHIPTO.size %]
78                   <tr>
79                     <th align="right">[% 'Shipping Address' | $T8 %]</th>
80                     <td>
81                       [% L.select_tag('shipto_id', ALL_SHIPTO, default=shipto_id, value_key='shipto_id', title_key='displayable_id', with_empty=1, style='width: 250px', onChange="document.getElementById('update_button').click();") %]
82                     </td>
83                   </tr>
84 [%- END %]
85 [%- IF is_order %]
86                   <tr>
87                     <td align="right">[% 'Credit Limit' | $T8 %]</td>
88                     <td>[% LxERP.format_amount(creditlimit, 0) %]; [% 'Remaining' | $T8 %] <span class="plus[% is_credit_remaining_negativ %]">[% LxERP.format_amount(creditremaining, 0) %]</span></td>
89                   </tr>
90 [%- END %]
91 [%- IF business %]
92                   <tr>
93                     <th align="right">[% business_label %]</th>
94                     <td>[% HTML.escape(business) %]; [% 'Trade Discount' | $T8 %] [% LxERP.format_percent(tradediscount) %] %</td>
95                   </tr>
96 [%- END %]
97 [%- IF max_dunning_level %]
98                   <tr>
99                     <th align="right">[% 'Max. Dunning Level' | $T8 %]:</th>
100                     <td>
101                       <b>[% HTML.escape(max_dunning_level) %]</b>;
102                       [% 'Dunning Amount' | $T8 %]: <b>[% LxERP.format_amount(dunning_amount, 2) %]</b>
103                     </td>
104                   </tr>
105 [%- END %]
106                   <tr>
107                     <th align="right">[% 'Steuersatz' | $T8 %]</th>
108                     <td>
109                       [% L.select_tag('taxzone_id', ALL_TAXZONES, default=taxzone_id, title_key='description', style='width: 250px') %]
110                     </td>
111                   </tr>
112 [%- IF ALL_DEPARTMENTS %]
113                   <tr>
114                     <th align="right" nowrap>[% 'Department' | $T8 %]</th>
115                     <td colspan="3">
116                       [% L.select_tag('department_id', ALL_DEPARTMENTS, default=department_id, title_sub=\department_labels, with_empty=1, style='width:250px') %]
117                     </td>
118                   </tr>
119 [%- END %]
120 [%- IF currencies %]
121                   <tr>
122                     <th align="right">[% 'Currency' | $T8 %]</th>
123                     <td>[% currencies %]</td>
124                   </tr>
125 [%- END %]
126 [%- IF show_exchangerate %]
127                   <tr>
128                     <th align="right">[% 'Exchangerate' | $T8 %]</th>
129                     <td>
130                      [%- IF forex %]
131                       [% LxERP.format_amount(exchangerate, 2) %]
132                      [%- ELSE %]
133                       <input name="exchangerate" size="10" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
134                      [%- END %]
135                     </td>
136                   </tr>
137 [%- END %]
138                   <tr>
139                     <th align="right">[% 'Shipping Point' | $T8 %]</th>
140                     <td colspan="3"><input name="shippingpoint" size="35" value="[% HTML.escape(shippingpoint) %]"></td>
141                   </tr>
142                   <tr>
143                     <th align="right">[% 'Ship via' | $T8 %]</th>
144                     <td colspan="3"><input name="shipvia" size="35" value="[% HTML.escape(shipvia) %]"></td>
145                   </tr>
146                   <tr>
147                     <th align="right">[% 'Transaction description' | $T8 %]</th>
148                     <td colspan="3"><input name="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"></td>
149                   </tr>
150 [%- IF show_delivery_customer %]
151                   <tr>
152                     <td colspan="4">
153                       <table>
154                         <tr>
155                           <td colspan="2">
156                           <button type="button" onclick="delivery_customer_selection_window('delivery_customer_string','delivery_customer_id')">[% 'Choose Customer' | $T8 %]</button>
157                         </td>
158                           <td colspan="2"><input type="hidden" name="delivery_customer_id" value="[% HTML.escape(delivery_customer_id) %]">
159                           <input size="45" id="delivery_customer_string" name="delivery_customer_string" value="[% HTML.escape(delivery_customer_string) %]"></td>
160                         </tr>
161                         <tr>
162                           <td colspan="2">
163                             <button type="button" onclick="vendor_selection_window('delivery_vendor_string','delivery_vendor_id')">[% 'Choose Vendor' | $T8 %]</button>
164                           </td>
165                           <td colspan="2"><input type="hidden" name="delivery_vendor_id" value="[% HTML.escape(delivery_vendor_id) %]">
166                           <input size="45" id="vendor_string" name="delivery_vendor_string" value="[% HTML.escape(delivery_vendor_string) %]"></td>
167                         </tr>
168                       </table>
169                     </td>
170                   </tr>
171 [%- END %]
172                 </table>
173               </td>
174               <td align="right">
175                 <table>
176               [% openclosed %]
177                   <tr>
178                     <th align="right">[% 'Employee' | $T8 %]</th>
179                     <td>
180                       [% L.select_tag('employee_id', ALL_EMPLOYEES, default=employee_id, title_key='safe_name') %]
181                     </td>
182                   </tr>
183 [%- IF is_sales and ALL_SALESMEN.size %]
184                   <tr>
185                     <th align="right">[% 'Salesman' | $T8 %]</th>
186                     <td>
187                       [% L.select_tag('salesman_id', ALL_SALESMEN, default=(salesman_id ? salesman_id : employee_id), title_key='safe_name') %]
188                     </td>
189                   </tr>
190 [%- END %]
191 [%- IF is_order %]
192                   <tr>
193                     <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
194                     <td><input name="ordnumber" size="11" value="[% HTML.escape(ordnumber) %]"></td>
195                   </tr>
196 [%- END %]
197                   <tr>
198                     <th width="70%" align="right" nowrap>[% IF is_req_quo %][% 'RFQ Number' | $T8 %][% ELSE %][% 'Quotation Number' | $T8 %][% END %]</th>
199                     <td><input name="quonumber" size="11" value="[% HTML.escape(quonumber) %]"></td>
200                   </tr>
201 [%- IF is_order %]
202                   <tr>
203                     <th width="70%" align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th>
204                     <td><input name="cusordnumber" size="11" value="[% HTML.escape(cusordnumber) %]"></td>
205                   </tr>
206 [%- END %]
207                   <tr>
208                     <th align="right" nowrap>
209                      [%- IF is_order %]
210                       [% 'Order Date' | $T8 %]
211                      [%- ELSIF is_req_quo %]
212                       [% 'RFQ Date' | $T8 %]
213                      [%- ELSE %]
214                       [% 'Quotation Date' | $T8 %]
215                      [%- END %]
216                     </th>
217                     <td nowrap>
218                       [% L.date_tag('transdate', transdate) %]
219                     </td>
220                   </tr>
221                   <tr>
222                     <th align="right" nowrap>
223                      [%- IF is_sales_quo %]
224                       [% 'Valid until' | $T8 %]
225                      [%- ELSE %]
226                       [% 'Reqdate' | $T8 %]
227                      [%- END %]
228                     </th>
229                     <td nowrap>
230                       [% L.date_tag('reqdate', reqdate) %]
231                     </td>
232                   </tr>
233                   <tr>
234                     <th width="70%" align="right" nowrap>[% 'Project Number' | $T8 %]</th>
235                     <td>
236                       [%- L.select_tag('globalproject_id', ALL_PROJECTS, title_key='projectnumber', default=globalproject_id, with_empty='1', onChange="document.getElementById('update_button').click();") %]
237                     </td>
238                   </tr>
239                 </table>
240               </td>
241             </tr>
242           </table>
243         </td>
244       </tr>