X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=SL%2FController%2FShopPart.pm;fp=SL%2FController%2FShopPart.pm;h=6ab65076c702471c8a54ff6883f0ee3ed265c644;hp=fb2fe92fb8479e7e0e549272441a76fd2e2732b2;hb=b293ff8ad52fc76ba0c44783e3982418114d6b08;hpb=d4925a8b60f04674885e30d9316dc0263f8b9a84 diff --git a/SL/Controller/ShopPart.pm b/SL/Controller/ShopPart.pm index fb2fe92fb..6ab65076c 100644 --- a/SL/Controller/ShopPart.pm +++ b/SL/Controller/ShopPart.pm @@ -266,7 +266,6 @@ sub action_mass_upload { sub action_update { my ($self) = @_; - $self->create_or_update; } @@ -288,17 +287,15 @@ sub create_or_update { my ($self) = @_; my $is_new = !$self->shop_part->id; - my $params = delete($::form->{shop_part}) || { }; - $self->shop_part->assign_attributes(%{ $params }); - $self->shop_part->save; my ( $price, $price_src_str ) = $self->get_price_n_pricesource($self->shop_part->active_price_source); -if(!$is_new){ - flash('info', $is_new ? t8('The shop part has been created.') : t8('The shop part has been saved.')); - $self->js->html('#shop_part_description_' . $self->shop_part->id, $self->shop_part->shop_description) + + if(!$is_new){ + flash('info', $is_new ? t8('The shop part has been created.') : t8('The shop part has been saved.')); + $self->js->html('#shop_part_description_' . $self->shop_part->id, $self->shop_part->shop_description) ->html('#shop_part_active_' . $self->shop_part->id, $self->shop_part->active) ->html('#price_' . $self->shop_part->id, $::form->format_amount(\%::myconfig,$price,2)) ->html('#active_price_source_' . $self->shop_part->id, $price_src_str)