X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FPriceFactor.pm;h=5f220cbe520bb8f7374369680371bf5f96dd95d4;hb=f15f5e4321df31d2279edb480e9c7fc15c3af31c;hp=31f0e46f1e5c4554e43a87464814ba625a5e0345;hpb=8893354909b940b99cb05e85e1964bfc5e805baa;p=kivitendo-erp.git diff --git a/SL/Controller/PriceFactor.pm b/SL/Controller/PriceFactor.pm index 31f0e46f1..5f220cbe5 100644 --- a/SL/Controller/PriceFactor.pm +++ b/SL/Controller/PriceFactor.pm @@ -15,14 +15,9 @@ __PACKAGE__->run_before('check_auth'); sub action_reorder { my ($self) = @_; - my @ids = @{ $::form->{price_factor_id} || [] }; - my $result = SL::DB::PriceFactor->new->db->do_transaction(sub { - foreach my $idx (0 .. scalar(@ids) - 1) { - SL::DB::PriceFactor->new(id => $ids[$idx])->load->update_attributes(sortkey => $idx + 1); - } - }); - - $self->render(type => 'js', inline => '1;'); + SL::DB::PriceFactor->reorder_list(@{ $::form->{price_factor_id} || [] }); + + $self->render(\'', { type => 'json' }); } #