summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
577042c)
beim Kunden übernehmen. Rechnungs und Mahnungsmail werden über diese
Adresse verschickt.
OR
( street % ? AND zipcode ILIKE ?)
OR
OR
( street % ? AND zipcode ILIKE ?)
OR
+ ( email ILIKE ? OR invoice_mail ILIKE ? )
- my @values = ($lastname, $company, $self->billing_zipcode, $street, $self->billing_zipcode, $self->billing_email);
+ my @values = ($lastname, $company, $self->billing_zipcode, $street, $self->billing_zipcode, $self->billing_email, $self->billing_email);
$customers = SL::DB::Manager::Customer->get_objects_from_sql(
sql => $fs_query,
$customers = SL::DB::Manager::Customer->get_objects_from_sql(
sql => $fs_query,
# If trgm extension is not installed
$customers = SL::DB::Manager::Customer->get_all(
where => [
# If trgm extension is not installed
$customers = SL::DB::Manager::Customer->get_all(
where => [
- or => [
- and => [
- or => [ 'name' => { ilike => $lastname },
- 'name' => { ilike => $company },
- ],
- 'zipcode' => { ilike => $zipcode },
+ or => [
+ and => [
+ or => [ 'name' => { ilike => $lastname },
+ 'name' => { ilike => $company },
+ ],
+ 'zipcode' => { ilike => $zipcode },
- and => [
- and => [ 'street' => { ilike => $street_not_fuzzy },
- 'zipcode' => { ilike => $zipcode },
+ and => [
+ and => [ 'street' => { ilike => $street_not_fuzzy },
+ 'zipcode' => { ilike => $zipcode },
- or => [ 'email' => { ilike => $email } ],
- ],
+ or => [
+ 'email' => { ilike => $email },
+ 'invoice_mail' => { ilike => $email },
+ ],
+ ],
+ and => [ obsolete => 'F' ]
'zipcode' => $self->billing_zipcode,
'city' => $self->billing_city,
'email' => $self->billing_email,
'zipcode' => $self->billing_zipcode,
'city' => $self->billing_city,
'email' => $self->billing_email,
+ 'invoice_mail' => $self->billing_email,
'country' => $self->billing_country,
'greeting' => $self->billing_greeting,
'fax' => $self->billing_fax,
'country' => $self->billing_country,
'greeting' => $self->billing_greeting,
'fax' => $self->billing_fax,
+ $customer->update_attributes(invoice_mail => $self->billing_email) if $customer->invoice_mail ne $self->billing_email;