Bugzilla – Attachment 131566 Details for
Bug 1526
Catalogue detail page does not show reserve status
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15261: Prevent checkout only if for a different borrower
Bug-15261-Prevent-checkout-only-if-for-a-different.patch (text/plain), 2.26 KB, created by
Henri-Damien LAURENT
on 2022-03-10 15:21:50 UTC
(
hide
)
Description:
Bug 15261: Prevent checkout only if for a different borrower
Filename:
MIME Type:
Creator:
Henri-Damien LAURENT
Created:
2022-03-10 15:21:50 UTC
Size:
2.26 KB
patch
obsolete
>From 73ca6d20c38815b2ee5604464df56e8a86e4e803 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 12 Feb 2020 10:19:18 +0100 >Subject: [PATCH] Bug 15261: Prevent checkout only if for a different borrower > >https://bugs.koha-community.org/show_bug.cgi?id=1526 >--- > C4/Circulation.pm | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 9596a1026e..5ac47093e8 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1158,17 +1158,17 @@ sub CanBookBeIssued { > ReservesOnSamePeriod($item_object->biblionumber, $item_object->itemnumber, $now->ymd, $duedate->ymd); > if ($preventCheckoutOnSameReservePeriod && $reserves_on_same_period) { > my $reserve = $reserves_on_same_period->[0]; >- my $patron = Koha::Patrons->find( $reserve->{borrowernumber} ); >- my $branchname = Koha::Libraries->find($reserve->{branchcode})->branchname; >- >- $needsconfirmation{RESERVED} = 1; >- $needsconfirmation{resfirstname} = $patron->firstname; >- $needsconfirmation{ressurname} = $patron->surname; >- $needsconfirmation{rescardnumber} = $patron->cardnumber; >- $needsconfirmation{resborrowernumber} = $patron->borrowernumber; >- $needsconfirmation{resbranchcode} = $patron->branchcode; >- $needsconfirmation{resreservedate} = $reserve->{reservedate}; >- $needsconfirmation{reserve_id} = $reserve->{reserve_id}; >+ if ($reserve->{borrowernumber} ne $patron->borrowernumber) { >+ my $patron = Koha::Patrons->find( $reserve->{borrowernumber} ); >+ $needsconfirmation{RESERVED} = 1; >+ $needsconfirmation{resfirstname} = $patron->firstname; >+ $needsconfirmation{ressurname} = $patron->surname; >+ $needsconfirmation{rescardnumber} = $patron->cardnumber; >+ $needsconfirmation{resborrowernumber} = $patron->borrowernumber; >+ $needsconfirmation{resbranchcode} = $patron->branchcode; >+ $needsconfirmation{resreservedate} = $reserve->{reservedate}; >+ $needsconfirmation{reserve_id} = $reserve->{reserve_id}; >+ } > } > > } >-- >2.30.2
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 1526
:
131561
|
131562
|
131563
|
131564
|
131565
| 131566 |
131567
|
131568