[open-ils-commits] r14023 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Sep 15 12:25:44 EDT 2009
Author: erickson
Date: 2009-09-15 12:25:41 -0400 (Tue, 15 Sep 2009)
New Revision: 14023
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
during inspect, return policy data even if the patron is not allowed to checkout without override
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-09-15 16:13:00 UTC (rev 14022)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-09-15 16:25:41 UTC (rev 14023)
@@ -894,6 +894,10 @@
return $self->matrix_test_result($results);
}
+# ---------------------------------------------------------------------
+# given a use and copy, this will calculate the circulation policy
+# parameters. Only works with in-db circ.
+# ---------------------------------------------------------------------
sub do_inspect {
my $self = shift;
@@ -913,17 +917,19 @@
push(@{$results->{failure_events}},
$LEGACY_CIRC_EVENT_MAP->{$_->{fail_part}})
for @{$self->matrix_test_result};
- return $results;
}
- my $duration_rule = $self->circ_matrix_matchpoint->duration_rule;
- my $recurring_fine_rule = $self->circ_matrix_matchpoint->recurring_fine_rule;
- my $max_fine_rule = $self->circ_matrix_matchpoint->max_fine_rule;
+ if($self->circ_matrix_matchpoint) {
+ my $duration_rule = $self->circ_matrix_matchpoint->duration_rule;
+ my $recurring_fine_rule = $self->circ_matrix_matchpoint->recurring_fine_rule;
+ my $max_fine_rule = $self->circ_matrix_matchpoint->max_fine_rule;
+
+ my $policy = $self->get_circ_policy(
+ $duration_rule, $recurring_fine_rule, $max_fine_rule);
+
+ $$results{$_} = $$policy{$_} for keys %$policy;
+ }
- my $policy = $self->get_circ_policy(
- $duration_rule, $recurring_fine_rule, $max_fine_rule);
-
- $$results{$_} = $$policy{$_} for keys %$policy;
return $results;
}
More information about the open-ils-commits
mailing list