]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Customer.pm
Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
[mfinanz.git] / SL / DB / Customer.pm
index 7cdfde6e449411f7a8bc0eb8db36c451a50d231c..f9f890167b39c384e4004cd04e14d60119ca652a 100644 (file)
@@ -31,12 +31,6 @@ __PACKAGE__->meta->add_relationship(
     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 +50,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;