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 226-239 if ($borrower->{cardnumber}) { Link Here
226
    my @issues;
226
    my @issues;
227
    my ($issueslist) = GetPendingIssues( $borrower->{'borrowernumber'} );
227
    my ($issueslist) = GetPendingIssues( $borrower->{'borrowernumber'} );
228
    foreach my $it (@$issueslist) {
228
    foreach my $it (@$issueslist) {
229
        my ($renewokay, $renewerror) = CanBookBeIssued(
229
        my ($can_be_renewed, $renew_error) = CanBookBeRenewed(
230
            $borrower,
230
            $borrower->{borrowernumber},
231
            $it->{'barcode'},
231
            $it->{itemnumber},
232
            undef,
233
            0,
234
            C4::Context->preference("AllowItemsOnHoldCheckoutSCO")
235
        );
232
        );
236
        $it->{'norenew'} = 1 if $renewokay->{'NO_MORE_RENEWALS'};
233
        $it->{can_be_renewed} = $can_be_renewed;
234
        $it->{renew_error} = $renew_error;
237
        $it->{date_due}  = $it->{date_due_sql};
235
        $it->{date_due}  = $it->{date_due_sql};
238
        push @issues, $it;
236
        push @issues, $it;
239
    }
237
    }
240
- 

Return to bug 16873