X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FDB%2FHelper%2FLinkedRecords.pm;h=adc3dac8a1e04bd676f9bf3b21494a7efe30768b;hb=f5e39f21bd5f9c5dd9a8bbbdfa34d0c17a2fc44d;hp=5ad49257c50e275e7275ab1eef8071db68e85222;hpb=f5df17caa4a22bcb8abe4910b837ec86a84ba9f0;p=kivitendo-erp.git diff --git a/SL/DB/Helper/LinkedRecords.pm b/SL/DB/Helper/LinkedRecords.pm index 5ad49257c..adc3dac8a 100644 --- a/SL/DB/Helper/LinkedRecords.pm +++ b/SL/DB/Helper/LinkedRecords.pm @@ -210,7 +210,7 @@ sub _linked_records_implementation { } # don't use rose retrieval here. too slow. - # instead use recursive sql to get all the linked record_links entrys, and retrieve the objects from there + # instead use recursive sql to get all the linked record_links entries and retrieve the objects from there my $query = <<""; WITH RECURSIVE record_links_rec_${wanted}(id, from_table, from_id, to_table, to_id, depth, path, cycle) AS ( SELECT id, from_table, from_id, to_table, to_id, @@ -312,6 +312,9 @@ sub sort_linked_records { 'SL::DB::PurchaseInvoice' => sub { $_[0]->invnumber }, 'SL::DB::RequirementSpec' => sub { $_[0]->id }, 'SL::DB::Letter' => sub { $_[0]->letternumber }, + 'SL::DB::ShopOrder' => sub { $_[0]->shop_ordernumber }, + 'SL::DB::EmailJournal' => sub { $_[0]->id }, + 'SL::DB::Dunning' => sub { $_[0]->dunning_id }, UNKNOWN => '9999999999999999', ); my $number_xtor = sub { @@ -341,6 +344,9 @@ sub sort_linked_records { 'SL::DB::PurchaseInvoice' => 150, 'SL::DB::PurchaseInvoice' => 150, 'SL::DB::Letter' => 200, + 'SL::DB::ShopOrder' => 250, + 'SL::DB::EmailJournal' => 300, + 'SL::DB::Dunning' => 350, UNKNOWN => 999, ); my $score_xtor = sub {