|
Lines 2282-2287
sub GetHistory {
Link Here
|
| 2282 |
my $total_qtyreceived = 0; |
2282 |
my $total_qtyreceived = 0; |
| 2283 |
my $total_price = 0; |
2283 |
my $total_price = 0; |
| 2284 |
|
2284 |
|
|
|
2285 |
#get variation of isbn |
| 2286 |
my @params; |
| 2287 |
my @isbns; |
| 2288 |
if ($isbn){ |
| 2289 |
if ( C4::Context->preference("SearchWithISBNVariations") ){ |
| 2290 |
@isbns = C4::Koha::GetVariationsOfISBN( $isbn ); |
| 2291 |
foreach my $isb (@isbns){ |
| 2292 |
push @params, '?'; |
| 2293 |
} |
| 2294 |
} |
| 2295 |
unless (@isbns){ |
| 2296 |
push @isbns, $isbn; |
| 2297 |
push @params, '?'; |
| 2298 |
} |
| 2299 |
} |
| 2300 |
|
| 2285 |
my $dbh = C4::Context->dbh; |
2301 |
my $dbh = C4::Context->dbh; |
| 2286 |
my $query =" |
2302 |
my $query =" |
| 2287 |
SELECT |
2303 |
SELECT |
|
Lines 2349-2358
sub GetHistory {
Link Here
|
| 2349 |
push @query_params, "%$author%"; |
2365 |
push @query_params, "%$author%"; |
| 2350 |
} |
2366 |
} |
| 2351 |
|
2367 |
|
| 2352 |
if ( $isbn ) { |
2368 |
if ( @isbns ) { |
| 2353 |
$query .= " AND biblioitems.isbn LIKE ? "; |
2369 |
$query .= " AND ( biblioitems.isbn LIKE " . join (" OR biblioitems.isbn LIKE ", @params ) . ")"; |
| 2354 |
push @query_params, "%$isbn%"; |
2370 |
foreach my $isbn (@isbns){ |
|
|
2371 |
push @query_params, "%$isbn%"; |
| 2372 |
} |
| 2355 |
} |
2373 |
} |
|
|
2374 |
|
| 2356 |
if ( $ean ) { |
2375 |
if ( $ean ) { |
| 2357 |
$query .= " AND biblioitems.ean = ? "; |
2376 |
$query .= " AND biblioitems.ean = ? "; |
| 2358 |
push @query_params, "$ean"; |
2377 |
push @query_params, "$ean"; |
| 2359 |
- |
|
|