X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/a809ab0a8e5c2f991ebbad1ccda9f31f1c009c7c..32e816b5faa06c33f4927271b04d29a92bb943d3:/SL/OE.pm diff --git a/SL/OE.pm b/SL/OE.pm index 870215479..b8dd56072 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -281,6 +281,15 @@ SQL push @values, conv_date($form->{expected_billing_date_to}); } + my ($cvar_where, @cvar_values) = CVar->build_filter_query('module' => 'CT', + 'trans_id_field' => 'ct.id', + 'filter' => $form, + ); + if ($cvar_where) { + $query .= qq| AND ($cvar_where)|; + push @values, @cvar_values; + } + my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC'; my $sortorder = join(', ', map { "${_} ${sortdir} " } ("o.id", $form->sort_columns("transdate", $ordnumber, "name"), "o.itime")); my %allowed_sort_columns = (