Bugzilla – Attachment 116772 Details for
Bug 26273
Expose cashup summary history for a cash register
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26273: (follow-up) Format dates and money correctly.
Bug-26273-follow-up-Format-dates-and-money-correct.patch (text/plain), 2.74 KB, created by
ByWater Sandboxes
on 2021-02-11 16:02:05 UTC
(
hide
)
Description:
Bug 26273: (follow-up) Format dates and money correctly.
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2021-02-11 16:02:05 UTC
Size:
2.74 KB
patch
obsolete
>From 7f6cd22146ffe9d224a73be99936585806867303 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 10 Feb 2021 17:31:56 +0000 >Subject: [PATCH] Bug 26273: (follow-up) Format dates and money correctly. > >This patch adds the missing formatting for the Datetime and Amount >fields. > >Test plan >1/ Apply patch and reload register page to re-display the cashups table >2/ Note that the 'Date' field now displays a nicely formatted date >without an offset. >3/ Note that the 'Amount' field now displays the number according to >your money formatting preferences (with 2 decimal places in most cases) >4/ Signoff > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >index bb607901b1..e368f65043 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >@@ -321,6 +321,7 @@ > [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %] > [% Asset.js("js/cashup_modal.js") | $raw %] > [% INCLUDE 'calendar.inc' %] >+ [% INCLUDE 'js-date-format.inc' %] > <script> > var sales_table = $("#sales").dataTable($.extend(true, {}, dataTablesDefaults, { > orderFixed: [ 0, 'asc'], >@@ -421,18 +422,24 @@ > { > "data": "timestamp", > "searchable": true, >- "orderable": true >+ "orderable": true, >+ "render": function(data, type, row, meta) { >+ return $datetime(row.timestamp); >+ } > }, > { > "data": "amount", > "searchable": true, >- "orderable": true >+ "orderable": true, >+ "render": function(data, type, row, meta) { >+ var amt = row.amount * -1; >+ return (amt).format_price(); >+ } > }, > { > "data": function( row, type, val, meta ) { > var result = '<a class="btn btn-default btn-xs" role="button" data-toggle="modal" data-cashup="'+encodeURIComponent(row.cashup_id)+'" data-register="[% register.description | html %]" href="#cashupSummaryModal"><i class="fa fa-pencil" aria-hidden="true"></i> '+_("Summary")+'</a>\n'; > return result; >- > }, > "searchable": false, > "orderable": false >-- >2.11.0
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 26273
:
116176
|
116640
|
116685
|
116691
|
116692
|
116697
|
116698
|
116699
|
116710
|
116771
|
116772
|
116773
|
117449
|
117450
|
117451
|
117787
|
117793
|
117809
|
117810
|
117811
|
117829
|
117830
|
117831
|
117832
|
117833
|
117834
|
118125
|
118129
|
118130
|
118149
|
118150
|
118151
|
118152
|
120403
|
120404