Bug 11182: remove another warning in circulation
authorMark Tompsett <mtompset@hotmail.com>
Fri, 10 Jan 2014 19:45:17 +0000 (14:45 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 29 Apr 2014 17:54:07 +0000 (17:54 +0000)
This deals with the warning when Circulation system preference
'WaitingNotifyAtCheckin' is set to 'Notify' and an overdue item
is checked in.

TEST PLAN
---------
 0) Feel free to backup your koha-error_log file, and then toast it.
     $ echo > ~/koha-dev/var/log/koha-error_log
 1) Log into staff client
 2) Koha administration
 3) Global system preferences
 4) Circulation
 5) Make sure WaitingNotifyAtCheckin is set to Notify.
 6) Check out tab
 7) Type patron's name
 8) Select patron if required
 9) Check out an item, but set the due date to be overdue.
10) Check in the overdue item.
11) Check the error log
     $ cat ~/koha-dev/var/log/koha-error_log | grep 284
     NOTE: the returns.pl one that will be fixed by this.
12) Apply this patch
13) Repeat steps 6 through 7, there should no new line 284 entries.

Signed-off-by: Jesse Weaver <pianohacker@gmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
circ/returns.pl

index 4abac2e..87fe21c 100755 (executable)
@@ -289,7 +289,7 @@ if ($barcode) {
                     $waiting_holds++;
                 }
             } 
-            if ($waiting_holds > 0) {
+            if ($waiting_holds && $waiting_holds > 0) {
                 $template->param(
                     waiting_holds       => $waiting_holds,
                     holdsborrowernumber => $borrower->{'borrowernumber'},