Bugzilla – Attachment 5588 Details for
Bug 6403
Record local use stats when checking in
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Enh 6403: Record local use stats when checking in unissued materials
SIGNED-OFF-Enh-6403-Record-local-use-stats-when-ch.patch (text/plain), 4.48 KB, created by
Nicole C. Engard
on 2011-09-26 14:26:40 UTC
(
hide
)
Description:
[SIGNED-OFF] Enh 6403: Record local use stats when checking in unissued materials
Filename:
MIME Type:
Creator:
Nicole C. Engard
Created:
2011-09-26 14:26:40 UTC
Size:
4.48 KB
patch
obsolete
>From 20ea292f54c943c87c108de8ca1d938f31b8a2a0 Mon Sep 17 00:00:00 2001 >From: Ian Walls <ian.walls@bywatersolutions.com> >Date: Wed, 21 Sep 2011 14:35:12 -0400 >Subject: [PATCH] [SIGNED-OFF] Enh 6403: Record local use stats when checking in unissued materials > >Adds a new system preference, RecordLocalUseOnReturn, which when active will change the statistical >entry type from "return" to "localuse" in AddReturn() if the material was not on loan when returned. >The intended use-case here is for libraries with 'open' book drops, in which patrons can put locally >used (but unissued) materials. > >Adds a small message to the user interface to confirm that Local Use was recorded. > >This change opens up the possibility to record more types of statistics on return; one would just need >to update the $stat_type variable accordingly. > >Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> >--- > C4/Circulation.pm | 10 ++++++++-- > circ/returns.pl | 3 +++ > .../en/modules/admin/preferences/circulation.pref | 6 ++++++ > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 3 +++ > 4 files changed, 20 insertions(+), 2 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 520c116..42a8b2d 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1515,7 +1515,8 @@ sub AddReturn { > my $biblio; > my $doreturn = 1; > my $validTransfert = 0; >- >+ my $stat_type = 'return'; >+ > # get information on item > my $itemnumber = GetItemnumberFromBarcode( $barcode ); > unless ($itemnumber) { >@@ -1532,6 +1533,11 @@ sub AddReturn { > # even though item is not on loan, it may still be transferred; therefore, get current branch info > $doreturn = 0; > # 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")) { >+ $messages->{'LocalUse'} = 1; >+ $stat_type = 'localuse'; >+ } > } > > my $item = GetItem($itemnumber) or die "GetItem($itemnumber) failed"; >@@ -1639,7 +1645,7 @@ sub AddReturn { > # update stats? > # Record the fact that this book was returned. > UpdateStats( >- $branch, 'return', '0', '', >+ $branch, $stat_type, '0', '', > $item->{'itemnumber'}, > $biblio->{'itemtype'}, > $borrowernumber >diff --git a/circ/returns.pl b/circ/returns.pl >index 6826d7c..afe574f 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -423,6 +423,9 @@ foreach my $code ( keys %$messages ) { > $err{notissued} = 1; > $err{msg} = $branches->{ $messages->{'IsPermanent'} }->{'branchname'}; > } >+ elsif ( $code eq 'LocalUse' ) { >+ $err{localuse} = 1; >+ } > elsif ( $code eq 'WasLost' ) { > $err{waslost} = 1; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >index f6324e3..f4946b5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref >@@ -85,6 +85,12 @@ Circulation: > yes: Show > no: "Don't show" > - a button to clear the current patron from the screen on the circulation screen. >+ - >+ - pref: RecordLocalUseOnReturn >+ choices: >+ yes: Record >+ no: "Don't record" >+ - local use when an unissued item is checked in. > Checkout Policy: > - > - pref: AllowNotForLoanOverride >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >index 2a9b47e..65df373 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -312,6 +312,9 @@ function Dopop(link) { > [% IF ( errmsgloo.notissued ) %] > <p class="problem">Not checked out.</p> > [% END %] >+ [% IF ( errmsgloo.localuse) %] >+ <p class="problem">Local Use recorded</p> >+ [% END %] > [% IF ( errmsgloo.waslost ) %] > <p class="problem">Item was lost, now found.</p> > [% END %] >-- >1.7.2.3
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 6403
:
5549
|
5550
|
5587
| 5588 |
5589