E-Mails als HTML verschicken: Bearbeiten Benutzer-Signatur (Admin-Bereich)
[kivitendo-erp.git] / SL / PriceSource / ALL.pm
1 package SL::PriceSource::ALL;
2
3 use strict;
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;
12
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',
22 );
23
24 my @price_sources_order = qw(
25   master_data
26   customer_discount
27   vendor_discount
28   pricegroup
29   makemodel
30   customerprice
31   business
32   price_rules
33 );
34
35 sub all_enabled_price_sources {
36   my %disabled = map { $_ => 1 } @{ $::instance_conf->get_disabled_price_sources || [] };
37
38   map { $price_sources_by_name{$_} } grep { !$disabled{$_} } @price_sources_order;
39 }
40
41 sub all_price_sources {
42   map { $price_sources_by_name{$_} } @price_sources_order;
43 }
44
45 sub price_source_class_by_name {
46   $price_sources_by_name{$_[1]};
47 }
48
49 1;