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