From: G. Richardson Date: Tue, 25 Oct 2016 06:13:50 +0000 (+0200) Subject: CustomerVendor Controller - all_pricegroups nicht für Lieferanten laden X-Git-Tag: release-3.5.4~1988 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4fbfbceb32294fde4a5a551fb2cdb6afafb66c57;p=kivitendo-erp.git CustomerVendor Controller - all_pricegroups nicht für Lieferanten laden Lieferanten haben keine Preisgruppe --- 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