Lieferscheine - Abteilung per ALL_DEPARTMENTS und L.select_tag
[kivitendo-erp.git] / templates / webpages / do / search.html
1 [%- USE T8 %]
2 [%- USE L %]
3 [%- USE HTML %][%- USE LxERP %]
4 <h1>[% title %]</h1>
5
6  [%- IF vc == 'customer' %]
7  [%- SET is_customer = '1' %]
8  [%- ELSE %]
9  [%- SET is_customer = '0' %]
10  [%- END %]
11
12  [%- SET vctypelabel = vc == 'customer' ? LxERP.t8('Customer type') : LxERP.t8('Vendor type') %]
13
14  <style type="text/css">
15   .fixed_width {
16     width: 250px;
17   }
18  </style>
19
20  <form method="post" action="do.pl" name="Form">
21
22   <p>
23    <table>
24     <tr>
25      <th align="right">[% IF is_customer %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]</th>
26      <td colspan="3">
27       [%- UNLESS SHOW_VC_DROP_DOWN %]
28       <input type="text" name="[% HTML.escape(vc) %]" class="fixed_width initial_focus">
29       [%- ELSE %]
30       <select name="[% vc %]" class="fixed_width initial_focus">
31        <option></option>
32        [%- FOREACH row = ALL_VC %]
33        <option>[% HTML.escape(row.name) %]--[% HTML.escape(row.id) %]</option>
34        [%- END %]
35       </select>
36       <input type="hidden" name="select[% vc %]" value="1">
37       [%- END %]
38      </td>
39     </tr>
40
41     <tr>
42      <th align="right" nowrap>[% 'Contact Person' | $T8 %]</th>
43      <td colspan="3">[% L.input_tag("cp_name", '', class="fixed_width") %]</td>
44     </tr>
45
46     <tr>
47      <th align="right">[% 'Delivery Order Number' | $T8 %]</th>
48      <td colspan="3"><input name="donumber" class="fixed_width"></td>
49     </tr>
50
51     <tr>
52      <th align="right">[% 'Order Number' | $T8 %]</th>
53      <td colspan="3"><input name="ordnumber" class="fixed_width"></td>
54     </tr>
55
56     <tr>
57      <th align="right">[% 'Customer Order Number' | $T8 %]</th>
58      <td colspan="3"><input name="cusordnumber" class="fixed_width"></td>
59     </tr>
60
61     [%- IF ALL_DEPARTMENTS.size %]
62     <tr>
63      <th align="right" nowrap>[% 'Department' | $T8 %]</th>
64      <td colspan=3>[% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, class="fixed_width") %]</td>
65     </tr>
66     [%- END %]
67
68     <tr>
69      <th align="right">[% 'Employee' | $T8 %]</th>
70      <td>[% L.select_tag('employee_id', ALL_EMPLOYEES, title_key = 'safe_name', with_empty = 1, class = 'fixed_width') %]</td>
71     </tr>
72
73     [%- IF is_customer %]
74     <tr>
75      <th align="right">[% 'Salesman' | $T8 %]</th>
76      <td>[% L.select_tag('salesman_id', ALL_EMPLOYEES, title_key = 'safe_name', with_empty = 1, class = 'fixed_width') %]</td>
77     </tr>
78     [%- END %]
79
80     <tr>
81      <th align="right">[% 'Transaction description' | $T8 %]</th>
82      <td><input name="transaction_description" class="fixed_width"></td>
83      <th align="right">[% 'Part Description' | $T8 %]</th>
84      <td><input name="parts_description" size="20"></td>
85     </tr>
86
87     <tr>
88      <th align="right">[% 'Project Number' | $T8 %]</th>
89      <td>
90       <select name="project_id" class="fixed_width">
91        <option></option>
92        [%- FOREACH row = ALL_PROJECTS %]
93        <option value="[% HTML.escape(row.id) %]">[% HTML.escape(row.projectnumber) %]</option>
94        [%- END %]
95       </select>
96      </td>
97      <th align="right">[% 'Part Number' | $T8 %]</th>
98      <td><input name="parts_partnumber" size="20"></td>
99     </tr>
100
101     <tr>
102      <th align="right">[% 'Serial Number' | $T8 %]</th>
103      <td colspan="3"><input name="serialnumber" class="fixed_width"></td>
104     </tr>
105
106     [%- IF ALL_BUSINESS_TYPES.size %]
107     <tr>
108      <th align="right" nowrap>[% vctypelabel %]</th>
109      <td colspan="3">
110       [% L.select_tag('business_id', ALL_BUSINESS_TYPES, title_key = 'description', with_empty = 1, style='width:250px') %]
111      </td>
112     </tr>
113     [%- END %]
114
115     <tr>
116      <th align="right">[% 'Delivery Order Date' | $T8 %] [% 'From' | $T8 %]</th>
117      <td>
118       [% L.date_tag('transdatefrom') %]
119      </td>
120      <th align="right">[% 'Bis' | $T8 %]</th>
121      <td>
122       [% L.date_tag('transdateto') %]
123      </td>
124     </tr>
125
126     <tr>
127      <th align="right">[% 'Reqdate' | $T8 %] [% 'From' | $T8 %]</th>
128      <td>
129       [% L.date_tag('reqdatefrom') %]
130      </td>
131      <th align="right">[% 'Bis' | $T8 %]</th>
132      <td>
133       [% L.date_tag('reqdateto') %]
134      </td>
135     </tr>
136
137     <tr>
138      <th align="right">[% 'Insert Date' | $T8 %] [% 'From' | $T8 %]</th>
139      <td>
140        [% L.date_tag('insertdatefrom') %]
141      </td>
142      <th align="right">[% 'Bis' | $T8 %]</th>
143      <td>
144        [% L.date_tag('insertdateto') %]
145      </td>
146     </tr>
147
148     <tr>
149      <th align="right">[% 'Include in Report' | $T8 %]</th>
150      <td colspan="5">
151       <table>
152        <tr>
153         <td>
154          <input type="checkbox" name="open" value="1" id="open" checked>
155          <label for="open">[% 'Open' | $T8 %]</label>
156         </td>
157         <td>
158          <input type="checkbox" name="closed" value="1" id="closed">
159          <label for="closed">[% 'Closed' | $T8 %]</label>
160         </td>
161        </tr>
162
163        <tr>
164         <td>
165          <input name="notdelivered" id="notdelivered" class="checkbox" type="checkbox" value="1" checked>
166          <label for="notdelivered">[% 'Not delivered' | $T8 %]</label>
167         </td>
168         <td>
169          <input name="delivered" id="delivered" class="checkbox" type="checkbox" value="1" checked>
170          <label for="delivered">[% 'Delivered' | $T8 %]</label></td>
171        </tr>
172
173        <tr>
174         <td>
175          <input name="l_id" id="l_id" class="checkbox" type="checkbox" value="Y">
176          <label for="l_id">[% 'ID' | $T8 %]</label>
177         </td>
178
179         <td>
180          <input name="l_donumber" id="l_donumber" class="checkbox" type="checkbox" value="Y" checked>
181          <label for="l_donumber">[% 'Delivery Order Number' | $T8 %]</label>
182         </td>
183        </tr>
184
185        <tr>
186         <td>
187          <input name="l_ordnumber" id="l_ordnumber" class="checkbox" type="checkbox" value="Y" checked>
188          <label for="l_ordnumber">[% 'Order Number' | $T8 %]</label>
189         </td>
190
191         <td>
192          <input name="l_cusordnumber" id="l_cusordnumber" class="checkbox" type="checkbox" value="Y" checked>
193          <label for="l_cusordnumber">[% 'Customer Order Number' | $T8 %]</label>
194         </td>
195        </tr>
196
197        <tr>
198         <td>
199          <input name="l_transdate" id="l_transdate" class="checkbox" type="checkbox" value="Y" checked>
200          <label for="l_transdate">[% 'Delivery Order Date' | $T8 %]</label>
201         </td>
202         <td>
203          <input name="l_reqdate" id="l_reqdate" class="checkbox" type="checkbox" value="Y" checked>
204          <label for="l_reqdate">[% 'Reqdate' | $T8 %]</label>
205         </td>
206         [% IF is_customer %]
207         <td>
208          <input name="l_insertdate" id="l_insertdate" class="checkbox" type="checkbox" value="Y">
209          <label for="l_insertdate">[% 'Insert Date' | $T8 %]</label>
210         </td>
211         [%- END %]
212        </tr>
213
214        <tr>
215         <td>
216          <input name="l_name" id="l_name" class="checkbox" type="checkbox" value="Y" checked>
217          <label for="l_name">[% IF is_customer %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]</label>
218         </td>
219
220         [% IF is_customer %]
221         <td>
222          <input name="l_customernumber" id="l_customernumber" class="checkbox" type="checkbox" value="Y">
223          <label for="l_customernumber">[% 'Customer Number' | $T8 %]</label>
224         </td>
225         [% END %]
226        </tr>
227
228        <tr>
229         <td>
230          <input name="l_department" id="l_department" class="checkbox" type="checkbox" value="Y">
231          <label for="l_department">[% "Department" | $T8 %]</label>
232         </td>
233
234         <td>
235          <input name="l_shipvia" id="l_shipvia" class="checkbox" type="checkbox" value="Y">
236          <label for="l_shipvia">[% 'Ship via' | $T8 %]</label>
237         </td>
238        </tr>
239
240        <tr>
241         <td>
242          <input name="l_employee" id="l_employee" class="checkbox" type="checkbox" value="Y" checked>
243          <label for="l_employee">[% 'Employee' | $T8 %]</label>
244         </td>
245
246         <td>
247          <input name="l_salesman" id="l_salesman" class="checkbox" type="checkbox" value="Y">
248          <label for="l_salesman">[% 'Salesman' | $T8 %]</label>
249         </td>
250        </tr>
251
252        <tr>
253         <td>
254          <input name="l_globalprojectnumber" id="l_globalprojectnumber" class="checkbox" type="checkbox" value="Y">
255          <label for="l_globalprojectnumber">[% 'Project Number' | $T8 %]</label>
256         </td>
257
258         <td>
259          <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 %]>
260          <label for="l_transaction_description">[% 'Transaction description' | $T8 %]</label>
261         </td>
262        </tr>
263
264       </table>
265      </td>
266     </tr>
267    </table>
268   </p>
269
270   <hr size="3" noshade>
271
272   <p>
273    <input type="hidden" name="nextsub" value="orders">
274    <input type="hidden" name="vc" value="[% HTML.escape(vc) %]">
275    <input type="hidden" name="type" value="[% HTML.escape(type) %]">
276
277    <input class="submit" type="submit" name="action" value="[% 'Continue' | $T8 %]">
278   </p>
279  </form>