[open-ils-commits] r14024 - branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Sep 15 12:26:22 EDT 2009
Author: erickson
Date: 2009-09-15 12:26:19 -0400 (Tue, 15 Sep 2009)
New Revision: 14024
Modified:
branches/rel_1_6/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: branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-09-15 16:25:41 UTC (rev 14023)
+++ branches/rel_1_6/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2009-09-15 16:26:19 UTC (rev 14024)
@@ -893,6 +893,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;
@@ -912,17 +916,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