From 6fcd1a6ae335e26369e0d98ab737d8056fbe0025 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Sun, 13 Jan 2008 17:59:41 -0600 Subject: [PATCH] Fix for bug 1428 Signed-off-by: Joshua Ferraro --- circ/circulation.pl | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 38c678e867..124b59073c 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -260,26 +260,30 @@ if ($borrowernumber) { if ($barcode) { # $barcode = cuecatbarcodedecode($barcode); + # always check for blockers on issuing + my ( $error, $question ) = + CanBookBeIssued( $borrower, $barcode, $datedue , $inprocess ); + my $noerror = 1; + foreach my $impossible ( keys %$error ) { + $template->param( + $impossible => $$error{$impossible}, + IMPOSSIBLE => 1 + ); + $noerror = 0; + } - if ($issueconfirmed) { + if ($issueconfirmed && $noerror) { + # we have no blockers for issuing and any issues needing confirmation have been resolved AddIssue( $borrower, $barcode, $datedue, $cancelreserve ); $inprocess = 1; } + elsif ($issueconfirmed){ + } else { - my ( $error, $question ) = - CanBookBeIssued( $borrower, $barcode, $datedue , $inprocess ); - my $noerror = 1; my $noquestion = 1; # Get the item title for more information my $getmessageiteminfo = GetBiblioFromItemNumber(undef,$barcode); - foreach my $impossible ( keys %$error ) { - $template->param( - $impossible => $$error{$impossible}, - IMPOSSIBLE => 1 - ); - $noerror = 0; - } foreach my $needsconfirmation ( keys %$question ) { $template->param( $needsconfirmation => $$question{$needsconfirmation}, -- 2.39.5