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