2 # Status of a Renew Transaction
5 package ILS::Transaction::Renew;
15 use parent qw(ILS::Transaction);
23 my $self = $class->SUPER::new();
25 foreach my $element (keys %fields) {
26 $self->{_permitted}->{$element} = $fields{$element};
29 @{$self}{keys %fields} = values %fields; # overkill?
30 return bless $self, $class;
36 my ($renewokay,$renewerror) = CanBookBeRenewed($borrower->{borrowernumber},$self->{item}->{itemnumber});
39 my $due_date = AddIssue( $borrower, $self->{item}->id, undef, 0 );
41 $self->{due} = $due_date;
45 $renewerror=~s/on_reserve/Item unavailable due to outstanding holds/;
46 $renewerror=~s/too_many/Item has reached maximum renewals/;
47 $self->screen_msg($renewerror);
56 my $borrower = GetMember( cardnumber => $self->{patron}->id );
57 return $self->do_renew_for($borrower);