From: Sven Schöling Date: Thu, 6 Aug 2015 09:28:58 +0000 (+0200) Subject: PriceSource: Stammdaten beachten jetzt Einheiten X-Git-Tag: release-3.3.0~31 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2d975c005034c80400abd22cfd6cd737d172045a;p=kivitendo-erp.git PriceSource: Stammdaten beachten jetzt Einheiten --- diff --git a/SL/PriceSource/MasterData.pm b/SL/PriceSource/MasterData.pm index e7ca2a3cc..14fe88f34 100644 --- a/SL/PriceSource/MasterData.pm +++ b/SL/PriceSource/MasterData.pm @@ -39,11 +39,15 @@ sub best_price { sub best_discount { } +sub unit_mul { + $_[0]->record_item ? $_[0]->record_item->unit_multiplier : 1 +} + sub make_sellprice { my ($self) = @_; return SL::PriceSource::Price->new( - price => $self->part->sellprice, + price => $self->part->sellprice * $self->unit_mul, spec => 'sellprice', description => t8('Sellprice'), price_source => $self, @@ -54,7 +58,7 @@ sub make_listprice { my ($self) = @_; return SL::PriceSource::Price->new( - price => $self->part->listprice, + price => $self->part->listprice * $self->unit_mul, spec => 'listprice', description => t8('List Price'), price_source => $self, @@ -65,7 +69,7 @@ sub make_lastcost { my ($self) = @_; return SL::PriceSource::Price->new( - price => $self->part->lastcost, + price => $self->part->lastcost * $self->unit_mul, spec => 'lastcost', description => t8('Lastcost'), price_source => $self,