X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDATEV.pm;h=dfd154236afea3d27729af5933a3235925a6a0c0;hb=368f144b970a4b307a50d82bb398e704d65eec43;hp=406f09d76be5cc9ae04b8227be49104e8530782d;hpb=a23454bb1b039a31b7f77710ff663fa9152d530c;p=kivitendo-erp.git diff --git a/SL/DATEV.pm b/SL/DATEV.pm index 406f09d76..dfd154236 100644 --- a/SL/DATEV.pm +++ b/SL/DATEV.pm @@ -193,6 +193,16 @@ sub to { return $self->{to}; } +sub trans_id { + my $self = shift; + + if (@_) { + $self->{trans_id} = $_[0]; + } + + return $self->{trans_id}; +} + sub accnofrom { my $self = shift; @@ -342,6 +352,10 @@ sub _get_transactions { my $form = $main::form; + my $trans_id_filter = ''; + + $trans_id_filter = 'AND ac.trans_id = ' . $self->trans_id if $self->trans_id; + my ($notsplitindex); $fromto =~ s/transdate/ac\.transdate/g; @@ -363,6 +377,7 @@ sub _get_transactions { LEFT JOIN chart c ON (ac.chart_id = c.id) WHERE (ar.id IS NOT NULL) AND $fromto + $trans_id_filter $filter UNION ALL @@ -378,6 +393,7 @@ sub _get_transactions { LEFT JOIN chart c ON (ac.chart_id = c.id) WHERE (ap.id IS NOT NULL) AND $fromto + $trans_id_filter $filter UNION ALL @@ -392,6 +408,7 @@ sub _get_transactions { LEFT JOIN chart c ON (ac.chart_id = c.id) WHERE (gl.id IS NOT NULL) AND $fromto + $trans_id_filter $filter ORDER BY trans_id, acc_trans_id|;