Bug 22269 - Pay amount - modal confirmation of amount to return to patron should be suppressed if attempting to pay (not collect) more than owed
Summary: Pay amount - modal confirmation of amount to return to patron should be suppr...
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 11373
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-04 17:41 UTC by Nick Clemens
Modified: 2021-06-14 21:28 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Payment fails if amount collected is higher (310.64 KB, image/gif)
2019-10-25 15:11 UTC, Caroline Cyr La Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2019-02-04 17:41:51 UTC
To recreate:
1 - Add a fine or find a patron owing money
2 - Go to pay fines, pay amount
3 - Set amount to be paid higher than amount owed
4 - Set amount collected higher than amount paid
5 - Note you get a confirmation modal, confirm
6 - payment fails

Expected action would be that modal is prevented or notifies user that they are trying to pay more than owed.
Comment 1 Caroline Cyr La Rose 2019-10-25 15:11:05 UTC
Created attachment 94785 [details]
Payment fails if amount collected is higher
Comment 2 Caroline Cyr La Rose 2019-10-25 15:13:51 UTC
I'm not sure if this is the same bug as the one I'm experiencing.

I'm trying to understand the new "change to give" feature. If I try to pay a 19,33$ charge with a 20$ bill, I get a notification saying I owe 0,67$ to the user, I confirm, and then the payment fails because "You must pay a value less than or equal to 19.33".

I attached a gif showing what I mean. 

To recreate:
1 - Add a fine or find a patron owing money
2 - Go to pay fines, pay amount
3 - Set amount collected higher than amount paid
4 - Note you get a confirmation modal, confirm
5 - payment fails
Comment 3 Lucas Gass 2020-08-27 23:01:05 UTC
When I attempt to recreate I get "You must pay a value less than or equal to X", so I think this is no longer a problem?
Comment 4 Nick Clemens 2020-08-28 10:03:43 UTC
(In reply to Lucas Gass from comment #3)
> When I attempt to recreate I get "You must pay a value less than or equal to
> X", so I think this is no longer a problem?

Indeed, works for me now

Caroline, can you check the db values for your patrons charges and ensure they don't owe any partial cents? If not, it may be a math error (floating point owed something like 19.32999999998)
Comment 5 Nick Clemens 2020-08-28 10:24:36 UTC
(In reply to Caroline Cyr La Rose from comment #2)
> I'm not sure if this is the same bug as the one I'm experiencing.
> 
> I'm trying to understand the new "change to give" feature. If I try to pay a
> 19,33$ charge with a 20$ bill, I get a notification saying I owe 0,67$ to
> the user, I confirm, and then the payment fails because "You must pay a
> value less than or equal to 19.33".
> 
> I attached a gif showing what I mean. 
> 
> To recreate:
> 1 - Add a fine or find a patron owing money
> 2 - Go to pay fines, pay amount
> 3 - Set amount collected higher than amount paid
> 4 - Note you get a confirmation modal, confirm
> 5 - payment fails

Maybe this one:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26076
Comment 6 Caroline Cyr La Rose 2020-08-28 13:35:19 UTC
Indeed, it works now. :)

Caroline