Bugzilla – Attachment 158316 Details for
Bug 15157
Cronjob to automatically restrict patrons with pending/unpaid charges
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15157: (follow-up) Add ability to set lower limit
Bug-15157-follow-up-Add-ability-to-set-lower-limit.patch (text/plain), 1.64 KB, created by
Marcel de Rooy
on 2023-11-03 10:06:05 UTC
(
hide
)
Description:
Bug 15157: (follow-up) Add ability to set lower limit
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-11-03 10:06:05 UTC
Size:
1.64 KB
patch
obsolete
>From 3cef881823898d43b7a97f8caea466f7de9ba7dd Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 21 Jan 2022 16:21:29 +0000 >Subject: [PATCH] Bug 15157: (follow-up) Add ability to set lower limit >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > misc/cronjobs/debar_patrons_with_fines.pl | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/misc/cronjobs/debar_patrons_with_fines.pl b/misc/cronjobs/debar_patrons_with_fines.pl >index b4906f6a9c..66d2d21eb3 100755 >--- a/misc/cronjobs/debar_patrons_with_fines.pl >+++ b/misc/cronjobs/debar_patrons_with_fines.pl >@@ -41,6 +41,11 @@ debt to the library. > > Display the help message and exit > >+=item B<-a|--amount> >+ >+Sets the minimum amount the patron owes before we debar them. >+Defaults to 0, meaning anyone that owes anything will be debared. >+ > =item B<-m|--message> > > Add the passed message in the debarment comment >@@ -74,6 +79,7 @@ use C4::Log qw( cronlogaction ); > > my ( $help, $confirm, $message, $expiration, $file ); > GetOptions( >+ 'a|amount' => \$amount, > 'h|help' => \$help, > 'c|confirm:s' => \$confirm, > 'm|message:s' => \$message, >@@ -84,7 +90,7 @@ pod2usage(1) if $help; > pod2usage(1) unless ( $confirm && ( $message || $file ) ); > > cronlogaction(); >-my $badBorrowers = Koha::Patrons->filter_by_amount_owed( { more_than => 0 } ); >+my $badBorrowers = Koha::Patrons->filter_by_amount_owed( { more_than => $amount // 0 } ); > $message = getMessageContent(); > > while ( my $bb = $badBorrowers->next ) { >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15157
:
44643
|
44645
|
44646
|
109220
|
124894
|
124895
|
124896
|
129701
|
129702
|
129703
|
129704
|
130103
|
158288
|
158289
|
158290
|
158291
|
158292
|
158315
| 158316 |
158317
|
158318