Revision 2d975c00
Von Sven Schöling vor mehr als 9 Jahren hinzugefügt
SL/PriceSource/MasterData.pm | ||
---|---|---|
39 | 39 |
|
40 | 40 |
sub best_discount { } |
41 | 41 |
|
42 |
sub unit_mul { |
|
43 |
$_[0]->record_item ? $_[0]->record_item->unit_multiplier : 1 |
|
44 |
} |
|
45 |
|
|
42 | 46 |
sub make_sellprice { |
43 | 47 |
my ($self) = @_; |
44 | 48 |
|
45 | 49 |
return SL::PriceSource::Price->new( |
46 |
price => $self->part->sellprice, |
|
50 |
price => $self->part->sellprice * $self->unit_mul,
|
|
47 | 51 |
spec => 'sellprice', |
48 | 52 |
description => t8('Sellprice'), |
49 | 53 |
price_source => $self, |
... | ... | |
54 | 58 |
my ($self) = @_; |
55 | 59 |
|
56 | 60 |
return SL::PriceSource::Price->new( |
57 |
price => $self->part->listprice, |
|
61 |
price => $self->part->listprice * $self->unit_mul,
|
|
58 | 62 |
spec => 'listprice', |
59 | 63 |
description => t8('List Price'), |
60 | 64 |
price_source => $self, |
... | ... | |
65 | 69 |
my ($self) = @_; |
66 | 70 |
|
67 | 71 |
return SL::PriceSource::Price->new( |
68 |
price => $self->part->lastcost, |
|
72 |
price => $self->part->lastcost * $self->unit_mul,
|
|
69 | 73 |
spec => 'lastcost', |
70 | 74 |
description => t8('Lastcost'), |
71 | 75 |
price_source => $self, |
Auch abrufbar als: Unified diff
PriceSource: Stammdaten beachten jetzt Einheiten