From: djfiander Date: Sun, 16 Apr 2006 15:47:07 +0000 (+0000) Subject: Minor cleanups. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=86e01e6ae60a5ad2d775f2f0fdb0144e702b3b5f;p=working%2FSIPServer.git Minor cleanups. move available() method out of Transaction and into Item. --- diff --git a/ILS/Item.pm b/ILS/Item.pm index 0d214a4..91b8830 100644 --- a/ILS/Item.pm +++ b/ILS/Item.pm @@ -133,10 +133,10 @@ sub owner { return 'UWOLS'; } -sub hold_queue_length { +sub hold_queue { my $self = shift; - return scalar @{$self->{hold_queue}}; + return @{$self->{hold_queue}}; } sub hold_queue_position { @@ -181,5 +181,9 @@ sub print_line { return $self->{print_line} || ''; } +sub available { + my $self = shift; + return (!$self->{patron_id} && !$self->{hold_queue}); +} 1;