Revision 5d97dcd0
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
1481 | 1481 |
sub action_show_conversion_to_purchase_delivery_order_item_selection { |
1482 | 1482 |
my ($self) = @_; |
1483 | 1483 |
|
1484 |
my @items = @{ $::form->{order}->{orderitems} // [] };
|
|
1484 |
my $items = $self->order->items_sorted;
|
|
1485 | 1485 |
|
1486 |
if (@items) { |
|
1487 |
my @part_ids = uniq map { $_->{parts_id} } @items; |
|
1486 |
if (@$items) {
|
|
1487 |
my @part_ids = uniq map { $_->{parts_id} } @$items;
|
|
1488 | 1488 |
my %parts_by_id = map { ($_->id => $_) } @{ SL::DB::Manager::Part->get_all(where => [ id => \@part_ids ]) }; |
1489 | 1489 |
my %make_models_by_id = map { ($_->parts_id => $_->model) } @{ |
1490 | 1490 |
SL::DB::Manager::MakeModel->get_all( |
... | ... | |
1494 | 1494 |
]) |
1495 | 1495 |
}; |
1496 | 1496 |
|
1497 |
foreach my $item (@items) { |
|
1497 |
foreach my $item (@$items) {
|
|
1498 | 1498 |
$item->{partnumber} = $parts_by_id{ $item->{parts_id} }->partnumber; |
1499 | 1499 |
$item->{vendor_partnumber} = $make_models_by_id{ $item->{parts_id} }; |
1500 | 1500 |
} |
... | ... | |
1503 | 1503 |
$self->render( |
1504 | 1504 |
'order/tabs/_purchase_delivery_order_item_selection', |
1505 | 1505 |
{ layout => 0 }, |
1506 |
ITEMS => \@items,
|
|
1506 |
ITEMS => $items,
|
|
1507 | 1507 |
); |
1508 | 1508 |
} |
1509 | 1509 |
|
Auch abrufbar als: Unified diff
S:C:Order: FIX: Artikelauswahl für EK-Lieferschein für nicht gespeicherten Beleg