Bug 33164: Do not prevent processing of all error messages

This follow-up patch removes the use of $exit_required_p completely. The sysprefs BlockReturnOfLostItems and BlockReturnOfWithdrawnItems are handled in other scripts, and should not prevent the processing of all returns error messages when enabled.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Aleisha Amohia 2023-10-23 22:28:55 +00:00 committed by Tomas Cohen Arazi
parent 1f56880812
commit 64460e4f4e
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -659,7 +659,6 @@ if ( $messages->{TransferredRecall} ) {
my @errmsgloop;
foreach my $code ( keys %$messages ) {
my %err;
my $exit_required_p = 0;
if ( $code eq 'BadBarcode' ) {
$err{badbarcode} = 1;
$err{msg} = $messages->{'BadBarcode'};
@ -697,7 +696,6 @@ foreach my $code ( keys %$messages ) {
}
elsif ( $code eq 'withdrawn' ) {
$err{withdrawn} = 1;
$exit_required_p = 1 if C4::Context->preference("BlockReturnOfWithdrawnItems");
}
elsif ( $code eq 'WrongTransfer' ) {
; # FIXME... anything to do here?
@ -753,7 +751,6 @@ foreach my $code ( keys %$messages ) {
if (%err) {
push( @errmsgloop, \%err );
}
last if $exit_required_p;
}
$template->param( errmsgloop => \@errmsgloop );