1 package SL::PriceSource::ALL;
4 use SL::PriceSource::Pricegroup;
5 use SL::PriceSource::MasterData;
6 use SL::PriceSource::Makemodel;
7 use SL::PriceSource::Customer;
8 use SL::PriceSource::Vendor;
9 use SL::PriceSource::Business;
10 use SL::PriceSource::PriceRules;
12 my %price_sources_by_name = (
13 master_data => 'SL::PriceSource::MasterData',
14 customer_discount => 'SL::PriceSource::Customer',
15 vendor_discount => 'SL::PriceSource::Vendor',
16 pricegroup => 'SL::PriceSource::Pricegroup',
17 makemodel => 'SL::PriceSource::Makemodel',
18 business => 'SL::PriceSource::Business',
19 price_rules => 'SL::PriceSource::PriceRules',
22 my @price_sources_order = qw(
32 sub all_enabled_price_sources {
33 my %disabled = map { $_ => 1 } @{ $::instance_conf->get_disabled_price_sources || [] };
35 map { $price_sources_by_name{$_} } grep { !$disabled{$_} } @price_sources_order;
38 sub all_price_sources {
39 map { $price_sources_by_name{$_} } @price_sources_order;
42 sub price_source_class_by_name {
43 $price_sources_by_name{$_[1]};