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

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt (-9 / +14 lines)
Lines 250-264 Link Here
250
                                                    <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
250
                                                    <form action="/cgi-bin/koha/sco/sco-main.pl" method="post">
251
                                                        <input type="hidden" name="patronid" value="[% patronid %]" />
251
                                                        <input type="hidden" name="patronid" value="[% patronid %]" />
252
                                                        <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
252
                                                        <input type="hidden" name="barcode" value="[% ISSUE.barcode %]" />
253
                                                        [% IF ( ISSUE.norenew ) %]
253
                                                        [% IF ISSUE.can_be_renewed %]
254
                                                            [% IF ( AllowSelfCheckReturns ) %]
255
                                                                <input type="submit" value="Check in item" name="confirm" class="btn return" />
256
                                                                <input type="hidden" name="op" value="returnbook" />
257
                                                                <input type="hidden" name="confirmed" value=""  />
258
                                                            [% ELSE %]
259
                                                                <span>No renewals allowed</span>
260
                                                            [% END %]
261
                                                        [% ELSE %]
262
                                                            <input type="hidden" name="op" value="checkout" />
254
                                                            <input type="hidden" name="op" value="checkout" />
263
                                                            <input type="hidden" name="confirmed" value="1" />
255
                                                            <input type="hidden" name="confirmed" value="1" />
264
                                                            [% UNLESS ( ISSUE.renew ) %]
256
                                                            [% UNLESS ( ISSUE.renew ) %]
Lines 266-271 Link Here
266
                                                            [% ELSE %]
258
                                                            [% ELSE %]
267
                                                                <input type="submit" value="Renew item" class="btn renew" />
259
                                                                <input type="submit" value="Renew item" class="btn renew" />
268
                                                            [% END %]
260
                                                            [% END %]
261
                                                        [% ELSE %]
262
                                                            [% IF ISSUE.renew_error == 'auto_renew' OR ISSUE.renew_error == 'auto_too_soon' %]
263
                                                                <span>This item has been scheduled for automatic renewal and cannot be renewed</span>
264
                                                            [% ELSIF ISSUE.renew_error == 'onsite_checkout' %]
265
                                                                <span>This is a on-site checkout, it cannot be renewed.</span>
266
                                                            [% ELSE %]
267
                                                                <span>No renewals allowed</span>
268
                                                            [% END %]
269
                                                            [% IF AllowSelfCheckReturns %]
270
                                                                <input type="submit" value="Check in item" name="confirm" class="btn return" />
271
                                                                <input type="hidden" name="op" value="returnbook" />
272
                                                                <input type="hidden" name="confirmed" value=""  />
273
                                                            [% END %]
269
                                                        [% END %]
274
                                                        [% END %]
270
                                                    </form>
275
                                                    </form>
271
                                                </td>
276
                                                </td>
(-)a/opac/sco/sco-main.pl (-8 / +5 lines)
Lines 227-240 if ($borrower->{cardnumber}) { Link Here
227
    my @issues;
227
    my @issues;
228
    my ($issueslist) = GetPendingIssues( $borrower->{'borrowernumber'} );
228
    my ($issueslist) = GetPendingIssues( $borrower->{'borrowernumber'} );
229
    foreach my $it (@$issueslist) {
229
    foreach my $it (@$issueslist) {
230
        my ($renewokay, $renewerror) = CanBookBeIssued(
230
        my ($can_be_renewed, $renew_error) = CanBookBeRenewed(
231
            $borrower,
231
            $borrower->{borrowernumber},
232
            $it->{'barcode'},
232
            $it->{itemnumber},
233
            undef,
234
            0,
235
            C4::Context->preference("AllowItemsOnHoldCheckout")
236
        );
233
        );
237
        $it->{'norenew'} = 1 if $renewokay->{'NO_MORE_RENEWALS'};
234
        $it->{can_be_renewed} = $can_be_renewed;
235
        $it->{renew_error} = $renew_error;
238
        $it->{date_due}  = $it->{date_due_sql};
236
        $it->{date_due}  = $it->{date_due_sql};
239
        push @issues, $it;
237
        push @issues, $it;
240
    }
238
    }
241
- 

Return to bug 16873