X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b404450189bc6a99c69fbf9f8b3e89c10dbcfda5..902b70fc8afe197df219583aef4913f152f1964f:/bin/mozilla/rp.pl
diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl
index bc2eab6e2..b4092e08e 100644
--- a/bin/mozilla/rp.pl
+++ b/bin/mozilla/rp.pl
@@ -37,11 +37,15 @@
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;
use SL::ReportGenerator;
use Data::Dumper;
+use List::MoreUtils qw(any);
require "bin/mozilla/arap.pl";
require "bin/mozilla/common.pl";
@@ -92,22 +96,21 @@ use strict;
# $locale->text('Receipts')
# $locale->text('Payments')
# $locale->text('Project Transactions')
-# $locale->text('Non-taxable Sales')
-# $locale->text('Non-taxable Purchases')
# $locale->text('Business evaluation')
# $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,13 +130,12 @@ 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'),
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'),
@@ -141,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} = "