From 1f877328dc86e2ff1f1db6923040ffd4325ed875 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Fri, 28 Sep 2012 11:48:18 +0100 Subject: [PATCH] Bug 8841 Duedate should be set to end of expiry day When reducing duedate to patron's expiry date it should be set to end of that day not 00:00 take account of the fact that the borrower expiry date will have no hours/minutes Signed-off-by: Kyle M Hall Signed-off-by: Paul Poulain Signed-off-by: Chris Cormack --- C4/Circulation.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index f3245c55c3..60cf563c10 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2877,6 +2877,7 @@ sub CalcDateDue { # if ReturnBeforeExpiry ON the datedue can't be after borrower expirydate if ( C4::Context->preference('ReturnBeforeExpiry') ) { my $expiry_dt = dt_from_string( $borrower->{dateexpiry}, 'iso' ); + $expiry_dt->set( hour => 23, minute => 59); if ( DateTime->compare( $datedue, $expiry_dt ) == 1 ) { $datedue = $expiry_dt->clone; } -- 2.39.5