Bugzilla – Attachment 120822 Details for
Bug 15261
Verify if checkout or hold request periods overlap with existing holds
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.21 KB, created by
Fridolin Somers
on 2021-05-11 08:05:07 UTC
(
hide
)
Description:
Bug 15261: Prevent checkout only if for a different borrower
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2021-05-11 08:05:07 UTC
Size:
2.21 KB
patch
obsolete
>From a515d3085896eb45c61086309abdcd890c06b3e9 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 > >--- > C4/Circulation.pm | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 0ae1b786be..e7633a6ac9 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1165,17 +1165,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 15261
:
45216
|
45833
|
45841
|
46432
|
46433
|
46441
|
46442
|
49001
|
49002
|
49003
|
52704
|
59643
|
61534
|
61539
|
61544
|
67088
|
67094
|
67143
|
68660
|
68661
|
68662
|
68663
|
68664
|
68852
|
68853
|
72956
|
72957
|
76221
|
76222
|
88292
|
88293
|
88297
|
88298
|
92376
|
92377
|
92584
|
92585
|
92664
|
93136
|
94871
|
98383
|
98424
|
98672
|
106944
|
106949
|
120822
|
123405
|
125793
|
125794
|
125795
|
125796
|
131569
|
131570
|
131571
|
131572
|
131573