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