X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FForm.pm;h=37e4a21b626e1b411b2a4ae1c59803180033f3ad;hb=554034c0587282b99d58cf42758b2f836367f2eb;hp=da832f8712aa0266f02055b98d7224bcf2327643;hpb=73c7fcda3fffdde721d283e8828a2954bdfcf561;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index da832f871..37e4a21b6 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -40,7 +40,6 @@ package Form; use Data::Dumper; use CGI; -use CGI::Ajax; use Cwd; use Encode; use File::Copy; @@ -2341,7 +2340,7 @@ sub _get_taxcharts { $key = $params; } - my $where = ' WHERE ' . join(' AND ', map { "($_)" } @where) if (@where); + my $where = @where ? ' WHERE ' . join(' AND ', map { "($_)" } @where) : ''; my $query = qq|SELECT * FROM tax $where ORDER BY taxkey|; @@ -2456,7 +2455,7 @@ sub _get_customers { my $options = ref $key eq 'HASH' ? $key : { key => $key }; $options->{key} ||= "all_customers"; - my $limit_clause = "LIMIT $options->{limit}" if $options->{limit}; + my $limit_clause = $options->{limit} ? "LIMIT $options->{limit}" : ''; my @where; push @where, qq|business_id IN (SELECT id FROM business WHERE salesman)| if $options->{business_is_salesman}; @@ -3665,8 +3664,8 @@ sub prepare_for_printing { $extension = 'xls'; } - my $printer_code = '_' . $self->{printer_code} if $self->{printer_code}; - my $email_extension = '_email' if -f "$self->{templates}/$self->{formname}_email${language}${printer_code}.${extension}"; + my $printer_code = $self->{printer_code} ? '_' . $self->{printer_code} : ''; + my $email_extension = -f "$::myconfig{templates}/$self->{formname}_email${language}.${extension}" ? '_email' : ''; $self->{IN} = "$self->{formname}${email_extension}${language}${printer_code}.${extension}"; # Format dates.