Part Controller: Aktion save_as_new wird nicht verwendet, sondern use_as_new
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Tue, 22 Jun 2021 09:27:27 +0000 (11:27 +0200)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Tue, 22 Jun 2021 09:28:22 +0000 (11:28 +0200)
SL/Controller/Part.pm

index 70ff2f5..14be0ed 100644 (file)
@@ -125,11 +125,6 @@ sub action_save {
   # $self->part has been loaded, parsed and validated without errors and is ready to be saved
   $self->part->db->with_transaction(sub {
 
-    if ( $params{save_as_new} ) {
-      $self->part( $self->part->clone_and_reset_deep );
-      $self->part->partnumber(undef); # will be assigned by _before_save_set_partnumber
-    };
-
     $self->part->save(cascade => 1);
 
     SL::DB::History->new(
@@ -162,11 +157,6 @@ sub action_save {
   }
 }
 
-sub action_save_as_new {
-  my ($self) = @_;
-  $self->action_save(save_as_new=>1);
-}
-
 sub action_delete {
   my ($self) = @_;