1 package SL::DB::OrderItem;
 
   5 use SL::DB::MetaSetup::OrderItem;
 
   7 __PACKAGE__->meta->add_relationship(
 
  10     class        => 'SL::DB::Part',
 
  11     column_map   => { parts_id => 'id' },
 
  15     class          => 'SL::DB::PriceFactor',
 
  16     column_map     => { price_factor_id => 'id' },
 
  20     class        => 'SL::DB::Unit',
 
  21     column_map   => { unit => 'name' },
 
  25 # Creates get_all, get_all_count, get_all_iterator, delete_all and update_all.
 
  26 __PACKAGE__->meta->make_manager_class;
 
  28 __PACKAGE__->meta->initialize;
 
  30 sub is_price_update_available {
 
  32   return $self->origprice > $self->part->sellprice;