Bugzilla – Attachment 16302 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
Paul Poulain
on 2013-03-18 18:24:03 UTC
(
hide
)
Description:
Bug 9805 - Lost items are un-lost if returned, but not if renewed.
Filename:
MIME Type:
Creator:
Paul Poulain
Created:
2013-03-18 18:24:03 UTC
Size:
1.88 KB
patch
obsolete
>From 25caf051c21212edb681a6576a5a8b0421352b96 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 file changed, 17 insertions(+), 1 deletion(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index abd4981..77205cc 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -2563,7 +2563,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.9.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