[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/misc overduenotices.pl,1.1.4.2,1.1.4.3
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] CVS: koha/misc overduenotices.pl,1.1.4.2,1.1.4.3 |
Date: |
Wed, 01 Jun 2005 07:12:14 -0700 |
Update of /cvsroot/koha/koha/misc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23396/misc
Modified Files:
Tag: rel_2_2
overduenotices.pl
Log Message:
Adding Date to messages.
Adding lists of books borrowed with barcode.
One Bug To Fix : use of uninitialized value.
Index: overduenotices.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/overduenotices.pl,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -C2 -r1.1.4.2 -r1.1.4.3
*** overduenotices.pl 28 Apr 2005 10:07:33 -0000 1.1.4.2
--- overduenotices.pl 1 Jun 2005 14:12:10 -0000 1.1.4.3
***************
*** 74,78 ****
# The following fields are available :
# <date> <itemcount> <firstname> <lastname> <address1> <address2> <address3>
<city> <postcode>
! my $mailtext = "\n\n\nDear library borrower\n\n\n <date>\n\n
According to our records, you have <itemcount> items that are at\n least
a week overdue for return to the library or renewal.\n If you have
registered a password with the library, you may use it\n and your library
card to login at http://XXX.org\n to check the status of your account, or
you may call any of our branch\n Please be advised that all library
services will be blocked\n if items are allowed to go more than 30 days
overdue.\n\n Thank you for using your public libraries.\n\n\n
<firstname> <lastname>\n
<address1>\n
<address2>\n <city>
<postcode>\n\n\n\n\n\n";
#
# END OF PARAMETERS
--- 74,79 ----
# The following fields are available :
# <date> <itemcount> <firstname> <lastname> <address1> <address2> <address3>
<city> <postcode>
! my $mailtext = "\n\n\nDear library borrower\n\n\n <date>\n\n
According to our records, you have <itemcount> items, the description of which
follows, that are at\n least a week overdue for return to the library or
renewal:\n title author barcode\n<titles>\n
! If you have registered a password with the library, you may use it\n
and your library card to login at http://XXX.org\n to check the
status of your account, or you may call any of our branch\n Please be
advised that all library services will be blocked\n if items are allowed
to go more than 30 days overdue.\n\n Thank you for using your public
libraries.\n\n\n <firstname>
<lastname>\n <address1>\n
<address2>\n
<city> <postcode>\n\n\n\n\n\n";
#
# END OF PARAMETERS
***************
*** 85,89 ****
my $dbh = C4::Context->dbh;
! my $sth = $dbh->prepare ("SELECT count(*),
issues.borrowernumber,firstname,surname,streetaddress,physstreet,city,zipcode,emailaddress
FROM issues,borrowers,categories WHERE returndate IS NULL AND
TO_DAYS(NOW())-TO_DAYS(date_due) BETWEEN 0 and 500 AND
issues.borrowernumber=borrowers.borrowernumber and
borrowers.categorycode=categories.categorycode and
categories.overduenoticerequired=1 group by issues.borrowernumber");
$sth->execute;
#
--- 86,92 ----
my $dbh = C4::Context->dbh;
! my $sth = $dbh->prepare ("SELECT COUNT(*),
issues.borrowernumber,firstname,surname,streetaddress,physstreet,city,zipcode,emailaddress
FROM issues,borrowers,categories WHERE returndate IS NULL AND
TO_DAYS(NOW())-TO_DAYS(date_due) BETWEEN 0 and 500 AND
issues.borrowernumber=borrowers.borrowernumber and
borrowers.categorycode=categories.categorycode and
categories.overduenoticerequired=1 group by issues.borrowernumber");
! my $sth2 = $dbh->prepare("SELECT biblio.title,biblio.author,items.barcode
FROM issues,items,biblio WHERE items.itemnumber=issues.itemnumber and
biblio.biblionumber=items.biblionumber AND issues.borrowernumber=? AND
returndate IS NULL AND TO_DAYS(NOW())-TO_DAYS(date_due) BETWEEN 0 and 500");
!
$sth->execute;
#
***************
*** 92,95 ****
--- 95,99 ----
my $count = 0; # to keep track of how many notices are printed
my $e_count = 0; # and e-mailed
+ my $date=localtime;
my
($itemcount,$borrnum,$firstname,$lastname,$address1,$address2,$city,$postcode,$email);
***************
*** 103,107 ****
$notice =~ s/\<city\>/$city/g;
$notice =~ s/\<postcode\>/$postcode/g;
!
# if not using e-mail notices, comment out the following lines
if ($email) { # or you might check for
borrowers.preferredcont
--- 107,120 ----
$notice =~ s/\<city\>/$city/g;
$notice =~ s/\<postcode\>/$postcode/g;
! $notice =~ s/\<date\>/$date/g;
!
! $sth2->execute($borrnum);
! my $titles;
! my ($title, $author, $barcode);
! while (($title, $author, $barcode) = $sth2->fetchrow){
! $titles .= " $title $author $barcode\n";
! }
! $notice =~ s/\<titles\>/$titles/g;
! $sth2->finish;
# if not using e-mail notices, comment out the following lines
if ($email) { # or you might check for
borrowers.preferredcont
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/misc overduenotices.pl,1.1.4.2,1.1.4.3,
Henri-Damien LAURENT <=