X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=7f5aa0d6969a382be88fd68d4c587c354ec9ff04;hb=c66624d02068502ae8e7bc55f7ec2edbcd8a4702;hp=c06e79b4d34c16f85f5fdf989bb83192033caeb3;hpb=3da2dca2e601b311b6e464ffff02bfe98a7024d1;p=kivitendo-erp.git diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index c06e79b4d..7f5aa0d69 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -39,7 +39,6 @@ use POSIX qw(strftime); use SL::PE; use SL::RP; -use SL::USTVA; use SL::Iconv; use SL::ReportGenerator; @@ -92,9 +91,32 @@ require "bin/mozilla/reportgenerator.pl"; # $locale->text('Non-taxable Sales') # $locale->text('Non-taxable Purchases') +# $form->parse_html_template('rp/html_report_susa') + +my $rp_access_map = { + 'projects' => 'report', + 'ar_aging' => 'general_ledger', + 'ap_aging' => 'general_ledger', + 'receipts' => 'cash', + 'payments' => 'cash', + 'trial_balance' => 'report', + 'income_statement' => 'report', + 'bwa' => 'report', + 'balance_sheet' => 'report', +}; + +sub check_rp_access { + my $right = $rp_access_map->{$form->{report}}; + $right ||= 'DOES_NOT_EXIST'; + + $auth->assert($right); +} + sub report { $lxdebug->enter_sub(); + check_rp_access(); + %title = ('balance_sheet' => 'Balance Sheet', 'income_statement' => 'Income Statement', 'trial_balance' => 'Trial Balance', @@ -107,8 +129,7 @@ sub report { 'receipts' => 'Receipts', 'payments' => 'Payments', 'projects' => 'Project Transactions', - 'bwa' => 'Betriebswirtschaftliche Auswertung', - 'ustva' => 'Umsatzsteuervoranmeldung',); + 'bwa' => 'Betriebswirtschaftliche Auswertung',); $form->{title} = $locale->text($title{ $form->{report} }); @@ -121,11 +142,7 @@ sub report { $form->all_departments(\%myconfig); if (@{ $form->{all_departments} }) { $form->{selectdepartment} = "