X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/c9589610acf927cfdba6c682a4aa0ed32d863805..4345da58fbb6bc8f2491922de5a8567d0d97f019:/SL/DB/Helper/CustomVariables.pm diff --git a/SL/DB/Helper/CustomVariables.pm b/SL/DB/Helper/CustomVariables.pm index 55ff12104..97837a287 100644 --- a/SL/DB/Helper/CustomVariables.pm +++ b/SL/DB/Helper/CustomVariables.pm @@ -295,7 +295,6 @@ sub make_cvar_custom_filter { my $conversion = $config->type =~ m{^(?:date|timestamp)$} ? $config->type : $config->type =~ m{^(?:customer|vendor|part)$} ? 'integer' : $config->type eq 'number' ? 'numeric' - # : $config->type eq 'bool' ? 'boolean' : ''; ($query{config}, $bind_vals{config}) = Rose::DB::Object::QueryBuilder::build_select( @@ -310,7 +309,7 @@ sub make_cvar_custom_filter { query_is_sql => 1, ); - $query{config} =~ s{ \bdefault_value\b \s*=\s* (?!'') }{default_value::${conversion} = }x if $conversion; + $query{config} =~ s{ (? $config->dbh, @@ -329,7 +328,7 @@ sub make_cvar_custom_filter { $query{$key} =~ s{\bt\d+(?:\.)?\b}{}g; # manually inline the values. again, rose doen't know how to handly bind params in subqueries :( - $query{$key} =~ s{\?}{ $config->dbh->quote($_) }xe for @{ $bind_vals{$key} }; + $query{$key} =~ s{\?}{ $config->dbh->quote(shift @{ $bind_vals{$key} }) }xeg; $query{$key} =~ s{\n}{ }g; }