X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=9f6d848fd7e3e240e76a0504d653b4b9d298fa0f;hb=7f8599c0909affd56ad82fd842015bb51c6a3dbf;hp=1d8446966b1a55089e9debca34a08f9857a01847;hpb=d5440cc6f9cc5b2942458ce7480526e2b90b17a4;p=kivitendo-erp.git diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 1d8446966..9f6d848fd 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -37,11 +37,13 @@ use POSIX qw(strftime); +use SL::DB::Project; use SL::PE; use SL::RP; use SL::Iconv; use SL::ReportGenerator; use Data::Dumper; +use List::MoreUtils qw(any); require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; @@ -120,837 +122,99 @@ sub check_rp_access { } sub report { - $main::lxdebug->enter_sub(); + $::lxdebug->enter_sub; check_rp_access(); - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; - my %title = ( - 'balance_sheet' => 'Balance Sheet', - 'income_statement' => 'Income Statement', - 'trial_balance' => 'Trial Balance', - 'ar_aging' => 'Search AR Aging', - 'ap_aging' => 'Search AP Aging', - 'tax_collected' => 'Tax collected', - 'tax_paid' => 'Tax paid', - 'nontaxable_sales' => 'Non-taxable Sales', - 'nontaxable_purchases' => 'Non-taxable Purchases', - 'receipts' => 'Receipts', - 'payments' => 'Payments', - 'projects' => 'Project Transactions', - 'bwa' => 'Business evaluation', + balance_sheet => $::locale->text('Balance Sheet'), + income_statement => $::locale->text('Income Statement'), + trial_balance => $::locale->text('Trial Balance'), + ar_aging => $::locale->text('Search AR Aging'), + ap_aging => $::locale->text('Search AP Aging'), + tax_collected => $::locale->text('Tax collected'), + tax_paid => $::locale->text('Tax paid'), + nontaxable_sales => $::locale->text('Non-taxable Sales'), + nontaxable_purchases => $::locale->text('Non-taxable Purchases'), + receipts => $::locale->text('Receipts'), + payments => $::locale->text('Payments'), + projects => $::locale->text('Project Transactions'), + bwa => $::locale->text('Business evaluation'), ); - $form->{title} = $locale->text($title{ $form->{report} }); - - my $accrual = $::lx_office_conf{system}->{eur} ? "" : "checked"; - my $cash = $::lx_office_conf{system}->{eur} ? "checked" : ""; - - my $year = (localtime)[5] + 1900; + $::form->{title} = $title{$::form->{report}}; # get departments - $form->all_departments(\%myconfig); - if (@{ $form->{all_departments} || [] }) { - $form->{selectdepartment} = "