Bugzilla – Attachment 6500 Details for
Bug 5211
marking lost (long overdue) not charging fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
0001-bug_5211-LostItem-added-charge_fee-param-to-control-.patch (text/plain), 3.50 KB, created by
Srdjan Jankovic
on 2011-12-02 00:36:30 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Srdjan Jankovic
Created:
2011-12-02 00:36:30 UTC
Size:
3.50 KB
patch
obsolete
>From 98abc04c6af52ea793ba33e4e3ce670f6cee5720 Mon Sep 17 00:00:00 2001 >From: Srdjan Jankovic <srdjan@catalyst.net.nz> >Date: Fri, 2 Dec 2011 13:26:50 +1300 >Subject: [PATCH] bug_5211: LostItem() - added charge_fee param to control fee charging > >Pass charge_fee = yes wherever is LostItem() called, which effectively >means tha there's no change. >--- > C4/Circulation.pm | 5 +++-- > catalogue/updateitem.pl | 2 +- > misc/cronjobs/longoverdue.pl | 2 +- > tools/batchMod.pl | 2 +- > 4 files changed, 6 insertions(+), 5 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index debef01..3d63224 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -3021,7 +3021,7 @@ sub ReturnLostItem{ > > > sub LostItem{ >- my ($itemnumber, $mark_returned) = @_; >+ my ($itemnumber, $mark_returned, $charge_fee) = @_; > > my $dbh = C4::Context->dbh(); > my $sth=$dbh->prepare("SELECT issues.*,items.*,biblio.title >@@ -3036,7 +3036,8 @@ sub LostItem{ > # if a borrower lost the item, add a replacement cost to the their record > if ( my $borrowernumber = $issues->{borrowernumber} ){ > >- C4::Accounts::chargelostitem($borrowernumber, $itemnumber, $issues->{'replacementprice'}, "Lost Item $issues->{'title'} $issues->{'barcode'}"); >+ C4::Accounts::chargelostitem($borrowernumber, $itemnumber, $issues->{'replacementprice'}, "Lost Item $issues->{'title'} $issues->{'barcode'}") >+ if $charge_fee; > #FIXME : Should probably have a way to distinguish this from an item that really was returned. > #warn " $issues->{'borrowernumber'} / $itemnumber "; > MarkIssueReturned($borrowernumber,$itemnumber) if $mark_returned; >diff --git a/catalogue/updateitem.pl b/catalogue/updateitem.pl >index 379c12c..7f93ee1 100755 >--- a/catalogue/updateitem.pl >+++ b/catalogue/updateitem.pl >@@ -74,6 +74,6 @@ if (defined $itemnotes) { # i.e., itemnotes parameter passed from form > > ModItem($item_changes, $biblionumber, $itemnumber); > >-LostItem($itemnumber, 'MARK RETURNED') if $itemlost; >+LostItem($itemnumber, 'MARK RETURNED', 'CHARGE FEE') if $itemlost; > > print $cgi->redirect("moredetail.pl?biblionumber=$biblionumber&itemnumber=$itemnumber#item$itemnumber"); >diff --git a/misc/cronjobs/longoverdue.pl b/misc/cronjobs/longoverdue.pl >index 2179d10..3843544 100755 >--- a/misc/cronjobs/longoverdue.pl >+++ b/misc/cronjobs/longoverdue.pl >@@ -154,7 +154,7 @@ foreach my $startrange (sort keys %$lost) { > printf ("Due %s: item %5s from borrower %5s to lost: %s\n", $row->{date_due}, $row->{itemnumber}, $row->{borrowernumber}, $lostvalue) if($verbose); > if($confirm) { > ModItem({ itemlost => $lostvalue }, $row->{'biblionumber'}, $row->{'itemnumber'}); >- LostItem($row->{'itemnumber'}) if( $charge && $charge eq $lostvalue); >+ LostItem($row->{'itemnumber'}, undef, 'CHARGE FEE') if( $charge && $charge eq $lostvalue); > } > $count++; > } >diff --git a/tools/batchMod.pl b/tools/batchMod.pl >index 701d421..94cfa69 100755 >--- a/tools/batchMod.pl >+++ b/tools/batchMod.pl >@@ -177,7 +177,7 @@ if ($op eq "action") { > UpdateMarcWith( $marcitem, $localmarcitem ); > eval{ > if ( my $item = ModItemFromMarc( $localmarcitem, $itemdata->{biblionumber}, $itemnumber ) ) { >- LostItem($itemnumber, 'MARK RETURNED') if $item->{itemlost}; >+ LostItem($itemnumber, 'MARK RETURNED', 'CHARGE FEE') if $item->{itemlost}; > } > }; > } >-- >1.6.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 5211
: 6500