Es werden drei neue Rechte eingeführt, die den Zugriff auf Dialogbuchungen,Kreditoren-/Debitorenrechnungen verfeinern
Das Recht für Finanzbuchhaltung wird auf diese Rechte als default kopiert
my ($self) = @_;
@{ $self->{master_rights} ||= do {
- $self->dbconnect->selectall_arrayref("SELECT name, description, category FROM auth.master_rights ORDER BY id");
+ $self->dbconnect->selectall_arrayref("SELECT name, description, category FROM auth.master_rights ORDER BY position");
}
}
}
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();
sub action_save_and_ar_transaction {
my ($self) = @_;
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
$self->_transaction('ar.pl');
}
sub action_save_and_ap_transaction {
my ($self) = @_;
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ap_transactions');
$self->_transaction('ap.pl');
}
}
sub check_auth {
- $::auth->assert('vendor_invoice_edit | invoice_edit | general_ledger');
+ $::auth->assert('vendor_invoice_edit | invoice_edit | ap_transactions | ar_transactions');
}
1;
sub add {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub edit {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
sub display_form {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
sub create_links {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my %params = @_;
my $form = $main::form;
sub form_header {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub form_footer {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub mark_as_paid {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub update {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub post_payment {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub _post {
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
sub post {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub post_as_new {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub use_as_new {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub delete {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
my $locale = $main::locale;
sub yes {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub storno {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('ar_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
my %myconfig = %main::myconfig;
my $locale = $main::locale;
- $main::auth->assert('general_ledger | vendor_invoice_edit | sales_order_edit | invoice_edit |' .
+ $main::auth->assert('ar_transactions | ap_transactions | vendor_invoice_edit | sales_order_edit | invoice_edit |' .
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash |' .
'purchase_delivery_order_edit | sales_delivery_order_edit');
my $form = $main::form;
my $locale = $main::locale;
- $main::auth->assert('general_ledger | vendor_invoice_edit | sales_order_edit | invoice_edit | sales_delivery_order_edit |' .
+ $main::auth->assert('ar_transactions| ap_transactions | vendor_invoice_edit | sales_order_edit | invoice_edit | sales_delivery_order_edit |' .
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash');
my ($table) = @_;
my $form = $main::form;
my %myconfig = %main::myconfig;
- $main::auth->assert('general_ledger | vendor_invoice_edit | sales_order_edit | invoice_edit | sales_delivery_order_edit | ' .
+ $main::auth->assert('ar_transactions | ap_transactions | vendor_invoice_edit | sales_order_edit | invoice_edit | sales_delivery_order_edit | ' .
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash');
# replace the variable with the one checked
sub select_project {
$::lxdebug->enter_sub;
- $::auth->assert('general_ledger | vendor_invoice_edit | sales_order_edit | invoice_edit |' .
+ $::auth->assert('ar_transactions | ap_transactions | vendor_invoice_edit | sales_order_edit | invoice_edit |' .
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash | report');
my ($is_global, $nextsub) = @_;
my $form = $main::form;
- $main::auth->assert('general_ledger | vendor_invoice_edit | sales_order_edit | invoice_edit |' .
+ $main::auth->assert('ar_transactions | ap_transactions | vendor_invoice_edit | sales_order_edit | invoice_edit |' .
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash | report');
# replace the variable with the one checked
sub add {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('gl_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub prepare_transaction {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('gl_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub edit {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('gl_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub search {
$::lxdebug->enter_sub;
- $::auth->assert('general_ledger');
+ $::auth->assert('gl_transactions');
$::form->all_departments(\%::myconfig);
$::form->get_lists(
sub generate_report {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('gl_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub update {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('gl_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
my ($init) = @_;
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('gl_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
my ($init) = @_;
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('gl_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub form_header {
$::lxdebug->enter_sub;
- $::auth->assert('general_ledger');
+ $::auth->assert('gl_transactions');
my ($init) = @_;
sub form_footer {
$::lxdebug->enter_sub;
- $::auth->assert('general_ledger');
+ $::auth->assert('gl_transactions');
my ($follow_ups, $follow_ups_due);
sub post {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('gl_transactions');
my $form = $main::form;
my $locale = $main::locale;
sub post_as_new {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('gl_transactions');
my $form = $main::form;
sub storno {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('gl_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
my $rp_access_map = {
'projects' => 'report',
- 'ar_aging' => 'general_ledger',
- 'ap_aging' => 'general_ledger',
+ 'ar_aging' => 'general_ledger | ar_transactions',
+ 'ap_aging' => 'general_ledger | ap_transactions',
'receipts' => 'cash',
'payments' => 'cash',
'trial_balance' => 'report',
sub generate_ar_aging {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('general_ledger | ar_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub generate_ap_aging {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger');
+ $main::auth->assert('general_ledger | ap_transactions');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub search_invoice {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger | invoice_edit');
+ $main::auth->assert('ar_transactions | ap_transactions | invoice_edit');
my $form = $main::form;
my %myconfig = %main::myconfig;
sub invoice_transactions {
$main::lxdebug->enter_sub();
- $main::auth->assert('general_ledger | invoice_edit');
+ $main::auth->assert('ar_transactions | ap_transactions | invoice_edit');
my $form = $main::form;
my %myconfig = %main::myconfig;
kleinere neue Features und Detailverbesserungen:
+ - Verfeinerung der Rechte für Finanzbuchhaltung: Es können nun für Dialogbuchungen,
+ Debitoren- und Kreditorenbuchungen extra Rechte vergeben werden
+
- Weiterer Bericht in der Rubrik Lager: Lagerentnahme
Gibt eine Statistik über Lagerbewegungen, pro Monat/Quartal/Jahr.
name: Add Transaction
icon: transaction_add
order: 100
- access: general_ledger
+ access: gl_transactions
module: gl.pl
params:
action: add
name: Add AR Transaction
icon: ar_transaction_add
order: 200
- access: general_ledger
+ access: ar_transactions
module: ar.pl
params:
action: add
name: Add AP Transaction
icon: ap_transaction_add
order: 300
- access: general_ledger
+ access: ap_transactions
module: ap.pl
params:
action: add
--- /dev/null
+# @tag: split_transaction_rights
+# @description: Finanzbuchhaltungsrechte für Buchungen aufspalten
+# @depends: release_3_4_0 master_rights_position_gaps
+# @charset: utf-8
+# @locales: General Ledger Transaction
+# @locales: AR Transactions
+# @locales: AP Transactions
+
+
+package SL::DBUpgrade2::split_transaction_rights;
+
+use strict;
+use utf8;
+
+use parent qw(SL::DBUpgrade2::Base);
+
+use SL::DBUtils;
+
+sub run {
+ my ($self) = @_;
+
+ $self->db_query("INSERT INTO auth.master_rights (position, name, description) VALUES (3130,'gl_transactions','General Ledger Transaction')");
+ $self->db_query("INSERT INTO auth.master_rights (position, name, description) VALUES (3150,'ar_transactions','AR Transactions')");
+ $self->db_query("INSERT INTO auth.master_rights (position, name, description) VALUES (3170,'ap_transactions','AP Transactions')");
+ $self->db_query("UPDATE auth.master_rights SET description='General Ledger' WHERE name='general_ledger'");
+
+ my $groups = $main::auth->read_groups();
+
+ foreach my $group (values %{$groups}) {
+ $group->{rights}->{gl_transactions} = $group->{rights}->{general_ledger};
+ $group->{rights}->{ar_transactions} = $group->{rights}->{general_ledger};
+ $group->{rights}->{ap_transactions} = $group->{rights}->{general_ledger};
+ $main::auth->save_group($group);
+ }
+
+ return 1;
+} # end run
+
+1;
+