Bug 37031: Club enrollment from staff interface fails due to Entrollment typo

There is a typo in svc/club/enroll - it tries to call
Koha::Club::Entrollments->search when it should be
Koha::Club::Enrollments. This causes and error when
enrolling patrons in clubs.

Test plan:
1. Without the patch, Tools - Patron clubs - New club template - name it
   and save
2. New club - (your template) - name it and save
3. Circulation - check out to a patron - Clubs tab - Enroll - Finish
   enrollment, get alert() about failure to enroll
4. Apply patch, restart_all
5. Enroll - Finish enrollment, success

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Phil Ringnalda 2024-07-06 15:34:06 -07:00 committed by Katrin Fischer
parent bce37851cf
commit f02d90938d
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -64,7 +64,7 @@ if ($enrollent_id) {
} }
} }
} elsif ($club) { } elsif ($club) {
my $already_enrolled = Koha::Club::Entrollments->search( my $already_enrolled = Koha::Club::Enrollments->search(
{ {
club_id => $club->id(), club_id => $club->id(),
borrowernumber => $borrowernumber, borrowernumber => $borrowernumber,