From b60fe963f91a370fd254b23f1104fd660fbeee38 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 19 Mar 2021 13:31:49 +0000 Subject: [PATCH] Bug 27993: Add handling for datecancelled in in_transit MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Joonas Kylmälä Signed-off-by: Jonathan Druart --- Koha/Item/Transfer.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Koha/Item/Transfer.pm b/Koha/Item/Transfer.pm index 8f4284f53a..96e652df28 100644 --- a/Koha/Item/Transfer.pm +++ b/Koha/Item/Transfer.pm @@ -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 -- 2.39.5