X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/78d813b90a293eafa7e17f711edeef5551f937d3..04479c02711b7b49ffc6f2228615aed373b83a01:/SL/DB/Part.pm diff --git a/SL/DB/Part.pm b/SL/DB/Part.pm index 6dde98f4d..5b5b4a2f5 100644 --- a/SL/DB/Part.pm +++ b/SL/DB/Part.pm @@ -11,6 +11,7 @@ use SL::DB::MetaSetup::Part; use SL::DB::Manager::Part; use SL::DB::Chart; use SL::DB::Helper::AttrHTML; +use SL::DB::Helper::AttrSorted; use SL::DB::Helper::TransNumberGenerator; use SL::DB::Helper::CustomVariables ( module => 'IC', @@ -37,6 +38,11 @@ __PACKAGE__->meta->add_relationships( manager_args => { sort_by => 'sortorder' }, column_map => { id => 'parts_id' }, }, + customerprices => { + type => 'one to many', + class => 'SL::DB::PartCustomerPrice', + column_map => { id => 'parts_id' }, + }, translations => { type => 'one to many', class => 'SL::DB::Translation', @@ -65,6 +71,7 @@ __PACKAGE__->meta->add_relationships( __PACKAGE__->meta->initialize; __PACKAGE__->attr_html('notes'); +__PACKAGE__->attr_sorted({ unsorted => 'makemodels', position => 'sortorder' }); __PACKAGE__->before_save('_before_save_set_partnumber');