Lines 1315-1324
sub buildQuery {
Link Here
|
1315 |
$q =~ s| and \( \(allrecords,AlwaysMatches=''\) and \(not-onloan-count,st-numeric >= 1\) and \(lost,st-numeric=0\) \)||; |
1315 |
$q =~ s| and \( \(allrecords,AlwaysMatches=''\) and \(not-onloan-count,st-numeric >= 1\) and \(lost,st-numeric=0\) \)||; |
1316 |
$original_q = $q; |
1316 |
$original_q = $q; |
1317 |
} |
1317 |
} |
|
|
1318 |
unless ( grep { $_ eq 'withoutitems' } @limits ) { |
1319 |
$q =~ s| and \( allrecords,AlwaysMatches='' not\(homebranch,AlwaysMatches=''\) \)||; |
1320 |
$original_q = $q; |
1321 |
} |
1318 |
if ( @limits ) { |
1322 |
if ( @limits ) { |
1319 |
if ( grep { $_ eq 'available' } @limits ) { |
1323 |
if ( grep { $_ eq 'available' } @limits ) { |
1320 |
$q .= q| and ( (allrecords,AlwaysMatches='') and (not-onloan-count,st-numeric >= 1) and (lost,st-numeric=0) )|; |
1324 |
$q .= q| and ( (allrecords,AlwaysMatches='') and (not-onloan-count,st-numeric >= 1) and (lost,st-numeric=0) )|; |
1321 |
@limits = grep {!/^available$/} @limits; |
1325 |
@limits = grep { $_ ne 'available' } @limits; |
|
|
1326 |
} |
1327 |
if ( grep { $_ eq 'withoutitems' } @limits ) { |
1328 |
$q .= q| and ( allrecords,AlwaysMatches='' not(homebranch,AlwaysMatches='') )|; |
1329 |
@limits = grep { $_ ne 'withoutitems' } @limits; |
1322 |
} |
1330 |
} |
1323 |
$q .= ' and '.join(' and ', @limits) if @limits; |
1331 |
$q .= ' and '.join(' and ', @limits) if @limits; |
1324 |
} |
1332 |
} |
1325 |
- |
|
|