1 # This file has been auto-generated only because it didn't exist.
 
   2 # Feel free to modify it at will; it will not be overwritten automatically.
 
   4 package SL::DB::Assembly;
 
   8 use SL::DB::MetaSetup::Assembly;
 
  10 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
 
  11 __PACKAGE__->meta->make_manager_class;
 
  13 __PACKAGE__->meta->initialize;
 
  18   return 0 unless $self->qty > 0 and $self->part->sellprice > 0;
 
  19   return $self->qty * $self->part->sellprice / ( $self->part->price_factor_id ? $self->part->price_factor->factor : 1 );
 
  22 sub linetotal_lastcost {
 
  25   return 0 unless $self->qty > 0 and $self->part->lastcost > 0;
 
  26   return $self->qty * $self->part->lastcost / ( $self->part->price_factor_id ? $self->part->price_factor->factor : 1 );