Bugzilla – Attachment 97715 Details for
Bug 23355
Add a 'cashup' process to accounts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23355: Use rowGroup plugin
Bug-23355-Use-rowGroup-plugin.patch (text/plain), 5.05 KB, created by
Martin Renvoize (ashimema)
on 2020-01-22 12:46:20 UTC
(
hide
)
Description:
Bug 23355: Use rowGroup plugin
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-01-22 12:46:20 UTC
Size:
5.05 KB
patch
obsolete
>From df4b1b494a490e171a55170455c48aef2d4cc924 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 9 Jan 2020 13:53:28 +0000 >Subject: [PATCH] Bug 23355: Use rowGroup plugin > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../intranet-tmpl/prog/en/modules/pos/pay.tt | 1 - > .../prog/en/modules/pos/register.tt | 41 ++++++++++++------- > 2 files changed, 27 insertions(+), 15 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 6f87d8b510..38a2ff8473 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -185,7 +185,6 @@ > [% END %] > > [% MACRO jsinclude BLOCK %] >- [% Asset.js("js/admin-menu.js") | $raw %] > [% INCLUDE 'format_price.inc' %] > [% INCLUDE 'datatables.inc' %] > [% Asset.js("lib/jquery/plugins/jquery.jeditable.mini.js") | $raw %] >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 59b3994069..d7535be961 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >@@ -9,6 +9,7 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Cashup</title> > [% INCLUDE 'doc-head-close.inc' %] >+[% Asset.css("lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css") | $raw %] > </head> > > <body id="register" class="pos"> >@@ -53,6 +54,9 @@ > <th> > Receipt ID > </th> >+ <th> >+ Transaction >+ </th> > <th> > Description of charges > </th> >@@ -69,22 +73,10 @@ > <tbody> > [% FOREACH accountline IN accountlines %] > [% IF accountline.is_credit %] >- <tr class="credit"> >- <td>[% accountline.accountlines_id %]</td> >- <td> >- [%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %]) >- </td> >- <td></td> >- <td> >- [% accountline.amount * -1 | $Price %] >- </td> >- <td> >- <button class="printReceipt" data-accountline="[%- accountline.accountlines_id | html -%]"><i class="fa fa-print"></i> Print receipt</button> >- </td> >- </tr> > [% FOREACH credit IN accountline.credit_offsets %] > <tr> > <td>[% accountline.accountlines_id %]</td> >+ <td>{ "type": "credit", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td> > <td>[%- PROCESS account_type_description account=credit.debit -%]</td> > <td>[% credit.debit.amount | $Price %]</td> > <td></td> >@@ -96,7 +88,7 @@ > </tbody> > <tfoot> > <tr> >- <td colspan="3">Total income: </td> >+ <td colspan="4">Total income: </td> > <td>[% accountlines.total * -1 | $Price %]</td> > <td></td> > </tr> >@@ -113,7 +105,28 @@ > </div><!-- /.row --> > > [% MACRO jsinclude BLOCK %] >+ [% INCLUDE 'datatables.inc' %] >+ [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %] > <script> >+ var sales_table = $("#sales").dataTable($.extend(true, {}, dataTablesDefaults, { >+ orderFixed: [ 0, 'asc'], >+ columnDefs: [ { >+ targets: [ 0, 1 ], >+ visible: false >+ }], >+ rowGroup: { >+ dataSrc: 0, >+ startRender: function ( rows, group ) { >+ var details = JSON.parse(rows.data().pluck(1).pop()); >+ return $('<tr class="'+details.type+'"/>') >+ .append( '<td colspan="2">'+group+' '+details.description+'</td>' ) >+ .append( '<td>'+details.amount+'</td>' ) >+ .append( '<td><button class="printReceipt" data-accountline="'+group+'"><i class="fa fa-print"></i> Print receipt</button></td>'); >+ }, >+ endRender: null, >+ } >+ })); >+ > $(".printReceipt").click(function() { > var accountlines_id = $(this).data('accountline'); > var win = window.open('/cgi-bin/koha/pos/printreceipt.pl?action=print&accountlines_id=' + accountlines_id, '_blank'); >-- >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 23355
:
92941
|
92942
|
92943
|
92944
|
92945
|
92946
|
92947
|
92948
|
92949
|
92950
|
92951
|
92952
|
92953
|
97031
|
97032
|
97033
|
97034
|
97035
|
97036
|
97037
|
97038
|
97039
|
97040
|
97041
|
97043
|
97044
|
97045
|
97046
|
97047
|
97048
|
97049
|
97050
|
97051
|
97052
|
97053
|
97054
|
97077
|
97078
|
97079
|
97080
|
97081
|
97082
|
97083
|
97084
|
97085
|
97086
|
97087
|
97088
|
97089
|
97706
|
97707
|
97708
|
97709
|
97710
|
97711
|
97712
|
97713
|
97714
|
97715
|
97716
|
97784
|
97785
|
97786
|
97787
|
97788
|
97789
|
97790
|
97791
|
97792
|
97793
|
97794
|
97816
|
97817
|
97818
|
97819
|
97820
|
97821
|
97822
|
97823
|
98026
|
98027
|
98028
|
98835
|
98836
|
98837
|
98838
|
98839
|
98840
|
98841
|
98842
|
100009
|
100010
|
100011
|
100012
|
100013
|
100014
|
100015
|
100016
|
100017
|
100018
|
100019
|
100020
|
100021
|
100030
|
100090
|
101685