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 <kyle@bywatersolutions.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
45cff3e8de
commit
1f877328dc
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue