$where .= " AND c.name ILIKE ?";
push(@values, $form->like($form->{customer}));
}
+ if ($form->{business_id}) {
+ my $business_id = $form->{business_id};
+ $where .= " AND c.business_id = ?";
+ push(@values, $business_id);
+ }
if ($form->{department_id}) {
my $department_id = $form->{department_id};
$where .= " AND a.department_id = ?";
$form->{title} = $locale->text('AR Transactions');
$form->{jsscript} = 1;
- $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 },
- "departments" => "ALL_DEPARTMENTS",
- "customers" => "ALL_VC");
+ # Auch in Rechnungsübersicht nach Kundentyp filtern - jan
+ $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 },
+ "departments" => "ALL_DEPARTMENTS",
+ "customers" => "ALL_VC",
+ "business_types" => "ALL_BUSINESS_TYPES");
+ $form->{SHOW_BUSINESS_TYPES} = scalar @{ $form->{ALL_BUSINESS_TYPES} } > 0;
# constants and subs for template
$form->{jsscript} = 1;
<form method=post name="search" action=[% script %]>
- <table width=100%>
+ <table width=100% border="0">
<tr><th class=listtop>[% title %]</th></tr>
<tr height="5"></tr>
<tr>
-%]
</td>
</tr>
+ [% IF SHOW_BUSINESS_TYPES %]
+ <tr>
+ <th align="right" nowrap>[% 'Customer type' | $T8 %]</th>
+ <td colspan="3">
+ [%- INCLUDE 'generic/multibox.html'
+ name = 'business_id',
+ style = "width: 250px",
+ DATA = ALL_BUSINESS_TYPES,
+ id_key = 'id',
+ label_key = 'description',
+ limit = vclimit,
+ show_empty = 1,
+ allow_textbox = 0,
+ -%]
+
+ </select>
+ </td>
+ </tr>
+ [% END %]
<tr>
<th align=right nowrap>[% 'From' | $T8 %]</th>
<td>