From 26dcea15bd1f734316221139015c4b7215662340 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 21 Jun 2013 18:06:22 +0200 Subject: [PATCH] AM nicht aus SL::DB::Object laden --- SL/DB/OrderItem.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.20.1