Bugzilla – Attachment 26674 Details for
Bug 9481
charge not showing fines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9481 (follow up) change parameter order in routine
0002-Bug-9481-follow-up-change-parameter-order-in-routine.patch (text/plain), 2.68 KB, created by
Rafal Kopaczka
on 2014-03-28 09:12:50 UTC
(
hide
)
Description:
Bug 9481 (follow up) change parameter order in routine
Filename:
MIME Type:
Creator:
Rafal Kopaczka
Created:
2014-03-28 09:12:50 UTC
Size:
2.68 KB
patch
obsolete
>From c7f9e240e6d458fbaba8dd6bb017f3a676b3d469 Mon Sep 17 00:00:00 2001 >From: Rafal Kopaczka <rkk0@poczta.onet.pl> >Date: Fri, 28 Mar 2014 09:37:54 +0100 >Subject: [PATCH 2/3] Bug 9481 (follow-up) - change parameter order in routine > Only small change in parameters order. Because other > routines in C4::Overudes gets first itemnumber then > borrowernumber, changed this to stay consistent. > >--- > C4/Overdues.pm | 9 ++++----- > circ/circulation.pl | 2 +- > members/moremember.pl | 2 +- > 3 files changed, 6 insertions(+), 7 deletions(-) > >diff --git a/C4/Overdues.pm b/C4/Overdues.pm >index be0e0aa..a53b3f5 100644 >--- a/C4/Overdues.pm >+++ b/C4/Overdues.pm >@@ -661,21 +661,20 @@ sub GetFine { > > =head2 GetItemCharges > >- $charges = GetItemCharges( $borrowernumber, $itemnumber ) >+ $charges = GetItemCharges( $itemnumber , $borrowernumber) > Gets fines and issue charge for item from accountlines. Icluding all outstanding amount for specific item, > also from previous issue of this item. >- >+ > =cut > > sub GetItemCharges { >- my ( $borrowernumber, $itemnumber ) = @_; >- >+ my ( $itemnumber, $borrowernumber ) = @_; > my $dbh = C4::Context->dbh(); > > my $query = "SELECT SUM(amountoutstanding) FROM accountlines WHERE borrowernumber = ? AND itemnumber = ? "; > my $sth = $dbh->prepare( $query ); > $sth->execute( $borrowernumber, $itemnumber ); >- return $sth->fetchrow_arrayref()->[0]; >+ return $sth->fetchrow_arrayref()->[0] || 0; > } > > =head2 NumberNotifyId >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 131fe35..18f0a22 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -480,7 +480,7 @@ sub build_issue_data { > $it->{'itemtype'} = ( C4::Context->preference( 'item-level_itypes' ) ) ? $it->{'itype'} : $it->{'itemtype'}; > > $it->{'charge'} = GetItemCharges( >- $it->{'borrowernumber'}, $it->{'itemnumber'} >+ $it->{'itemnumber'}, $it->{'borrowernumber'} > ); > $it->{'charge'} = sprintf("%.2f", $it->{'charge'}); > my ($can_renew, $can_renew_error) = CanBookBeRenewed( >diff --git a/members/moremember.pl b/members/moremember.pl >index e7ac52a..ce84c08 100755 >--- a/members/moremember.pl >+++ b/members/moremember.pl >@@ -504,7 +504,7 @@ sub build_issue_data { > } > > #find all charges for an item >- my $charge = GetItemCharges( $borrowernumber, $issue->{itemnumber} ); >+ my $charge = GetItemCharges( $issue->{itemnumber}, $borrowernumber ); > > my $getiteminfo = GetBiblioFromItemNumber( $issue->{'itemnumber'} ); > my $itemtypeinfo = getitemtypeinfo( (C4::Context->preference('item-level_itypes')) ? $getiteminfo->{'itype'} : $getiteminfo->{'itemtype'} ); >-- >1.7.10.4 >
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 9481
:
14816
|
14817
|
26193
|
26457
|
26674
|
26675
|
26684
|
26685
|
36739
|
36740
|
36742
|
36787
|
36848