From fc4c8d2078be024feac5279c233034f8543a2c6d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 10 Aug 2015 12:29:12 +0200 Subject: [PATCH] =?utf8?q?Auftrags-Controller:=20Gewichte=20(noch)=20nicht?= =?utf8?q?=20ber=C3=BCcksichtigen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Order.pm | 9 --------- 1 file changed, 9 deletions(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index b9aace218..546d58a48 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -269,16 +269,8 @@ sub _setup { tax => $tax }); } - $self->{totalweight} = 0; foreach my $item ($self->order->items) { $item->{linetotal} = _linetotal($self->order, $item); - my $item_unit = SL::DB::Manager::Unit->find_by(name => $item->unit); - my $part_unit = SL::DB::Manager::Unit->find_by(name => $item->part->unit); - my $base_qty = $item_unit->convert_to($item->qty, $part_unit); - $item->{weight} = $base_qty * $item->part->weight; - - # Calculate total weight/tare weight - $self->{totalweight} += $item->{weight}; } } @@ -306,7 +298,6 @@ sub _pre_render { sort_by => 'projectnumber'); $self->{current_employee_id} = SL::DB::Manager::Employee->current->id; - $self->{show_weight} = SL::DB::Default->get()->show_weight; } # The following subs are more or less copied/pasted from SL::DB::Helper::PriceTaxCalculator. -- 2.20.1