Bugzilla – Attachment 38430 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.88 KB, created by
Kyle M Hall (khall)
on 2015-04-23 16:22:58 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:
2015-04-23 16:22:58 UTC
Size:
1.88 KB
patch
obsolete
>From c10450d9810919ad11318bfe37db9b5f1d6d17a5 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 > >Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> >--- > C4/Circulation.pm | 18 +++++++++++++++++- > 1 files changed, 17 insertions(+), 1 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index dd23734..9735116 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2824,7 +2824,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