Teil-Fix für Bug 1673 : Drucken geht wieder ...
[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                       [% L.select_tag('cp_id', L.options_for_select(ALL_CONTACTS, default=cp_id, value='cp_id', title_sub=\contact_labels, with_empty=1), style='width: 250px') %]
67                     </td>
68                   </tr>
69 [%- END %]
70 [%- IF ALL_SHIPTO.size %]
71                   <tr>
72                     <th align="right">[% 'Shipping Address' | $T8 %]</th>
73                     <td>
74                       [% L.select_tag('shipto_id', L.options_for_select(ALL_SHIPTO, default=shipto_id, value='shipto_id', title_sub=\shipto_labels, with_empty=1), style='width: 250px', onChange="document.getElementById('update_button').click();") %]
75                     </td>
76                   </tr>
77 [%- END %]
78 [%- IF is_order %]
79                   <tr>
80                     <td align="right">[% 'Credit Limit' | $T8 %]</td>
81                     <td>[% LxERP.format_amount(creditlimit, 0) %]; [% 'Remaining' | $T8 %] <span class="plus[% is_credit_remaining_negativ %]">[% LxERP.format_amount(creditremaining, 0) %]</span></td>
82                   </tr>
83 [%- END %]
84 [%- IF business %]
85                   <tr>
86                     <th align="right">[% business_label %]</th>
87                     <td>[% HTML.escape(business) %]; [% 'Trade Discount' | $T8 %] [% LxERP.format_percent(tradediscount) %] %</td>
88                   </tr>
89 [%- END %]
90 [%- IF max_dunning_level %]
91                   <tr>
92                     <th align="right">[% 'Max. Dunning Level' | $T8 %]:</th>
93                     <td>
94                       <b>[% HTML.escape(max_dunning_level) %]</b>;
95                       [% 'Dunning Amount' | $T8 %]: <b>[% LxERP.format_amount(dunning_amount, 2) %]</b>
96                     </td>
97                   </tr>
98 [%- END %]
99                   <tr>
100                     <th align="right">[% 'Steuersatz' | $T8 %]</th>
101                     <td>
102                       [% L.select_tag('taxzone_id', L.options_for_select(ALL_TAXZONES, default=taxzone_id, title='description'), style='width: 250px') %]
103                     </td>
104                   </tr>
105 [%- IF ALL_DEPARTMENTS %]
106                   <tr>
107                     <th align="right" nowrap>[% 'Department' | $T8 %]</th>
108                     <td colspan="3">
109                       [% L.select_tag('department_id', L.options_for_select(ALL_DEPARTMENTS, default=department_id, title_sub=\department_labels, with_empty=1), style='width:250px') %]
110                     </td>
111                   </tr>
112 [%- END %]
113                   <tr>
114 [%- IF currencies %]
115                   <tr>
116                     <th align="right">[% 'Currency' | $T8 %]</th>
117                     <td>[% currencies %]</td>
118                   </tr>
119 [%- END %]
120 [%- IF show_exchangerate %]
121                   <tr>
122                     <th align="right">[% 'Exchangerate' | $T8 %]</th>
123                     <td>
124                      [%- IF forex %]
125                       [% LxERP.format_amount(exchangerate, 2) %]
126                      [%- ELSE %]
127                       <input name="exchangerate" size="10" value="[% HTML.escape(LxERP.format_amount(exchangerate)) %]">
128                      [%- END %]
129                     </td>
130                   </tr>
131 [%- END %]
132                   <tr>
133                     <th align="right">[% 'Shipping Point' | $T8 %]</th>
134                     <td colspan="3"><input name="shippingpoint" size="35" value="[% HTML.escape(shippingpoint) %]"></td>
135                   </tr>
136                   <tr>
137                     <th align="right">[% 'Ship via' | $T8 %]</th>
138                     <td colspan="3"><input name="shipvia" size="35" value="[% HTML.escape(shipvia) %]"></td>
139                   </tr>
140                   <tr>
141                     <th align="right">[% 'Transaction description' | $T8 %]</th>
142                     <td colspan="3"><input name="transaction_description" size="35" value="[% HTML.escape(transaction_description) %]"></td>
143                   </tr>
144 [%- IF show_delivery_customer %]
145                   <tr>
146                     <td colspan="4">
147                       <table>
148                         <tr>
149                           <td colspan="2">
150                           <button type="button" onclick="delivery_customer_selection_window('delivery_customer_string','delivery_customer_id')">[% 'Choose Customer' | $T8 %]</button>
151                         </td>
152                           <td colspan="2"><input type="hidden" name="delivery_customer_id" value="[% HTML.escape(delivery_customer_id) %]">
153                           <input size="45" id="delivery_customer_string" name="delivery_customer_string" value="[% HTML.escape(delivery_customer_string) %]"></td>
154                         </tr>
155                         <tr>
156                           <td colspan="2">
157                             <button type="button" onclick="vendor_selection_window('delivery_vendor_string','delivery_vendor_id')">[% 'Choose Vendor' | $T8 %]</button>
158                           </td>
159                           <td colspan="2"><input type="hidden" name="delivery_vendor_id" value="[% HTML.escape(delivery_vendor_id) %]">
160                           <input size="45" id="vendor_string" name="delivery_vendor_string" value="[% HTML.escape(delivery_vendor_string) %]"></td>
161                         </tr>
162                       </table>
163                     </td>
164                   </tr>
165 [%- END %]
166                 </table>
167               </td>
168               <td align="right">
169                 <table>
170               [% openclosed %]
171                   <tr>
172                     <th align="right">[% 'Employee' | $T8 %]</th>
173                     <td>
174                       [% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, default=employee_id, title_sub=\sales_employee_labels)) %]
175                     </td>
176                   </tr>
177 [%- IF is_sales and ALL_SALESMEN.size %]
178                   <tr>
179                     <th align="right">[% 'Salesman' | $T8 %]</th>
180                     <td>
181                       [% L.select_tag('salesman_id', L.options_for_select(ALL_SALESMEN, default=(salesman_id ? salesman_id : employee_id), title_sub=\sales_employee_labels)) %]
182                     </td>
183                   </tr>
184 [%- END %]
185 [%- IF is_order %]
186                   <tr>
187                     <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
188                     <td><input name="ordnumber" size="11" value="[% HTML.escape(ordnumber) %]"></td>
189                   </tr>
190 [%- END %]
191                   <tr>
192                     <th width="70%" align="right" nowrap>[% IF is_req_quo %][% 'RFQ Number' | $T8 %][% ELSE %][% 'Quotation Number' | $T8 %][% END %]</th>
193                     <td><input name="quonumber" size="11" value="[% HTML.escape(quonumber) %]"></td>
194                   </tr>
195 [%- IF is_order %]
196                   <tr>
197                     <th width="70%" align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th>
198                     <td><input name="cusordnumber" size="11" value="[% HTML.escape(cusordnumber) %]"></td>
199                   </tr>
200 [%- END %]
201                   <tr>
202                     <th align="right" nowrap>
203                      [%- IF is_order %]
204                       [% 'Order Date' | $T8 %]
205                      [%- ELSIF is_req_quo %]
206                       [% 'RFQ Date' | $T8 %]
207                      [%- ELSE %]
208                       [% 'Quotation Date' | $T8 %]
209                      [%- END %]
210                     </th>
211                     <td nowrap>
212                       <input name=transdate id=transdate size=11 title="[% HTML.escape(dateformat) %]" value="[% transdate %]" onBlur="check_right_date_format(this)">
213                       <input type=button name=transdate id="trigger1" value="[% 'button' | $T8 %]">
214                     </td>
215                   </tr>
216                   <tr>
217                     <th align="right" nowrap>
218                      [%- IF is_sales_quo %]
219                       [% 'Valid until' | $T8 %]
220                      [%- ELSE %]
221                       [% 'Required by' | $T8 %]
222                      [%- END %]
223                     </th>
224                     <td nowrap>
225                       <input name=reqdate id=reqdate size=11 title="[% HTML.escape(dateformat) %]" value="[% reqdate %]" onBlur="check_right_date_format(this)">
226                       <input type=button name=reqdate id="trigger2" value="[% 'button' | $T8 %]">
227                     </td>
228                   </tr>
229                   <tr>
230                     <th width="70%" align="right" nowrap>[% 'Project Number' | $T8 %]</th>
231                     <td>
232                       [%- L.select_tag('globalproject_id', L.options_for_select(ALL_PROJECTS, title='projectnumber', default=globalproject_id, with_empty='1'), onChange="document.getElementById('update_button').click();") %]
233                     </td>
234                   </tr>
235                 </table>
236               </td>
237             </tr>
238           </table>
239         </td>
240       </tr>
241
242     <script type="text/javascript">
243      <!--
244        Calendar.setup({ inputField : "transdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger1" });
245        Calendar.setup({ inputField : "reqdate", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger2" });
246
247        $('document').ready(function(){
248          setupDateFormat('[% dateformat %]', '[% 'Falsches Datumsformat!' | $T8 %]');
249          setupPoints('[% numberformat %]', '[% 'wrongformat' | $T8 %]');
250        });
251      //-->
252     </script>