[open-ils-commits] r14601 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Oct 26 10:07:47 EDT 2009
Author: miker
Date: 2009-10-26 10:07:45 -0400 (Mon, 26 Oct 2009)
New Revision: 14601
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Validator.pm
Log:
allow the CircIsOpen and CircIsOverdue validators to reuse the MaxPassiveDelayAge validator in the presense of a max_delay_age param
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Validator.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Validator.pm 2009-10-26 13:57:38 UTC (rev 14600)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Validator.pm 2009-10-26 14:07:45 UTC (rev 14601)
@@ -13,7 +13,10 @@
my $self = shift;
my $env = shift;
- return defined($env->{target}->checkin_time) ? 0 : 1;
+ return 0 if (defined($env->{target}->checkin_time));
+ return 0 if ($env->{params}->{max_delay_age} && !$self->MaxPassiveDelayAge($env));
+
+ return 1;
}
sub MaxPassiveDelayAge {
@@ -36,6 +39,7 @@
return 0 if $circ->checkin_time;
return 0 if $circ->stop_fines and not $circ->stop_fines =~ /MAXFINES|LONGOVERDUE/;
+ return 0 if ($env->{params}->{max_delay_age} && !$self->MaxPassiveDelayAge($env));
my $due_date = DateTime::Format::ISO8601->new->parse_datetime(clense_ISO8601($circ->due_date));
return 0 if $due_date > DateTime->now;
More information about the open-ils-commits
mailing list