Lines 28-33
use Koha::DateUtils qw( dt_from_string );
Link Here
|
28 |
use C4::Context; |
28 |
use C4::Context; |
29 |
use C4::Circulation; |
29 |
use C4::Circulation; |
30 |
use C4::Reserves; |
30 |
use C4::Reserves; |
|
|
31 |
use C4::ClassSource; # FIXME We would like to avoid that |
32 |
|
31 |
use Koha::Checkouts; |
33 |
use Koha::Checkouts; |
32 |
use Koha::CirculationRules; |
34 |
use Koha::CirculationRules; |
33 |
use Koha::Item::Transfer::Limits; |
35 |
use Koha::Item::Transfer::Limits; |
Lines 67-74
sub store {
Link Here
|
67 |
$self->itype($self->biblio->biblioitem->itemtype); |
69 |
$self->itype($self->biblio->biblioitem->itemtype); |
68 |
} |
70 |
} |
69 |
|
71 |
|
|
|
72 |
my $today = dt_from_string; |
70 |
unless ( $self->in_storage ) { #AddItem |
73 |
unless ( $self->in_storage ) { #AddItem |
71 |
my $today = dt_from_string; |
|
|
72 |
unless ( $self->permanent_location ) { |
74 |
unless ( $self->permanent_location ) { |
73 |
$self->permanent_location($self->location); |
75 |
$self->permanent_location($self->location); |
74 |
} |
76 |
} |
Lines 79-84
sub store {
Link Here
|
79 |
$self->datelastseen($today); |
81 |
$self->datelastseen($today); |
80 |
} |
82 |
} |
81 |
|
83 |
|
|
|
84 |
unless ( $self->dateaccessioned ) { |
85 |
$self->dateaccessioned($today); |
86 |
} |
87 |
|
88 |
if ( $self->itemcallnumber ) { # This could be improved, we should recalculate it only if changed |
89 |
my $cn_sort = GetClassSort($self->cn_source, $self->itemcallnumber, ""); |
90 |
$self->cn_sort($cn_sort); |
91 |
} |
82 |
} |
92 |
} |
83 |
|
93 |
|
84 |
unless ( $self->dateaccessioned ) { |
94 |
unless ( $self->dateaccessioned ) { |
85 |
- |
|
|