$where .= qq| AND NOT obsolete|;
}
+ if ($form->{business_id}) {
+ $where .= qq| AND (business_id = ?)|;
+ push(@values, conv_i($form->{business_id}));
+ }
+
my $query =
qq|SELECT ct.*, b.description AS business | .
qq|FROM $cv ct | .
sub search {
$lxdebug->enter_sub();
+ my $vc_business_type = $form->{db} eq "customer" ?
+ $locale->text("Customer type") : $locale->text("Vendor type");
+
+ $form->get_lists("business_types" => "ALL_BUSINESS_TYPES");
+ my (%labels, @values);
+
+ my $business_types;
+ if (scalar(@{ $form->{ALL_BUSINESS_TYPES} }) != 0) {
+ push(@values, undef);
+ foreach my $item (@{ $form->{ALL_BUSINESS_TYPES} }) {
+ push(@values, $item->{id});
+ $labels{$item->{id}} = $item->{description};
+ }
+
+ $business_types =
+ qq| <tr>
+ <th align="right" nowrap>${vc_business_type}</th>
+ <td>|
+ . NTI($cgi->popup_menu('-name' => 'business_id', '-values' => \@values,
+ '-labels' => \%labels))
+ . qq|</td>
+ </tr>
+|;
+ }
+
$label = ucfirst $form->{db};
$form->{title} = $locale->text($label . "s");
<th align=right nowrap>| . $locale->text('E-mail') . qq|</th>
<td><input name=email size=35></td>
</tr>
+ $business_types
<tr>
<td></td>
<td><input name=status class=radio type=radio value=all checked> |
<td><input name="l_sic_code" type=checkbox class=checkbox value=Y> |
. $locale->text('SIC') . qq|</td>
<td><input name="l_business" type=checkbox class=checkbox value=Y> |
- . $locale->text('Type of Business') . qq|</td>
+ . $vc_business_type . qq|</td>
</tr>
<tr>
<td><input name="l_invnumber" type=checkbox class=checkbox value=Y> |
'Customer not on file or locked!' => 'Dieser Kunde existiert nicht oder ist gesperrt.',
'Customer not on file!' => 'Kunde ist nicht in der Datenbank!',
'Customer saved!' => 'Kunde gespeichert!',
+ 'Customer type' => 'Kundentyp',
'Customername' => 'Kundenname',
'Customernumberinit' => 'Kunden-/Lieferantennummernkreis',
'Customers' => 'Kunden',
'Vendor not on file or locked!' => 'Dieser Lieferant existiert nicht oder ist gesperrt.',
'Vendor not on file!' => 'Lieferant ist nicht in der Datenbank!',
'Vendor saved!' => 'Lieferant gespeichert!',
+ 'Vendor type' => 'Lieferantentyp',
'Vendors' => 'Lieferanten',
'Verrechnungseinheit' => 'Verrechnungseinheit',
'Version' => 'Version',
'Customer Number' => 'Kundennummer',
'Customer deleted!' => 'Kunde gelöscht!',
'Customer saved!' => 'Kunde gespeichert!',
+ 'Customer type' => 'Kundentyp',
'Customers' => 'Kunden',
'DELETED' => 'Gelöscht',
'DUNNING STARTED' => 'DUNNING STARTED',
'Vendor Number' => 'Lieferantennummer',
'Vendor deleted!' => 'Lieferant gelöscht!',
'Vendor saved!' => 'Lieferant gespeichert!',
+ 'Vendor type' => 'Lieferantentyp',
'Vendors' => 'Lieferanten',
'Zipcode' => 'PLZ',
'bin_list' => 'Lagerliste',