From: Sven Schöling Date: Fri, 21 Jun 2013 16:06:22 +0000 (+0200) Subject: AM nicht aus SL::DB::Object laden X-Git-Tag: release-3.1.0beta1~276 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=26dcea15bd1f734316221139015c4b7215662340;p=kivitendo-erp.git AM nicht aus SL::DB::Object laden --- diff --git a/SL/DB/OrderItem.pm b/SL/DB/OrderItem.pm index 862a215a1..67bffd8ce 100644 --- a/SL/DB/OrderItem.pm +++ b/SL/DB/OrderItem.pm @@ -3,7 +3,6 @@ package SL::DB::OrderItem; use strict; use List::Util qw(sum); -use SL::AM; use SL::DB::MetaSetup::OrderItem; use SL::DB::Manager::OrderItem; @@ -36,6 +35,7 @@ sub shipped_qty { my $d_orders = $self->order->linked_records(direction => 'to', to => 'SL::DB::DeliveryOrder'); my @doi = grep { $_->parts_id == $self->parts_id } map { $_->orderitems } @$d_orders; + require SL::AM; return sum(map { AM->convert_unit($_->unit => $self->unit) * $_->qty } @doi); }