Bugzilla – Attachment 183717 Details for
Bug 40296
Bookings that are checked out do not have status updated to completed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40296: Mark booking as completed when issuing
Bug-40296-Mark-booking-as-completed-when-issuing.patch (text/plain), 1.45 KB, created by
Lucas Gass (lukeg)
on 2025-07-02 20:18:29 UTC
(
hide
)
Description:
Bug 40296: Mark booking as completed when issuing
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2025-07-02 20:18:29 UTC
Size:
1.45 KB
patch
obsolete
>From 3fb9b8c5e36ae3969a5f5c454b3b2987d5c55f70 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 2 Jul 2025 20:17:39 +0000 >Subject: [PATCH] Bug 40296: Mark booking as completed when issuing > >--- > C4/Circulation.pm | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index bf93c32a590..60c8c209acc 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1766,6 +1766,17 @@ sub AddIssue { > # In the case that the borrower has an on-site checkout > # and SwitchOnSiteCheckouts is enabled this converts it to a regular checkout > $issue = Koha::Checkouts->find( { itemnumber => $item_object->itemnumber } ); >+ >+ #if this checkout is a booking mark it as completed >+ if ( >+ my $booking = $item_object->find_booking( >+ { checkout_date => $issuedate, due_date => $datedue, patron_id => $patron->borrowernumber } >+ ) >+ ) >+ { >+ $booking->status('completed')->store; >+ } >+ > if ($issue) { > $issue->set($issue_attributes)->store; > } else { >@@ -1783,6 +1794,7 @@ sub AddIssue { > ); > } > $issue->discard_changes; >+ > $patron->update_lastseen('check_out'); > if ( $item_object->location > && $item_object->location eq 'CART' >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40296
:
183717
|
183743
|
183744
|
183745