[Koha-bugs] [Bug 6292] Overdue notices have a bug when multiple overdues exist
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue May 3 01:30:44 CEST 2011
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6292
--- Comment #1 from Chris Cormack <chris at bigballofwax.co.nz> 2011-05-02 23:30:44 UTC ---
The piece of code is here
my $borrower_sql = <<'END_SQL';
SELECT COUNT(*), issues.borrowernumber, firstname, surname, address, address2,
city, zipcode, country, email, MIN(date_due) as longest_issue
FROM issues,borrowers,categories
WHERE issues.borrowernumber=borrowers.borrowernumber
AND borrowers.categorycode=categories.categorycode
END_SQL
my @borrower_parameters;
if ($branchcode) {
$borrower_sql .= ' AND issues.branchcode=? ';
push @borrower_parameters, $branchcode;
}
if ( $overdue_rules->{categorycode} ) {
$borrower_sql .= ' AND borrowers.categorycode=? ';
push @borrower_parameters, $overdue_rules->{categorycode};
}
$borrower_sql .= ' AND categories.overduenoticerequired=1
GROUP BY issues.borrowernumber ';
if($triggered) {
$borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(longest_issue)
= ?';
push @borrower_parameters, $mindays;
--
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
More information about the Koha-bugs
mailing list