Revision 23586a58
Von Sven Schöling vor fast 3 Jahren hinzugefügt
SL/Controller/DeliveryOrder.pm | ||
---|---|---|
2005 | 2005 |
sub calculate_stock_in_out { |
2006 | 2006 |
my ($self, $item) = @_; |
2007 | 2007 |
|
2008 |
return "" if !$item->part || !$item->part->unit; |
|
2008 |
return "" if !$item->part || !$item->part->unit || !$item->unit;
|
|
2009 | 2009 |
|
2010 | 2010 |
my $in_out = $self->type_data->properties("transfer"); |
2011 | 2011 |
|
2012 | 2012 |
my $do_qty = $item->qty; |
2013 |
my $sum = sum0 map { $_->unit_obj->convert_to($_->qty, $item->unit_obj) } @{ $item->delivery_order_stock_entries }; |
|
2013 |
my $sum = sum0 map { |
|
2014 |
$_->unit_obj->convert_to($_->qty, $item->unit_obj) |
|
2015 |
} $item->delivery_order_stock_entries; |
|
2014 | 2016 |
|
2015 | 2017 |
my $matches = $do_qty == $sum; |
2016 | 2018 |
my $content = _format_number_units($sum, 2, $item->unit_obj, $item->part->unit_obj); |
Auch abrufbar als: Unified diff
DeliveryOrder: fix array conversion in calculate_stock_in_out