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.
The points you've made apply equally to the change feature elsewhere and should be fixed there at the same time.
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.
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.
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.
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>
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>
Nice work everyone! Pushed to master for 20.05
not pushed to 19.11.x due to dependencies
+ <input type="hidden" name="change" value="[% 0 | $Price %]"/> I think this is not correct, $Price should not be used for hidden inputs.