[Bug 7190] New: written off fines being refunded
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 Bug #: 7190 Summary: written off fines being refunded Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 - low Component: Circulation AssignedTo: kyle.m.hall@gmail.com ReportedBy: nengard@gmail.com QAContact: ian.walls@bywatersolutions.com CC: gmcharlt@gmail.com When a lost charge is written off (using the write off function) and then returned at a later date the patron is refunded the fee for the book - this means the patron makes out with extra money that they shouldn't be getting. If a fine line was written off then when returning the item the fees should not be refunded. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff AssignedTo|kyle.m.hall@gmail.com |srdjan@catalyst.net.nz --- Comment #1 from Srdjan Jankovic <srdjan@catalyst.net.nz> 2012-01-24 03:49:11 UTC --- Created attachment 7310 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7310 patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #2 from Nicole C. Engard <nengard@gmail.com> 2012-01-30 14:47:20 UTC --- I have tested and the behavior has not changed after applying the patch. Test plan: 1. check a book out 2. mark it lost 3. confirm that patron is charged lost fee 4. writeoff lost fine line 5. return the book 6. confirm that patron was not refunded the price of the lost item [FAILED] In my test the patron is still refunded even though the accountline was written off. Nicole -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7310|0 |1 is obsolete| | --- Comment #3 from Srdjan Jankovic <srdjan@catalyst.net.nz> 2012-01-31 02:40:05 UTC --- Created attachment 7395 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7395 patch That will teach me not to use doctored database records when testing -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 Srdjan Jankovic <srdjan@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7395|0 |1 is obsolete| | --- Comment #4 from Nicole C. Engard <nengard@gmail.com> 2012-02-01 01:00:18 UTC --- Created attachment 7404 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7404 [SIGNED-OFF] bug_7190: Do not reverse writeoffs when item is returned Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com --- Comment #5 from Paul Poulain <paul.poulain@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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Version|master |rel_3_6 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 --- Comment #6 from Srdjan Jankovic <srdjan@catalyst.net.nz> 2012-02-03 00:26:05 UTC --- Paul, It is not equivalent. The purpose is to catch 'W'. * With "SELECT * FROM accountlines WHERE itemnumber = ? AND accounttype IN ('L', 'Rep') ORDER BY date DESC, accountno DESC" 'W' is ignored. It says "The latest fine" and the latest fine is acted upon. * With "accounttype IN ('L', 'Rep', 'W')" it says "Latest fine or writeoff", and if it is a writeoff we walk away. Re clumsiness, well it is not just this sub, it is the accounting side as a whole. There's no proper accounting/billing implemented, and the best thing would be to integrate a third party solution, but that is another subject. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 --- Comment #7 from Paul Poulain <paul.poulain@biblibre.com> 2012-02-03 08:11:18 UTC --- (In reply to comment #6)
Paul,
It is not equivalent. The purpose is to catch 'W'. * With "SELECT * FROM accountlines WHERE itemnumber = ? AND accounttype IN ('L', 'Rep') ORDER BY date DESC, accountno DESC" 'W' is ignored. It says "The latest fine" and the latest fine is acted upon. * With "accounttype IN ('L', 'Rep', 'W')" it says "Latest fine or writeoff", and if it is a writeoff we walk away.
Yes, that's what I understood at the end. But relying on the date to discover if there is a writeoff is quite dangerous. And it's more as the date field is only a date. Suppose the fine and the writeoff are made the same day. We are not sure of the order mySQL return. Or suppose someone or something changes the date. However, your patch relies on how Koha works today, so I have pushed it.
Re clumsiness, well it is not just this sub, it is the accounting side as a whole.
There's no proper accounting/billing implemented, and the best thing would be to integrate a third party solution, but that is another subject. agreed (to all part of this sentence : no proper & third party solution &
You're right. Its a kind of "oldies but NOT goodies"... that's another subject) -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 --- Comment #8 from Srdjan Jankovic <srdjan@catalyst.net.nz> 2012-02-03 09:37:43 UTC --- "Suppose the fine and the writeoff are made the same day. We are not sure of the" order mySQL return." Correct. That's why I seconded it with accountnumber. "Or suppose someone or something changes the date." That would really screw things up. But I don't think anything does. Let's hope for the best :) -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7190 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #9 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This fix was included in the 3.6.x branch prior to 3.6.4. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org