[Bug 7597] New: fines not recording the right info in the stats table
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7597 Bug #: 7597 Summary: fines not recording the right info in the stats table Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: critical Priority: P5 - low Component: Circulation AssignedTo: kyle.m.hall@gmail.com ReportedBy: nengard@gmail.com QAContact: koha.sekjal@gmail.com CC: gmcharlt@gmail.com I did some testing today of paying fines and watched my DB only to find that the data being recorded when writing off a fine is wrong. http://screencast.com/t/XuhUtQRMccr When you write off a fine it's using the wrong branch code and it seems to be writing off the wrong amount altogether. -- 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=7597 --- Comment #1 from Kyle M Hall <kyle.m.hall@gmail.com> 2012-02-28 14:20:53 UTC --- Created attachment 7913 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7913 Bug 7597 - Part 2 - move sub writeoff to C4::Accounts Currently, the subroutine writeoff lives in pay.pl, which is a violation of the Koha coding guidelines, as it writes to the database. This commit restructures and moves writeoff to C4::Accounts::WriteOff(), and modifies pay.pl to use it. -- 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=7597 --- Comment #2 from Kyle M Hall <kyle.m.hall@gmail.com> 2012-02-28 14:23:08 UTC --- Created attachment 7914 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7914 Bug 7597 - Part 1 - fines not recording the right info in the stats table Koha was writing off the value of accountlines.amount rather than the value of accountlines.ammountoutstanding. -- 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=7597 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #3 from Nicole C. Engard <nengard@gmail.com> 2012-02-28 14:24:26 UTC --- Kyle, To test do I apply 1 and test it and then apply 2 and test it - or do I apply both and test them together? 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=7597 Kyle M Hall <kyle.m.hall@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7914|0 |1 is obsolete| | -- 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=7597 --- Comment #4 from Kyle M Hall <kyle.m.hall@gmail.com> 2012-02-28 14:25:48 UTC --- Created attachment 7915 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7915 Bug 7597 - Part 1 - fines not recording the right info in the stats table Koha was writing off the value of accountlines.amount rather than the value of accountlines.ammountoutstanding. -- 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=7597 --- Comment #5 from Kyle M Hall <kyle.m.hall@gmail.com> 2012-02-28 14:26:22 UTC --- Created attachment 7916 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7916 Bug 7597 - Part 2 - move sub writeoff to C4::Accounts Currently, the subroutine writeoff lives in pay.pl, which is a violation of the Koha coding guidelines, as it writes to the database. This commit restructures and moves writeoff to C4::Accounts::WriteOff(), and modifies pay.pl to use it. -- 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=7597 --- Comment #6 from Kyle M Hall <kyle.m.hall@gmail.com> 2012-02-28 14:27:58 UTC --- Either way should work fine. (In reply to comment #3)
Kyle,
To test do I apply 1 and test it and then apply 2 and test it - or do I apply both and test them together?
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=7597 Kyle M Hall <kyle.m.hall@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |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=7597 --- Comment #7 from Kyle M Hall <kyle.m.hall@gmail.com> 2012-02-28 14:36:00 UTC --- Created attachment 7917 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7917 Bug 7597 - Part 3 - fines not recording the right info in the stats table This commit fixes writeoff_all to write off only the amount outstanding for each fine being written off, rather than the original amount owed. -- 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=7597 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7915|0 |1 is obsolete| | --- Comment #8 from Nicole C. Engard <nengard@gmail.com> 2012-02-28 14:56:08 UTC --- Created attachment 7919 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7919 [SIGNED-OFF] Bug 7597 - Part 1 - fines not recording the right info in the stats table Koha was writing off the value of accountlines.amount rather than the value of accountlines.ammountoutstanding. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Tested all three patches together and was able to write off single and multiple fines and the data was correct in the stats table. -- 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=7597 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7916|0 |1 is obsolete| | --- Comment #9 from Nicole C. Engard <nengard@gmail.com> 2012-02-28 14:56:52 UTC --- Created attachment 7920 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7920 [SIGNED-OFF] Bug 7597 - Part 2 - move sub writeoff to C4::Accounts Currently, the subroutine writeoff lives in pay.pl, which is a violation of the Koha coding guidelines, as it writes to the database. This commit restructures and moves writeoff to C4::Accounts::WriteOff(), and modifies pay.pl to use it. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Tested all three patches together and was able to write off single and multiple fines and the data was correct in the stats table. -- 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=7597 --- Comment #10 from Nicole C. Engard <nengard@gmail.com> 2012-02-28 14:57:21 UTC --- Created attachment 7921 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7921 Bug 7597 - Part 3 - fines not recording the right info in the stats table This commit fixes writeoff_all to write off only the amount outstanding for each fine being written off, rather than the original amount owed. -- 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=7597 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7917|0 |1 is obsolete| | Attachment #7921|0 |1 is obsolete| | --- Comment #11 from Nicole C. Engard <nengard@gmail.com> 2012-02-28 14:58:03 UTC --- Created attachment 7922 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7922 [SIGNED-OFF] Bug 7597 - Part 3 - fines not recording the right info in the stats table This commit fixes writeoff_all to write off only the amount outstanding for each fine being written off, rather than the original amount owed. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> Tested all three patches together and was able to write off single and multiple fines and the data was correct in the stats table. -- 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=7597 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=7597 Ian Walls <koha.sekjal@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #12 from Ian Walls <koha.sekjal@gmail.com> 2012-03-01 20:20:49 UTC --- Part 1: just changes which field is recorded in writeoff from amount to amountoutstanding Part 2: moves code out of pay.pl and into C4/Accounts, which is very good. Unfortunately, the new subroutine, WriteOff, does not meet coding guideline PERL9... we've got the verb, but not the noun. WriteOffFee or WriteOffFine would be appropriate substitutions. Part 3: correspondingly fixes amount to amountoutstanding in writeoffall. Parts 1 and 3 pass QA, but part 2 does not. It's a small change to make, though, and once the WriteOff subroutine is renamed to follow PERL9, it will pass 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=7597 --- Comment #13 from Kyle M Hall <kyle.m.hall@gmail.com> --- Created attachment 8020 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8020&action=edit Bug 7597 - Part 4 - Change C4::Acounts::WriteOff to WriteOffFee -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7597 Kyle M Hall <kyle.m.hall@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8020|0 |1 is obsolete| | --- Comment #14 from Kyle M Hall <kyle.m.hall@gmail.com> --- Created attachment 8021 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8021&action=edit Bug 7597 - Part 4 - Change C4::Acounts::WriteOff to WriteOffFee -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7597 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8021|0 |1 is obsolete| | --- Comment #15 from Nicole C. Engard <nengard@gmail.com> --- Created attachment 8026 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8026&action=edit [SIGNED-OFF] Bug 7597 - Part 4 - Change C4::Acounts::WriteOff to WriteOffFee Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7597 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA CC| |paul.poulain@biblibre.com --- Comment #16 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: some variable declared twice "my" variable $branch masks earlier declaration in same scope at /home/paul/koha.dev/koha-community//C4/Accounts.pm line 783. => branch is created at line 782, removing the my should be enough (the problem appears in patch 2) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7597 --- Comment #17 from Kyle M Hall <kyle.m.hall@gmail.com> --- Created attachment 8100 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8100&action=edit Bug 7597 - Part 5 - Remove my from $branch, which was masking previous declaration -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7597 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #8100|0 |1 is obsolete| | --- Comment #18 from Nicole C. Engard <nengard@gmail.com> --- Created attachment 8198 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=8198&action=edit [SIGNED-OFF] Bug 7597 - Part 5 - Remove my from $branch, which was masking previous declaration Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7597 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7597 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #19 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: clean code, improving coding guidelines followance passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7597 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7597 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |rel_3_6 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7597 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #20 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This bug will be included in the Koha 3.6.5 release. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org