X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=85799561161ab9e097f226b02788eb337796fb48;hb=f7b15d4334848fad1bcd0b569eff5139f9a6ba4d;hp=89e1b280d6fe4bdda735143716c9e7ea1574f2df;hpb=2e66dde525c12d064518c316d25a6b41ed727b39;p=kivitendo-erp.git diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 89e1b280d..857995611 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -28,7 +28,8 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1335, USA. #====================================================================== # # module for preparing Income Statement and Balance Sheet @@ -39,6 +40,7 @@ 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; @@ -100,15 +102,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 { @@ -128,6 +131,7 @@ sub report { my %title = ( balance_sheet => $::locale->text('Balance Sheet'), income_statement => $::locale->text('Income Statement'), + erfolgsrechnung => $::locale->text('Erfolgsrechnung'), trial_balance => $::locale->text('Trial Balance'), ar_aging => $::locale->text('Search AR Aging'), ap_aging => $::locale->text('Search AP Aging'), @@ -140,6 +144,10 @@ sub report { ); $::form->{title} = $title{$::form->{report}}; + $::request->{layout}->add_javascripts('autocomplete_customer.js'); + $::request->{layout}->add_javascripts('autocomplete_project.js'); + $::form->{fromdate} = DateTime->today->truncate(to => 'year')->to_kivitendo; + $::form->{todate} = DateTime->today->truncate(to => 'year')->add(years => 1)->add(days => -1)->to_kivitendo; # get departments $::form->all_departments(\%::myconfig); @@ -150,13 +158,14 @@ sub report { $::form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }); - my $is_projects = $::form->{report} eq "projects"; - my $is_income_statement = $::form->{report} eq "income_statement"; - my $is_bwa = $::form->{report} eq "bwa"; - my $is_balance_sheet = $::form->{report} eq "balance_sheet"; - my $is_trial_balance = $::form->{report} eq "trial_balance"; - my $is_aging = $::form->{report} =~ /^a[rp]_aging$/; - my $is_payments = $::form->{report} =~ /(receipts|payments)$/; + my $is_projects = $::form->{report} eq "projects"; + my $is_income_statement = $::form->{report} eq "income_statement"; + my $is_erfolgsrechnung = $::form->{report} eq "erfolgsrechnung"; + my $is_bwa = $::form->{report} eq "bwa"; + my $is_balance_sheet = $::form->{report} eq "balance_sheet"; + my $is_trial_balance = $::form->{report} eq "trial_balance"; + my $is_aging = $::form->{report} =~ /^a[rp]_aging$/; + my $is_payments = $::form->{report} =~ /(receipts|payments)$/; my ($label, $nextsub, $vc); if ($is_aging) { @@ -170,8 +179,8 @@ sub report { $::form->all_vc(\%::myconfig, $::form->{vc}, $is_sales ? "AR" : "AP"); $vc .= "