|
Lines 195-202
sub _find_matching_requests {
Link Here
|
| 195 |
|
195 |
|
| 196 |
my $patron = Koha::Patrons->find( { cardnumber => $self->{metadata}->{cardnumber} } ); |
196 |
my $patron = Koha::Patrons->find( { cardnumber => $self->{metadata}->{cardnumber} } ); |
| 197 |
|
197 |
|
|
|
198 |
return 0 unless $patron; |
| 199 |
|
| 198 |
my $query; |
200 |
my $query; |
| 199 |
$query->{'-and'} = [ { 'me.borrowernumber' => $patron->borrowernumber } ] if $patron; |
201 |
$query->{'-and'} = [ { 'me.borrowernumber' => $patron->borrowernumber } ]; |
| 200 |
foreach my $id_field (@existing_id_fields) { |
202 |
foreach my $id_field (@existing_id_fields) { |
| 201 |
push @{ $query->{'-or'} }, { |
203 |
push @{ $query->{'-or'} }, { |
| 202 |
'illrequestattributes.type' => $id_field, |
204 |
'illrequestattributes.type' => $id_field, |
| 203 |
- |
|
|