From 4fbfbceb32294fde4a5a551fb2cdb6afafb66c57 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Tue, 25 Oct 2016 08:13:50 +0200 Subject: [PATCH] =?utf8?q?CustomerVendor=20Controller=20-=20all=5Fpricegro?= =?utf8?q?ups=20nicht=20f=C3=BCr=20Lieferanten=20laden?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Lieferanten haben keine Preisgruppe --- SL/Controller/CustomerVendor.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index 2e8b2f5a0..325fa58bb 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -905,7 +905,9 @@ sub _pre_render { $self->{all_delivery_terms} = SL::DB::Manager::DeliveryTerm->get_all(); - $self->{all_pricegroups} = SL::DB::Manager::Pricegroup->get_all_sorted(query => [ or => [ id => $self->{cv}->pricegroup_id, obsolete => 0 ] ]); + if ($self->{cv}->is_customer) { + $self->{all_pricegroups} = SL::DB::Manager::Pricegroup->get_all_sorted(query => [ or => [ id => $self->{cv}->pricegroup_id, obsolete => 0 ] ]); + } $query = 'SELECT DISTINCT(cp_abteilung) AS department -- 2.20.1