Bug 19208 - Pay select option doesn't pay the selected fine
Summary: Pay select option doesn't pay the selected fine
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 19205
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-30 14:18 UTC by Andreas Hedström Mace
Modified: 2017-09-12 14:40 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Fines total amount (70.24 KB, image/png)
2017-08-30 14:18 UTC, Andreas Hedström Mace
Details
Bug 19208 [Master] - Pay select option doesn't pay the selected fine (4.21 KB, patch)
2017-08-30 14:39 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 19208 [Master] - Pay select option doesn't pay the selected fine (4.37 KB, patch)
2017-08-30 19:52 UTC, Andreas Hedström Mace
Details | Diff | Splinter Review
Bug 19208 [Master] - Pay select option doesn't pay the selected fine (4.44 KB, patch)
2017-09-01 07:58 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.