Dateimanagement: Integration in Masken und Controller
[kivitendo-erp.git] / templates / webpages / oe / form_header.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %][%- USE P -%]
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/calculate_qty.js"></script>
10     <script type="text/javascript" src="js/follow_up.js"></script>
11     [%- IF is_sales_ord %]
12      [% L.javascript_tag("js/edit_periodic_invoices_config") %]
13     [%- END %]
14
15 [%- FOREACH row = HIDDENS %]
16    <input type="hidden" name="[% HTML.escape(row.name) %]" value="[% HTML.escape(row.value) %]" >
17 [%- END %]
18
19     <input type="hidden" name="convert_from_oe_ids" value="[% HTML.escape(convert_from_oe_ids) %]">
20
21     <input type="hidden" name="follow_up_trans_id_1" value="[% HTML.escape(id) %]">
22     <input type="hidden" name="follow_up_trans_type_1" value="[% HTML.escape(type) %]">
23     <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
24     <input type="hidden" name="follow_up_rowcount" value="1">
25     <input type="hidden" name="lastmtime" value="[% HTML.escape(lastmtime) %]">
26
27     <h1>[% title %]</h1>
28
29 [%- INCLUDE 'common/flash.html' %]
30 [%- INCLUDE 'generic/set_longdescription.html' %]
31
32     <div id="oe_tabs" 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 AND INSTANCE_CONF.get_doc_storage %]
39       <li><a href="controller.pl?action=File/list&file_type=document&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Documents' | $T8 %]</a></li>
40       <li><a href="controller.pl?action=File/list&file_type=attachment&object_type=[% HTML.escape(type) %]&object_id=[% HTML.url(id) %]">[% 'Attachments' | $T8 %]</a></li>
41 [%- END %]
42 [%- IF id AND AUTH.assert('record_links', 1) %]
43       <li><a href="controller.pl?action=RecordLinks/ajax_list&object_model=Order&object_id=[% HTML.url(id) %]">[% 'Linked Records' | $T8 %]</a></li>
44 [%- END %]
45      </ul>
46
47      <div id="ui-tabs-basic-data">
48
49     <table width="100%">
50       <tr>
51         <td>
52           <table width="100%">
53             <tr valign="top">
54               <td width="50%">
55                 <table width="100%">
56                   <tr>
57                     <th align="right">[% IF vc == 'customer' %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]</th>
58                     <td>
59                      [%- SET vc_id = vc _ "_id" %]
60                      [% P.customer_vendor_picker(vc_id, $vc_id, type=vc, style="width: 250px", class="initial_focus") %]
61                      [% P.button_tag("show_vc_details('" _ HTML.escape(vc) _  "')", LxERP.t8("Details (one letter abbreviation)")) %]
62                      [% P.hidden_tag("previous_" _ vc_id, $vc_id) %]
63                     </td>
64                   </tr>
65 [%- IF ALL_CONTACTS.size %]
66                   <tr>
67                     <th align="right">[% 'Contact Person' | $T8 %]</th>
68                     <td>
69                       [% 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') %]
70                     </td>
71                   </tr>
72 [%- END %]
73 [%- IF ALL_SHIPTO.size %]
74                   <tr>
75                     <th align="right">[% 'Shipping Address' | $T8 %]</th>
76                     <td>
77                       [% shiptos = [ [ "", LxERP.t8("No/individual shipping address") ] ] ;
78                          L.select_tag('shipto_id', shiptos.import(ALL_SHIPTO), default=shipto_id, value_key='shipto_id', title_key='displayable_id', style='width: 250px') %]
79                     </td>
80                   </tr>
81 [%- END %]
82 [%- IF is_order %]
83                   <tr>
84                     <td align="right">[% 'Credit Limit' | $T8 %]</td>
85                     <td>[% LxERP.format_amount(creditlimit, 0) %]; [% 'Remaining' | $T8 %] <span class="plus[% is_credit_remaining_negativ %]">[% LxERP.format_amount(creditremaining, 0) %]</span></td>
86                   </tr>
87 [%- END %]
88 [%- IF business %]
89                   <tr>
90                     <th align="right">[% business_label %]</th>
91                     <td>[% HTML.escape(business) %]; [% 'Trade Discount' | $T8 %] [% LxERP.format_percent(tradediscount) %] %</td>
92                   </tr>
93 [%- END %]
94 [%- IF max_dunning_level %]
95                   <tr>
96                     <th align="right">[% 'Max. Dunning Level' | $T8 %]:</th>
97                     <td>
98                       <b>[% HTML.escape(max_dunning_level) %]</b>;
99                       [% 'Dunning Amount' | $T8 %]: <b>[% LxERP.format_amount(dunning_amount, 2) %]</b>
100                     </td>
101                   </tr>
102 [%- END %]
103                   <tr>
104                     <th align="right">[% 'Steuersatz' | $T8 %]</th>
105                     <td>
106                       [% L.select_tag('taxzone_id', ( id ? ALL_TAXZONES : ALL_ACTIVE_TAXZONES), default=taxzone_id, title_key='description', style='width: 250px') %]
107                     </td>
108                   </tr>
109 [%- IF ALL_DEPARTMENTS.size %]
110                   <tr>
111                     <th align="right" nowrap>[% 'Department' | $T8 %]</th>
112                     <td colspan="3">
113                       [% L.select_tag('department_id', ALL_DEPARTMENTS, default=department_id, title_key = 'description', with_empty=1, style='width:250px') %]
114                     </td>
115                   </tr>
116 [%- END %]
117                   <tr>
118                     <th align="right">[% 'Currency' | $T8 %]</th>
119                     <td>[% L.select_tag("currency", ALL_CURRENCIES, value_key="name", default=currency, onchange="document.getElementById('update_button').click();") %]</td>
120                   </tr>
121 [%- IF show_exchangerate %]
122                   <tr>
123                     <th align="right">[% 'Exchangerate' | $T8 %]</th>
124                     <td>
125                      [%- IF forex %]
126                       [% LxERP.format_amount(exchangerate, 2) %]
127                      [%- ELSE %]
128                       <input name="exchangerate" size="10" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
129                      [%- END %]
130                     </td>
131                   </tr>
132 [%- END %]
133                   <tr>
134                     <th align="right">[% 'Shipping Point' | $T8 %]</th>
135                     <td colspan="3"><input name="shippingpoint" size="35" value="[% HTML.escape(shippingpoint) %]"></td>
136                   </tr>
137                   <tr>
138                     <th align="right">[% 'Ship via' | $T8 %]</th>
139                     <td colspan="3"><input name="shipvia" size="35" value="[% HTML.escape(shipvia) %]"></td>
140                   </tr>
141                   <tr>
142                     <th align="right">[% 'Transaction description' | $T8 %]</th>
143                     <td colspan="3"><input name="transaction_description" id="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"></td>
144                   </tr>
145 [%- IF show_delivery_customer %]
146                   <tr>
147                     <td colspan="4">
148                       <table>
149                         <tr>
150                           <td colspan="2">
151                           <button type="button" onclick="delivery_customer_selection_window('delivery_customer_string','delivery_customer_id')">[% 'Choose Customer' | $T8 %]</button>
152                         </td>
153                           <td colspan="2"><input type="hidden" name="delivery_customer_id" value="[% HTML.escape(delivery_customer_id) %]">
154                           <input size="45" id="delivery_customer_string" name="delivery_customer_string" value="[% HTML.escape(delivery_customer_string) %]"></td>
155                         </tr>
156                         <tr>
157                           <td colspan="2">
158                             <button type="button" onclick="vendor_selection_window('delivery_vendor_string','delivery_vendor_id')">[% 'Choose Vendor' | $T8 %]</button>
159                           </td>
160                           <td colspan="2"><input type="hidden" name="delivery_vendor_id" value="[% HTML.escape(delivery_vendor_id) %]">
161                           <input size="45" id="vendor_string" name="delivery_vendor_string" value="[% HTML.escape(delivery_vendor_string) %]"></td>
162                         </tr>
163                       </table>
164                     </td>
165                   </tr>
166 [%- END %]
167                 </table>
168               </td>
169               <td align="right">
170                 <table>
171               [% openclosed %]
172                   <tr>
173                     <th align="right">[% 'Employee' | $T8 %]</th>
174                     <td>
175                       [% L.select_tag('employee_id', ALL_EMPLOYEES, default=employee_id, title_key='safe_name') %]
176                     </td>
177                   </tr>
178 [%- IF is_sales and ALL_SALESMEN.size %]
179                   <tr>
180                     <th align="right">[% 'Salesman' | $T8 %]</th>
181                     <td>
182                       [% L.select_tag('salesman_id', ALL_SALESMEN, default=(salesman_id ? salesman_id : employee_id), title_key='safe_name') %]
183                     </td>
184                   </tr>
185 [%- END %]
186 [%- IF is_order %]
187                   <tr>
188                     <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
189                     <td><input name="ordnumber" size="11" value="[% HTML.escape(ordnumber) %]"></td>
190                   </tr>
191 [%- END %]
192                   <tr>
193                     <th width="70%" align="right" nowrap>[% IF is_req_quo %][% 'RFQ Number' | $T8 %][% ELSE %][% 'Quotation Number' | $T8 %][% END %]</th>
194                     <td><input name="quonumber" size="11" value="[% HTML.escape(quonumber) %]"></td>
195                   </tr>
196 [%- IF is_order %]
197                   <tr>
198                     <th width="70%" align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th>
199                     <td><input name="cusordnumber" size="11" value="[% HTML.escape(cusordnumber) %]"></td>
200                   </tr>
201 [%- END %]
202                   <tr>
203                     <th align="right" nowrap>
204                      [%- IF is_order %]
205                       [% 'Order Date' | $T8 %]
206                      [%- ELSIF is_req_quo %]
207                       [% 'RFQ Date' | $T8 %]
208                      [%- ELSE %]
209                       [% 'Quotation Date' | $T8 %]
210                      [%- END %]
211                     </th>
212                     <td nowrap>
213                       [% L.date_tag('transdate', transdate, id='transdate') %]
214                     </td>
215                   </tr>
216                   <tr>
217                     <th align="right" nowrap>
218                      [%- IF is_sales_quo %]
219                       [% 'Valid until' | $T8 %]
220                      [%- ELSE %]
221                       [% 'Reqdate' | $T8 %]
222                      [%- END %]
223                     </th>
224                     <td nowrap>
225                       [% L.date_tag('reqdate', reqdate, id='reqdate') %]
226                     </td>
227                   </tr>
228                   [%- IF is_sales_ord %]
229                   <tr>
230                     <th align="right" nowrap>[% 'Insert Date' | $T8 %]</th>
231                     <td>[% oe_obj.itime_as_date %]</td>
232                   </tr>
233                   [%- END %]
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 [%- IF type == 'sales_quotation' %]
241                   <tr>
242                     <th width="70%" align="right" nowrap>[% 'Order probability' | $T8 %]</th>
243                     <td nowrap>
244                       [%- L.select_tag('order_probability', ORDER_PROBABILITIES, title='title', default=order_probability) %]%
245                     </td>
246                   </tr>
247                   <tr>
248                     <th width="70%" align="right" nowrap>[% 'Expected billing date' | $T8 %]</th>
249                     <td nowrap>
250                       [%- L.date_tag('expected_billing_date', expected_billing_date 'BL') %]
251                     </td>
252                   </tr>
253 [%- END %]
254                 </table>
255               </td>
256             </tr>
257           </table>
258         </td>
259       </tr>