"zipcode" => "ct.zipcode",
"city" => "ct.city",
"country" => "ct.country",
+ "gln" => "ct.gln",
"discount" => "ct.discount",
"insertdate" => "ct.itime",
"salesman" => "e.name",
push @values, ('%' . $form->{addr_country} . '%') x 2;
}
+ if ($form->{addr_gln}) {
+ $where .= " AND ((lower(ct.gln) LIKE lower(?))
+ OR
+ (ct.id IN (
+ SELECT so.trans_id
+ FROM shipto so
+ WHERE (so.module = 'CT')
+ AND (lower(so.shiptogln) LIKE lower(?))
+ ))
+ )";
+ push @values, ('%' . $form->{addr_gln} . '%') x 2;
+ }
+
if ( $form->{status} eq 'orphaned' ) {
$where .=
qq| AND ct.id NOT IN | .
push @options, $locale->text('Billing/shipping address (zipcode)') . " : $form->{zipcode}" if $form->{addr_zipcode};
push @options, $locale->text('Billing/shipping address (street)') . " : $form->{street}" if $form->{addr_street};
push @options, $locale->text('Billing/shipping address (country)') . " : $form->{country}" if $form->{addr_country};
+ push @options, $locale->text('Billing/shipping address (GLN)') . " : $form->{addr_gln}" if $form->{addr_gln};
if ($form->{business_id}) {
my $business = SL::DB::Manager::Business->find_by(id => $form->{business_id});
'id', 'name', "$form->{db}number", 'contact', 'phone', 'discount',
'fax', 'email', 'taxnumber', 'street', 'zipcode' , 'city',
'business', 'payment', 'invnumber', 'ordnumber', 'quonumber', 'salesman',
- 'country', 'insertdate', 'pricegroup'
+ 'country', 'gln', 'insertdate', 'pricegroup'
);
my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs };
'zipcode' => { 'text' => $locale->text('Zipcode'), },
'city' => { 'text' => $locale->text('City'), },
'country' => { 'text' => $locale->text('Country'), },
+ 'gln' => { 'text' => $locale->text('GLN'), },
'salesman' => { 'text' => $locale->text('Salesman'), },
'discount' => { 'text' => $locale->text('Discount'), },
'payment' => { 'text' => $locale->text('Payment Terms'), },
my @hidden_variables = ( qw(
db status obsolete name contact email cp_name addr_street addr_zipcode
- addr_city addr_country business_id salesman_id insertdateto insertdatefrom
+ addr_city addr_country addr_gln business_id salesman_id insertdateto insertdatefrom
), "$form->{db}number",
map({ "cvar_$_->{name}" } @searchable_custom_variables),
map({'cvar_'. $_->{name} .'_qtyop'} grep({$_->{type} eq 'number'} @searchable_custom_variables)),
'Billed extra expenses' => 'Abgerechnete Nebenkosten',
'Billing Address' => 'Rechnungsadresse',
'Billing Periodicity' => 'Abrechnungsperiodizität',
+ 'Billing/shipping address (GLN)' => 'Rechnungsadresse (GLN)',
'Billing/shipping address (city)' => 'Rechnungsadresse (Stadt)',
'Billing/shipping address (country)' => 'Rechnungsadresse (Land)',
'Billing/shipping address (street)' => 'Rechnungsadresse (Straße)',
'GL Transaction (abbreviation)' => 'DB',
'GL search' => 'FiBu Suche',
'GL transactions changeable' => 'Änderbarkeit von Dialogbuchungen',
+ 'GLN' => 'GLN',
'Gegenkonto' => 'Gegenkonto',
'Gender' => 'Geschlecht',
'General Ledger' => 'Finanzbuchhaltung',
'Bestandskonto' => '',
'Bilanz' => '',
'Billing Address' => '',
+ 'Billing/shipping address (GLN)' => '',
'Billing/shipping address (city)' => '',
'Billing/shipping address (country)' => '',
'Billing/shipping address (street)' => '',
'Fwd' => 'Forward',
'GL Transaction' => '',
'GL transactions changeable' => '',
+ 'GLN' => '',
'Gegenkonto' => '',
'Gender' => '',
'General Ledger' => '',
<th align="right" nowrap>[% 'Billing/shipping address (country)' | $T8 %]</th>
<td><input name="addr_country" size="35"></td>
</tr>
+ <tr>
+ <th align="right" nowrap>[% 'Billing/shipping address (GLN)' | $T8 %]</th>
+ <td><input name="addr_gln" size="35"></td>
+ </tr>
[% IF SHOW_BUSINESS_TYPES %]
<tr>
<input name="l_insertdate" id="l_insertdate" class="checkbox" type="checkbox" value="Y">
<label for="l_insertdate">[% 'Insert Date' | $T8 %]</label>
</td>
+ <td>
+ <input name="l_gln" id="l_gln" type="checkbox" class="checkbox" value="Y" checked>
+ <label for="l_gln">[% 'GLN' | $T8 %]</label>
+ </td>
+ </tr>
[% IF IS_CUSTOMER %]
+ <tr>
<td>
<input name="l_salesman" id="l_salesman" type="checkbox" class="checkbox" value="Y">
<label for="l_salesman">[% 'Salesman' | $T8 %]</label>
</td>
- </tr>
- <tr>
<td>
<input name="l_pricegroup" id="l_pricegroup" type="checkbox" class="checkbox" value="Y">
<label for="l_pricegroup">[% 'Pricegroup' | $T8 %]</label>
</td>
- [% END %]
</tr>
+ [% END %]
[% CUSTOM_VARIABLES_INCLUSION_CODE %]