From 8d8b0447658ad0607360c12c9e582047f6f975fa Mon Sep 17 00:00:00 2001 From: mxbeaulieu Date: Fri, 5 Jun 2015 14:27:10 -0400 Subject: [PATCH] Bug 12769 - Follow up to comments 14 & 15 Removed useless change in previous patch Test scenario 1: OK Test scenario 2: OK Test scenario 3: OK Test scenario 4: OK Test scenario 5: OK Some notes: In test scenario 3 I noticed that running the cron scripts several times would add several fines for the same items due/overdue. I did not test for this during the other scenarios. If an item is checked out without having a branch selected in the staff client the branchcode will be set to NO_LIBRARY and then no fines will be triggered when running the scripts. Signed-off-by: Eivin Giske Skaaren --- misc/cronjobs/advance_notices.pl | 2 +- misc/cronjobs/overdue_notices.pl | 2 +- 2 files changed, 2 insertions(+), 2 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..e381598 100755 --- a/misc/cronjobs/overdue_notices.pl +++ b/misc/cronjobs/overdue_notices.pl @@ -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.10.4