Bugzilla – Attachment 5221 Details for
Bug 6292
Overdue notices have a bug when multiple overdues exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
avoid duplication of letters
0001-Bug-6292-Followup-2.-several-letters-where-generated.patch (text/plain), 2.49 KB, created by
Sophie MEYNIEUX
on 2011-08-30 15:03:30 UTC
(
hide
)
Description:
avoid duplication of letters
Filename:
MIME Type:
Creator:
Sophie MEYNIEUX
Created:
2011-08-30 15:03:30 UTC
Size:
2.49 KB
patch
obsolete
>From 774d485a1cc5c644b5d25ffa61f12a49de02cad0 Mon Sep 17 00:00:00 2001 >From: Sophie Meynieux <sophie.meynieux@biblibre.com> >Date: Tue, 30 Aug 2011 16:54:42 +0200 >Subject: [PATCH] Bug 6292 : Followup 2. several letters where generated if a borrower had overdues with different due_date triggering the same level > >This patch fixes the SQL request giving the list of borrowers >--- > misc/cronjobs/overdue_notices.pl | 10 +++++----- > 1 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 4ae9684..c9fa8f2 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -425,7 +425,7 @@ END_SQL > # <date> <itemcount> <firstname> <lastname> <address1> <address2> <address3> <city> <postcode> > > my $borrower_sql = <<'END_SQL'; >-SELECT distinct(issues.borrowernumber), firstname, surname, address, address2, city, zipcode, country, email, date_due >+SELECT distinct(issues.borrowernumber), firstname, surname, address, address2, city, zipcode, country, email > FROM issues,borrowers,categories > WHERE issues.borrowernumber=borrowers.borrowernumber > AND borrowers.categorycode=categories.categorycode >@@ -441,10 +441,10 @@ END_SQL > } > $borrower_sql .= ' AND categories.overduenoticerequired=1 '; > if($triggered) { >- $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(date_due) = ?'; >+ $borrower_sql .= ' AND TO_DAYS(NOW())-TO_DAYS(date_due) = ?'; > push @borrower_parameters, $mindays; > } else { >- $borrower_sql .= ' HAVING TO_DAYS(NOW())-TO_DAYS(date_due) BETWEEN ? and ? ' ; >+ $borrower_sql .= ' AND TO_DAYS(NOW())-TO_DAYS(date_due) BETWEEN ? and ? ' ; > push @borrower_parameters, $mindays, $maxdays; > } > >@@ -454,8 +454,8 @@ END_SQL > $verbose and warn $borrower_sql . "\n $branchcode | " . $overdue_rules->{'categorycode'} . "\n ($mindays, $maxdays)\nreturns " . $sth->rows . " rows"; > > while ( my ( $borrowernumber, $firstname, $lastname, >- $address1, $address2, $city, $postcode, $country, $email, >- $date_due ) = $sth->fetchrow ) >+ $address1, $address2, $city, $postcode, $country, $email >+ ) = $sth->fetchrow ) > { > $verbose and warn "borrower $firstname, $lastname ($borrowernumber) has items triggering level $i."; > >-- >1.7.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6292
:
4027
|
4028
|
4982
|
5000
|
5001
|
5221
|
6700