X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FFU.pm;h=822e31fe32b1f204f95eedf24b2f6665f27acacf;hb=2a0cbd885790174fa0f212e6661b30362650a42c;hp=8f52ae4cd7164b675d81a728e7635c2b6e9c1b3b;hpb=c3db1b36f46f3bb8fe278ad3320bc7b139278dc3;p=kivitendo-erp.git diff --git a/SL/FU.pm b/SL/FU.pm index 8f52ae4cd..822e31fe3 100644 --- a/SL/FU.pm +++ b/SL/FU.pm @@ -195,8 +195,10 @@ sub follow_ups { my @values_user = (); if ($params{trans_id}) { - $where .= qq| AND EXISTS (SELECT * FROM follow_up_links ful - WHERE (ful.follow_up_id = fu.id) AND (ful.trans_id = ?))|; + $where .= qq| AND fu.id IN (select follow_up_id from follow_up_links where trans_id = ?)|; + # $where .= qq| AND (ful.follow_up_id = fu.id) AND (ful.trans_id = ?))|; + # $where .= qq| AND EXISTS (SELECT * FROM follow_up_links ful + # WHERE (ful.follow_up_id = fu.id) AND (ful.trans_id = ?))|; push @values, conv_i($params{trans_id}); } @@ -251,7 +253,7 @@ sub follow_ups { push @values, conv_i($params{created_for}); } - if ($params{all_users}) { + if ($params{all_users} || $params{trans_id}) { # trans_id only for documents? $where_user = qq|OR (fu.created_by IN (SELECT DISTINCT what FROM follow_up_access WHERE who = ?))|; push @values_user, $employee_id; } @@ -338,7 +340,7 @@ sub link_details { } elsif ($params{trans_type} eq 'sales_quotation') { my $script = 'oe.pl'; my $action = 'edit'; - if ($::instance_conf->get_feature_experimental) { + if ($::instance_conf->get_feature_experimental_order) { $script = 'controller.pl'; $action = 'Order/edit'; } @@ -364,7 +366,7 @@ sub link_details { } elsif ($params{trans_type} eq 'sales_order') { my $script = 'oe.pl'; my $action = 'edit'; - if ($::instance_conf->get_feature_experimental) { + if ($::instance_conf->get_feature_experimental_order) { $script = 'controller.pl'; $action = 'Order/edit'; } @@ -400,7 +402,7 @@ sub link_details { } elsif ($params{trans_type} eq 'request_quotation') { my $script = 'oe.pl'; my $action = 'edit'; - if ($::instance_conf->get_feature_experimental) { + if ($::instance_conf->get_feature_experimental_order) { $script = 'controller.pl'; $action = 'Order/edit'; } @@ -412,7 +414,7 @@ sub link_details { } elsif ($params{trans_type} eq 'purchase_order') { my $script = 'oe.pl'; my $action = 'edit'; - if ($::instance_conf->get_feature_experimental) { + if ($::instance_conf->get_feature_experimental_order) { $script = 'controller.pl'; $action = 'Order/edit'; }