From b94fc3419dc04d06d7557753cea619633ab4c8dd Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 27 Jan 2016 15:44:31 +0100 Subject: [PATCH] Bug 15240: [QA Follow-up] Minor adjustments This patch does: [1] It removes some unused modules. [2] It adds some options not listed in the synopsis. [3] It removes an unused sql expression from one query. Note: In fines related code the third parameter of CalcFine sometimes is named as days_overdue too. [4] Corrects a few typos in comments or pod. Signed-off-by: Marcel de Rooy Signed-off-by: Brendan A Gallagher (cherry picked from commit 8d072272fa396820ec655fb7b45d30eee6fca3e8) Signed-off-by: Julian Maurice --- misc/cronjobs/overdue_notices.pl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl index 7315de00a8..7bcd37538f 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -18,8 +18,7 @@ # You should have received a copy of the GNU General Public License # along with Koha; if not, see . -use strict; -use warnings; +use Modern::Perl; BEGIN { @@ -32,16 +31,12 @@ BEGIN { use Getopt::Long; use Pod::Usage; use Text::CSV_XS; -use Locale::Currency::Format 1.28; -use Encode; use DateTime; use DateTime::Duration; use C4::Context; -use C4::Debug; use C4::Letters; use C4::Overdues qw(GetFine GetOverdueMessageTransportTypes parse_overdues_letter); -use C4::Budgets qw(GetCurrency); use C4::Log; use Koha::Borrower::Debarments qw(AddUniqueDebarment); use Koha::DateUtils; @@ -61,6 +56,7 @@ overdue_notices.pl Options: -help brief help message -man full documentation + -v verbose -n No email will be sent -max maximum days overdue to deal with -library only deal with overdues from this library (repeatable : several libraries can be given) @@ -70,6 +66,9 @@ overdue_notices.pl -itemscontent item information in templates -borcat category code that must be included -borcatout category code that must be excluded + -t only include triggered overdues + -list-all list all overdues + -date emulate overdues run for this date -email type of email that will be used. Can be 'email', 'emailpro' or 'B_email'. Repeatable. =head1 OPTIONS @@ -141,11 +140,11 @@ issues tables. =item B<-borcat> -Repetable field, that permit to select only few of patrons categories. +Repeatable field, that permits to select only some patron categories. =item B<-borcatout> -Repetable field, permis to exclude some patrons categories. +Repeatable field, that permits to exclude some patron categories. =item B<-t> | B<--triggered> @@ -250,7 +249,7 @@ administrator email address. =head1 USAGE EXAMPLES C - In this most basic usage, with no command line -arguments, all libraries are procesed individually, and notices are +arguments, all libraries are processed individually, and notices are prepared for all patrons with overdue items for whom we have email addresses. Messages for those patrons for whom we have no email address are sent in a single attachment to the library administrator's @@ -447,7 +446,7 @@ foreach my $branchcode (@branches) { $verbose and warn sprintf "branchcode : '%s' using %s\n", $branchcode, $admin_email_address; my $sth2 = $dbh->prepare( <<"END_SQL" ); -SELECT biblio.*, items.*, issues.*, biblioitems.itemtype, TO_DAYS($date)-TO_DAYS(date_due) AS days_overdue, branchname +SELECT biblio.*, items.*, issues.*, biblioitems.itemtype, branchname FROM issues,items,biblio, biblioitems, branches b WHERE items.itemnumber=issues.itemnumber AND biblio.biblionumber = items.biblionumber -- 2.39.5