X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FController%2FCustomerVendor.pm;h=325fa58bb5efc8fa4322b651120c88bc188a8294;hb=4fbfbceb32294fde4a5a551fb2cdb6afafb66c57;hp=b2e32e6fa57105316b507aa4c6d61551e7fab906;hpb=96670fe82a38116ac10592a6ccbd34800f8ad9f8;p=kivitendo-erp.git diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index b2e32e6fa..325fa58bb 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -263,7 +263,8 @@ sub action_save_and_close { sub _transaction { my ($self, $script) = @_; - $::auth->assert('general_ledger | invoice_edit | vendor_invoice_edit | ' . + $::auth->assert('gl_transactions | ap_transactions | ar_transactions'. + '| invoice_edit | vendor_invoice_edit | ' . ' request_quotation_edit | sales_quotation_edit | sales_order_edit | purchase_order_edit'); $self->_save(); @@ -287,7 +288,7 @@ sub _transaction { sub action_save_and_ar_transaction { my ($self) = @_; - $main::auth->assert('general_ledger'); + $main::auth->assert('ar_transactions'); $self->_transaction('ar.pl'); } @@ -295,7 +296,7 @@ sub action_save_and_ar_transaction { sub action_save_and_ap_transaction { my ($self) = @_; - $main::auth->assert('general_ledger'); + $main::auth->assert('ap_transactions'); $self->_transaction('ap.pl'); } @@ -904,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(); + 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