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

(-)a/C4/Circulation.pm (-2 / +12 lines)
Lines 2214-2219 sub MarkIssueReturned { Link Here
2214
    # FIXME Improve the return value and handle it from callers
2214
    # FIXME Improve the return value and handle it from callers
2215
    $schema->txn_do(sub {
2215
    $schema->txn_do(sub {
2216
2216
2217
        my $patron = Koha::Patrons->find( $borrowernumber );
2218
2219
        # Remove any OVERDUES related debarment if the borrower has no overdues
2220
        if ( C4::Context->preference('AutoRemoveOverduesRestrictions')
2221
          && $patron->debarred
2222
          && !$patron->has_overdues
2223
          && @{ GetDebarments({ borrowernumber => $borrowernumber, type => 'OVERDUES' }) }
2224
        ) {
2225
            DelUniqueDebarment({ borrowernumber => $borrowernumber, type => 'OVERDUES' });
2226
        }
2227
2228
2217
        # Update the returndate value
2229
        # Update the returndate value
2218
        if ( $returndate ) {
2230
        if ( $returndate ) {
2219
            $issue->returndate( $returndate )->store->discard_changes; # update and refetch
2231
            $issue->returndate( $returndate )->store->discard_changes; # update and refetch
Lines 2237-2243 sub MarkIssueReturned { Link Here
2237
2249
2238
        if ( C4::Context->preference('StoreLastBorrower') ) {
2250
        if ( C4::Context->preference('StoreLastBorrower') ) {
2239
            my $item = Koha::Items->find( $itemnumber );
2251
            my $item = Koha::Items->find( $itemnumber );
2240
            my $patron = Koha::Patrons->find( $borrowernumber );
2241
            $item->last_returned_by( $patron );
2252
            $item->last_returned_by( $patron );
2242
        }
2253
        }
2243
    });
2254
    });
2244
- 

Return to bug 24413