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.
This problem is generating a lot of confusion in users
Created attachment 49009 [details] [review] Bug 15397: just a try
I have just tried something, but I cannot go further (I'd like to keep my mental health).
Jonathan, I have tested in a local installation (3.22.4) and works fine!
Jonathan, I made a mistake: the test went well in 3.22.3 but went wrong in 3.22.4
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?
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.
Created attachment 53486 [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!
Created attachment 53490 [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>
It works! Many thanks Kyle!
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>
Pushed to master for Koha 16.11!
Pushed in 16.05. Will be in 16.05.03.
Patch pushed to 3.22.x, will be in 3.22.10