X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/85f9e4958564847dc9917345b0437c013a77a6d2..f275cac9ddfb00d05435e73fc85f0a6c016095b8:/SL/Controller/CsvImport/Part.pm diff --git a/SL/Controller/CsvImport/Part.pm b/SL/Controller/CsvImport/Part.pm index 33301d140..be989eee1 100644 --- a/SL/Controller/CsvImport/Part.pm +++ b/SL/Controller/CsvImport/Part.pm @@ -27,6 +27,24 @@ use Rose::Object::MakeMethods::Generic translation_columns all_pricegroups) ], ); +sub set_profile_defaults { + my ($self) = @_; + + my $bugru = SL::DB::Manager::Buchungsgruppe->find_by(description => { like => 'Standard%19%' }); + + $self->controller->profile->_set_defaults( + sellprice_places => 2, + sellprice_adjustment => 0, + sellprice_adjustment_type => 'percent', + article_number_policy => 'update_prices', + shoparticle_if_missing => '0', + parts_type => 'part', + default_buchungsgruppe => ($bugru ? $bugru->id : undef), + apply_buchungsgruppe => 'all', + ); +}; + + sub init_class { my ($self) = @_; $self->class('SL::DB::Part');