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