Lines 80-93
sub to_library {
Link Here
|
80 |
|
80 |
|
81 |
=head3 transit |
81 |
=head3 transit |
82 |
|
82 |
|
83 |
Set the transfer as in transit by updating the datesent time. |
83 |
$transfer->transit({ [ skip_record_index => 0|1 ] }); |
|
|
84 |
|
85 |
Set the transfer as in transit by updating the I<datesent> time. |
84 |
|
86 |
|
85 |
Also, update date last seen and ensure item holdingbranch is correctly set. |
87 |
Also, update date last seen and ensure item holdingbranch is correctly set. |
86 |
|
88 |
|
|
|
89 |
An optional I<skip_record_index> parameter can be passed to avoid triggering |
90 |
reindex. |
91 |
|
87 |
=cut |
92 |
=cut |
88 |
|
93 |
|
89 |
sub transit { |
94 |
sub transit { |
90 |
my ($self) = @_; |
95 |
my ($self, $params) = @_; |
91 |
|
96 |
|
92 |
# Throw exception if item is still checked out |
97 |
# Throw exception if item is still checked out |
93 |
Koha::Exceptions::Item::Transfer::OnLoan->throw() if ( $self->item->checkout ); |
98 |
Koha::Exceptions::Item::Transfer::OnLoan->throw() if ( $self->item->checkout ); |
Lines 107-113
sub transit {
Link Here
|
107 |
} |
112 |
} |
108 |
)->store; |
113 |
)->store; |
109 |
|
114 |
|
110 |
ModDateLastSeen( $self->item->itemnumber ); |
115 |
ModDateLastSeen( $self->item->itemnumber, undef, { skip_record_index => $params->{skip_record_index} } ); |
111 |
return $self; |
116 |
return $self; |
112 |
|
117 |
|
113 |
} |
118 |
} |
114 |
- |
|
|