X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FCustomer.pm;h=2e3fa68562bbb50ad5d95798aa0fef1ebb4310c2;hb=eca0862f8bcc69d22d94c41cc9076a008c77056d;hp=7cdfde6e449411f7a8bc0eb8db36c451a50d231c;hpb=e1bf173bae820584e8bafdc01ebe2e7d7537a59c;p=kivitendo-erp.git diff --git a/SL/DB/Customer.pm b/SL/DB/Customer.pm index 7cdfde6e4..2e3fa6856 100644 --- a/SL/DB/Customer.pm +++ b/SL/DB/Customer.pm @@ -26,17 +26,6 @@ __PACKAGE__->meta->add_relationship( column_map => { id => 'cp_cv_id' }, manager_args => { sort_by => 'lower(contacts.cp_name)' }, }, - business => { - type => 'one to one', - class => 'SL::DB::Business', - column_map => { business_id => 'id' }, - }, - custom_variables => { - type => 'one to many', - class => 'SL::DB::CustomVariable', - column_map => { id => 'trans_id' }, - query_args => [ config_id => [ \"(SELECT custom_variable_configs.id FROM custom_variable_configs WHERE custom_variable_configs.module = 'CT')" ] ], - }, ); __PACKAGE__->meta->initialize; @@ -56,4 +45,10 @@ sub short_address { return join ', ', grep { $_ } $self->street, $self->zipcode, $self->city; } +sub displayable_name { + my $self = shift; + + return join ' ', grep $_, $self->customernumber, $self->name; +} + 1;