Skip to content

Commit

Permalink
DATEV: transaction_type darf undef sein
Browse files Browse the repository at this point in the history
  • Loading branch information
kivijan committed Jan 17, 2025
1 parent ea42faf commit d0816ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SL/DATEV.pm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ sub transaction_type {
$self->{transaction_type} = $_[0] if @_;

die "Invalid DATEV Transaction Type"
unless $self->{transaction_type} =~ m/^(ar|ap|all)$/;
if $self->{transaction_type} && $self->{transaction_type} !~ m/^(ar|ap|all)$/;

return $self->{transaction_type};
}
Expand Down Expand Up @@ -540,8 +540,8 @@ sub generate_datev_data {

my $filter = ''; # Useful for debugging purposes

$filter .= ' AND ac.trans_id in (SELECT id from ar) ' if $self->transaction_type eq 'ar';
$filter .= ' AND ac.trans_id in (SELECT id from ap) ' if $self->transaction_type eq 'ap';
$filter .= ' AND ac.trans_id in (SELECT id from ar) ' if $self->transaction_type // '' eq 'ar';
$filter .= ' AND ac.trans_id in (SELECT id from ap) ' if $self->transaction_type // '' eq 'ap';

my %all_taxchart_ids = selectall_as_map($form, $self->dbh, qq|SELECT DISTINCT chart_id, TRUE AS is_set FROM tax|, 'chart_id', 'is_set');

Expand Down

0 comments on commit d0816ea

Please sign in to comment.