Bug 24395 - Floats in cash registers have 6 decimals
Summary: Floats in cash registers have 6 decimals
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Katrin Fischer
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-09 20:17 UTC by Caroline Cyr La Rose
Modified: 2020-02-13 16:16 UTC (History)
6 users (show)

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


Attachments
Bug 24395: Show initial float using the Price TT plugin on summary page (2.58 KB, patch)
2020-01-15 23:14 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24395: Show initial float using the Price TT plugin on summary page (2.55 KB, patch)
2020-01-15 23:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 24395: Show initial float using the Price TT plugin on summary page (2.60 KB, patch)
2020-01-16 08:47 UTC, David Nind
Details | Diff | Splinter Review
Bug 24395: Show initial float using the Price TT plugin on summary page (2.67 KB, patch)
2020-01-16 21:34 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 24395: Show initial float using the Price TT plugin on summary page (2.77 KB, patch)
2020-01-17 07:17 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2020-01-09 20:17:06 UTC
When going to Administration > Cash registers, the floats are displayed with 6 decimals. I think it would be better if it was limited to 2 or however many your active currency uses.
Comment 1 Katrin Fischer 2020-01-14 07:23:41 UTC
Probably should be using the TT Price template?
Comment 2 Katrin Fischer 2020-01-15 23:14:06 UTC
Created attachment 97422 [details] [review]
Bug 24395: Show initial float using the Price TT plugin on summary page

For displaying monetary amounts, we should be using the Price TT
plugin everywhere. This adds it to the cash register summary page.

To test:
- Create a cash register
- Check the cash register table for "Initial float"
- Verify the amount shows with more than 2 decimals
- Edit cash register - verify the same display there
- Apply patch
- Check again - it should display now with only 2 decimals

Note: This doesn't fix
Comment 3 Katrin Fischer 2020-01-15 23:15:30 UTC
Created attachment 97423 [details] [review]
Bug 24395: Show initial float using the Price TT plugin on summary page

For displaying monetary amounts, we should be using the Price TT
plugin everywhere. This adds it to the cash register summary page.

To test:
- Create a cash register
- Check the cash register table for "Initial float"
- Verify the amount shows with more than 2 decimals
- Edit cash register - verify the same display there
- Apply patch
- Check again - it should display now with only 2 decimals
Comment 4 David Nind 2020-01-16 08:47:50 UTC
Created attachment 97432 [details] [review]
Bug 24395: Show initial float using the Price TT plugin on summary page

For displaying monetary amounts, we should be using the Price TT
plugin everywhere. This adds it to the cash register summary page.

To test:
- Enable the cash register feature (set UseCashRegisters to 'Use')
- Go to More > Administration > Accounting > Cash registers
- Create a cash register
- Check the cash register table for "Initial float"
- Verify the amount shows with more than 2 decimals
- Edit cash register - verify the same display there
- Apply patch
- Check again - it should display now with only 2 decimals

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Caroline Cyr La Rose 2020-01-16 21:34:04 UTC
Created attachment 97473 [details] [review]
Bug 24395: Show initial float using the Price TT plugin on summary page

For displaying monetary amounts, we should be using the Price TT
plugin everywhere. This adds it to the cash register summary page.

To test:
- Create a cash register
- Check the cash register table for "Initial float"
- Verify the amount shows with more than 2 decimals
- Edit cash register - verify the same display there
- Apply patch
- Check again - it should display now with only 2 decimals

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 6 Katrin Fischer 2020-01-17 07:04:08 UTC
Thx Caroline and David!
Comment 7 Marcel de Rooy 2020-01-17 07:17:34 UTC
Created attachment 97474 [details] [review]
Bug 24395: Show initial float using the Price TT plugin on summary page

For displaying monetary amounts, we should be using the Price TT
plugin everywhere. This adds it to the cash register summary page.

To test:
- Create a cash register
- Check the cash register table for "Initial float"
- Verify the amount shows with more than 2 decimals
- Edit cash register - verify the same display there
- Apply patch
- Check again - it should display now with only 2 decimals

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Martin Renvoize 2020-01-20 14:04:56 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 9 Joy Nelson 2020-01-31 23:46:51 UTC
Pushed to 19.11.x branch for 19.11.03
Comment 10 Lucas Gass 2020-02-13 16:16:03 UTC
no cash_registers.tt in 19.05.x, not backporting