Bugzilla – Attachment 116640 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: Add historic cashups table to register page
Bug-26273-Add-historic-cashups-table-to-register-p.patch (text/plain), 3.42 KB, created by
PTFS Europe Sandboxes
on 2021-02-10 10:16:52 UTC
(
hide
)
Description:
Bug 26273: Add historic cashups table to register page
Filename:
MIME Type:
Creator:
PTFS Europe Sandboxes
Created:
2021-02-10 10:16:52 UTC
Size:
3.42 KB
patch
obsolete
>From eee835052e5219a69a0a9c0d39e63849374ebea5 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 1 Feb 2021 14:50:02 +0000 >Subject: [PATCH] Bug 26273: Add historic cashups table to register page > >This patch adds a historic cashups table to the bottom of the register >transaction details page. It will only display if one or more cashups >have taken place and contains links to allow display of the summary >detail modal for each cashup. > >Test plan >1/ Enable UseCashRegisters >2/ Undertake a few transactions and cashups >3/ View the 'Register details' page >4/ Note the appearance of a 'Cashup history' section at the bottom of >the page >5/ Note that 'Summary' button displays the relevant modal >6/ Signoff > >Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk> >--- > .../intranet-tmpl/prog/en/modules/pos/register.tt | 50 ++++++++++++++++++++++ > 1 file changed, 50 insertions(+) > >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 5569539969..bb607901b1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >@@ -223,6 +223,17 @@ > </table> > [% END %] > >+ <h2>Cashup history</h2> >+ <div class="table_cashups_table_controls"></div> >+ <table id="table_cashups"> >+ <thead> >+ <tr> >+ <th>Date</th> >+ <th>Amount</th> >+ <th data-class-name="actions">Actions</th> >+ </tr> >+ </thead> >+ </table> > [% END %] > </div> > >@@ -390,6 +401,45 @@ > window.print(); > }); > >+ >+ var cashups_table_url = "/api/v1/cash_registers/[% register.id | html %]/cashups?"; >+ var cashups_table = $("#table_cashups").api({ >+ "ajax": { >+ "url": cashups_table_url >+ }, >+ "order": [[ 1, "asc" ]], >+ "columnDefs": [ { >+ "targets": [0,1], >+ "render": function (data, type, row, meta) { >+ if ( type == 'display' ) { >+ return data.escapeHtml(); >+ } >+ return data; >+ } >+ } ], >+ "columns": [ >+ { >+ "data": "timestamp", >+ "searchable": true, >+ "orderable": true >+ }, >+ { >+ "data": "amount", >+ "searchable": true, >+ "orderable": true >+ }, >+ { >+ "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 >+ } >+ ] >+ }, [], 1); >+ > $(document).ready(function() { > // http://jqueryui.com/demos/datepicker/#date-range > var dates = $( "#from, #to" ).datepicker({ >-- >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