Bugzilla – Attachment 16090 Details for
Bug 9805
Lost items are un-lost if returned, but not if renewed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9805 - Lost items are un-lost if returned, but not if renewed.
Bug-9805---Lost-items-are-un-lost-if-returned-but-.patch (text/plain), 1.83 KB, created by
Kyle M Hall (khall)
on 2013-03-13 13:02:54 UTC
(
hide
)
Description:
Bug 9805 - Lost items are un-lost if returned, but not if renewed.
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2013-03-13 13:02:54 UTC
Size:
1.83 KB
patch
obsolete
>From 95601a31b17eb90b485b19c3ab554b2e17a15553 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 13 Mar 2013 08:36:57 -0400 >Subject: [PATCH] Bug 9805 - Lost items are un-lost if returned, but not if renewed. > >If an item has a lost status, that status is removed when the item >is returned. However, it is not removed if the item is renewed. > >Test Plan: >1) Check an item out to a patron, back date the due date 6 months >2) Run misc/cronjobs/longoverdue.pl -l 30=2 --confirm >3) Verify the item is now checked out but lost >4) Renew the item, verify the item is still lost >5) Apply this patch >6) Renew the item again, verify the item is no longer lost >--- > C4/Circulation.pm | 18 +++++++++++++++++- > 1 files changed, 17 insertions(+), 1 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index f1c8662..1bdb969 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2565,7 +2565,23 @@ sub AddRenewal { > > # Update the renewal count on the item, and tell zebra to reindex > $renews = $biblio->{'renewals'} + 1; >- ModItem({ renewals => $renews, onloan => $datedue->strftime('%Y-%m-%d %H:%M')}, $biblio->{'biblionumber'}, $itemnumber); >+ >+ # If item was lost, it has now been found, reverse any list item charges if neccessary. >+ if ( $item->{'itemlost'} ) { >+ if ( C4::Context->preference('RefundLostItemFeeOnReturn') ) { >+ _FixAccountForLostAndReturned( $item->{'itemnumber'}, undef, $item->{'barcode'} ); >+ } >+ } >+ >+ ModItem( >+ { >+ renewals => $renews, >+ onloan => $datedue->strftime('%Y-%m-%d %H:%M'), >+ itemlost => 0, >+ }, >+ $biblio->{'biblionumber'}, >+ $itemnumber >+ ); > > # Charge a new rental fee, if applicable? > my ( $charge, $type ) = GetIssuingCharges( $itemnumber, $borrowernumber ); >-- >1.7.2.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 9805
:
16089
|
16090
|
16302
|
29214
|
37008
|
38430
|
38432
|
38433
|
45411
|
45412
|
45413
|
46539
|
46540
|
46541
|
47616
|
47617
|
47618
|
47619
|
48779
|
48780
|
48781
|
49091
|
49092
|
49093
|
49165
|
162473