X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FPresenter%2FRecord.pm;h=368a05d7caed4bcc832c91fb638ee211e5cb345d;hb=915e14b7f4a22384a3cd6ca744401474525dd301;hp=a00f40055e81525e5118e6ddf5fae31be80f515c;hpb=c8e0c77f4da1fe14f1294a3be2e437c24f40eaea;p=kivitendo-erp.git diff --git a/SL/Presenter/Record.pm b/SL/Presenter/Record.pm index a00f40055..368a05d7c 100644 --- a/SL/Presenter/Record.pm +++ b/SL/Presenter/Record.pm @@ -27,6 +27,7 @@ sub grouped_record_list { my %groups = _sort_grouped_lists(_group_records($list)); my $output = ''; + $output .= _requirement_spec_list( $self, $groups{requirement_specs}, %params) if $groups{requirement_specs}; $output .= _sales_quotation_list( $self, $groups{sales_quotations}, %params) if $groups{sales_quotations}; $output .= _sales_order_list( $self, $groups{sales_orders}, %params) if $groups{sales_orders}; $output .= _sales_delivery_order_list( $self, $groups{sales_delivery_orders}, %params) if $groups{sales_delivery_orders}; @@ -37,7 +38,7 @@ sub grouped_record_list { $output .= _purchase_order_list( $self, $groups{purchase_orders}, %params) if $groups{purchase_orders}; $output .= _purchase_delivery_order_list($self, $groups{purchase_delivery_orders}, %params) if $groups{purchase_delivery_orders}; $output .= _purchase_invoice_list( $self, $groups{purchase_invoices}, %params) if $groups{purchase_invoices}; - $output .= _ar_transaction_list( $self, $groups{ar_transactions}, %params) if $groups{ar_transactions}; + $output .= _ap_transaction_list( $self, $groups{ap_transactions}, %params) if $groups{ap_transactions}; $output .= _sepa_collection_list( $self, $groups{sepa_collections}, %params) if $groups{sepa_collections}; $output .= _sepa_transfer_list( $self, $groups{sepa_transfers}, %params) if $groups{sepa_transfers}; @@ -74,7 +75,12 @@ sub record_list { if ($with_columns{record_link_direction}) { push @columns, { title => $::locale->text('Link direction'), - data => sub { $_[0]->{_record_link_direction} eq 'from' ? $::locale->text('Row was source for current record') : $::locale->text('Row was created from current record') }, + data => sub { + $_[0]->{_record_link_depth} > 1 + ? $::locale->text('Row was linked to another record') + : $_[0]->{_record_link_direction} eq 'from' + ? $::locale->text('Row was source for current record') + : $::locale->text('Row was created from current record') }, }; } @@ -142,6 +148,7 @@ sub _group_records { my ($list) = @_; my %matchers = ( + requirement_specs => sub { (ref($_[0]) eq 'SL::DB::RequirementSpec') }, sales_quotations => sub { (ref($_[0]) eq 'SL::DB::Order') && $_[0]->is_type('sales_quotation') }, sales_orders => sub { (ref($_[0]) eq 'SL::DB::Order') && $_[0]->is_type('sales_order') }, sales_delivery_orders => sub { (ref($_[0]) eq 'SL::DB::DeliveryOrder') && $_[0]->is_sales }, @@ -182,6 +189,24 @@ sub _sort_grouped_lists { return %groups; } +sub _requirement_spec_list { + my ($self, $list, %params) = @_; + + return $self->record_list( + $list, + title => $::locale->text('Requirement specs'), + type => 'requirement_spec', + columns => [ + [ $::locale->text('Requirement spec number'), sub { $self->requirement_spec($_[0], display => 'table-cell') } ], + [ $::locale->text('Customer'), 'customer' ], + [ $::locale->text('Title'), 'title' ], + [ $::locale->text('Project'), 'project', ], + [ $::locale->text('Status'), sub { $_[0]->status->description } ], + ], + %params, + ); +} + sub _sales_quotation_list { my ($self, $list, %params) = @_;