X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FDB%2FHelper%2FLinkedRecords.pm;fp=SL%2FDB%2FHelper%2FLinkedRecords.pm;h=95b5e7037c27824960366c7051c10abc3101277e;hb=d183ece10bbfb9a6aee8ba181ebf493bf7dddcb6;hp=f3459ccb8db0bc3d744b690866219180724cfe84;hpb=260c52c3a38dfc7d812550c6de511b0f9a106f69;p=kivitendo-erp.git diff --git a/SL/DB/Helper/LinkedRecords.pm b/SL/DB/Helper/LinkedRecords.pm index f3459ccb8..95b5e7037 100644 --- a/SL/DB/Helper/LinkedRecords.pm +++ b/SL/DB/Helper/LinkedRecords.pm @@ -210,23 +210,23 @@ from C<$self> (for C = C). For C all records linked from or to C<$self> are returned. The optional parameter C or C (same as C) -contains the package names of Rose models for table limitation. It can -be a single model name as a single scalar or multiple model names in -an array reference in which case all links matching any of the model -names will be returned. +contains the package names of Rose models for table limitation (the +prefix C is optional). It can be a single model name as a +single scalar or multiple model names in an array reference in which +case all links matching any of the model names will be returned. If you only need invoices created from an order C<$order> then the call could look like this: my $invoices = $order->linked_records(direction => 'to', - to => 'SL::DB::Invoice'); + to => 'Invoice'); The optional parameter C can be used to limit the records returned. The following call limits the earlier example to invoices created today: my $invoices = $order->linked_records(direction => 'to', - to => 'SL::DB::Invoice', + to => 'Invoice', query => [ transdate => DateTime->today_local ]); The optional parameters C<$params{sort_by}> and C<$params{sort_dir}>