X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0c28bb82b805b07543debaf08061b58d0b437c07..902b70fc8afe197df219583aef4913f152f1964f:/bin/mozilla/rp.pl
diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl
index c3a13dac3..b4092e08e 100644
--- a/bin/mozilla/rp.pl
+++ b/bin/mozilla/rp.pl
@@ -37,7 +37,9 @@
use POSIX qw(strftime);
+use SL::DB::Default;
use SL::DB::Project;
+use SL::DB::Customer;
use SL::PE;
use SL::RP;
use SL::Iconv;
@@ -99,15 +101,16 @@ use strict;
# $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',
+ 'projects' => 'report',
+ 'ar_aging' => 'general_ledger',
+ 'ap_aging' => 'general_ledger',
+ 'receipts' => 'cash',
+ 'payments' => 'cash',
+ 'trial_balance' => 'report',
+ 'income_statement' => 'report',
+ 'erfolgsrechnung' => 'report',
+ 'bwa' => 'report',
+ 'balance_sheet' => 'report',
};
sub check_rp_access {
@@ -127,6 +130,7 @@ sub report {
my %title = (
balance_sheet => $::locale->text('Balance Sheet'),
income_statement => $::locale->text('Income Statement'),
+ erfolgsrechnung => ('Erfolgsrechnung'),
trial_balance => $::locale->text('Trial Balance'),
ar_aging => $::locale->text('Search AR Aging'),
ap_aging => $::locale->text('Search AP Aging'),
@@ -139,8 +143,14 @@ sub report {
);
$::form->{title} = $title{$::form->{report}};
+ $::request->{layout}->add_javascripts('autocomplete_customer.js');
+ $::form->{dateformat} = $::myconfig{dateformat};
+ my $year = DateTime->today->year;
+ $::form->{fromdate} = $::locale->reformat_date(\%::myconfig, '01.01.'.$year, $::myconfig{dateformat});
+ $::form->{todate} = $::locale->reformat_date(\%::myconfig, '31.01.'.$year, $::myconfig{dateformat});
# get departments
+
$::form->all_departments(\%::myconfig);
if (@{ $::form->{all_departments} || [] }) {
$::form->{selectdepartment} = "