bugfix invalid comparison to ceilingDueDate in CalcDateDue()
The comparison to check the ceilingDueDate is done in the syspref format, which isn't a good comparison. This changes to code so the comparison is done using iso format. Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
This commit is contained in:
parent
e60b571d6d
commit
2ace8cb33d
1 changed files with 5 additions and 3 deletions
|
@ -2499,9 +2499,11 @@ sub CalcDateDue {
|
|||
|
||||
# if ceilingDueDate ON the datedue can't be after the ceiling date
|
||||
if ( C4::Context->preference('ceilingDueDate')
|
||||
&& ( C4::Context->preference('ceilingDueDate') =~ C4::Dates->regexp('syspref') )
|
||||
&& $datedue->output gt C4::Context->preference('ceilingDueDate') ) {
|
||||
$datedue = C4::Dates->new( C4::Context->preference('ceilingDueDate') );
|
||||
&& ( C4::Context->preference('ceilingDueDate') =~ C4::Dates->regexp('syspref') ) ) {
|
||||
my $ceilingDate = C4::Dates->new( C4::Context->preference('ceilingDueDate') );
|
||||
if ( $datedue->output( 'iso' ) gt $ceilingDate->output( 'iso' ) ) {
|
||||
$datedue = $ceilingDate;
|
||||
}
|
||||
}
|
||||
|
||||
return $datedue;
|
||||
|
|
Loading…
Reference in a new issue