2 # Status of a Renew Transaction
5 package ILS::Transaction::Renew;
16 our @ISA = qw(ILS::Transaction);
24 my $self = $class->SUPER::new();
26 foreach my $element (keys %fields) {
27 $self->{_permitted}->{$element} = $fields{$element};
30 @{$self}{keys %fields} = values %fields; # overkill?
31 return bless $self, $class;
37 my ($renewokay,$renewerror) = CanBookBeRenewed($borrower->{borrowernumber},$self->{item}->{itemnumber});
39 $self->{due} = AddIssue( $borrower, $self->{item}->id, undef, 0 );
42 $self->screen_msg(($self->screen_msg || '') . " " . $renewerror);
45 $! and warn "do_renew_for error: $!";
46 $self->ok(1) unless $!;
52 my $borrower = GetMember( 'cardnumber'=>$self->{patron}->id);
53 return $self->do_renew_for($borrower);