X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/7edc9f8c5eeec5fd24ccd709efa62f928ab66350..8b7b7b3f6252786b38bb6c9357fc00a08750b8db:/SL/DB/Part.pm diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index 952bce278..5c795f197 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; }