Revision 1c311d64
Von Sven Schöling vor mehr als 9 Jahren hinzugefügt
SL/PriceSource.pm | ||
---|---|---|
4 | 4 |
use parent 'SL::DB::Object'; |
5 | 5 |
use Rose::Object::MakeMethods::Generic ( |
6 | 6 |
scalar => [ qw(record_item record) ], |
7 |
'array --get_set_init' => [ qw(all_price_sources) ], |
|
7 | 8 |
); |
8 | 9 |
|
9 | 10 |
use List::UtilsBy qw(min_by max_by); |
... | ... | |
11 | 12 |
use SL::PriceSource::Price; |
12 | 13 |
use SL::Locale::String; |
13 | 14 |
|
14 |
sub all_price_sources { |
|
15 |
sub init_all_price_sources {
|
|
15 | 16 |
my ($self) = @_; |
16 | 17 |
|
17 |
map { |
|
18 |
[ map {
|
|
18 | 19 |
$_->new(record_item => $self->record_item, record => $self->record) |
19 |
} SL::PriceSource::ALL->all_enabled_price_sources |
|
20 |
} SL::PriceSource::ALL->all_enabled_price_sources ]
|
|
20 | 21 |
} |
21 | 22 |
|
22 | 23 |
sub price_from_source { |
Auch abrufbar als: Unified diff
PriceSource: Implementoren zwischen price/discount cachen.