Bug 27993: Add handling for datecancelled in in_transit

This patch adds handling for the datecancelled field in the in_transit
method.

Test plan
1/ Run the new unit test in t/db_dependent/Koha/Item/Transfer.t

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2021-03-19 13:31:49 +00:00 committed by Jonathan Druart
parent 87cc346e48
commit b60fe963f9
1 changed files with 3 additions and 1 deletions

View File

@ -94,7 +94,9 @@ Boolean returning whether the transfer is in transit or waiting
sub in_transit {
my ($self) = @_;
return ( defined( $self->datesent ) && !defined( $self->datearrived ) );
return ( defined( $self->datesent )
&& !defined( $self->datearrived )
&& !defined( $self->datecancelled ) );
}
=head3 receive