Bugzilla – Attachment 39918 Details for
Bug 12769
Manage fees for sending notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12769 - Follow up to comments 14 & 15
Bug-12769---Follow-up-to-comments-14--15.patch (text/plain), 2.06 KB, created by
Maxime Beaulieu
on 2015-06-05 18:23:57 UTC
(
hide
)
Description:
Bug 12769 - Follow up to comments 14 & 15
Filename:
MIME Type:
Creator:
Maxime Beaulieu
Created:
2015-06-05 18:23:57 UTC
Size:
2.06 KB
patch
obsolete
>From 87dfc680265ccc56f14f85d4dbd58c0fc468e06a Mon Sep 17 00:00:00 2001 >From: mxbeaulieu <maxime.beaulieu@inlibro.com> >Date: Fri, 5 Jun 2015 14:17:41 -0400 >Subject: [PATCH] Bug 12769 - Follow up to comments 14 & 15 > >The scripts now check if the variable is defined. > >As for 0 and NULL in the letter's fee column: > >If the fee is NULL, we use the default value stored in the system preference. >If the syspref is 0 or NULL the patron is not charged. > >If the fee is 0, we use that value and the fine is not created. >--- > misc/cronjobs/advance_notices.pl | 2 +- > misc/cronjobs/overdue_notices.pl | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/misc/cronjobs/advance_notices.pl b/misc/cronjobs/advance_notices.pl >index 950bad0..c3e9c7e 100755 >--- a/misc/cronjobs/advance_notices.pl >+++ b/misc/cronjobs/advance_notices.pl >@@ -526,7 +526,7 @@ sub noticefine { > $sendfee = C4::Context->preference('DefaultNoticeFee'); > } > >- if ($sendfee > 0){ >+ if (defined($sendfee) && $sendfee > 0){ > C4::Accounts::manualinvoice($borrowernumber, "", "", "F", $sendfee, C4::Context->preference('NoticeFeeNote')); > } > } >diff --git a/misc/cronjobs/overdue_notices.pl b/misc/cronjobs/overdue_notices.pl >index 5dc437c..6946165 100755 >--- a/misc/cronjobs/overdue_notices.pl >+++ b/misc/cronjobs/overdue_notices.pl >@@ -463,7 +463,7 @@ END_SQL > > my $rqoverduerules = $dbh->prepare($query); > $rqoverduerules->execute($branchcode, @myborcat, @myborcatout); >- >+ > # We get default rules is there is no rule for this branch > if($rqoverduerules->rows == 0){ > $query = "SELECT * FROM overduerules WHERE delay1 IS NOT NULL AND branchcode = '' "; >@@ -600,7 +600,7 @@ END_SQL > $sendfee = C4::Context->preference('DefaultNoticeFee'); > } > >- if ($sendfee > 0){ >+ if (defined($sendfee) && $sendfee > 0){ > C4::Accounts::manualinvoice($borrowernumber, "", "", "F", $sendfee, C4::Context->preference('NoticeFeeNote')); > } > >-- >1.7.9.5
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 12769
:
34335
|
36318
|
36351
|
36504
|
39900
|
39918
|
39919
|
40081
|
40082