=cut
-=head3 housebound_choosers
+=head3 search_housebound_choosers
Returns all Patrons which are Housebound choosers.
=cut
-sub housebound_choosers {
+sub search_housebound_choosers {
my ( $self ) = @_;
my $cho = $self->_resultset->search
->search_related('borrower_attributes', {
return Koha::Patrons->_new_from_dbic($cho);
}
-=head3 housebound_deliverers
+=head3 search_housebound_deliverers
Returns all Patrons which are Housebound deliverers.
=cut
-sub housebound_deliverers {
+sub search_housebound_deliverers {
my ( $self ) = @_;
my $del = $self->_resultset->search
->search_related('borrower_attributes', {
$method = undef;
} elsif ( $method eq 'visit_update_or_create' ) {
# We want to edit, edit a visit, so we must pass its details.
- $deliverers = Koha::Patrons->new->housebound_deliverers;
- $choosers = Koha::Patrons->new->housebound_choosers;
+ $deliverers = Koha::Patrons->new->search_housebound_deliverers;
+ $choosers = Koha::Patrons->new->search_housebound_choosers;
$houseboundvisit = $visit;
} elsif ( $method eq 'visit_delete' and $visit ) {
# We want ot delete a specific visit.
# patron_choosers and patron_deliverers Tests
# Current Patron Chooser / Deliverer count
-my $orig_del_count = Koha::Patrons->housebound_deliverers->count;
-my $orig_cho_count = Koha::Patrons->housebound_choosers->count;
+my $orig_del_count = Koha::Patrons->search_housebound_deliverers->count;
+my $orig_cho_count = Koha::Patrons->search_housebound_choosers->count;
# We add one, just in case the above is 0, so we're guaranteed one of each.
my $patron_chooser = $builder->build({ source => 'Borrower' });
},
});
-# Test housebound_choosers
-is(Koha::Patrons->housebound_choosers->count, $orig_cho_count + 1, "Correct count of choosers.");
-is(Koha::Patrons->housebound_deliverers->count, $orig_del_count + 1, "Correct count of deliverers");
+# Test search_housebound_choosers
+is(Koha::Patrons->search_housebound_choosers->count, $orig_cho_count + 1, "Correct count of choosers.");
+is(Koha::Patrons->search_housebound_deliverers->count, $orig_del_count + 1, "Correct count of deliverers");
-isa_ok(Koha::Patrons->housebound_choosers->next, "Koha::Patron");
-isa_ok(Koha::Patrons->housebound_deliverers->next, "Koha::Patron");
+isa_ok(Koha::Patrons->search_housebound_choosers->next, "Koha::Patron");
+isa_ok(Koha::Patrons->search_housebound_deliverers->next, "Koha::Patron");
$schema->storage->txn_rollback;