Bugzilla – Attachment 161146 Details for
Bug 16122
Item record needs to keep local use count
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16122: Increment items.localuse in AddReturn
Bug-16122-Increment-itemslocaluse-in-AddReturn.patch (text/plain), 1.67 KB, created by
Lucas Gass (lukeg)
on 2024-01-18 18:32:23 UTC
(
hide
)
Description:
Bug 16122: Increment items.localuse in AddReturn
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-01-18 18:32:23 UTC
Size:
1.67 KB
patch
obsolete
>From 645fce62b0f09e0e334827b3339721ea2f2c156d Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 12 Jan 2024 22:47:07 +0000 >Subject: [PATCH] Bug 16122: Increment items.localuse in AddReturn > >--- > C4/Circulation.pm | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 109809d4b9..0e0a6d0a68 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -834,6 +834,12 @@ sub CanBookBeIssued { > interface => C4::Context->interface, > } > ); >+ >+ #increment items.localuse >+ my $localuse_count = $item_object->localuse; >+ $localuse_count++; >+ $item_object->localuse( $localuse_count )->store; >+ > my $block_lost_return = C4::Context->preference("BlockReturnOfLostItems") ? 1 : 0; > my ( $stats_return, $stats_messages, $stats_iteminformation, $stats_borrower ) = > AddReturn( $item_object->barcode, C4::Context->userenv->{'branch'} ); >@@ -2153,6 +2159,7 @@ sub AddReturn { > > my $itemnumber = $item->itemnumber; > my $itemtype = $item->effective_itemtype; >+ my $localuse_count = $item->localuse; > > my $issue = $item->checkout; > if ( $issue ) { >@@ -2168,6 +2175,8 @@ sub AddReturn { > # No issue, no borrowernumber. ONLY if $doreturn, *might* you have a $borrower later. > # Record this as a local use, instead of a return, if the RecordLocalUseOnReturn is on > if (C4::Context->preference("RecordLocalUseOnReturn")) { >+ $localuse_count++; >+ $item->localuse( $localuse_count )->store; > $messages->{'LocalUse'} = 1; > $stat_type = 'localuse'; > } >-- >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 16122
:
149281
|
149282
|
149283
|
149284
|
150231
|
150232
|
150233
|
150234
|
150235
|
150236
|
150623
|
150693
|
153193
|
153196
|
153197
|
153198
|
153199
|
153200
|
158466
|
158467
|
158468
|
158469
|
158470
|
158471
|
161001
|
161002
|
161003
|
161004
|
161005
|
161006
|
161144
|
161145
|
161146
|
161147
|
161148
|
161149
|
161150
|
161151
|
161153
|
161154
|
161155
|
161156
|
161157
|
161158
|
161159
|
161160
|
163072
|
163073
|
163074
|
163075
|
163076
|
163077
|
163243
|
163244
|
163245
|
163246
|
163247
|
163248
|
163296
|
163297
|
163298
|
163299
|
163300
|
163301
|
163302
|
163303
|
165313
|
165314
|
165315
|
165316
|
165317
|
165318
|
165319
|
165320