This patch creates a --quiet flag for longoverdue that will squelch
the summary at the end of the run. It also silences an unnecessary
warn in C4/Acounts.pm
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
# FIXME: Log this ?
}
#FIXME : Should probably have a way to distinguish this from an item that really was returned.
# FIXME: Log this ?
}
#FIXME : Should probably have a way to distinguish this from an item that really was returned.
- warn " $issues->{'borrowernumber'} / $itemnumber ";
+ #warn " $issues->{'borrowernumber'} / $itemnumber ";
C4::Circulation::MarkIssueReturned($issues->{borrowernumber},$itemnumber);
# Shouldn't MarkIssueReturned do this?
C4::Items::ModItem({ onloan => undef }, undef, $itemnumber);
C4::Circulation::MarkIssueReturned($issues->{borrowernumber},$itemnumber);
# Shouldn't MarkIssueReturned do this?
C4::Items::ModItem({ onloan => undef }, undef, $itemnumber);
use Getopt::Long;
my $lost; # key=lost value, value=num days.
use Getopt::Long;
my $lost; # key=lost value, value=num days.
-my ($charge, $verbose, $confirm);
+my ($charge, $verbose, $confirm, $quiet);
my $endrange = 366; # FIXME hardcoded - don't deal with anything overdue by more than this num days.
GetOptions(
my $endrange = 366; # FIXME hardcoded - don't deal with anything overdue by more than this num days.
GetOptions(
'c|charge=s' => \$charge,
'confirm' => \$confirm,
'verbose' => \$verbose,
'c|charge=s' => \$charge,
'confirm' => \$confirm,
'verbose' => \$verbose,
);
my $usage = << 'ENDUSAGE';
);
my $usage = << 'ENDUSAGE';
-print "\n### LONGOVERDUE SUMMARY ###";
-summarize (\@report, 1);
-print "\nTOTAL: $total items\n";
+if (!$quiet){
+ print "\n### LONGOVERDUE SUMMARY ###";
+ summarize (\@report, 1);
+ print "\nTOTAL: $total items\n";
+}