Bug 19208

Summary: Pay select option doesn't pay the selected fine
Product: Koha Reporter: Andreas Hedström Mace <andreas.hedstrom.mace>
Component: CirculationAssignee: Kyle M Hall <kyle>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jonathan.druart, julian.maurice, kyle.m.hall, kyle
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 19205    
Bug Blocks:    
Attachments: Fines total amount
Bug 19208 [Master] - Pay select option doesn't pay the selected fine
Bug 19208 [Master] - Pay select option doesn't pay the selected fine
Bug 19208 [Master] - Pay select option doesn't pay the selected fine

Description Andreas Hedström Mace 2017-08-30 14:18:50 UTC
Created attachment 66616 [details]
Fines total amount

The "Pay selected" option on the Fines tab in the borrower account page doesn't work as intended. The problem has been noted on both 16.05.00 and on master, but behaves a bit differently.

On 16.05 the amount paid will be drawn from the total amount rather than the selected fine, while on master the fine on top of the list gets the amount deducted, even if another fine is choosen from the list.

To recreate:
1) Create two or three fines, using the Create manual invoice function.
2) Choose one of the fines (not the one on the top) and click Pay selected
3) Pay a partial amount
4) Go back to the Pay fines tab an notice that the fine you selected has not changed. Instead, either the top fine or the total (see attachment) has ben affected.
Comment 1 Kyle M Hall 2017-08-30 14:39:54 UTC
Created attachment 66618 [details] [review]
Bug 19208 [Master] - Pay select option doesn't pay the selected fine

The "Pay selected" option on the Fines tab in the borrower account page doesn't work as intended.
The fine on top of the list gets the amount deducted, even if another fine is choosen from the list.

Test Plan:
1) Create two or three fines, using the Create manual invoice function.
2) Choose one of the fines (not the one on the top) and click Pay selected
3) Pay a partial amount
4) Go back to the Pay fines tab an notice that the fine you selected has not changed. Instead, either the top fine or the total (see attachment) has ben affected.
5) Apply this patch
6) Repeat steps 1-3
7) Note the correct fine is paid
Comment 2 Andreas Hedström Mace 2017-08-30 19:52:04 UTC
Created attachment 66653 [details] [review]
Bug 19208 [Master] - Pay select option doesn't pay the selected fine

The "Pay selected" option on the Fines tab in the borrower account page doesn't work as intended.
The fine on top of the list gets the amount deducted, even if another fine is choosen from the list.

Test Plan:
1) Create two or three fines, using the Create manual invoice function.
2) Choose one of the fines (not the one on the top) and click Pay selected
3) Pay a partial amount
4) Go back to the Pay fines tab an notice that the fine you selected has not changed. Instead, either the top fine or the total (see attachment) has ben affected.
5) Apply this patch
6) Repeat steps 1-3
7) Note the correct fine is paid

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
Comment 3 Julian Maurice 2017-09-01 07:58:29 UTC
Created attachment 66690 [details] [review]
Bug 19208 [Master] - Pay select option doesn't pay the selected fine

The "Pay selected" option on the Fines tab in the borrower account page doesn't work as intended.
The fine on top of the list gets the amount deducted, even if another fine is choosen from the list.

Test Plan:
1) Create two or three fines, using the Create manual invoice function.
2) Choose one of the fines (not the one on the top) and click Pay selected
3) Pay a partial amount
4) Go back to the Pay fines tab an notice that the fine you selected has not changed. Instead, either the top fine or the total (see attachment) has ben affected.
5) Apply this patch
6) Repeat steps 1-3
7) Note the correct fine is paid

Signed-off-by: Andreas Hedström Mace <andreas.hedstrom.mace@sub.su.se>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 4 Jonathan Druart 2017-09-01 16:09:24 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 5 Fridolin Somers 2017-09-12 14:40:07 UTC
Pushed to 17.05.x, will be in 17.05.04.