X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Frp.pl;h=aaf47ff5fec8d9fb12f2f758d5486602bff21086;hb=72be9c763f3b7f7df1fae4fe10011e45f9e2ad1d;hp=edb093ca943b056f31415ea659d0c982dda48706;hpb=6c4ea0af7845a7c0259c77f529198677a98bcd8a;p=kivitendo-erp.git diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index edb093ca9..aaf47ff5f 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -158,20 +158,9 @@ sub report { 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'; @@ -210,6 +199,7 @@ sub report { label => $label, year => DateTime->today->year, onload => $onload, + nextsub => $nextsub, accrual => $::instance_conf->get_accounting_method ne 'cash', cash => $::instance_conf->get_accounting_method eq 'cash', is_payments => $is_payments, @@ -1106,116 +1096,39 @@ sub select_all { } sub e_mail { - $main::lxdebug->enter_sub(); - - $main::auth->assert('general_ledger'); - - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; + $::lxdebug->enter_sub; + $::auth->assert('general_ledger'); # get name and email addresses my $selected = 0; - for my $i (1 .. $form->{rowcount}) { - if ($form->{"statement_$i"}) { - $form->{"$form->{ct}_id"} = $form->{"$form->{ct}_id_$i"}; - RP->get_customer(\%myconfig, \%$form); - $selected = 1; - last; - } + for my $i (1 .. $::form->{rowcount}) { + next unless $::form->{"statement_$i"}; + $::form->{"$::form->{ct}_id"} = $::form->{"$::form->{ct}_id_$i"}; + RP->get_customer(\%::myconfig, $::form); + $selected = 1; + last; } - $form->error($locale->text('Nothing selected!')) unless $selected; - - my $bcc = ''; - if ($myconfig{role} eq 'admin') { - $bcc = qq| -