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

(-)a/C4/Circulation.pm (-2 / +2 lines)
Lines 1476-1481 sub AddIssue { Link Here
1476
                my ( $allowed, $message ) = CanBookBeReturned( $item_unblessed, C4::Context->userenv->{branch} );
1476
                my ( $allowed, $message ) = CanBookBeReturned( $item_unblessed, C4::Context->userenv->{branch} );
1477
                return unless $allowed;
1477
                return unless $allowed;
1478
                AddReturn( $item_object->barcode, C4::Context->userenv->{'branch'} );
1478
                AddReturn( $item_object->barcode, C4::Context->userenv->{'branch'} );
1479
                # AddReturn certainly has side-effects, like onloan => undef
1480
                $item_object->discard_changes;
1479
            }
1481
            }
1480
1482
1481
            C4::Reserves::MoveReserve( $item_object->itemnumber, $borrower->{'borrowernumber'}, $cancelreserve );
1483
            C4::Reserves::MoveReserve( $item_object->itemnumber, $borrower->{'borrowernumber'}, $cancelreserve );
Lines 1565-1571 sub AddIssue { Link Here
1565
            $item_object->holdingbranch(C4::Context->userenv->{'branch'});
1567
            $item_object->holdingbranch(C4::Context->userenv->{'branch'});
1566
            $item_object->itemlost(0);
1568
            $item_object->itemlost(0);
1567
            $item_object->onloan($datedue->ymd());
1569
            $item_object->onloan($datedue->ymd());
1568
            $item_object->make_column_dirty('onloan'); # Force write onloan so we don't need to fetch from db
1569
            $item_object->datelastborrowed( dt_from_string()->ymd() );
1570
            $item_object->datelastborrowed( dt_from_string()->ymd() );
1570
            $item_object->datelastseen( dt_from_string()->ymd() );
1571
            $item_object->datelastseen( dt_from_string()->ymd() );
1571
            $item_object->store({log_action => 0});
1572
            $item_object->store({log_action => 0});
1572
- 

Return to bug 27808