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';
# if there are any dates
if ($::form->{fromdate} || $::form->{todate}) {
- my $fromdate = $::locale->date(\%::myconfig, $::form->{fromdate}, 1) if $::form->{fromdate};
- my $todate = $::locale->date(\%::myconfig, $::form->{todate}, 1) if $::form->{todate};
+ my $fromdate = $::form->{fromdate} ? $::locale->date(\%::myconfig, $::form->{fromdate}, 1) : '';
+ my $todate = $::form->{todate} ? $::locale->date(\%::myconfig, $::form->{todate}, 1) : '';
push @options, "$fromdate - $todate";
} else {
push @options, $::locale->date(\%::myconfig, $::form->current_date, 1);