- description => $part->description,
+ description => $_->description, # description from the shop
+ longdescription => $part->notes, # longdescription from parts. TODO locales
intnotes => $customer->notes,
salesman_id => $employee->id,
taxincluded => $self->tax_included,
intnotes => $customer->notes,
salesman_id => $employee->id,
taxincluded => $self->tax_included,
taxzone_id => $customer->taxzone_id,
currency_id => $customer->currency_id,
transaction_description => $shop->transaction_description,
taxzone_id => $customer->taxzone_id,
currency_id => $customer->currency_id,
transaction_description => $shop->transaction_description,
- 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);
- 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' ]
my $customer_proposals = $self->check_for_existing_customers;
my $name = $self->billing_firstname . " " . $self->billing_lastname;
my $customer = 0;
my $customer_proposals = $self->check_for_existing_customers;
my $name = $self->billing_firstname . " " . $self->billing_lastname;
my $customer = 0;
if(!scalar(@{$customer_proposals})){
my %address = ( 'name' => $name,
'department_1' => $self->billing_company,
if(!scalar(@{$customer_proposals})){
my %address = ( 'name' => $name,
'department_1' => $self->billing_company,
'zipcode' => $self->billing_zipcode,
'city' => $self->billing_city,
'email' => $self->billing_email,
'zipcode' => $self->billing_zipcode,
'city' => $self->billing_city,
'email' => $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,