X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/1b69969f8d9fedd218b059b7148bc3778ee600f3..a7041228dd1face28a082f5f747c02468ed0bb5a:/SL/DB/Part.pm diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index 952bce278..3fb34bad2 100644 --- a/SL/DB/Part.pm +++ b/SL/DB/Part.pm @@ -21,16 +21,6 @@ __PACKAGE__->meta->add_relationships( class => 'SL::DB::Assembly', column_map => { id => 'id' }, }, - partsgroup => { - type => 'one to one', - class => 'SL::DB::PartsGroup', - column_map => { partsgroup_id => 'id' }, - }, - price_factor => { - type => 'one to one', - class => 'SL::DB::PriceFactor', - column_map => { price_factor_id => 'id' }, - }, prices => { type => 'one to many', class => 'SL::DB::Price', @@ -55,7 +45,7 @@ __PACKAGE__->before_save('_before_save_set_partnumber'); sub _before_save_set_partnumber { my ($self) = @_; - $self->create_trans_number if $self->partnumber eq ''; + $self->create_trans_number if !$self->partnumber; return 1; } @@ -107,7 +97,6 @@ sub orphaned { SL::DB::InvoiceItem SL::DB::OrderItem SL::DB::Inventory - SL::DB::RMAItem ); for my $class (@relations) {