[Bug 9481] New: charge not showing fines
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Bug ID: 9481 Summary: charge not showing fines Classification: Unclassified Change sponsored?: --- Product: Koha Version: 3.8 Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: nengard@gmail.com CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Created attachment 14816 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14816&action=edit $0 charges When looking at the patron record or the checkout screen the checkout summary is now showing 0 for all the Charges even if the item was overdue and has accrued fines. This column I think used to show the fine amount. I have confirmed in 3.8.5 and master. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 --- Comment #1 from Nicole C. Engard <nengard@gmail.com> --- Created attachment 14817 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14817&action=edit fines for those titles -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |olli-antti.kivilahti@jns.fi --- Comment #2 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- I am not seeing a way to endorse this bug, but I'll endorse it by commenting. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Rafal Kopaczka <rkopaczka@afm.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |rkopaczka@afm.edu.pl Assignee|koha-bugs@lists.koha-commun |rkopaczka@afm.edu.pl |ity.org | --- Comment #3 from Rafal Kopaczka <rkopaczka@afm.edu.pl> --- Created attachment 26193 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26193&action=edit Bug 9481 - charge not showing fines Added new subroutine to sum up all outstanding charges by borrower for this item including all historical issues and rent charges. Previous routine gets charge amount from system preferences instead of amount outstanding. To test: 1/ Check out items with past due date. 2/ Run fines.pl script (ensure finesMode is set to Calculate and Charge) 3/ Verify on Fines->Pay Fines screen that fines where calculated correct. 4/ Go to Patron record, charge column on Details and Check out screen should be 0 or rental charge amount only. But total amount row display right number, same as in pay fines screen. 4/ Apply patch. 5/ Now charges on display and check out screen shows all outstanding fees for each item. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Rafal Kopaczka <rkopaczka@afm.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.8 |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abl@biblos.pk.edu.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 --- Comment #4 from Holger Meißner <h.meissner.82@web.de> --- Created attachment 26457 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26457&action=edit 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 To test: 1/ Check out items with past due date 2/ Run fines.pl script (ensure finesMode is set to Calculate and Charge) 3/ Verify on Fines->Pay Fines screen that fines where calculated correct. 4/ Go to Patron record, charge column on Details and Check out screen should be 0 or rental charge amount only. But total amount row display right number, same as in pay fines screen. 4/ Apply patch. 5/ Now charges on display and check out screen shows all outstanding fees for each item. Signed-off-by: Holger Meißner <h.meissner.82@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Holger Meißner <h.meissner.82@web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |h.meissner.82@web.de -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Holger Meißner <h.meissner.82@web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26193|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |jonathan.druart@biblibre.co | |m --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Could you please provide unit tests for the new routine please? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 --- Comment #6 from Rafal Kopaczka <rkopaczka@afm.edu.pl> --- Created attachment 26674 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26674&action=edit Bug 9481 (follow up) change parameter order in routine Small change in parameters order. Because other routines in C4::Overudes gets first itemnumber then borrowernumber, changed this to stay consistent. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 --- Comment #7 from Rafal Kopaczka <rkopaczka@afm.edu.pl> --- Created attachment 26675 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26675&action=edit Bug 9481 QA follow-up Add unit test Add unit test for GetItemCharges in C4::Overdues. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Rafal Kopaczka <rkopaczka@afm.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 --- Comment #8 from Holger Meißner <h.meissner.82@web.de> --- Created attachment 26684 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26684&action=edit Bug 9481 (follow-up) - change parameter order in routine Only small change in parameters order. Because other routines in C4::Overudes gets first itemnumber then borrowernumber, changed this to stay consistent. Signed-off-by: Holger Meißner <h.meissner.82@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 --- Comment #9 from Holger Meißner <h.meissner.82@web.de> --- Created attachment 26685 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26685&action=edit Bug 9481 (QA follow-up) - Add unit test for GetItemCharges in C4::Overdues. Signed-off-by: Holger Meißner <h.meissner.82@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Holger Meißner <h.meissner.82@web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26674|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Holger Meißner <h.meissner.82@web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26675|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Holger Meißner <h.meissner.82@web.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=7985 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- 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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- Comment on attachment 26685 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26685 Bug 9481 (QA follow-up) - Add unit test for GetItemCharges in C4::Overdues. Review of attachment 26685: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=9481&attachment=26685) ----------------------------------------------------------------- ::: t/db_dependent/Overdues.t @@ +69,5 @@
+ $sth->execute(@$loop); +} + +ok(GetItemCharges($itemnumber, $borrowernumber) == 348.25, "GetItemCharges returns all outstanding charges for item"); +
What is 348.25? Please make this more readable. @@ +71,5 @@
+ +ok(GetItemCharges($itemnumber, $borrowernumber) == 348.25, "GetItemCharges returns all outstanding charges for item"); + +my $anotheritemnumber = $itemnumber + 999999; +my $anotherborrowernumber = $borrowernumber + 999999;
These numbers could exist in a big DB and the test will fail. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- Marked as Failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- See also bug 13732. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david.roberts@ptfs-europe.c | |om --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 13732 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Is there any prospect for this bug getting solved? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Rafal, do you have time to make the fixes pointed out by Jonathan? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 --- Comment #17 from Rafal Kopaczka <rkopaczka@afm.edu.pl> --- Sorry I've forgot about this bug... But it seems that there isn't much work to do (beside rebase), but currently I'm working on something else. So if anyone want to work on this feel free to do so. If not I'll have time to look at this patch for about 1-2 weeks. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Rafal Kopaczka <rkopaczka@afm.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Rafal Kopaczka <rkopaczka@afm.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26457|0 |1 is obsolete| | Attachment #26684|0 |1 is obsolete| | Attachment #26685|0 |1 is obsolete| | --- Comment #18 from Rafal Kopaczka <rkopaczka@afm.edu.pl> --- Created attachment 36739 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36739&action=edit [PATCH] Bug 9481 - charge not showing fines On 'Check out' and 'Details'. When looking at the patron record or the checkout screen the checkout summary is now showing 0 for all the Charges even if the item was overdue and has accrued fines. To test: 1/ Check out items with past due date 2/ Run fines.pl script (ensure finesMode is set to Calculate and Charge) 3/ Verify on Fines->Pay Fines screen that fines where calculated correct. 4/ Go to Patron record, charge column on Details and Check out screen should be 0 or rental charge amount only. But total amount row display right number, same as in pay fines screen. 4/ Apply patch. 5/ Now charges on display and check out screen shows all outstanding fees for each item. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Rafal Kopaczka <rkopaczka@afm.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36739|0 |1 is obsolete| | --- Comment #19 from Rafal Kopaczka <rkopaczka@afm.edu.pl> --- Created attachment 36740 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36740&action=edit [PATCH] Bug 9481 - charge not showing fines On 'Check out' and 'Details'. When looking at the patron record or the checkout screen the checkout summary is now showing 0 for all the Charges even if the item was overdue and has accrued fines. To test: 1/ Check out items with past due date 2/ Run fines.pl script (ensure finesMode is set to Calculate and Charge) 3/ Verify on Fines->Pay Fines screen that fines where calculated correct. 4/ Go to Patron record, charge column on Details and Check out screen should be 0 or rental charge amount only. But total amount row display right number, same as in pay fines screen. 4/ Apply patch. 5/ Now charges on display and check out screen shows all outstanding fees for each item. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 --- Comment #20 from Rafal Kopaczka <rkopaczka@afm.edu.pl> --- This patch, turns out is trivial after datatables patch has been pushed. But now I'm wondering if showing fines in charges column is correct behaviour? Maybe there should be some syspref for showing fines/charges or separate column in table? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 --- Comment #21 from David Roberts <david.roberts@ptfs-europe.com> --- Showing fines in the charges column is definitely not correct (see my bug 13732 which was marked as a duplicate of this one). Charges refer to e.g. rental fees which are different to fines. It would be better perhaps if there was a separate column for fines. If more screen real-estate is needed, some of the columns that display on this screen are probably not that useful (replacement price, for example) so could be removed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Rafal Kopaczka <rkopaczka@afm.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36740|0 |1 is obsolete| | --- Comment #22 from Rafal Kopaczka <rkopaczka@afm.edu.pl> --- Created attachment 36742 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36742&action=edit [PATCH] Bug 9481 - charge not showing fines On 'Check out' and 'Details'. When looking at the patron record or the checkout screen the checkout summary is now showing 0 for all the Charges even if the item was overdue and has accrued fines. Removed unused(?) footer values in checkouts-table-footer.inc To test: 1/ Check out items with past due date 2/ Run fines.pl script (ensure finesMode is set to Calculate and Charge) 3/ Verify on Fines->Pay Fines screen that fines where calculated correct. 4/ Go to Patron record, charge column on Details and Check out screen should be 0 or rental charge amount only. But total amount row display right number, same as in pay fines screen. 4/ Apply patch. 5/ Now charges on display and check out screen shows all outstanding fees for each item. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 --- Comment #23 from Rafal Kopaczka <rkopaczka@afm.edu.pl> --- (In reply to David Roberts from comment #21)
Showing fines in the charges column is definitely not correct (see my bug 13732 which was marked as a duplicate of this one). Charges refer to e.g. rental fees which are different to fines. It would be better perhaps if there was a separate column for fines. If more screen real-estate is needed, some of the columns that display on this screen are probably not that useful (replacement price, for example) so could be removed.
That's what I've think. New patch with new column for fines. As for removing columns, there is some feature for defining visibility of column. Maybe that could be used to hide columns? But it's another bug I think. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36742|0 |1 is obsolete| | --- Comment #24 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 36787 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36787&action=edit Bug 9481 - charge not showing fines On 'Check out' and 'Details'. When looking at the patron record or the checkout screen the checkout summary is now showing 0 for all the Charges even if the item was overdue and has accrued fines. Removed unused(?) footer values in checkouts-table-footer.inc To test: 1/ Check out items with past due date 2/ Run fines.pl script (ensure finesMode is set to Calculate and Charge) 3/ Verify on Fines->Pay Fines screen that fines where calculated correct. 4/ Go to Patron record, charge column on Details and Check out screen should be 0 or rental charge amount only. But total amount row display right number, same as in pay fines screen. 4/ Apply patch. 5/ Now charges on display and check out screen shows all outstanding fees for each item. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #36787|0 |1 is obsolete| | --- Comment #25 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 36848 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=36848&action=edit [PASSED QA] Bug 9481 - charge not showing fines On 'Check out' and 'Details'. When looking at the patron record or the checkout screen the checkout summary is now showing 0 for all the Charges even if the item was overdue and has accrued fines. Removed unused(?) footer values in checkouts-table-footer.inc To test: 1/ Check out items with past due date 2/ Run fines.pl script (ensure finesMode is set to Calculate and Charge) 3/ Verify on Fines->Pay Fines screen that fines where calculated correct. 4/ Go to Patron record, charge column on Details and Check out screen should be 0 or rental charge amount only. But total amount row display right number, same as in pay fines screen. 4/ Apply patch. 5/ Now charges on display and check out screen shows all outstanding fees for each item. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #26 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Rafal! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #27 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.18.x will be in 3.18.6 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9481 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14841 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14841 [Bug 14841] Columns settings on checkouts table have 2 bugs -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org