X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=bf1270ece208814a21cfb725197fdf166841e424;hb=1974df3353b9c43a8c53c699f430a8767438b341;hp=209e082ff798c2aa23bde5b8562cb3d683ec8a66;hpb=d629acd82a27e980899a044ca8b0f4becc8e94bb;p=kivitendo-erp.git diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 209e082ff..bf1270ece 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -35,12 +35,17 @@ # #====================================================================== -require "bin/mozilla/arap.pl"; -require "bin/mozilla/common.pl"; +use POSIX qw(strftime); use SL::PE; use SL::RP; -use SL::USTVA; +use SL::Iconv; +use SL::ReportGenerator; +use Data::Dumper; + +require "bin/mozilla/arap.pl"; +require "bin/mozilla/common.pl"; +require "bin/mozilla/reportgenerator.pl"; 1; @@ -87,9 +92,32 @@ use SL::USTVA; # $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', @@ -102,8 +130,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} }); @@ -116,11 +143,7 @@ sub report { $form->all_departments(\%myconfig); if (@{ $form->{all_departments} }) { $form->{selectdepartment} = "