[open-ils-commits] r13561 - in trunk/Open-ILS/src/perlmods/OpenILS: . Application (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jul 10 10:46:32 EDT 2009
Author: erickson
Date: 2009-07-10 10:46:30 -0400 (Fri, 10 Jul 2009)
New Revision: 13561
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
trunk/Open-ILS/src/perlmods/OpenILS/Const.pm
Log:
using new penalty org depth when setting invalid addr penalty. created const for penalty name
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2009-07-10 14:45:50 UTC (rev 13560)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm 2009-07-10 14:46:30 UTC (rev 13561)
@@ -328,10 +328,15 @@
} elsif($enforce and $addr_count > 0 and !$addr_penalty) {
+ my $ptype = $e->retrieve_config_standing_penalty(29) or return $e->die_event;
+ my $depth = $ptype->org_depth;
+ my $ctx_org = $U->org_unit_ancestor_at_depth($patron->home_ou, $depth) if defined $depth;
+ $ctx_org = $patron->home_ou unless defined $ctx_org;
+
my $penalty = Fieldmapper::actor::user_standing_penalty->new;
$penalty->usr($patron->id);
- $penalty->org_unit($patron->home_ou); # TODO: use depth
- $penalty->standing_penalty(29); # INVALID_PATRON_ADDRESS (TODO: make me a constant, please)
+ $penalty->org_unit($ctx_org);
+ $penalty->standing_penalty(OILS_PENALTY_INVALID_PATRON_ADDRESS);
$e->create_actor_user_standing_penalty($penalty) or return $e->die_event;
$e->commit;
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Const.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Const.pm 2009-07-10 14:45:50 UTC (rev 13560)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Const.pm 2009-07-10 14:46:30 UTC (rev 13561)
@@ -111,6 +111,7 @@
econst OILS_PENALTY_AUTO_ID => 100;
econst OILS_PENALTY_PATRON_EXCEEDS_FINES => 1;
econst OILS_PENALTY_PATRON_EXCEEDS_OVERDUE_COUNT => 2;
+econst OILS_PENALTY_INVALID_PATRON_ADDRESS => 29;
econst OILS_BILLING_TYPE_NOTIFICATION_FEE => 9;
More information about the open-ils-commits
mailing list