View | Details | Raw Unified | Return to bug 26301
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-1 / +1 lines)
Lines 316-322 Link Here
316
                                                                    <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
316
                                                                    <input type="hidden" name="barcode" value="[% ISSUE.barcode | html %]" />
317
                                                                    <input type="hidden" name="newissues" value="[% newissues | html %]" />
317
                                                                    <input type="hidden" name="newissues" value="[% newissues | html %]" />
318
                                                                    [% IF ISSUE.can_be_renewed %]
318
                                                                    [% IF ISSUE.can_be_renewed %]
319
                                                                        <input type="hidden" name="op" value="checkout" />
319
                                                                        <input type="hidden" name="op" value="renew" />
320
                                                                        <input type="hidden" name="confirmed" value="1" />
320
                                                                        <input type="hidden" name="confirmed" value="1" />
321
                                                                        [% UNLESS ( ISSUE.renew ) %]
321
                                                                        [% UNLESS ( ISSUE.renew ) %]
322
                                                                            <input type="submit" value="Renew item"  name="confirm  " class="btn renew" />
322
                                                                            <input type="submit" value="Renew item"  name="confirm  " class="btn renew" />
(-)a/opac/sco/sco-main.pl (-13 / +14 lines)
Lines 139-145 elsif ( $op eq "returnbook" && $allowselfcheckreturns ) { Link Here
139
    my ($doreturn) = AddReturn( $barcode, $branch );
139
    my ($doreturn) = AddReturn( $barcode, $branch );
140
    $template->param( returned => $doreturn );
140
    $template->param( returned => $doreturn );
141
}
141
}
142
elsif ( $patron && ( $op eq 'checkout' || $op eq 'renew' ) ) {
142
elsif ( $patron && ( $op eq 'checkout' ) ) {
143
    my $impossible  = {};
143
    my $impossible  = {};
144
    my $needconfirm = {};
144
    my $needconfirm = {};
145
    ( $impossible, $needconfirm ) = CanBookBeIssued(
145
    ( $impossible, $needconfirm ) = CanBookBeIssued(
Lines 183-204 elsif ( $patron && ( $op eq 'checkout' || $op eq 'renew' ) ) { Link Here
183
                barcode    => $barcode,
183
                barcode    => $barcode,
184
            );
184
            );
185
        }
185
        }
186
    } elsif ( $needconfirm->{RENEW_ISSUE} || $op eq 'renew' ) {
186
    } elsif ( $needconfirm->{RENEW_ISSUE} ){
187
        if ($confirmed) {
187
        $template->param(
188
            #warn "renewing";
189
            AddRenewal( $borrower->{borrowernumber}, $item->itemnumber );
190
            push @newissueslist, $barcode;
191
            $template->param( renewed => 1 );
192
        } else {
193
            #warn "renew confirmation";
194
            $template->param(
195
                renew               => 1,
188
                renew               => 1,
196
                barcode             => $barcode,
189
                barcode             => $barcode,
197
                confirm             => 1,
190
                confirm             => 1,
198
                confirm_renew_issue => 1,
191
                confirm_renew_issue => 1,
199
                hide_main           => 1,
192
                hide_main           => 1,
200
            );
193
        );
201
        }
202
    } elsif ( $confirm_required && !$confirmed ) {
194
    } elsif ( $confirm_required && !$confirmed ) {
203
        #warn "failed confirmation";
195
        #warn "failed confirmation";
204
        $template->param(
196
        $template->param(
Lines 261-266 elsif ( $patron && ( $op eq 'checkout' || $op eq 'renew' ) ) { Link Here
261
    }
253
    }
262
} # $op
254
} # $op
263
255
256
if ( $patron && ( $op eq 'renew' ) ) {
257
    my ($status,$renewerror) = CanBookBeRenewed( $borrower->{borrowernumber}, $item->itemnumber );
258
    if ($status) {
259
        #warn "renewing";
260
        AddRenewal( $borrower->{borrowernumber}, $item->itemnumber );
261
        push @newissueslist, $barcode;
262
        $template->param( renewed => 1 );
263
    }
264
}
265
264
if ($borrower) {
266
if ($borrower) {
265
#   warn "issuer's  branchcode: " .   $issuer->{branchcode};
267
#   warn "issuer's  branchcode: " .   $issuer->{branchcode};
266
#   warn   "user's  branchcode: " . $borrower->{branchcode};
268
#   warn   "user's  branchcode: " . $borrower->{branchcode};
267
- 

Return to bug 26301