http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481
--- Comment #10 from Jonathan Druart <[email protected]> --- Comment on attachment 26457 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26457 Bug 9481 - charge not showing fines On 'Check out' and 'Details' screens in patron record fines for item aren't showing. Added new soubroutine to sum up all outstanding charges by borrower for this item including all historical issues and rent charges. Pr Review of attachment 26457: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=9481&attachment=26457) ----------------------------------------------------------------- ::: C4/Overdues.pm @@ +659,5 @@ > return 0; > } > > +=head2 GetItemCharges > + Why don't you put this subroutine into C4::Account? @@ +668,5 @@ > +=cut > + > +sub GetItemCharges { > + my ( $borrowernumber, $itemnumber ) = @_; > + I would prefer you pass an hashref to this new subroutine. @@ +674,5 @@ > + > + 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]; Could be done using $dbh->selectcol_arrayref -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
