[Koha-patches] [PATCH] Bug 8841 Duedate should be set to end of expiry day
Colin Campbell
colin.campbell at ptfs-europe.com
Fri Sep 28 13:37:30 CEST 2012
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
---
C4/Circulation.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/C4/Circulation.pm b/C4/Circulation.pm
index 71e13bb..3278039 100644
--- a/C4/Circulation.pm
+++ b/C4/Circulation.pm
@@ -3062,6 +3062,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;
}
--
1.7.12.1.428.g652398a
More information about the Koha-patches
mailing list