From: Jan Büren Date: Mon, 10 Nov 2014 13:00:01 +0000 (+0100) Subject: Lieferplan: Warenwert der ausgelagerten Warenmenge anzeigen X-Git-Tag: release-3.2.0beta~262 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=28f67151ac88eb5bd0075c3b15419a734a0fca3a;p=kivitendo-erp.git Lieferplan: Warenwert der ausgelagerten Warenmenge anzeigen --- diff --git a/SL/Controller/DeliveryPlan.pm b/SL/Controller/DeliveryPlan.pm index 1ea6d7c7c..07581c428 100644 --- a/SL/Controller/DeliveryPlan.pm +++ b/SL/Controller/DeliveryPlan.pm @@ -28,7 +28,7 @@ my %sort_columns = ( ordnumber => t8('Order'), customer => t8('Customer'), vendor => t8('Vendor'), - value_of_goods => t8('Value of goods'), + value_of_goods => t8('Value of transferred goods'), ); diff --git a/SL/DB/OrderItem.pm b/SL/DB/OrderItem.pm index 058d04bfe..65772955f 100644 --- a/SL/DB/OrderItem.pm +++ b/SL/DB/OrderItem.pm @@ -44,7 +44,8 @@ sub delivered_qty { my @doi_delivered = grep { $_->parts_id == $self->parts_id } map { $_->orderitems } @d_orders_delivered; require SL::AM; - return sum(map { AM->convert_unit($_->unit => $self->unit) * $_->qty } @doi_delivered); + $self->{delivered_qty} = sum(map { AM->convert_unit($_->unit => $self->unit) * $_->qty } @doi_delivered); + return $self->{delivered_qty}; } sub value_of_goods { @@ -52,7 +53,7 @@ sub value_of_goods { my $price_factor = $self->price_factor || 1; - return ($self->qty * $self->sellprice * (1 - $self->discount ) / $price_factor); + return ($self->{delivered_qty} * $self->sellprice * (1 - $self->discount ) / $price_factor); } sub taxincluded { diff --git a/locale/de/all b/locale/de/all index c09360884..3c78fa244 100755 --- a/locale/de/all +++ b/locale/de/all @@ -2805,7 +2805,7 @@ $self->{texts} = { 'Valid until' => 'gültig bis', 'Valid/Obsolete' => 'Gültig/ungültig', 'Value' => 'Wert', - 'Value of goods' => 'Warenverkaufswert', + 'Value of transferred goods' => 'Verkaufswert der ausgelagerten Waren', 'Variable' => 'Variable', 'Variable Description' => 'Datenfeldbezeichnung', 'Variable Name' => 'Datenfeldname (intern)',