|
Lines 285-291
sub calculate {
Link Here
|
| 285 |
LEFT JOIN biblioitems ON (aqorders.biblionumber = biblioitems.biblionumber) |
285 |
LEFT JOIN biblioitems ON (aqorders.biblionumber = biblioitems.biblionumber) |
| 286 |
LEFT JOIN aqbudgets ON (aqorders.budget_id = aqbudgets.budget_id ) |
286 |
LEFT JOIN aqbudgets ON (aqorders.budget_id = aqbudgets.budget_id ) |
| 287 |
LEFT JOIN aqbooksellers ON (aqbasket.booksellerid = aqbooksellers.id) |
287 |
LEFT JOIN aqbooksellers ON (aqbasket.booksellerid = aqbooksellers.id) |
| 288 |
WHERE $line IS NOT NULL AND $line <> '' "; |
288 |
WHERE $line IS NOT NULL AND COALESCE($line,'') <> '' "; |
| 289 |
|
289 |
|
| 290 |
if (@linefilter) { |
290 |
if (@linefilter) { |
| 291 |
if ( $linefilter[1] ) { |
291 |
if ( $linefilter[1] ) { |
|
Lines 310-319
sub calculate {
Link Here
|
| 310 |
$strsth .= " ORDER BY $line"; |
310 |
$strsth .= " ORDER BY $line"; |
| 311 |
|
311 |
|
| 312 |
my $sth = $dbh->prepare($strsth); |
312 |
my $sth = $dbh->prepare($strsth); |
| 313 |
if ( (@linefilter) and ( $linefilter[1] ) ) { |
313 |
if ( (@linefilter) and ( $linefilter[0] && $linefilter[1] ) ) { |
| 314 |
$sth->execute( $linefilter[0], $linefilter[1] ); |
314 |
$sth->execute( $linefilter[0], $linefilter[1] ); |
| 315 |
} elsif ( $linefilter[0] ) { |
315 |
} elsif ( $linefilter[0] ) { |
| 316 |
$sth->execute( $linefilter[0] ); |
316 |
$sth->execute( $linefilter[0] ); |
|
|
317 |
} elsif ( $linefilter[1] ) { |
| 318 |
$sth->execute( $linefilter[1] ); |
| 317 |
} else { |
319 |
} else { |
| 318 |
$sth->execute; |
320 |
$sth->execute; |
| 319 |
} |
321 |
} |
|
Lines 336-342
sub calculate {
Link Here
|
| 336 |
LEFT JOIN biblioitems ON (aqorders.biblionumber = biblioitems.biblionumber) |
338 |
LEFT JOIN biblioitems ON (aqorders.biblionumber = biblioitems.biblionumber) |
| 337 |
LEFT JOIN aqbudgets ON (aqorders.budget_id = aqbudgets.budget_id ) |
339 |
LEFT JOIN aqbudgets ON (aqorders.budget_id = aqbudgets.budget_id ) |
| 338 |
LEFT JOIN aqbooksellers ON (aqbasket.booksellerid = aqbooksellers.id) |
340 |
LEFT JOIN aqbooksellers ON (aqbasket.booksellerid = aqbooksellers.id) |
| 339 |
WHERE $column IS NOT NULL AND $column <> '' |
341 |
WHERE $column IS NOT NULL AND COALESCE($column,'') <> '' |
| 340 |
"; |
342 |
"; |
| 341 |
|
343 |
|
| 342 |
if (@colfilter) { |
344 |
if (@colfilter) { |
|
Lines 364-373
sub calculate {
Link Here
|
| 364 |
|
366 |
|
| 365 |
my $sth2 = $dbh->prepare($strsth2); |
367 |
my $sth2 = $dbh->prepare($strsth2); |
| 366 |
|
368 |
|
| 367 |
if ( (@colfilter) and ( $colfilter[1] ) ) { |
369 |
if ( (@colfilter) and ( $colfilter[0] and $colfilter[1] ) ) { |
| 368 |
$sth2->execute( $colfilter[0], $colfilter[1] ); |
370 |
$sth2->execute( $colfilter[0], $colfilter[1] ); |
| 369 |
} elsif ( $colfilter[0] ) { |
371 |
} elsif ( $colfilter[0] ) { |
| 370 |
$sth2->execute( $colfilter[0] ); |
372 |
$sth2->execute( $colfilter[0] ); |
|
|
373 |
} elsif ( $colfilter[1] ) { |
| 374 |
$sth2->execute( $colfilter[1] ); |
| 371 |
} else { |
375 |
} else { |
| 372 |
$sth2->execute; |
376 |
$sth2->execute; |
| 373 |
} |
377 |
} |
| 374 |
- |
|
|