Lines 87-93
sub get_enrollable {
Link Here
|
87 |
|
87 |
|
88 |
=head3 filter_out_empty |
88 |
=head3 filter_out_empty |
89 |
|
89 |
|
90 |
Remove clubs without current enrollments. |
90 |
my $filtered_rs = $clubs_rs->filter_out_empty; |
|
|
91 |
|
92 |
Return a new I<Koha::Clubs> resultset, containing only clubs with current enrollments. |
91 |
|
93 |
|
92 |
=cut |
94 |
=cut |
93 |
|
95 |
|
Lines 96-105
sub filter_out_empty {
Link Here
|
96 |
return $self->search( |
98 |
return $self->search( |
97 |
{ |
99 |
{ |
98 |
-and => [ |
100 |
-and => [ |
99 |
[ |
|
|
100 |
{ name => { like => '%x%' } }, |
101 |
{ description => { like => '%x%' } }, |
102 |
], |
103 |
{ 'club_enrollments.club_id' => { '!=' => undef } }, |
101 |
{ 'club_enrollments.club_id' => { '!=' => undef } }, |
104 |
{ 'club_enrollments.date_canceled' => undef }, |
102 |
{ 'club_enrollments.date_canceled' => undef }, |
105 |
] |
103 |
] |