SL::DB::Customer: Fehler in der shipto Relation.
authorSven Schöling <s.schoeling@linet-services.de>
Thu, 21 Apr 2011 14:17:12 +0000 (16:17 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Thu, 21 Apr 2011 14:17:12 +0000 (16:17 +0200)
SL/DB/Customer.pm

index fd5f66e..27683b3 100644 (file)
@@ -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;