Bugzilla – Attachment 99903 Details for
Bug 24479
POS doesn't follow CurrencyFormat
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24479: Use $Price filters for '0' amounts
Bug-24479-Use-Price-filters-for-0-amounts.patch (text/plain), 2.19 KB, created by
Martin Renvoize (ashimema)
on 2020-03-02 11:33:39 UTC
(
hide
)
Description:
Bug 24479: Use $Price filters for '0' amounts
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-03-02 11:33:39 UTC
Size:
2.19 KB
patch
obsolete
>From b3a10852051a7e2cc5a49bb24cad870f857adf29 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 2 Mar 2020 11:32:42 +0000 >Subject: [PATCH] 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. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >index e0a68b1436..e231dab0bc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -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"> >@@ -243,9 +243,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); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24479
:
99903
|
100037
|
100099