View | Details | Raw Unified | Return to bug 15157
Collapse All | Expand All

(-)a/misc/cronjobs/debar_patrons_with_fines.pl (-2 / +7 lines)
Lines 41-46 debt to the library. Link Here
41
41
42
Display the help message and exit
42
Display the help message and exit
43
43
44
=item B<-a|--amount>
45
46
Sets the minimum amount the patron owes before we debar them.
47
Defaults to 0, meaning anyone that owes anything will be debared.
48
44
=item B<-m|--message>
49
=item B<-m|--message>
45
50
46
Add the passed message in the debarment comment
51
Add the passed message in the debarment comment
Lines 74-79 use C4::Log qw( cronlogaction ); Link Here
74
79
75
my ( $help, $confirm, $message, $expiration, $file );
80
my ( $help, $confirm, $message, $expiration, $file );
76
GetOptions(
81
GetOptions(
82
    'a|amount'       => \$amount,
77
    'h|help'         => \$help,
83
    'h|help'         => \$help,
78
    'c|confirm:s'    => \$confirm,
84
    'c|confirm:s'    => \$confirm,
79
    'm|message:s'    => \$message,
85
    'm|message:s'    => \$message,
Lines 84-90 pod2usage(1) if $help; Link Here
84
pod2usage(1) unless ( $confirm && ( $message || $file ) );
90
pod2usage(1) unless ( $confirm && ( $message || $file ) );
85
91
86
cronlogaction();
92
cronlogaction();
87
my $badBorrowers = Koha::Patrons->filter_by_amount_owed( { more_than => 0 } );
93
my $badBorrowers = Koha::Patrons->filter_by_amount_owed( { more_than => $amount // 0 } );
88
$message = getMessageContent();
94
$message = getMessageContent();
89
95
90
while ( my $bb = $badBorrowers->next ) {
96
while ( my $bb = $badBorrowers->next ) {
91
- 

Return to bug 15157