Bug 24479 - POS doesn't follow CurrencyFormat
Summary: POS doesn't follow CurrencyFormat
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Fines and fees (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on: 22359 23354
Blocks: 13985
  Show dependency treegraph
 
Reported: 2020-01-22 07:31 UTC by Katrin Fischer
Modified: 2021-12-13 21:08 UTC (History)
5 users (show)

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


Attachments
Bug 24479: Use $Price filters for '0' amounts (2.19 KB, patch)
2020-03-02 11:33 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 24479: Use $Price filters for '0' amounts (2.26 KB, patch)
2020-03-03 15:03 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 24479: Use $Price filters for '0' amounts (2.31 KB, patch)
2020-03-04 12:06 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2020-01-22 07:31:50 UTC
There is some hardcoded stuff in the new POS feature that is wrong when another CurrencyFormat tha US is used:

<p>The change to give is <b><span id="modal_change">0.00</span></b>.</p>
<span id="change">0.00</span>
<input type="hidden" name="change" value="0.00"/>

This needs a thorough check and fix.
Comment 1 Martin Renvoize 2020-01-22 11:19:57 UTC
The points you've made apply equally to the change feature elsewhere and should be fixed there at the same time.
Comment 2 Katrin Fischer 2020-01-22 13:17:52 UTC
I am not sure I undertand - you are using the Price TT plugin in parts of the page, but when you get the confirmation message for change the value is not formatted.


<p>The change to give is <b><span id="modal_change">0.00</span></b>.</p>

I am not even sure why there is 0.00 in there - and the b span construct seems risky for translation.
Comment 3 Martin Renvoize 2020-03-02 11:33:39 UTC
Created attachment 99903 [details] [review]
Bug 24479: Use $Price filters for '0' amounts

This patch adds the use of the $Price TT filter to properly format '0'
amounts in the POS system.
Comment 4 Martin Renvoize 2020-03-02 17:19:10 UTC
Test plan
1) Change the Currency format preference
2) enter an amount equal to or less than the amount owed into the collected field in the point of sale page and note that on leaving the field it will be formatted as per the system preference.
Comment 5 PTFS Europe Sandboxes 2020-03-03 15:03:27 UTC
Created attachment 100037 [details] [review]
Bug 24479: Use $Price filters for '0' amounts

This patch adds the use of the $Price TT filter to properly format '0'
amounts in the POS system.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 6 Tomás Cohen Arazi 2020-03-04 12:06:30 UTC
Created attachment 100099 [details] [review]
Bug 24479: Use $Price filters for '0' amounts

This patch adds the use of the $Price TT filter to properly format '0'
amounts in the POS system.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Martin Renvoize 2020-03-04 14:54:31 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 8 Joy Nelson 2020-04-01 21:16:27 UTC
not pushed to 19.11.x due to dependencies
Comment 9 Jonathan Druart 2020-07-30 13:26:22 UTC
+                                <input type="hidden" name="change" value="[% 0 | $Price %]"/>

I think this is not correct, $Price should not be used for hidden inputs.