]> wagnertech.de Git - mfinanz.git/blobdiff - SL/DB/Order.pm
AttrDuration-Helfer
[mfinanz.git] / SL / DB / Order.pm
index 0c46f567373703caa85f634c35c24bd5cf9acd68..b9959aa7e2c9437adddecf656f1c3ef72718366f 100644 (file)
@@ -27,7 +27,7 @@ __PACKAGE__->meta->add_relationship(
     }
   },
   periodic_invoices_config => {
-    type                   => 'one to many',
+    type                   => 'one to one',
     class                  => 'SL::DB::PeriodicInvoicesConfig',
     column_map             => { id => 'oe_id' },
   },
@@ -37,8 +37,7 @@ __PACKAGE__->meta->initialize;
 
 # methods
 
-sub items         { goto &orderitems; }
-sub payment_terms { goto &payment;    }
+sub items { goto &orderitems; }
 
 sub type {
   my $self = shift;
@@ -69,7 +68,7 @@ sub displayable_type {
 
 sub is_sales {
   croak 'not an accessor' if @_ > 1;
-  return shift->customer_id;
+  return !!shift->customer_id;
 }
 
 sub invoices {