Revision e6349b94
Von Werner Hahn vor mehr als 2 Jahren hinzugefügt
SL/DB/ShopOrder.pm | ||
---|---|---|
138 | 138 |
OR |
139 | 139 |
( street % ? AND zipcode ILIKE ?) |
140 | 140 |
OR |
141 |
email ILIKE ?
|
|
141 |
( email ILIKE ? OR invoice_mail ILIKE ? )
|
|
142 | 142 |
) AND obsolete = 'F' |
143 | 143 |
SQL |
144 | 144 |
|
145 |
my @values = ($lastname, $company, $self->billing_zipcode, $street, $self->billing_zipcode, $self->billing_email); |
|
145 |
my @values = ($lastname, $company, $self->billing_zipcode, $street, $self->billing_zipcode, $self->billing_email, $self->billing_email);
|
|
146 | 146 |
|
147 | 147 |
$customers = SL::DB::Manager::Customer->get_objects_from_sql( |
148 | 148 |
sql => $fs_query, |
... | ... | |
152 | 152 |
# If trgm extension is not installed |
153 | 153 |
$customers = SL::DB::Manager::Customer->get_all( |
154 | 154 |
where => [ |
155 |
or => [ |
|
156 |
and => [ |
|
157 |
or => [ 'name' => { ilike => $lastname }, |
|
158 |
'name' => { ilike => $company }, |
|
159 |
], |
|
160 |
'zipcode' => { ilike => $zipcode }, |
|
155 |
or => [
|
|
156 |
and => [
|
|
157 |
or => [ 'name' => { ilike => $lastname },
|
|
158 |
'name' => { ilike => $company },
|
|
159 |
],
|
|
160 |
'zipcode' => { ilike => $zipcode },
|
|
161 | 161 |
], |
162 |
and => [ |
|
163 |
and => [ 'street' => { ilike => $street_not_fuzzy }, |
|
164 |
'zipcode' => { ilike => $zipcode }, |
|
162 |
and => [
|
|
163 |
and => [ 'street' => { ilike => $street_not_fuzzy },
|
|
164 |
'zipcode' => { ilike => $zipcode },
|
|
165 | 165 |
], |
166 | 166 |
], |
167 |
or => [ 'email' => { ilike => $email } ], |
|
168 |
], |
|
167 |
or => [ |
|
168 |
'email' => { ilike => $email }, |
|
169 |
'invoice_mail' => { ilike => $email }, |
|
170 |
], |
|
171 |
], |
|
172 |
and => [ obsolete => 'F' ] |
|
169 | 173 |
], |
170 | 174 |
); |
171 | 175 |
} |
... | ... | |
199 | 203 |
'zipcode' => $self->billing_zipcode, |
200 | 204 |
'city' => $self->billing_city, |
201 | 205 |
'email' => $self->billing_email, |
206 |
'invoice_mail' => $self->billing_email, |
|
202 | 207 |
'country' => $self->billing_country, |
203 | 208 |
'greeting' => $self->billing_greeting, |
204 | 209 |
'fax' => $self->billing_fax, |
... | ... | |
234 | 239 |
obsolete => 'F', |
235 | 240 |
); |
236 | 241 |
} |
242 |
$customer->update_attributes(invoice_mail => $self->billing_email) if $customer->invoice_mail ne $self->billing_email; |
|
237 | 243 |
|
238 | 244 |
return $customer; |
239 | 245 |
} |
Auch abrufbar als: Unified diff
ShopOrder: billing_email zusätzlich als invoice_mail ...
beim Kunden übernehmen. Rechnungs und Mahnungsmail werden über diese
Adresse verschickt.