[open-ils-commits] r15140 - trunk/Open-ILS/src/perlmods/OpenILS/SIP (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Dec 11 10:01:02 EST 2009
Author: erickson
Date: 2009-12-11 10:01:00 -0500 (Fri, 11 Dec 2009)
New Revision: 15140
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm
Log:
repaired faulty user penalty checking logic in SIP server
Modified: trunk/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm 2009-12-11 15:00:47 UTC (rev 15139)
+++ trunk/Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm 2009-12-11 15:01:00 UTC (rev 15140)
@@ -47,7 +47,7 @@
[
{ card => $$c[0] },
{
- flesh => 1,
+ flesh => 2,
flesh_fields => {
"au" => [
#"cards",
@@ -58,7 +58,8 @@
"mailing_address",
#"stat_cat_entries",
'profile',
- ]
+ ],
+ ausp => ['standing_penalty']
}
}
]
@@ -226,11 +227,11 @@
if( $u->standing_penalties ) {
return $b if
- grep { $_->penalty_type eq 'PATRON_EXCEEDS_OVERDUE_COUNT' }
+ grep { $_->standing_penalty->name eq 'PATRON_EXCEEDS_OVERDUE_COUNT' }
@{$u->standing_penalties};
return $b if
- grep { $_->penalty_type eq 'PATRON_EXCEEDS_FINES' }
+ grep { $_->standing_penalty->name eq 'PATRON_EXCEEDS_FINES' }
@{$u->standing_penalties};
}
@@ -255,7 +256,7 @@
sub too_many_overdue {
my $self = shift;
if( $self->{user}->standing_penalties ) {
- return grep { $_->penalty_type eq 'PATRON_EXCEEDS_OVERDUE_COUNT' }
+ return grep { $_->standing_penalty->name eq 'PATRON_EXCEEDS_OVERDUE_COUNT' }
@{$self->{user}->standing_penalties};
}
return 0;
@@ -283,7 +284,7 @@
my $self = shift;
syslog('LOG_DEBUG', 'OILS: Patron->excessive_fines()');
if( $self->{user}->standing_penalties ) {
- return grep { $_->penalty_type eq 'PATRON_EXCEEDS_FINES' }
+ return grep { $_->standing_penalty->name eq 'PATRON_EXCEEDS_FINES' }
@{$self->{user}->standing_penalties};
}
return 0;
@@ -296,7 +297,7 @@
my $self = shift;
syslog('LOG_DEBUG', 'OILS: Patron->excessive_fees()');
if( $self->{user}->standing_penalties ) {
- return grep { $_->penalty_type eq 'PATRON_EXCEEDS_FINES' }
+ return grep { $_->standing_penalty->name eq 'PATRON_EXCEEDS_FINES' }
@{$self->{user}->standing_penalties};
}
return 0;
More information about the open-ils-commits
mailing list