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> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
4237fa9512
commit
c5c7f3efa2
1 changed files with 5 additions and 4 deletions
|
@ -108,8 +108,8 @@
|
|||
</li>
|
||||
<li>
|
||||
<label>Change to give: </label>
|
||||
<span id="change">0.00</span>
|
||||
<input type="hidden" name="change" value="0.00"/>
|
||||
<span id="change">[% 0 | $Price %]</span>
|
||||
<input type="hidden" name="change" value="[% 0 | $Price %]"/>
|
||||
</li>
|
||||
|
||||
[% PROCESS account_payment_types %]
|
||||
|
@ -156,7 +156,7 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
<p>The amount collected from the patron is higher than the amount to be paid.</p>
|
||||
<p>The change to give is <b><span id="modal_change">0.00</span></b>.</p>
|
||||
<p>The change to give is <b><span id="modal_change">[% 0 | $Price %]</span></b>.</p>
|
||||
<p>Confirm this payment?</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
@ -242,9 +242,10 @@
|
|||
|
||||
function updateChangeValues() {
|
||||
var change = $('#change')[0];
|
||||
var zero_formatted = "[% 0 | $Price %]";
|
||||
change.innerHTML = Math.round(($('#collected')[0].value - $('#paid')[0].value) * 100) / 100;
|
||||
if (change.innerHTML <= 0) {
|
||||
change.innerHTML = "0.00";
|
||||
change.innerHTML = zero_formatted;
|
||||
} else {
|
||||
change.value = change.innerHTML;
|
||||
moneyFormat(change);
|
||||
|
|
Loading…
Reference in a new issue