Lines 404-418
foreach my $branchcode (@branches) {
Link Here
|
404 |
|
404 |
|
405 |
$verbose and warn sprintf "branchcode : '%s' using %s\n", $branchcode, $admin_email_address; |
405 |
$verbose and warn sprintf "branchcode : '%s' using %s\n", $branchcode, $admin_email_address; |
406 |
|
406 |
|
407 |
my $sth2 = $dbh->prepare( <<'END_SQL' ); |
407 |
my $sth2 = $dbh->prepare( " |
408 |
SELECT biblio.title as "biblio.title", biblio.*, items.*, issues.*, biblioitems.itemtype, TO_DAYS($date)-TO_DAYS(date_due) AS days_overdue |
408 |
SELECT biblio.title as 'biblio.title', biblio.*, items.*, issues.*, biblioitems.itemtype, TO_DAYS($date)-TO_DAYS(date_due) AS days_overdue |
409 |
FROM issues,items,biblio, biblioitems |
409 |
FROM issues,items,biblio, biblioitems |
410 |
WHERE items.itemnumber=issues.itemnumber |
410 |
WHERE items.itemnumber=issues.itemnumber |
411 |
AND biblio.biblionumber = items.biblionumber |
411 |
AND biblio.biblionumber = items.biblionumber |
412 |
AND biblio.biblionumber = biblioitems.biblionumber |
412 |
AND biblio.biblionumber = biblioitems.biblionumber |
413 |
AND issues.borrowernumber = ? |
413 |
AND issues.borrowernumber = ? |
414 |
AND TO_DAYS($date)-TO_DAYS(date_due) BETWEEN ? and ? |
414 |
AND TO_DAYS($date)-TO_DAYS(date_due) BETWEEN ? and ? |
415 |
END_SQL |
415 |
"); |
416 |
|
416 |
|
417 |
my $query = "SELECT * FROM overduerules WHERE delay1 IS NOT NULL AND branchcode = ? "; |
417 |
my $query = "SELECT * FROM overduerules WHERE delay1 IS NOT NULL AND branchcode = ? "; |
418 |
$query .= " AND categorycode IN (".join( ',' , ('?') x @myborcat ).") " if (@myborcat); |
418 |
$query .= " AND categorycode IN (".join( ',' , ('?') x @myborcat ).") " if (@myborcat); |
Lines 505-511
END_SQL
Link Here
|
505 |
$sth2->execute(@params); |
505 |
$sth2->execute(@params); |
506 |
$verbose and warn "STH2 PARAMS: borrowernumber = $borrowernumber, mindays = $mindays, maxdays = $maxdays returns ".$sth2->rows." rows"; |
506 |
$verbose and warn "STH2 PARAMS: borrowernumber = $borrowernumber, mindays = $mindays, maxdays = $maxdays returns ".$sth2->rows." rows"; |
507 |
my $itemcount = 0; |
507 |
my $itemcount = 0; |
508 |
my $titles; |
508 |
my $titles=''; |
509 |
if ($htmlfilename) { |
509 |
if ($htmlfilename) { |
510 |
$titles = "<table id='itemscontent$borrowernumber'>"; |
510 |
$titles = "<table id='itemscontent$borrowernumber'>"; |
511 |
$titles .= "<thead><tr><th>" . join( "</th><th>", @$columns_def_hashref{@item_content_fields} ); |
511 |
$titles .= "<thead><tr><th>" . join( "</th><th>", @$columns_def_hashref{@item_content_fields} ); |
512 |
- |
|
|