Koha/C4/SIP/ILS/Transaction/Checkin.pm
Chris Cormack ca1d6576c5 SIP returns (checkin) working now
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-06 06:33:17 -06:00

54 lines
832 B
Perl

#
# An object to handle checkin status
#
package ILS::Transaction::Checkin;
use warnings;
use strict;
use POSIX qw(strftime);
use ILS;
use ILS::Transaction;
use C4::Circulation;
our @ISA = qw(ILS::Transaction);
my %fields = (
magnetic => 0,
sort_bin => undef,
);
sub new {
my $class = shift;;
my $self = $class->SUPER::new();
my $element;
foreach $element (keys %fields) {
$self->{_permitted}->{$element} = $fields{$element};
}
@{$self}{keys %fields} = values %fields;
return bless $self, $class;
}
sub do_checkin {
my $self = shift;
my $barcode = $self->{item}->{id};
my $branch='ALB'; # gotta set this
my $return = AddReturn($barcode,$branch);
$self->ok($return);
return 1;
}
sub resensitize {
my $self = shift;
return !$self->{item}->magnetic;
}
1;