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

(-)a/C4/Circulation.pm (-1 / +9 lines)
Lines 834-839 sub CanBookBeIssued { Link Here
834
                interface      => C4::Context->interface,
834
                interface      => C4::Context->interface,
835
            }
835
            }
836
        );
836
        );
837
838
        #increment items.localuse
839
        my $localuse_count = $item_object->localuse;
840
        $localuse_count++;
841
        $item_object->localuse( $localuse_count )->store;
842
837
        my $block_lost_return = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0;
843
        my $block_lost_return = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0;
838
        my ( $stats_return, $stats_messages, $stats_iteminformation, $stats_borrower ) =
844
        my ( $stats_return, $stats_messages, $stats_iteminformation, $stats_borrower ) =
839
            AddReturn( $item_object->barcode, C4::Context->userenv->{'branch'} );
845
            AddReturn( $item_object->barcode, C4::Context->userenv->{'branch'} );
Lines 2153-2158 sub AddReturn { Link Here
2153
2159
2154
    my $itemnumber = $item->itemnumber;
2160
    my $itemnumber = $item->itemnumber;
2155
    my $itemtype = $item->effective_itemtype;
2161
    my $itemtype = $item->effective_itemtype;
2162
    my $localuse_count = $item->localuse;
2156
2163
2157
    my $issue  = $item->checkout;
2164
    my $issue  = $item->checkout;
2158
    if ( $issue ) {
2165
    if ( $issue ) {
Lines 2168-2173 sub AddReturn { Link Here
2168
        # No issue, no borrowernumber.  ONLY if $doreturn, *might* you have a $borrower later.
2175
        # No issue, no borrowernumber.  ONLY if $doreturn, *might* you have a $borrower later.
2169
        # Record this as a local use, instead of a return, if the RecordLocalUseOnReturn is on
2176
        # Record this as a local use, instead of a return, if the RecordLocalUseOnReturn is on
2170
        if (C4::Context->preference("RecordLocalUseOnReturn")) {
2177
        if (C4::Context->preference("RecordLocalUseOnReturn")) {
2178
           $localuse_count++;
2179
           $item->localuse( $localuse_count )->store;
2171
           $messages->{'LocalUse'} = 1;
2180
           $messages->{'LocalUse'} = 1;
2172
           $stat_type = 'localuse';
2181
           $stat_type = 'localuse';
2173
        }
2182
        }
2174
- 

Return to bug 16122