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