[Koha-bugs] [Bug 7190] written off fines being refunded
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Feb 2 18:17:03 CET 2012
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190
Paul Poulain <paul.poulain at biblibre.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paul.poulain at biblibre.com
--- Comment #5 from Paul Poulain <paul.poulain at biblibre.com> 2012-02-02 17:17:03 UTC ---
QA comment:
Srdjan, I couldn't understand why you write
my $sth = $dbh->prepare("SELECT * FROM accountlines WHERE itemnumber = ?
AND accounttype IN ('L', 'Rep', 'W') ORDER BY date DESC, accountno DESC");
and a few lines below:
$data or return; # bail if there is nothing to do
$data->{accounttype} eq 'W' and return; # Written off
It's equivalent to
my $sth = $dbh->prepare("SELECT * FROM accountlines WHERE itemnumber = ?
AND accounttype IN ('L', 'Rep') ORDER BY date DESC, accountno DESC");
followed by
$data or return; # bail if there is nothing to do
?
Thinking of it, a little bit more, the date DESC is important. As the sub
returns only 1 line, you can have more than 1 line in the SQL, we assume the W
is the most recent one (that sound reasonable: you writeoff a fine you've
already set)
At the end, my feeling is that the sub is quite strange (could I say clumsy ?
probably...), but it was before your patch, so it's OK
Otherwise, small patch, passed QA
--
Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the Koha-bugs
mailing list