Revision db151e5a
Von Tamino Steinert vor etwa 1 Jahr hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
278 | 278 |
my $saved_order = SL::DB::Order->new(id => $order->id)->load; |
279 | 279 |
|
280 | 280 |
# Create new record from current one |
281 |
my $updated_order = SL::Model::Record->update_for_save_as_new($saved_order, $order); |
|
282 |
|
|
283 |
$self->order($updated_order); |
|
281 |
my $new_order = SL::Model::Record->clone_for_save_as_new($saved_order, $order); |
|
282 |
$self->order($new_order); |
|
284 | 283 |
|
285 | 284 |
# Warn on obsolete items |
286 | 285 |
my @obsolete_positions = map { $_->position } grep { $_->part->obsolete } @{ $self->order->items_sorted }; |
Auch abrufbar als: Unified diff
Model::Record: umbenennen von update_... zu clone_for_save_as_new