X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/255d89a0ff95321a926f15b963641750fe7d1c97..fdebfd5d0c558cb156849b01c9c9268b29dc443b:/SL/Controller/RecordLinks.pm?ds=sidebyside diff --git a/SL/Controller/RecordLinks.pm b/SL/Controller/RecordLinks.pm index b477ba22e..67b97d92e 100644 --- a/SL/Controller/RecordLinks.pm +++ b/SL/Controller/RecordLinks.pm @@ -18,6 +18,7 @@ use SL::DBUtils qw(like); use SL::DB::ShopOrder; use SL::JSON; use SL::Locale::String; +use SL::Presenter::Record qw(grouped_record_list); use Rose::Object::MakeMethods::Generic ( @@ -63,7 +64,7 @@ sub action_ajax_list { my $linked_records = $self->object->linked_records(direction => 'both', recursive => 1, save_path => 1); push @{ $linked_records }, $self->object->sepa_export_items if $self->object->can('sepa_export_items'); - my $output = SL::Presenter->get->grouped_record_list( + my $output = grouped_record_list( $linked_records, with_columns => [ qw(record_link_direction) ], edit_record_links => 1, @@ -105,7 +106,7 @@ sub action_ajax_add_filter { my $presenter = $self->presenter; my @link_type_select = map { [ $_->{type}, $_->{title} ] } @link_types; - my @projects = map { [ $_->id, $presenter->project($_, display => 'inline', style => 'both', no_link => 1) ] } @{ SL::DB::Manager::Project->get_all_sorted }; + my @projects = map { [ $_->id, $_->presenter->project(display => 'inline', style => 'both', no_link => 1) ] } @{ SL::DB::Manager::Project->get_all_sorted }; my $is_sales = $self->object->can('customer_id') && $self->object->customer_id; $self->render( @@ -122,7 +123,7 @@ sub action_ajax_add_list { my ($self) = @_; my $manager = 'SL::DB::Manager::' . $self->link_type_desc->{model}; - my $vc = $self->link_type =~ m/sales_|^invoice|requirement_spec|letter/ ? 'customer' : 'vendor'; + my $vc = $self->link_type =~ m/shop|sales_|^invoice|requirement_spec|letter/ ? 'customer' : 'vendor'; my $project = $self->link_type_desc->{project}; my $project_id = "${project}_id"; my $description = $self->link_type_desc->{description};