Revision 1fca7d35
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/Controller/Order.pm | ||
---|---|---|
266 | 266 |
my $saved_order = SL::DB::Order->new(id => $order->id)->load; |
267 | 267 |
|
268 | 268 |
# Create new record from current one |
269 |
my $updated_order = SL::Model::Record->update_for_save_as_new($saved_order, $order); |
|
270 |
|
|
271 |
$self->order($updated_order); |
|
269 |
my $new_order = SL::Model::Record->clone_for_save_as_new($saved_order, $order); |
|
270 |
$self->order($new_order); |
|
272 | 271 |
|
273 | 272 |
# Warn on obsolete items |
274 | 273 |
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