Summary: | Entering multiple lines of an item in Point of Sale can make the Collect Payment field off | ||
---|---|---|---|
Product: | Koha | Reporter: | Kelly McElligott <kelly> |
Component: | Fines and fees | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | CLOSED FIXED | QA Contact: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Severity: | major | ||
Priority: | P5 - low | CC: | andrew, caroline.cyr-la-rose, david, esther.melander, nick, sally.healey, tomascohen, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This fixes the POS transactions page so that the total for the sale and the amount to collect are the same.
Before this a POS transaction with multiple items in the Sale box, say for example 9 x .10 items, the total in the Sale box appears correct, but the amount to Collect from Patron is off by a cent.
|
Version(s) released in: |
22.05.00,21.11.01,21.05.08,20.11.13
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 13985, 30139 | ||
Attachments: |
Calculation error
Bug 27801: Fix javascript price calculations Bug 27801: Fix javascript price calculations Bug 27801: Fix javascript price calculations Bug 27801: Fix javascript price calculations Bug 27801: Fix javascript price calculations |
Description
Kelly McElligott
2021-02-25 22:28:09 UTC
On further testing, this error also occurs when using the quantity field rather than clicking "Add" multiple times. Apologies for my indecisiveness on the severity of this bug. I'm kicking it back to Major, as I've just confirmed that once Koha has mis-calculated that total the user cannot manually correct it. :(, I should have predicted this. It's the same problem throughout Koha, but the point of sale system highlights it more often. We really need to start dealing with money differently system wide. Created attachment 125287 [details]
Calculation error
On version 21.05.14. The combination of the certain numbers appears to result in being 1 penny off. 0.6 x 3 = 1.79 0.7 x 3 = 2.09 Other combinations appear to be correct. In this case, only one item is added to the sale box. Screenshot attached to ticket. Created attachment 128228 [details] [review] Bug 27801: Fix javascript price calculations This patch ensures we're formatting the price values consistently for the table total and the amount to pay input field. Test plan 1) Add an item to charge at 0.10. 2) Add this same item 8 or 9 times (Do not use the 'quantity') 3) Note that the table total and the 'Amount paid' values do not match 4) Apply the patch and repeat the above steps.. the values should now match. Created attachment 128229 [details] [review] Bug 27801: Fix javascript price calculations This patch ensures we're formatting the price values consistently for the table total and the amount to pay input field. Test plan 1) Add an item to charge at 0.10. 2) Add this same item 8 or 9 times (Do not use the 'quantity') 3) Note that the table total and the 'Amount paid' values do not match 4) Apply the patch and repeat the above steps.. the values should now match. Created attachment 128234 [details] [review] Bug 27801: Fix javascript price calculations This patch ensures we're formatting the price values consistently for the table total and the amount to pay input field. Test plan 1) Add an item to charge at 0.10. 2) Add this same item 8 or 9 times (Do not use the 'quantity') 3) Note that the table total and the 'Amount paid' values do not match 4) Apply the patch and repeat the above steps.. the values should now match. Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> I also confirmed the errors Esther mentioned were present without the patch and fixed with it. Thanks, Martin! Created attachment 128358 [details] [review] Bug 27801: Fix javascript price calculations This patch ensures we're formatting the price values consistently for the table total and the amount to pay input field. Test plan 1) Add an item to charge at 0.10. 2) Add this same item 8 or 9 times (Do not use the 'quantity') 3) Note that the table total and the 'Amount paid' values do not match 4) Apply the patch and repeat the above steps.. the values should now match. Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Also tested, and in live operation, at Cheshire libraries. Created attachment 128449 [details] [review] Bug 27801: Fix javascript price calculations This patch ensures we're formatting the price values consistently for the table total and the amount to pay input field. Test plan 1) Add an item to charge at 0.10. 2) Add this same item 8 or 9 times (Do not use the 'quantity') 3) Note that the table total and the 'Amount paid' values do not match 4) Apply the patch and repeat the above steps.. the values should now match. Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Pushed to master for 22.05, thanks to everybody involved [U+1F984] Pushed to 21.05.x for 21.05.08 Backported: Pushed to 20.11.x branch for 20.11.13 This causes a major problem with the FR currencyformat, see Bug 30139 |