Bug 9582

Summary: Unused code in members/pay.pl
Product: Koha Reporter: Jared Camins-Esakov <jcamins>
Component: Architecture, internals, and plumbingAssignee: Galen Charlton <gmcharlt>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: minor    
Priority: P5 - low CC: jonathan.druart, kyle
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 9582: Remove unused code from members/pay.pl
Bug 9582: Remove unused code from members/pay.pl
Bug 9582: Remove unused code from members/pay.pl

Description Jared Camins-Esakov 2013-02-10 15:33:33 UTC
The subroutines writeoff() and get_writeoff_sth() (and the two package variables $writeoff_sth and $add_writeoff_sth) defined in members/pay.pl do not seem to be used at all.
Comment 1 Jared Camins-Esakov 2013-02-10 15:46:22 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2013-02-10 22:10:03 UTC
Comment on attachment 15208 [details] [review]
Bug 9582: Remove unused code from members/pay.pl

Review of attachment 15208 [details] [review]:
-----------------------------------------------------------------

This code looks ok, I haven't tested it you though so not signing off, but passing initial code review
Comment 3 Kyle M Hall 2013-02-15 12:26:18 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2013-02-19 14:55:33 UTC
QA comment:

Hum, really strange :)
These routines have been removed by Kyle (commit db946ffd58094ec6287f991493a8df7bd7298f71 - Bug 7597 - Part 2 - move sub writeoff to C4::Accounts) and reintroduced by Stéphane (
commit a8b168dc63df9d60e8e562f368f8bdbec520ffd8 - Bug 7671 : add a real primary key accountlines_id in accountlines). But the latter does not used them!

Marked as Passed QA.
Comment 5 Jonathan Druart 2013-02-19 14:55:55 UTC
Created attachment 15548 [details] [review]
Bug 9582: Remove unused code from members/pay.pl

The subroutines writeoff() and get_writeoff_sth() (and the two package
variables $writeoff_sth and $add_writeoff_sth) defined in members/pay.pl
are not used at all.

To test:
1) View members/pay.pl by looking at the record of a patron who has
   at least seven fines/fees and clicking the "Pay fines" tab after
   clicking the "Fines" tab on the left side
2) Write off a single item in the table on members/pay.pl using the
   button labelled "Write off"
3) Pay a single fine by clicking the "Pay" button
4) Pay a portion of a fine by selecting a checkbox on one of the lines
   in the table and clicking the "Pay amount" button
5) Select two lines in the table and click the "Pay selected" button
6) Write off all remaining fines

If all your actions show up in the table on the Account tab, this patch
works.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 6 Jared Camins-Esakov 2013-02-20 13:17:47 UTC
This patch has been pushed to master.