X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Frp.pl;h=02023f532089bf39fc32626ad609a867c7519357;hb=01678c873dfa6fcbe5003789e79d8b7ad7c93551;hp=01ae84fdb8cba2ce44fb7bf344636855a5ab073d;hpb=0c2be9979d3c323a8f88ca372c0e1314774d7293;p=kivitendo-erp.git diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index 01ae84fdb..02023f532 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,8 +96,6 @@ 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') @@ -132,8 +134,6 @@ sub report { 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,6 +141,7 @@ sub report { ); $::form->{title} = $title{$::form->{report}}; + $::request->{layout}->add_javascripts('autocomplete_customer.js'); # get departments $::form->all_departments(\%::myconfig); @@ -151,27 +152,14 @@ sub report { $::form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 1 }); - my $onload = qq|focus()|; - 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_taxreport = $::form->{report} =~ /^tax_/; - my $is_nontaxable = $::form->{report} =~ /^nontaxable_/; my $is_aging = $::form->{report} =~ /^a[rp]_aging$/; my $is_payments = $::form->{report} =~ /(receipts|payments)$/; -# if (is_taxreport) { -# $::form->{db} = ($::form->{report} =~ /_collected/) ? "ar" : "ap"; -# RP->get_taxaccounts(\%::myconfig, $::form); -# } -# -# if ($is_nontaxable) { -# $::form->{db} = ($::form->{report} =~ /_sales/) ? "ar" : "ap"; -# } - my ($label, $nextsub, $vc); if ($is_aging) { my $is_sales = $::form->{report} eq 'ar_aging'; @@ -184,8 +172,8 @@ sub report { $::form->all_vc(\%::myconfig, $::form->{vc}, $is_sales ? "AR" : "AP"); $vc .= "