Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0b032505

Von Sven Schöling vor etwa 3 Jahren hinzugefügt

  • ID 0b0325056a3b1f2d340f186f3ad2eb30f437e547
  • Vorgänger af5f4950
  • Nachfolger 48009569

DeliveryOrder: fix array conversion in calculate_stock_in_out

Unterschiede anzeigen:

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