adding openncip / opensip SIP2 service
[koha.git] / C4 / SIP / ILS / Transaction / Checkout.pm
1 #
2 # An object to handle checkout status
3 #
4
5 package ILS::Transaction::Checkout;
6
7 use warnings;
8 use strict;
9
10 use POSIX qw(strftime);
11
12 use ILS;
13 use ILS::Transaction;
14
15 our @ISA = qw(ILS::Transaction);
16
17 # Most fields are handled by the Transaction superclass
18 my %fields = (
19               security_inhibit => 0,
20               due              => undef,
21               renew_ok         => 0,
22               );
23
24 sub new {
25     my $class = shift;;
26     my $self = $class->SUPER::new();
27     my $element;
28
29     foreach $element (keys %fields) {
30         $self->{_permitted}->{$element} = $fields{$element};
31     }
32
33     @{$self}{keys %fields} = values %fields;
34     $self->{'due'} = time() + (60*60*24*14); # two weeks hence
35     
36     return bless $self, $class;
37 }
38
39 1;