[Koha-patches] [PATCH] Bug 5548 Follow up: Confirm Checkout message where it shouldn't be

Ian Walls ian.walls at bywatersolutions.com
Fri Apr 1 19:34:35 CEST 2011


Fixes the main Hard Due Dates conditional to first check for the existence
of $hardduedate, then the existences of its ISO export, then finally that that
value is not '0000-00-00'

Signed-off-by: Ian Walls <ian.walls at bywatersolutions.com>
---
 C4/Circulation.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/C4/Circulation.pm b/C4/Circulation.pm
index 0adf9fb..b977524 100644
--- a/C4/Circulation.pm
+++ b/C4/Circulation.pm
@@ -2718,7 +2718,7 @@ sub CalcDateDue {
 
 	# if Hard Due Dates are used, retreive them and apply as necessary
         my ($hardduedate, $hardduedatecompare) = GetHardDueDate($borrower->{'categorycode'},$itemtype, $branch);
-	if ( $hardduedate && $hardduedate->output('iso') ne '0000-00-00') {
+	if ( $hardduedate && $hardduedate->output('iso') && $hardduedate->output('iso') ne '0000-00-00') {
             # if the calculated due date is after the 'before' Hard Due Date (ceiling), override
             if ( $datedue->output( 'iso' ) gt $hardduedate->output( 'iso' ) && $hardduedatecompare == -1) {
                 $datedue = $hardduedate;
-- 
1.5.6.5



More information about the Koha-patches mailing list