Bug 15397 - Pay selected does not works as expected
Summary: Pay selected does not works as expected
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P4 normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-18 09:30 UTC by Josef Moravec
Modified: 2017-12-07 22:16 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15397: just a try (1.86 KB, patch)
2016-03-11 13:12 UTC, Jonathan Druart
Details | Diff | Splinter Review
Pay selected test (239.77 KB, application/pdf)
2016-03-24 23:14 UTC, Claudio
Details
Bug 15397 - Pay selected does not works as expected (1.35 KB, patch)
2016-07-19 13:14 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 15397 - Pay selected does not works as expected (1.41 KB, patch)
2016-07-19 14:56 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 15397 - Pay selected does not works as expected (1.55 KB, patch)
2016-07-25 12:42 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Josef Moravec 2015-12-18 09:30:57 UTC
When patron has more fees (account lines) and you wan't to pay just some of them, you select wanted lines a click on "pay selected" button. But the fine isn't paid, the "amountoutstandig" is not modified, but it is added new line with "pay" code an with amountoutstanding below zero. Paying one or all fine works as expected. Paying selected worked some time ago, but I don't know when it stopped working, we realize it after upgrade to 3.22.
Comment 1 Claudio 2016-03-01 17:12:26 UTC
This problem is generating a lot of confusion in users
Comment 2 Jonathan Druart 2016-03-11 13:12:21 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2016-03-11 13:13:32 UTC
I have just tried something, but I cannot go further (I'd like to keep my mental health).
Comment 4 Claudio 2016-03-11 22:20:14 UTC
Jonathan, I have tested in a local installation (3.22.4) and works fine!
Comment 5 Claudio 2016-03-13 01:12:13 UTC
Jonathan, I made a mistake: the test went well in 3.22.3 but went wrong in 3.22.4
Comment 6 Sally 2016-03-21 16:43:26 UTC
Test Plan:

1)  Create invoices on the account.
2)  Use 'Pay selected' to pay off one line using the correct money.

Outcome:  Works as expected.

3)  Create invoices on the account
4)  Use 'Pay selected' to pay off several lines using the correct money.

Outcome:  Works as expected.

5)  Create invoices on the account
6)  Use 'Pay selected' to partially pay off one line.

Outcome:  Works as expected.

7)  Create invoices on the account
8)  Use 'Pay selected' to partially pay off several lines.

Outcome:  Works as expected.

9)  Create invoices on the account
10)  Use 'Pay selected' to fully pay off one specific line, and partially pay off another specific line.

Outcome:  Works as expected.

The only thing that doesn't work correctly is overpaying on a single line.  

For instance, a patron owes £3 on one line and £4 on another line.  They dispute the £4 line, but they're happy to pay the £3 line.  They use a £5  note to pay the £3 line, and expect £2 change. 

9)  Create invoices on the account
10)  Use ''Pay selected' to overpay a single line.

Outcome:  You must pay a value less than or equal to 3.00

If you attempt again, the error message will start to count all of the lines:  You must pay a value less than or equal to 7.00

...and then paying again will cause the whole 5.00 to be taken (£3 off one line, and £2 partial payment of the £4 line).

Again, I think this patch resolves the 'pay selected' issue that was initially reported.  

Would we consider the overpayment of a single line problem as a separate issue?
Comment 7 Claudio 2016-03-24 23:14:34 UTC
Created attachment 49574 [details]
Pay selected test

This is my test in 3.22.4. Simply pay fines selecting all account lines (as Koha suggests). It doesn't work.
Comment 8 Kyle M Hall 2016-07-19 13:14:44 UTC Comment hidden (obsolete)
Comment 9 Josef Moravec 2016-07-19 14:56:50 UTC Comment hidden (obsolete)
Comment 10 Josef Moravec 2016-07-19 14:57:53 UTC
It works! Many thanks Kyle!
Comment 11 Jonathan Druart 2016-07-25 12:42:09 UTC
Created attachment 53681 [details] [review]
Bug 15397 - Pay selected does not works as expected

When patron has more fees (account lines) and you wan't to pay just some
of them, you select wanted lines a click on "pay selected" button. But
the fine isn't paid, the "amountoutstandig" is not modified, but it is
added new line with "pay" code an with amountoutstanding below zero.
Paying one or all fine works as expected. Paying selected worked some
time ago, but I don't know when it stopped working, we realize it after
upgrade to 3.22.

Test Plan:
1) Apply this patch
2) Pay fines using "Pay selected"
3) Note the payment and the fees outstanding balances are reduced!

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 12 Kyle M Hall 2016-08-01 10:49:56 UTC
Pushed to master for Koha 16.11!
Comment 13 Frédéric Demians 2016-08-05 06:05:54 UTC
Pushed in 16.05. Will be in 16.05.03.
Comment 14 Julian Maurice 2016-08-17 12:14:04 UTC
Patch pushed to 3.22.x, will be in 3.22.10