Merge branch 'master' of git@vc.linet-services.de:public/lx-office-erp
[kivitendo-erp.git] / templates / webpages / oe / search.html
1 [%- USE HTML %]
2 [%- USE T8 %]
3 [%- USE LxERP %]
4 [%- USE L %]
5 [%- SET vclabel = vc == 'customer' ? LxERP.t8('Customer') : LxERP.t8('Vendor') %]
6 [%- SET vcnumberlabel = vc == 'customer' ? LxERP.t8('Customer Number') : LxERP.t8('Vendor Number') %]
7 <body>
8
9 <form method="post" action="oe.pl">
10
11  <p><div class="listtop">[% HTML.escape(title) %]</div></p>
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         = vclimit,
29                  show_empty    = 1,
30                  allow_textbox = 1,
31                  -%]
32      </td>
33     </tr>
34 [%- IF ALL_DEPARTMENTS.size %]
35     <tr>
36      <th align="right" nowrap>[% 'Department' | $T8 %]</th>
37      <td colspan="3">
38             [%- INCLUDE 'generic/multibox.html'
39                  name          = 'department_id',
40                  style         = 'width: 250px',
41                  DATA          = ALL_DEPARTMENTS,
42                  id_key        = 'id',
43                  label_key     = 'description',
44                  limit         = vclimit,
45                  show_empty    = 1,
46                  allow_textbox = 1,
47             -%]
48      </td>
49     </tr>
50 [%- END %]
51     <tr>
52      <th align="right">[% HTML.escape(ordlabel) %]</th>
53      <td colspan="3"><input name="[% HTML.escape(ordnrname) %]" style="width: 250px"></td>
54     </tr>
55     <tr>
56      <th align="right">[% 'Employee' | $T8 %]</th>
57      <td>[% L.select_tag('employee_id', L.options_for_select(ALL_EMPLOYEES, title='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', L.options_for_select(ALL_EMPLOYEES, title='safe_name', with_empty=1), style='width:250px') %]</td>
62     </tr>
63     <tr>
64      <th align="right">[% 'Transaction description' | $T8 %]</th>
65      <td colspan="3"><input name="transaction_description" style="width: 250px"></td>
66     </tr>
67     <tr>
68      <th align="right">[% 'Project Number' | $T8 %]</th>
69      <td colspan="3">
70             [%- INCLUDE 'generic/multibox.html'
71                  name          =  vclimit < ALL_PROJECTS.size ? 'projectnumber' : 'project_id',
72                  style         = "width: 250px",
73                  DATA          =  ALL_PROJECTS,
74                  id_key        = 'id',
75                  label_key     = 'projectnumber',
76                  limit         = vclimit,
77                  show_empty    = 1,
78                  allow_textbox = 1,
79             -%]
80      </td>
81     </tr>
82     <tr>
83      <th align="right">[% IF is_order %][% 'Order Date' | $T8 %][% ELSE %][% 'Quotation Date' | $T8 %][% END %] [% 'From' | $T8 %]</th>
84      <td>
85       <input name="transdatefrom" id="transdatefrom" size="11" title="[% dateformat | html %]" onBlur="check_right_date_format(this)">
86       <input type="button" name="transdatefrom" id="trigger3" value="?">
87      </td>
88      <th align="right">[% 'Bis' | $T8 %]</th>
89      <td>
90       <input name="transdateto" id="transdateto" size="11" title="[% HTML.escape(dateformat) %]" onBlur="check_right_date_format(this)">
91       <input type="button" name="transdateto" name="transdateto" id="trigger4" value="?">
92      </td>
93     </tr>
94     <tr>
95      <th align="right">[% IF is_order %][% 'Delivery Date' | $T8 %][% ELSE %][% 'Valid until' | $T8 %][% END %] [% 'From' | $T8 %]</th>
96      <td>
97       <input name=reqdatefrom id=reqdatefrom size=11 title="[% HTML.escape(dateformat) %]" onBlur="check_right_date_format(this)">
98       <input type=button name=reqdatefrom id="trigger5" value=?>
99      </td>
100      <th align="right">[% 'Bis' | $T8 %]</th>
101      <td>
102       <input name=reqdateto id=reqdateto size=11 title="[% HTML.escape(dateformat) %]" onBlur="check_right_date_format(this)">
103       <input type=button name=reqdateto name=reqdateto id="trigger6" value=?>
104      </td>
105     </tr>
106     <tr>
107      <th align="right">[% 'Include in Report' | $T8 %]</th>
108      <td colspan="5">
109       <table>
110        <tr>
111         <td>
112          <input type="checkbox" name="open" value="1" id="open" checked>
113          <label for="open">[% 'Open' | $T8 %]</label>
114         </td>
115         <td>
116          <input type="checkbox" name="closed" value="1" id="closed">
117          <label for="closed">[% 'Closed' | $T8 %]</label>
118         </td>
119        </tr>
120 [%- IF type == 'sales_order' OR type == 'purchase_order' %]
121        <tr>
122         <td>
123          <input name="notdelivered" id="notdelivered" class="checkbox" type="checkbox" value="1" checked>
124          <label for="notdelivered">[% 'Not delivered' | $T8 %]</label>
125         </td>
126         <td>
127          <input name="delivered" id="delivered" class="checkbox" type="checkbox" value="1" checked>
128          <label for="delivered">[% 'Delivery Order created' | $T8 %]</label>
129         </td>
130        </tr>
131 [%- END %]
132 [%- IF type == 'sales_order' %]
133        <tr>
134         <td>
135          [% L.checkbox_tag("periodic_invoices_active", label => LxERP.t8("Periodic invoices active")) %]
136         </td>
137         <td>
138          [% L.checkbox_tag("periodic_invoices_inactive", label => LxERP.t8("Periodic invoices inactive")) %]
139         </td>
140        </tr>
141 [%- END %]
142        <tr>
143         <td>
144          <input name="l_id" id="l_id" class="checkbox" type="checkbox" value="Y">
145          <label for="l_id">[% 'ID' | $T8 %]</label>
146         </td>
147         <td>
148          <input name="l_[% HTML.escape(ordnrname) %]" id="l_[% HTML.escape(ordnrname) %]" class="checkbox" type="checkbox" value="Y" checked>
149          <label for="l_[% HTML.escape(ordnrname) %]">[% HTML.escape(ordlabel) %]</label>
150         </td>
151        </tr>
152        <tr>
153         <td>
154          <input name="l_transdate" id="l_transdate" class="checkbox" type="checkbox" value="Y" checked>
155          <label for="l_transdate">[% 'Date' | $T8 %]</label>
156         </td>
157         <td>
158          <input name="l_reqdate" id="l_reqdate" class="checkbox" type="checkbox" value="Y" checked>
159          <label for="l_reqdate">[% IF is_order %][% 'Required by' | $T8 %][% ELSE %][% 'Valid until' | $T8 %][% END %]</label>
160         </td>
161        </tr>
162        <tr>
163         <td>
164          <input name="l_name" id="l_name" class="checkbox" type="checkbox" value="Y" checked>
165          <label for="l_name">[% HTML.escape(vclabel) %]
166         </td>
167         <td>
168          <input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y" checked>
169          <label for="l_employee">[% 'Employee' | $T8 %]</label>
170         </td>
171         <td>
172          <input name="l_shipvia" id="l_shipvia" class="checkbox" type="checkbox" value="Y">
173          <label for="l_shipvia">[% 'Ship via' | $T8 %]</label>
174         </td>
175        </tr>
176        <tr>
177         <td>
178          <input name="l_netamount" id="l_netamount" class="checkbox" type="checkbox" value="Y">
179          <label for="l_netamount">[% 'Amount' | $T8 %]</label>
180         </td>
181         <td>
182          <input name="l_tax" id="l_tax" class="checkbox" type="checkbox" value="Y">
183          <label for="l_tax">[% 'Tax' | $T8 %]</label>
184         </td>
185         <td>
186          <input name="l_amount" id="l_amount" class="checkbox" type="checkbox" value="Y" checked>
187          <label for="l_amount">[% 'Total' | $T8 %]</label>
188         </td>
189        </tr>
190        <tr>
191         <td>
192          <input name="l_marge_total" id="l_marge_total" class="checkbox" type="checkbox" value="Y">
193          <label for="l_marge_total">[% 'Ertrag' | $T8 %]</label>
194         </td>
195         <td>
196          <input name="l_marge_percent" id="l_marge_percent" class="checkbox" type="checkbox" value="Y">
197          <label for="l_marge_percent">[% 'Ertrag prozentual' | $T8 %]</label>
198         </td>
199        </tr>
200        <tr>
201         <td>
202          <input name="l_globalprojectnumber" id="l_globalprojectnumber" class="checkbox" type="checkbox" value="Y">
203          <label for="l_globalprojectnumber">[% 'Project Number' | $T8 %]</label>
204         </td>
205         <td>
206          <input name="l_transaction_description" id="l_transaction_description" class="checkbox" type="checkbox" value="Y">
207          <label for="l_transaction_description">[% 'Transaction description' | $T8 %]</label>
208         </td>
209        </tr>
210        <tr>
211         <td>
212          <input name="l_subtotal" id="l_subtotal" class="checkbox" type="checkbox" value="Y">
213          <label for="l_subtotal">[% 'Subtotal' | $T8 %]</label>
214         </td>
215         <td>
216          <input name="l_salesman" id="l_salesman" class="checkbox" type="checkbox" value="Y">
217          <label for="l_salesman">[% 'Salesman' | $T8 %]</label>
218         </td>
219        </tr>
220        <tr>
221         <td colspan=4 align=left><b>[% HTML.escape(vclabel) %]</td>
222        </tr>
223        <tr>
224         <td>
225          <input name="l_vcnumber" id="l_vcnumber" class="checkbox" type="checkbox" value="Y">
226          <label for="l_vcnumber">[% HTML.escape(vcnumberlabel) %]</label>
227         </td>
228         <td>
229          <input name="l_country" id="l_country" class="checkbox" type="checkbox" value="Y">
230          <label for="l_country">[% 'Country' | $T8 %]</label>
231         </td>
232         <td>
233          <input name="l_ustid"  id="l_ustid" class="checkbox" type="checkbox" value="Y">
234          <label for="l_ustid">[% 'USt-IdNr.' | $T8 %]</label>
235         </td>
236        </tr>
237 [%- IF type == 'sales_order' %]
238        <tr><td colspan="3"><hr></td></tr>
239 [%- END %]
240       </table>
241      </td>
242     </tr>
243    </table>
244   </td>
245  </tr>
246 </table>
247
248 <script type="text/javascript">
249  <!--
250    Calendar.setup({ inputField : "transdatefrom", ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger3" });
251    Calendar.setup({ inputField : "transdateto",   ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger4" });
252    Calendar.setup({ inputField : "reqdatefrom",   ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger5" });
253    Calendar.setup({ inputField : "reqdateto",     ifFormat :"[% myconfig_jsc_dateformat %]", align : "BL", button : "trigger6" });
254  //-->
255 </script>
256
257 <br>
258 <input type="hidden" name="nextsub" value="orders">
259 <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
260 <input type="hidden" name="type" value="[% HTML.escape(type) %]">
261 <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
262 </form>
263
264 </body>
265 </html>