Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5b1b4713

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID 5b1b4713203066a12db13731db6eebabcc85df13
  • Vorgänger e992513a
  • Nachfolger d17799e0

Model::Record: FIX: Workflow mit ausgewählten Positionen

Unterschiede anzeigen:

SL/Controller/DeliveryOrder.pm
123 123
    my %use_item = map { $_ => 1 } @{$::form->{from_item_ids}};
124 124
    $flags{item_filter} = sub {
125 125
      my ($item) = @_;
126
      return %use_item{$item->id};
126
      return %use_item{$item->{RECORD_ITEM_ID()}};
127 127
    }
128 128
  }
129 129

  
......
533 533
  my $to_type = $::form->{to_type};
534 534
  my $to_controller = get_object_name_from_type($to_type);
535 535

  
536
  $self->save();
537

  
536 538
  my %additional_params = ();
537
  if ($::form->{only_selected_items}) {
538
    my $from_item_ids = $::form->{selected_items} || [];
539
    $additional_params{from_item_ids} = $from_item_ids;
539
  if ($::form->{only_selected_item_positions}) { # ids can be unset before save
540
    my $item_positions = $::form->{selected_item_positions} || [];
541
    my @from_item_ids = map { $self->order->items_sorted->[$_]->id } @$item_positions;
542
    $additional_params{from_item_ids} = \@from_item_ids;
540 543
  }
541 544

  
542
  $self->save();
543 545
  flash_later('info', $self->type_data->text('saved'));
544 546

  
545 547
  $self->redirect_to(

Auch abrufbar als: Unified diff