From 2a052485a4de4f8c9ea8f6dfdc5eb8fc0f2ed156 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 21 Apr 2011 16:17:12 +0200 Subject: [PATCH] SL::DB::Customer: Fehler in der shipto Relation. --- SL/DB/Customer.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SL/DB/Customer.pm b/SL/DB/Customer.pm index fd5f66ef6..27683b3c1 100644 --- a/SL/DB/Customer.pm +++ b/SL/DB/Customer.pm @@ -12,7 +12,7 @@ __PACKAGE__->meta->add_relationship( class => 'SL::DB::Shipto', column_map => { id => 'trans_id' }, manager_args => { sort_by => 'lower(shipto.shiptoname)' }, - query_args => [ 'shipto.module' => 'CT' ], + query_args => [ 'module' => 'CT' ], }, business => { type => 'one to one', @@ -24,4 +24,10 @@ __PACKAGE__->meta->add_relationship( __PACKAGE__->meta->make_manager_class; __PACKAGE__->meta->initialize; +sub short_address { + my ($self) = @_; + + return join ', ', grep { $_ } $self->street, $self->zipcode, $self->city; +} + 1; -- 2.20.1