Aufträge - Abteilung per ALL_DEPARTMENTS und L.select_tag
[kivitendo-erp.git] / templates / webpages / oe / search.html
1 [%- USE HTML %]
2 [%- USE T8 %]
3 [%- USE LxERP %]
4 [%- USE L %]
5 <h1>[% HTML.escape(title) %]</h1>
6
7 [%- SET vclabel = vc == 'customer' ? LxERP.t8('Customer') : LxERP.t8('Vendor') %]
8 [%- SET vcnumberlabel = vc == 'customer' ? LxERP.t8('Customer Number') : LxERP.t8('Vendor Number') %]
9 [%- SET vctypelabel = vc == 'customer' ? LxERP.t8('Customer type') : LxERP.t8('Vendor type') %]
10
11 <form method="post" action="oe.pl">
12
13 <table width="100%">
14  <tr>
15   <td>
16    <table>
17     <tr>
18      <th align="right">[% HTML.escape(vclabel) %]</th>
19      <td colspan="3">
20             [%- INCLUDE 'generic/multibox.html'
21                  name          = vc,
22                  default       = vc == 'customer' ? oldcustomer : oldvendor,
23                  style         = 'width: 250px',
24                  DATA          = ALL_VC,
25                  id_sub        = 'vc_keys',
26                  label_key     = 'name',
27                  select        = vc_select,
28                  limit         = MYCONFIG.vclimit,
29                  show_empty    = 1,
30                  allow_textbox = 1,
31                  class         = 'initial_focus',
32                  -%]
33      </td>
34     </tr>
35     <tr>
36      <th align="right" nowrap>[% 'Contact Person' | $T8 %]</th>
37      <td colspan="3">[% L.input_tag("cp_name", '', style="width: 250px") %]</td>
38     </tr>
39 [%- IF ALL_DEPARTMENTS.size %]
40     <tr>
41      <th align="right" nowrap>[% 'Department' | $T8 %]</th>
42      <td colspan=3>[% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, style="width: 250px") %]</td>
43     </tr>
44 [%- END %]
45     <tr>
46      <th align="right">[% HTML.escape(ordlabel) %]</th>
47      <td colspan="3"><input name="[% HTML.escape(ordnrname) %]" style="width: 250px"></td>
48     </tr>
49 [% IF is_order %]
50     <tr>
51      <th align="right">[% LxERP.t8("Customer Order Number") %]</th>
52      <td colspan="3">[% L.input_tag("cusordnumber", '', style="width: 250px") %]</td>
53     </tr>
54 [% END %]
55     <tr>
56      <th align="right">[% 'Employee' | $T8 %]</th>
57      <td>[% L.select_tag('employee_id', ALL_EMPLOYEES, title_key='safe_name', with_empty=1, style='width:250px') %]</td>
58     </tr>
59     <tr>
60      <th align="right">[% 'Salesman' | $T8 %]</th>
61      <td>[% L.select_tag('salesman_id', ALL_EMPLOYEES, title_key='safe_name', with_empty=1, style='width:250px') %]</td>
62     </tr>
63     <tr>
64      <th align="right">[% 'Steuersatz' | $T8 %]</th>
65      <td>[% L.select_tag('taxzone_id', ALL_TAXZONES, with_empty=1, title_key='description', style='width: 250px') %]</td>
66     </tr>
67     <tr>
68      <th align="right">[% 'Shipping Point' | $T8 %]</th>
69      <td colspan="3">[% L.input_tag('shippingpoint', '', style='width:250px') %]</td>
70     </tr>
71     <tr>
72      <th align="right">[% 'Transaction description' | $T8 %]</th>
73      <td><input name="transaction_description" style="width: 250px"></td>
74
75      <th align="right">[% 'Part Description' | $T8 %]</th>
76      <td><input name="parts_description" style="width: 250px"></td>
77     </tr>
78     <tr>
79      <th align="right">[% 'Project Number' | $T8 %]</th>
80      <td>
81             [%- INCLUDE 'generic/multibox.html'
82                  name          =  MYCONFIG.vclimit < ALL_PROJECTS.size ? 'projectnumber' : 'project_id',
83                  style         = "width: 250px",
84                  DATA          =  ALL_PROJECTS,
85                  id_key        = 'id',
86                  label_key     = 'projectnumber',
87                  limit         = MYCONFIG.vclimit,
88                  show_empty    = 1,
89                  allow_textbox = 1,
90             -%]
91      </td>
92
93      <th align="right">[% 'Part Number' | $T8 %]</th>
94      <td><input name="parts_partnumber" style="width: 250px"></td>
95     </tr>
96     [%- UNLESS ALL_BUSINESS_TYPES.size == 0 %]
97     <tr>
98      <th align="right" nowrap>[% vctypelabel %]</th>
99      <td colspan="3">
100       [% L.select_tag('business_id', ALL_BUSINESS_TYPES, title_key = 'description', with_empty = 1, style='width:250px') %]
101      </td>
102     </tr>
103     [%- END %]
104     <tr>
105      <th align="right">[% IF is_order %][% 'Order Date' | $T8 %][% ELSE %][% 'Quotation Date' | $T8 %][% END %] [% 'From' | $T8 %]</th>
106      <td>
107        [% L.date_tag('transdatefrom') %]
108      </td>
109      <th align="right">[% 'Bis' | $T8 %]</th>
110      <td>
111       [% L.date_tag('transdateto') %]
112      </td>
113     </tr>
114     <tr>
115      <th align="right">[% IF is_order %][% 'Delivery Date' | $T8 %][% ELSE %][% 'Valid until' | $T8 %][% END %] [% 'From' | $T8 %]</th>
116      <td>
117        [% L.date_tag('reqdatefrom') %]
118      </td>
119      <th align="right">[% 'Bis' | $T8 %]</th>
120      <td>
121        [% L.date_tag('reqdateto') %]
122      </td>
123     </tr>
124
125     [%- IF type == 'sales_order' %]
126     <tr>
127      <th align="right">[% 'Insert Date' | $T8 %] [% 'From' | $T8 %]</th>
128      <td>
129        [% L.date_tag('insertdatefrom') %]
130      </td>
131      <th align="right">[% 'Bis' | $T8 %]</th>
132      <td>
133        [% L.date_tag('insertdateto') %]
134      </td>
135     </tr>
136     [%- END %]
137
138 [%- IF type == 'sales_quotation' %]
139     <tr>
140      <th align="right">[% 'Expected billing date' | $T8 %] [% 'From' | $T8 %]</th>
141      <td>
142       [% L.date_tag('expected_billing_date_from', '' 'BL') %]
143      </td>
144      <th align="right">[% 'Expected billing date' | $T8 %] [% 'Bis' | $T8 %]</th>
145      <td>
146       [% L.date_tag('expected_billing_date_to', '' 'BL') %]
147      </td>
148     </tr>
149     <tr>
150      <th align="right">[% 'Order probability' | $T8 %]</th>
151      <td colspan="3">
152       [% L.select_tag('order_probability_op', [[ 'ge', '>=' ], [ 'le', '<=' ]]) %]
153       [% L.select_tag('order_probability_value', ORDER_PROBABILITIES, title='title', with_empty=1) %]
154      </td>
155     </tr>
156 [%- END %]
157
158 [%- IF CT_CUSTOM_VARIABLES.size %]
159     <tr>
160       <td></td>
161       <td colspan=4 align=left><b>[% 'Custom variables for module' | $T8 %]: [%'Customers and vendors' | $T8 %]</td>
162     </tr>
163     [% CT_CUSTOM_VARIABLES_FILTER_CODE %]
164 [%- END %]
165
166     <tr>
167      <th align="right">[% 'Include in Report' | $T8 %]</th>
168      <td colspan="5">
169       <table>
170        <tr>
171         <td>
172          <input type="checkbox" name="open" value="1" id="open" checked>
173          <label for="open">[% 'Open' | $T8 %]</label>
174         </td>
175         <td>
176          <input type="checkbox" name="closed" value="1" id="closed">
177          <label for="closed">[% 'Closed' | $T8 %]</label>
178         </td>
179        </tr>
180 [%- IF type == 'sales_order' OR type == 'purchase_order' %]
181        <tr>
182         <td>
183          <input name="notdelivered" id="notdelivered" class="checkbox" type="checkbox" value="1" checked>
184          <label for="notdelivered">[% 'Not delivered' | $T8 %]</label>
185         </td>
186         <td>
187          <input name="delivered" id="delivered" class="checkbox" type="checkbox" value="1" checked>
188          <label for="delivered">[% 'Delivery Order(s) for full qty created' | $T8 %]</label>
189         </td>
190        </tr>
191 [%- END %]
192 [%- IF type == 'sales_order' %]
193        <tr>
194         <td>
195          [% L.checkbox_tag("periodic_invoices_active", label => LxERP.t8("Periodic invoices active")) %]
196         </td>
197         <td>
198          [% L.checkbox_tag("periodic_invoices_inactive", label => LxERP.t8("Periodic invoices inactive")) %]
199         </td>
200        </tr>
201 [%- END %]
202        <tr>
203         <td>
204          <input name="l_id" id="l_id" class="checkbox" type="checkbox" value="Y">
205          <label for="l_id">[% 'ID' | $T8 %]</label>
206         </td>
207         <td>
208          <input name="l_[% HTML.escape(ordnrname) %]" id="l_[% HTML.escape(ordnrname) %]" class="checkbox" type="checkbox" value="Y" checked>
209          <label for="l_[% HTML.escape(ordnrname) %]">[% HTML.escape(ordlabel) %]</label>
210         </td>
211 [% IF is_order %]
212         <td>
213          <input name="l_cusordnumber" id="l_cusordnumber" class="checkbox" type="checkbox" value="Y" checked>
214          <label for="l_cusordnumber">[% LxERP.t8("Customer Order Number") %]</label>
215         </td>
216 [% END %]
217        </tr>
218        <tr>
219         <td>
220          <input name="l_transdate" id="l_transdate" class="checkbox" type="checkbox" value="Y" checked>
221          <label for="l_transdate">[% 'Date' | $T8 %]</label>
222         </td>
223         <td>
224          <input name="l_reqdate" id="l_reqdate" class="checkbox" type="checkbox" value="Y" checked>
225          <label for="l_reqdate">[% IF is_order %][% 'Required by' | $T8 %][% ELSE %][% 'Valid until' | $T8 %][% END %]</label>
226         </td>
227         [%- IF type == 'sales_order' %]
228         <td>
229           <input name="l_insertdate" id="l_insertdate" class="checkbox" type="checkbox" value="Y">
230           <label for="l_insertdate">[% 'Insert Date' | $T8 %]</label>
231         </td>
232         [%- END %]
233        </tr>
234        <tr>
235         <td>
236          <input name="l_name" id="l_name" class="checkbox" type="checkbox" value="Y" checked>
237          <label for="l_name">[% HTML.escape(vclabel) %]
238         </td>
239         <td>
240          <input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y" checked>
241          <label for="l_employee">[% 'Employee' | $T8 %]</label>
242         </td>
243         <td>
244          <input name="l_shipvia" id="l_shipvia" class="checkbox" type="checkbox" value="Y">
245          <label for="l_shipvia">[% 'Ship via' | $T8 %]</label>
246         </td>
247        </tr>
248        <tr>
249         <td>
250          <input name="l_customernumber" id="l_customernumber" class="checkbox" type="checkbox" value="Y">
251          <label for="l_customernumber">[% 'Customer Number' | $T8 %]</label>
252         </td>
253         <td>[%- L.checkbox_tag('l_taxzone',       label => LxERP.t8('Steuersatz'))     %]</td>
254         <td>[%- L.checkbox_tag('l_shippingpoint', label => LxERP.t8('Shipping Point')) %]</td>
255        </tr>
256        <tr>
257         <td>
258          <input name="l_netamount" id="l_netamount" class="checkbox" type="checkbox" value="Y">
259          <label for="l_netamount">[% 'Amount' | $T8 %]</label>
260         </td>
261         <td>
262          <input name="l_tax" id="l_tax" class="checkbox" type="checkbox" value="Y">
263          <label for="l_tax">[% 'Tax' | $T8 %]</label>
264         </td>
265         <td>
266          <input name="l_amount" id="l_amount" class="checkbox" type="checkbox" value="Y" checked>
267          <label for="l_amount">[% 'Total' | $T8 %]</label>
268         </td>
269        </tr>
270        <tr>
271         <td>
272          <input name="l_marge_total" id="l_marge_total" class="checkbox" type="checkbox" value="Y">
273          <label for="l_marge_total">[% 'Ertrag' | $T8 %]</label>
274         </td>
275         <td>
276          <input name="l_marge_percent" id="l_marge_percent" class="checkbox" type="checkbox" value="Y">
277          <label for="l_marge_percent">[% 'Ertrag prozentual' | $T8 %]</label>
278         </td>
279         <td>
280          <input name="l_payment_terms" id="l_payment_terms" class="checkbox" type="checkbox" value="Y">
281          <label for="l_payment_terms">[% 'Payment Terms' | $T8 %]</label>
282         </td>
283        </tr>
284        <tr>
285         <td>
286          <input name="l_globalprojectnumber" id="l_globalprojectnumber" class="checkbox" type="checkbox" value="Y">
287          <label for="l_globalprojectnumber">[% 'Project Number' | $T8 %]</label>
288         </td>
289         <td>
290          <input name="l_transaction_description" id="l_transaction_description" class="checkbox" type="checkbox" value="Y"[% IF INSTANCE_CONF.get_require_transaction_description_ps %] checked[% END %]>
291          <label for="l_transaction_description">[% 'Transaction description' | $T8 %]</label>
292         </td>
293        </tr>
294        <tr>
295         <td>
296          <input name="l_subtotal" id="l_subtotal" class="checkbox" type="checkbox" value="Y">
297          <label for="l_subtotal">[% 'Subtotal' | $T8 %]</label>
298         </td>
299         <td>
300          <input name="l_salesman" id="l_salesman" class="checkbox" type="checkbox" value="Y">
301          <label for="l_salesman">[% 'Salesman' | $T8 %]</label>
302         </td>
303        </tr>
304 [% IF type == 'sales_quotation' %]
305        <tr>
306         <td colspan="2">
307          <input name="l_order_probability_expected_billing_date" id="l_order_probability_expected_billing_date" class="checkbox" type="checkbox" value="Y">
308          <label for="l_order_probability_expected_billing_date">[% 'Order probability & expected billing date' | $T8 %]</label>
309         </td>
310        </tr>
311 [%- END %]
312        <tr>
313         <td>
314          <input name="l_remaining_amount" id="l_remaining_amount" class="checkbox" type="checkbox" value="Y">
315          <label for="l_remaining_amount">[% 'Remaining Amount' | $T8 %]</label>
316         </td>
317         <td>
318          <input name="l_remaining_netamount" id="l_remaining_netamount" class="checkbox" type="checkbox" value="Y">
319          <label for="l_remaining_netamount">[% 'Remaining Net Amount' | $T8 %]</label>
320         </td>
321        </tr>
322        <tr>
323         <td colspan=4 align=left><b>[% HTML.escape(vclabel) %]</td>
324        </tr>
325        <tr>
326         <td>
327          <input name="l_vcnumber" id="l_vcnumber" class="checkbox" type="checkbox" value="Y">
328          <label for="l_vcnumber">[% HTML.escape(vcnumberlabel) %]</label>
329         </td>
330         <td>
331          <input name="l_country" id="l_country" class="checkbox" type="checkbox" value="Y">
332          <label for="l_country">[% 'Country' | $T8 %]</label>
333         </td>
334         <td>
335          <input name="l_ustid"  id="l_ustid" class="checkbox" type="checkbox" value="Y">
336          <label for="l_ustid">[% 'USt-IdNr.' | $T8 %]</label>
337         </td>
338        </tr>
339
340       [% CT_CUSTOM_VARIABLES_INCLUSION_CODE %]
341
342 [%- IF type == 'sales_order' %]
343        <tr><td colspan="3"><hr></td></tr>
344 [%- END %]
345       </table>
346      </td>
347     </tr>
348    </table>
349   </td>
350  </tr>
351 </table>
352
353 <br>
354 <input type="hidden" name="nextsub" value="orders">
355 <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
356 <input type="hidden" name="type" value="[% HTML.escape(type) %]">
357 <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
358 </form>