-
- 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,
- );
+ if( !$blocker ){
+ my $confirm_required = 0;
+ unless($issueconfirmed){
+ # Get the item title for more information
+ my $getmessageiteminfo = GetBiblioFromItemNumber(undef,$barcode);
+ $template->param( itemhomebranch => $getmessageiteminfo->{'homebranch'} );
+
+ # pass needsconfirmation to template if issuing is possible and user hasn't yet confirmed.
+ foreach my $needsconfirmation ( keys %$question ) {
+ $template->param(
+ $needsconfirmation => $$question{$needsconfirmation},
+ getTitleMessageIteminfo => $getmessageiteminfo->{'title'},
+ NEEDSCONFIRMATION => 1
+ );
+ $confirm_required = 1;
+ }
+ }
+ unless($confirm_required) {
+ AddIssue( $borrower, $barcode, $datedue, $cancelreserve );
+ $inprocess = 1;
+ if($globalduedate && ! $stickyduedate && $duedatespec_allow ){
+ $duedatespec = $globalduedate->output();
+ $stickyduedate = 1;
+ }
+ }