Revision 3886e8eb
Von Tamino Steinert vor etwa 2 Jahren hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
|
||
$self->order($updated_order);
|
||
|
||
# no linked records on save as new
|
||
delete $::form->{$_} for qw(converted_from_oe_id converted_from_orderitems_ids);
|
||
|
||
# Warn on obsolete items
|
||
my @obsolete_positions = map { $_->position } grep { $_->part->obsolete } @{ $self->order->items_sorted };
|
||
flash_later('warning', t8('This record containts obsolete items at position #1', join ', ', @obsolete_positions)) if @obsolete_positions;
|
SL/DB/Order.pm | ||
---|---|---|
if ( $is_abbr_any->(qw(poso rqsq rqso)) ) {
|
||
$current_oe_item->lastcost($source_item->sellprice);
|
||
}
|
||
$current_oe_item->{ RECORD_ITEM_ID() } = $_->{id};
|
||
$current_oe_item->{ RECORD_ITEM_TYPE_REF() } = ref($source_item);
|
||
unless ($params{no_linked_records}) {
|
||
$current_oe_item->{ RECORD_ITEM_ID() } = $_->{id};
|
||
$current_oe_item->{ RECORD_ITEM_TYPE_REF() } = ref($source_item);
|
||
}
|
||
$current_oe_item;
|
||
} @{ $items };
|
||
|
||
... | ... | |
|
||
$order->items(\@items);
|
||
|
||
$order->{ RECORD_ID() } = $source->{id};
|
||
$order->{ RECORD_TYPE_REF() } = ref($source);
|
||
unless ($params{no_linked_records}) {
|
||
$order->{ RECORD_ID() } = $source->{id};
|
||
$order->{ RECORD_TYPE_REF() } = ref($source);
|
||
}
|
||
|
||
return $order;
|
||
}
|
Auch abrufbar als: Unified diff
DB::Order: no_linked_records Flag zu new_from hinzugefügt