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::AssortmentItem;
 
   8 use SL::DB::MetaSetup::AssortmentItem;
 
   9 use SL::DB::Manager::AssortmentItem;
 
  10 use Rose::DB::Object::Helpers qw(clone);
 
  12 __PACKAGE__->meta->initialize;
 
  17   return 0 unless $self->qty > 0 and $self->part->sellprice > 0;
 
  18   return $self->qty * $self->part->sellprice / ( $self->part->price_factor_id ? $self->part->price_factor->factor : 1 );
 
  21 sub linetotal_lastcost {
 
  24   return 0 unless $self->qty > 0 and $self->part->lastcost > 0;
 
  25   return $self->qty * $self->part->lastcost / ( $self->part->price_factor_id ? $self->part->price_factor->factor : 1 );