http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190
Paul Poulain <paul.poul...@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poul...@biblibre.com --- Comment #5 from Paul Poulain <paul.poul...@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. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/