- delete $question->{'DEBT'} if ($debt_confirmed);
- foreach my $impossible ( keys %$error ) {
- $template->param(
- $impossible => $$error{$impossible},
- IMPOSSIBLE => 1
- );
- $noerror = 0;
- }
-
- 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){ # FIXME: Do something? Or is this to *intentionally* do nothing?
- }
- else {
- my $noquestion = 1;
-# Get the item title for more information
- my $getmessageiteminfo = GetBiblioFromItemNumber(undef,$barcode);
- if ($noerror) {
- # only pass needsconfirmation to template if issuing is possible
- foreach my $needsconfirmation ( keys %$question ) {
- $template->param(
- $needsconfirmation => $$question{$needsconfirmation},
- getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
- NEEDSCONFIRMATION => 1
- );
- $noquestion = 0;
- }
- # Because of the weird conditional structure (empty elsif block),
- # if we reached here, $issueconfirmed must be false.
- # Also, since we moved inside the if ($noerror) conditional,
- # this old chunky conditional can be simplified:
- # if ( $noerror && ( $noquestion || $issueconfirmed ) ) {
- if ($noquestion) {
- AddIssue( $borrower, $barcode, $datedue );
- $inprocess = 1;
- }
- }
- $template->param(
- itemhomebranch => $getmessageiteminfo->{'homebranch'} ,
- duedatespec => $duedatespec,