projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Anzahlungs-Rg.: keine weitere Rückbuchung bei erneutem Buchen einer Schluss-Rg
[kivitendo-erp.git]
/
SL
/
Controller
/
Helper
/
ParseFilter.pm
diff --git
a/SL/Controller/Helper/ParseFilter.pm
b/SL/Controller/Helper/ParseFilter.pm
index
c642abf
..
0f73141
100644
(file)
--- a/
SL/Controller/Helper/ParseFilter.pm
+++ b/
SL/Controller/Helper/ParseFilter.pm
@@
-125,7
+125,8
@@
sub _parse_filter {
my ($type, $op) = $key =~ m{:(.+)::(.+)};
my $is_multi = $key =~ s/:multi//;
my ($type, $op) = $key =~ m{:(.+)::(.+)};
my $is_multi = $key =~ s/:multi//;
- my @value_tokens = $is_multi ? parse_line('\s+', 0, $value) : ($value);
+ my $is_any = $key =~ s/:any//;
+ my @value_tokens = $is_multi || $is_any ? parse_line('\s+', 0, $value) : ($value);
($key, $method) = split m{::}, $key, 2;
($key, @filters) = split m{:}, $key;
($key, $method) = split m{::}, $key, 2;
($key, @filters) = split m{:}, $key;
@@
-146,7
+147,7
@@
sub _parse_filter {
next unless defined $key;
next unless defined $key;
- push @result, $is_multi ? (and => [ @args ]) : @args;
+ push @result, $is_multi ? (and => [ @args ]) :
$is_any ? (or => [ @args ]) :
@args;
}
return \@result;
}
}
return \@result;
}
@@
-272,6
+273,10
@@
sub _apply_complex {
__END__
__END__
+=pod
+
+=encoding utf8
+
=head1 NAME
SL::Controller::Helper::ParseFilter - Convert a form filter spec into a RDBO get_all filter
=head1 NAME
SL::Controller::Helper::ParseFilter - Convert a form filter spec into a RDBO get_all filter
@@
-279,10
+284,10
@@
SL::Controller::Helper::ParseFilter - Convert a form filter spec into a RDBO get
=head1 SYNOPSIS
use SL::Controller::Helper::ParseFilter;
=head1 SYNOPSIS
use SL::Controller::Helper::ParseFilter;
- SL::DB::Object->get_all(parse_filter($::form->{filter}));
+ SL::DB::
Manager::
Object->get_all(parse_filter($::form->{filter}));
# or more complex
# or more complex
- SL::DB::Object->get_all(parse_filter($::form->{filter},
+ SL::DB::
Manager::
Object->get_all(parse_filter($::form->{filter},
with_objects => [ qw(part customer) ]));
=head1 DESCRIPTION
with_objects => [ qw(part customer) ]));
=head1 DESCRIPTION
@@
-293,8
+298,8
@@
customer. L<Rose::DB::Object> allows you to search for these by filtering them p
query => [
'customer.name' => 'John Doe',
query => [
'customer.name' => 'John Doe',
- 'department.description' =>
[ ilike => '%Sales%' ]
,
- 'orddate' =>
[ lt => DateTime->today ]
,
+ 'department.description' =>
{ ilike => '%Sales%' }
,
+ 'orddate' =>
{ lt => DateTime->today }
,
]
Unfortunately, if you specify them in your form as these strings, the form
]
Unfortunately, if you specify them in your form as these strings, the form
@@
-467,7
+472,7
@@
Adds "% .. %" around the search string and applies C<trim>.
All these are recognized like the L<Rose::DB::Object> methods.
All these are recognized like the L<Rose::DB::Object> methods.
-=item laz
u
_bool_eq
+=item laz
y
_bool_eq
If the value is undefined or an empty string then this parameter will
be completely removed from the query. Otherwise a falsish filter value
If the value is undefined or an empty string then this parameter will
be completely removed from the query. Otherwise a falsish filter value