Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b8c3f51d

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID b8c3f51dde07fb15180dd8384bbbc72e63850b95
  • Vorgänger b87781dc
  • Nachfolger 3653c752

DB::Order: no_linked_records Flag zu new_from hinzugefügt

Unterschiede anzeigen:

SL/Controller/Order.pm
294 294

  
295 295
  $self->order($updated_order);
296 296

  
297
  # no linked records on save as new
298
  delete $::form->{$_} for qw(converted_from_oe_id converted_from_orderitems_ids);
299

  
300 297
  # Warn on obsolete items
301 298
  my @obsolete_positions = map { $_->position } grep { $_->part->obsolete } @{ $self->order->items_sorted };
302 299
  flash_later('warning', t8('This record containts obsolete items at position #1', join ', ', @obsolete_positions)) if @obsolete_positions;
SL/DB/Order.pm
510 510
    if ( $is_abbr_any->(qw(poso rqsq rqso pqisq pqiso)) ) {
511 511
      $current_oe_item->lastcost($source_item->sellprice);
512 512
    }
513
    $current_oe_item->{ RECORD_ITEM_ID() } = $_->{id};
514
    $current_oe_item->{ RECORD_ITEM_TYPE_REF() } = ref($source_item);
513
    unless ($params{no_linked_records}) {
514
      $current_oe_item->{ RECORD_ITEM_ID() } = $_->{id};
515
      $current_oe_item->{ RECORD_ITEM_TYPE_REF() } = ref($source_item);
516
    }
515 517
    $current_oe_item;
516 518
  } @{ $items };
517 519

  
......
521 523

  
522 524
  $order->items(\@items);
523 525

  
524
  $order->{ RECORD_ID() } = $source->{id};
525
  $order->{ RECORD_TYPE_REF() } = ref($source);
526
  unless ($params{no_linked_records}) {
527
    $order->{ RECORD_ID() } = $source->{id};
528
    $order->{ RECORD_TYPE_REF() } = ref($source);
529
  }
526 530

  
527 531
  return $order;
528 532
}

Auch abrufbar als: Unified diff