Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a24773da

Von Werner Hahn vor fast 2 Jahren hinzugefügt

  • ID a24773daf1832a25d826a8dd28a3311982e9ae4f
  • Vorgänger 58ae7e4d
  • Nachfolger d910a433

Beistelllieferschein/DeliveryOrder Lagerbuchungen mit in die Druckvariablen aufgenommen

Unterschiede anzeigen:

SL/Controller/DeliveryOrder.pm
1351 1351
  # You need a custom shipto object to call cvars_by_config to get the cvars.
1352 1352
  $self->order->custom_shipto(SL::DB::Shipto->new(module => 'OE', custom_variables => [])) if !$self->order->custom_shipto;
1353 1353

  
1354
  $self->prepare_stock_info($_) for $self->order->items;
1354
  $self->order->prepare_stock_info($_) for $self->order->items;
1355 1355

  
1356 1356
  return $self->order;
1357 1357
}
......
1403 1403
    $pos++;
1404 1404
  }
1405 1405

  
1406
  $self->prepare_stock_info($_) for $order->items, @items;
1407

  
1408 1406
  $order->add_items(grep {!$_->id} @items);
1409 1407

  
1410 1408
  return $order;
......
1532 1530
  return $item;
1533 1531
}
1534 1532

  
1535
sub prepare_stock_info {
1536
  my ($self, $item) = @_;
1537

  
1538
  $item->{stock_info} = SL::YAML::Dump([
1539
    map +{
1540
      delivery_order_items_stock_id => $_->id,
1541
      qty                           => $_->qty,
1542
      warehouse_id                  => $_->warehouse_id,
1543
      bin_id                        => $_->bin_id,
1544
      chargenumber                  => $_->chargenumber,
1545
      unit                          => $_->unit,
1546
    }, $item->delivery_order_stock_entries
1547
  ]);
1548
}
1549

  
1550 1533
sub setup_order_from_cv {
1551 1534
  my ($order) = @_;
1552 1535

  

Auch abrufbar als: Unified diff