Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 44442c75

Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt

  • ID 44442c75574c55955fd3d3673a78180d6352d27b
  • Vorgänger 5e604127
  • Nachfolger 2c0f4855

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

Unterschiede anzeigen:

SL/Controller/Order.pm
280 280

  
281 281
  $self->order($updated_order);
282 282

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

  
286 283
  # Warn on obsolete items
287 284
  my @obsolete_positions = map { $_->position } grep { $_->part->obsolete } @{ $self->order->items_sorted };
288 285
  flash_later('warning', t8('This record containts obsolete items at position #1', join ', ', @obsolete_positions)) if @obsolete_positions;
SL/DB/Order.pm
485 485
    if ( $is_abbr_any->(qw(poso rqsq rqso)) ) {
486 486
      $current_oe_item->lastcost($source_item->sellprice);
487 487
    }
488
    $current_oe_item->{ RECORD_ITEM_ID() } = $_->{id};
489
    $current_oe_item->{ RECORD_ITEM_TYPE_REF() } = ref($source_item);
488
    unless ($params{no_linked_records}) {
489
      $current_oe_item->{ RECORD_ITEM_ID() } = $_->{id};
490
      $current_oe_item->{ RECORD_ITEM_TYPE_REF() } = ref($source_item);
491
    }
490 492
    $current_oe_item;
491 493
  } @{ $items };
492 494

  
......
496 498

  
497 499
  $order->items(\@items);
498 500

  
499
  $order->{ RECORD_ID() } = $source->{id};
500
  $order->{ RECORD_TYPE_REF() } = ref($source);
501
  unless ($params{no_linked_records}) {
502
    $order->{ RECORD_ID() } = $source->{id};
503
    $order->{ RECORD_TYPE_REF() } = ref($source);
504
  }
501 505

  
502 506
  return $order;
503 507
}

Auch abrufbar als: Unified diff