Merge branch 'after-262'
[kivitendo-erp.git] / templates / webpages / oe / form_header.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5 <body onLoad="[% onload %]">
6
7   <form method="post" name="oe" action="[% script %]">
8
9     <script type="text/javascript" src="js/common.js"></script>
10     <script type="text/javascript" src="js/delivery_customer_selection.js"></script>
11     <script type="text/javascript" src="js/vendor_selection.js"></script>
12     <script type="text/javascript" src="js/calculate_qty.js"></script>
13     <script type="text/javascript" src="js/customer_or_vendor_selection.js"></script>
14     <script type="text/javascript" src="js/follow_up.js"></script>
15     [%- IF is_sales_ord %]
16      [% L.javascript_tag("js/edit_periodic_invoices_config") %]
17     [%- END %]
18
19 [%- FOREACH row = HIDDENS %]
20    <input type="hidden" name="[% HTML.escape(row.name) %]" value="[% HTML.escape(row.value) %]" >
21 [%- END %]
22
23     <input type="hidden" name="convert_from_oe_ids" value="[% HTML.escape(convert_from_oe_ids) %]">
24
25     <input type="hidden" name="follow_up_trans_id_1" value="[% HTML.escape(id) %]">
26     <input type="hidden" name="follow_up_trans_type_1" value="[% HTML.escape(type) %]">
27     <input type="hidden" name="follow_up_trans_info_1" value="[% HTML.escape(follow_up_trans_info) %]">
28     <input type="hidden" name="follow_up_rowcount" value="1">
29 [%- IF resubmit %]
30 [%# in case of resubmits, restore enough information for dispatcher to work %]
31     [% L.hidden_tag('action_' _ dispatched_action, 1) %]
32 [%- END %]
33
34     <div class="listtop">[% title %]</div>
35
36 [%- INCLUDE 'common/flash.html' %]
37
38     <table width="100%">
39       <tr height="5"></tr>
40       <tr>
41         <td>
42           <table width="100%">
43             <tr valign="top">
44               <td width="50%">
45                 <table width="100%">
46                   <tr>
47                     <th align="right">[% IF vc == 'customer' %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]</th>
48                     <td>
49                       [%- INCLUDE 'generic/multibox.html'
50                            name          = vc,
51                            style         = 'width: 250px',
52                            DATA          = vc == 'customer' ? ALL_CUSTOMERS : ALL_VENDORS,
53                            id_sub        = 'vc_keys',
54                            label_key     = 'name',
55                            select        = vc_select,
56                            limit         = vclimit,
57                            allow_textbox = 1,
58                            onChange      = "document.getElementById('update_button').click();" -%]
59                       <input type="button" value="[% 'Details (one letter abbreviation)' | $T8 %]" onclick="show_vc_details('[% HTML.escape(vc) %]')">
60                     </td>
61                   </tr>
62 [%- IF ALL_CONTACTS.size %]
63                   <tr>
64                     <th align="right">[% 'Contact Person' | $T8 %]</th>
65                     <td>
66                       [%- INCLUDE 'generic/multibox.html'
67                            name       = 'cp_id',
68                            style      = 'width: 250px',
69                            DATA       = ALL_CONTACTS,
70                            id_key     = 'cp_id',
71                            label_sub  = 'contact_labels',
72                            show_empty = 1 -%]
73                     </td>
74                   </tr>
75 [%- END %]
76 [%- IF ALL_SHIPTO.size %]
77                   <tr>
78                     <th align="right">[% 'Shipping Address' | $T8 %]</th>
79                     <td>
80                       [%- INCLUDE 'generic/multibox.html'
81                            name       = 'shipto_id',
82                            style      = 'width: 250px',
83                            DATA       = ALL_SHIPTO,
84                            id_key     = 'shipto_id',
85                            label_sub  = 'shipto_labels',
86                            show_empty = 1,
87                            onChange   = "document.getElementById('update_button').click();" -%]
88                     </td>
89                   </tr>
90 [%- END %]
91 [%- IF is_order %]
92                   <tr>
93                     <td align="right">[% 'Credit Limit' | $T8 %]</td>
94                     <td>[% LxERP.format_amount(creditlimit, 0) %]; [% 'Remaining' | $T8 %] <span class="plus[% is_credit_remaining_negativ %]">[% LxERP.format_amount(creditremaining, 0) %]</span></td>
95                   </tr>
96 [%- END %]
97 [%- IF business %]
98                   <tr>
99                     <th align="right">[% business_label %]</th>
100                     <td>[% HTML.escape(business) %]; [% 'Trade Discount' | $T8 %] [% LxERP.format_percent(tradediscount) %] %</td>
101                   </tr>
102 [%- END %]
103 [%- IF max_dunning_level %]
104                   <tr>
105                     <th align="right">[% 'Max. Dunning Level' | $T8 %]:</th>
106                     <td>
107                       <b>[% HTML.escape(max_dunning_level) %]</b>;
108                       [% 'Dunning Amount' | $T8 %]: <b>[% LxERP.format_amount(dunning_amount, 2) %]</b>
109                     </td>
110                   </tr>
111 [%- END %]
112                   <tr>
113                     <th align="right">[% 'Steuersatz' | $T8 %]</th>
114                     <td>
115                       [%- INCLUDE 'generic/multibox.html'
116                            name       = 'taxzone_id',
117                            style      = 'width: 250px',
118                            DATA       = ALL_TAXZONES,
119                            id_key     = 'id',
120                            label_key  = 'description' -%]
121                     </td>
122                   </tr>
123 [%- IF ALL_DEPARTMENTS %]
124                   <tr>
125                     <th align="right" nowrap>[% 'Department' | $T8 %]</th>
126                     <td colspan="3">
127                       [%- INCLUDE 'generic/multibox.html'
128                            name       = 'department_id',
129                            style      = 'width: 250px',
130                            DATA       = ALL_DEPARTMENTS,
131                            id_key     = 'id',
132                            label_sub  = 'department_labels',
133                            show_empty = 1 -%]
134                     </td>
135                   </tr>
136 [%- END %]
137                   <tr>
138 [%- IF currencies %]
139                   <tr>
140                     <th align="right">[% 'Currency' | $T8 %]</th>
141                     <td>[% currencies %]</td>
142                   </tr>
143 [%- END %]
144 [%- IF show_exchangerate %]
145                   <tr>
146                     <th align="right">[% 'Exchangerate' | $T8 %]</th>
147                     <td>
148                      [%- IF forex %]
149                       [% LxERP.format_amount(exchangerate, 2) %]
150                      [%- ELSE %]
151                       <input name="exchangerate" size="10" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
152                      [%- END %]
153                     </td>
154                   </tr>
155 [%- END %]
156                   <tr>
157                     <th align="right">[% 'Shipping Point' | $T8 %]</th>
158                     <td colspan="3"><input name="shippingpoint" size="35" value="[% HTML.escape(shippingpoint) %]"></td>
159                   </tr>
160                   <tr>
161                     <th align="right">[% 'Ship via' | $T8 %]</th>
162                     <td colspan="3"><input name="shipvia" size="35" value="[% HTML.escape(shipvia) %]"></td>
163                   </tr>
164                   <tr>
165                     <th align="right">[% 'Transaction description' | $T8 %]</th>
166                     <td colspan="3"><input name="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"></td>
167                   </tr>
168 [%- IF show_delivery_customer %]
169                   <tr>
170                     <td colspan="4">
171                       <table>
172                         <tr>
173                           <td colspan="2">
174                           <button type="button" onclick="delivery_customer_selection_window('delivery_customer_string','delivery_customer_id')">[% 'Choose Customer' | $T8 %]</button>
175                         </td>
176                           <td colspan="2"><input type="hidden" name="delivery_customer_id" value="[% HTML.escape(delivery_customer_id) %]">
177                           <input size="45" id="delivery_customer_string" name="delivery_customer_string" value="[% HTML.escape(delivery_customer_string) %]"></td>
178                         </tr>
179                         <tr>
180                           <td colspan="2">
181                             <button type="button" onclick="vendor_selection_window('delivery_vendor_string','delivery_vendor_id')">[% 'Choose Vendor' | $T8 %]</button>
182                           </td>
183                           <td colspan="2"><input type="hidden" name="delivery_vendor_id" value="[% HTML.escape(delivery_vendor_id) %]">
184                           <input size="45" id="vendor_string" name="delivery_vendor_string" value="[% HTML.escape(delivery_vendor_string) %]"></td>
185                         </tr>
186                       </table>
187                     </td>
188                   </tr>
189 [%- END %]
190                 </table>
191               </td>
192               <td align="right">
193                 <table>
194               [% openclosed %]
195                   <tr>
196                     <th align="right">[% 'Employee' | $T8 %]</th>
197                     <td>
198                       [%- INCLUDE 'generic/multibox.html'
199                            name       = 'employee_id',
200                            DATA       = ALL_EMPLOYEES,
201                            id_key     = 'id',
202                            label_sub  = 'sales_employee_labels' -%]
203                     </td>
204                   </tr>
205 [%- IF is_sales and ALL_SALESMEN.size %]
206                   <tr>
207                     <th align="right">[% 'Salesman' | $T8 %]</th>
208                     <td>
209                       [%- INCLUDE 'generic/multibox.html'
210                            name       = 'salesman_id',
211                            default    = salesman_id ? salesman_id : employee_id,
212                            DATA       = ALL_SALESMEN,
213                            id_key     = 'id',
214                            label_sub  = 'sales_employee_labels' -%]
215                     </td>
216                   </tr>
217 [%- END %]
218 [%- IF is_order %]
219                   <tr>
220                     <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
221                     <td><input name="ordnumber" size="11" value="[% HTML.escape(ordnumber) %]"></td>
222                   </tr>
223 [%- END %]
224                   <tr>
225                     <th width="70%" align="right" nowrap>[% IF is_req_quo %][% 'RFQ Number' | $T8 %][% ELSE %][% 'Quotation Number' | $T8 %][% END %]</th>
226                     <td><input name="quonumber" size="11" value="[% HTML.escape(quonumber) %]"></td>
227                   </tr>
228 [%- IF is_order %]
229                   <tr>
230                     <th width="70%" align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th>
231                     <td><input name="cusordnumber" size="11" value="[% HTML.escape(cusordnumber) %]"></td>
232                   </tr>
233 [%- END %]
234                   <tr>
235                     <th align="right" nowrap>
236                      [%- IF is_order %]
237                       [% 'Order Date' | $T8 %]
238                      [%- ELSIF is_req_quo %]
239                       [% 'RFQ Date' | $T8 %]
240                      [%- ELSE %]
241                       [% 'Quotation Date' | $T8 %]
242                      [%- END %]
243                     </th>
244                     <td nowrap>
245                       <input name=transdate id=transdate size=11 title="[% HTML.escape(dateformat) %]" value="[% transdate %]" onBlur="check_right_date_format(this)">
246                       <input type=button name=transdate id="trigger1" value="[% 'button' | $T8 %]">
247                     </td>
248                   </tr>
249                   <tr>
250                     <th align="right" nowrap>
251                      [%- IF is_sales_quo %]
252                       [% 'Valid until' | $T8 %]
253                      [%- ELSE %]
254                       [% 'Required by' | $T8 %]
255                      [%- END %]
256                     </th>
257                     <td nowrap>
258                       <input name=reqdate id=reqdate size=11 title="[% HTML.escape(dateformat) %]" value="[% reqdate %]" onBlur="check_right_date_format(this)">
259                       <input type=button name=reqdate id="trigger2" value="[% 'button' | $T8 %]">
260                     </td>
261                   </tr>
262                   <tr>
263                     <th width="70%" align="right" nowrap>[% 'Project Number' | $T8 %]</th>
264                     <td>
265                       [%- INCLUDE 'generic/multibox.html'
266                            name       = 'globalproject_id',
267                            DATA       = ALL_PROJECTS,
268                            id_key     = 'id',
269                            label_key  = 'projectnumber',
270                            show_empty = 1,
271                            onChange   = "document.getElementById('update_button').click();" -%]
272                     </td>
273                   </tr>
274                 </table>
275               </td>
276             </tr>
277           </table>
278         </td>
279       </tr>
280
281     <script type="text/javascript">
282      <!--
283        Calendar.setup({ inputField : "transdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger1" });
284        Calendar.setup({ inputField : "reqdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger2" });
285      //-->
286     </script>