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 <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2016-01-27 15:44:31 +01:00 committed by Brendan A Gallagher
parent 0d36c27678
commit 8d072272fa

View file

@ -18,8 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with Koha; if not, see <http://www.gnu.org/licenses>.
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 <days> maximum days overdue to deal with
-library <branchname> only deal with overdues from this library (repeatable : several libraries can be given)
@ -70,6 +66,9 @@ overdue_notices.pl
-itemscontent <list of fields> item information in templates
-borcat <categorycode> category code that must be included
-borcatout <categorycode> category code that must be excluded
-t only include triggered overdues
-list-all list all overdues
-date <yyyy-mm-dd> emulate overdues run for this date
-email <email_type> 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<overdue_notices.pl> - 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