X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FAR.pm;h=3ee8e0d92d0cbe5e8b6a2ab41710ec711f5e47a1;hb=c51601f019f963dcdc875469514aa40802b5c574;hp=65ab4ce016f33ba7b15b0023433e082f79e57d8a;hpb=cff0e9be7e6925c22dab7cb0b52ab9e23af0d56a;p=kivitendo-erp.git diff --git a/SL/AR.pm b/SL/AR.pm index 65ab4ce01..3ee8e0d92 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -302,8 +302,6 @@ sub post_transaction { exporttype => DATEV_ET_BUCHUNGEN, format => DATEV_FORMAT_KNE, dbh => $dbh, - from => $transdate, - to => $transdate, trans_id => $form->{id}, ); @@ -460,7 +458,7 @@ sub ar_transactions { my $query = qq|SELECT DISTINCT a.id, a.invnumber, a.ordnumber, a.cusordnumber, a.transdate, | . qq| a.duedate, a.netamount, a.amount, a.paid, | . - qq| a.invoice, a.datepaid, a.terms, a.notes, a.shipvia, | . + qq| a.invoice, a.datepaid, a.notes, a.shipvia, | . qq| a.shippingpoint, a.storno, a.storno_id, a.globalproject_id, | . qq| a.marge_total, a.marge_percent, | . qq| a.transaction_description, | . @@ -573,6 +571,15 @@ sub ar_transactions { } }; + my ($cvar_where, @cvar_values) = CVar->build_filter_query('module' => 'CT', + 'trans_id_field' => 'c.id', + 'filter' => $form, + ); + if ($cvar_where) { + $where .= qq| AND ($cvar_where)|; + push @values, @cvar_values; + } + my @a = qw(transdate invnumber name); push @a, "employee" if $form->{l_employee}; my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC';