From: Chris Cormack Date: Sun, 13 Jan 2008 23:59:41 +0000 (-0600) Subject: Fix for bug 1428 X-Git-Tag: v3.00.00-beta~595 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=6fcd1a6ae335e26369e0d98ab737d8056fbe0025;p=koha_fer Fix for bug 1428 Signed-off-by: Joshua Ferraro --- 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},