Bug 36431: Add screen message for NeedsTransfer when AutomaticItemReturn is off

Test plan:
Pick an item (without holds) with homebranch A and holdingbranch B.
(My SIP examples use RMA for A, NRD for B.)
Enable AutomaticItemReturn.
Check in this item at branch B via SIP.
* 09N20240422    10000020240422    160000APNRD|AONRD|ABperl01|
You should see something like:
* 101YNY20240422    105736AONRD|ABperl01|AQRMA|AJLearning Perl /|CSH|CTRMA|CV04|
Verify too that a transfer was started.
Now disable AutomaticItemReturn. Remove the transfer.
Check in this item at branch B via SIP.
You should see now something like:
101YNY20240422    105515AONRD|ABperl01|AQRMA|AJLearning Perl /|CSH|CTRMA|CV04|AFThis item must still be transferred to RMA branch.|
Verify that no transfer was started.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Marcel de Rooy 2024-04-22 09:04:45 +00:00 committed by Katrin Fischer
parent 67e8825830
commit 9b927e7923
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -133,6 +133,8 @@ sub do_checkin {
if ( $messages->{NeedsTransfer} ) {
$self->{item}->destination_loc( $messages->{NeedsTransfer} );
$self->alert_type('04'); # send to other branch
$self->screen_msg( "This item must still be transferred to " . $messages->{NeedsTransfer} . " branch." )
if !C4::Context->preference('AutomaticItemReturn');
}
if ( $messages->{WasTransfered} ) { # set into transit so tell unit
$self->{item}->destination_loc( $item->homebranch );