Bugzilla – Attachment 116692 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.31 KB, created by
Martin Renvoize (ashimema)
on 2021-02-11 08:11:10 UTC
(
hide
)
Description:
Bug 26273: (follow-up) Format dates and money correctly.
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-02-11 08:11:10 UTC
Size:
2.31 KB
patch
obsolete
>From c456e93e73b64229dbc4913b221003c701fb32ff 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. >--- > .../intranet-tmpl/prog/en/modules/pos/register.tt | 12 +++++++++--- > 1 file changed, 9 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..a7e3b62636 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,23 @@ > { > "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) { >+ return (row.amount).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.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 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