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

(-)a/C4/Circulation.pm (-1 / +12 lines)
Lines 1766-1771 sub AddIssue { Link Here
1766
            # In the case that the borrower has an on-site checkout
1766
            # In the case that the borrower has an on-site checkout
1767
            # and SwitchOnSiteCheckouts is enabled this converts it to a regular checkout
1767
            # and SwitchOnSiteCheckouts is enabled this converts it to a regular checkout
1768
            $issue = Koha::Checkouts->find( { itemnumber => $item_object->itemnumber } );
1768
            $issue = Koha::Checkouts->find( { itemnumber => $item_object->itemnumber } );
1769
1770
            #if this checkout is a booking mark it as completed
1771
            if (
1772
                my $booking = $item_object->find_booking(
1773
                    { checkout_date => $issuedate, due_date => $datedue, patron_id => $patron->borrowernumber }
1774
                )
1775
                )
1776
            {
1777
                $booking->status('completed')->store;
1778
            }
1779
1769
            if ($issue) {
1780
            if ($issue) {
1770
                $issue->set($issue_attributes)->store;
1781
                $issue->set($issue_attributes)->store;
1771
            } else {
1782
            } else {
Lines 1783-1788 sub AddIssue { Link Here
1783
                );
1794
                );
1784
            }
1795
            }
1785
            $issue->discard_changes;
1796
            $issue->discard_changes;
1797
1786
            $patron->update_lastseen('check_out');
1798
            $patron->update_lastseen('check_out');
1787
            if (   $item_object->location
1799
            if (   $item_object->location
1788
                && $item_object->location eq 'CART'
1800
                && $item_object->location eq 'CART'
1789
- 

Return to bug 40296