use SL::CVar;
use SL::DBUtils;
use SL::DB;
+use SL::Util qw(trim);
use Text::ParseWords;
use strict;
push @values, $form->{create_zugferd_invoices};
}
+ if ($form->{all_phonenumbers}) {
+ $where .= qq| AND (ct.phone ILIKE ? OR
+ ct.fax ILIKE ? OR
+ ct.id IN
+ (SELECT cp_cv_id FROM contacts
+ WHERE cp_phone1 ILIKE ? OR
+ cp_phone2 ILIKE ? OR
+ cp_fax ILIKE ? OR
+ cp_mobile1 ILIKE ? OR
+ cp_mobile2 ILIKE ? OR
+ cp_satphone ILIKE ? OR
+ cp_satfax ILIKE ? OR
+ cp_privatphone ILIKE ?
+ )
+ )|;
+ push @values, (like(trim($form->{all_phonenumbers})))x10;
+ }
+
my ($cvar_where, @cvar_values) = CVar->build_filter_query('module' => 'CT',
'trans_id_field' => 'ct.id',
'filter' => $form);
push @options, $locale->text('Contact') . " : $form->{contact}" if $form->{contact};
push @options, $locale->text('Number') . qq| : $form->{"$form->{db}number"}| if $form->{"$form->{db}number"};
push @options, $locale->text('E-mail') . " : $form->{email}" if $form->{email};
+ push @options, $locale->text('All phone numbers') . " : $form->{all_phonenumbers}" if $form->{all_phonenumbers};
push @options, $locale->text('Contact person (surname)') . " : $form->{cp_name}" if $form->{cp_name};
push @options, $locale->text('Billing/shipping address (city)') . " : $form->{addr_city}" if $form->{addr_city};
push @options, $locale->text('Billing/shipping address (zipcode)') . " : $form->{addr_zipcode}" if $form->{addr_zipcode};
my @hidden_variables = ( qw(
db status obsolete name contact email cp_name addr_street addr_zipcode
addr_city addr_country addr_gln business_id salesman_id insertdateto insertdatefrom all
+ all_phonenumbers
), "$form->{db}number",
map({ "cvar_$_->{name}" } @searchable_custom_variables),
map({'cvar_'. $_->{name} .'_from'} grep({$_->{type} eq 'date'} @searchable_custom_variables)),
'All pay postings successfully imported.' => 'Alle Lohnbuchungen erfolgreich importiert.',
'All payments have already been posted.' => 'Es wurden bereits alle Zahlungen verbucht.',
'All payments must be posted before the payment list can be downloaded.' => 'Alle Zahlungen müssen verbucht werden, bevor die Zahlungsliste heruntergeladen werden kann.',
+ 'All phone numbers' => 'Alle Telefonnummern',
'All price sources' => 'Alle Preisquellen',
'All reports' => 'Alle Berichte (Kontenübersicht, Summen- u. Saldenliste, Erfolgsrechnung, GuV, BWA, Bilanz, Projektbuchungen)',
'All the other clients will start with an empty set of WebDAV folders.' => 'Alle anderen Mandanten werden mit einem leeren Satz von Dokumenten-Ordnern ausgestattet.',
'All pay postings successfully imported.' => '',
'All payments have already been posted.' => '',
'All payments must be posted before the payment list can be downloaded.' => '',
+ 'All phone numbers' => '',
'All price sources' => '',
'All reports' => '',
'All the other clients will start with an empty set of WebDAV folders.' => '',
<th align="right" nowrap>[% 'E-mail' | $T8 %]</th>
<td><input name="email" size="35"></td>
</tr>
+ <tr>
+ <th align="right" nowrap>[% 'All phone numbers' | $T8 %]</th>
+ <td><input name="all_phonenumbers" size="35"></td>
+ </tr>
<tr>
<th align="right" nowrap>[% 'Contact person (surname)' | $T8 %]</th>
<td><input name="cp_name" size="35"></td>