@@ -, +, @@
---
.../rowGroup/dataTables.rowGroup.min.js | 25 +++++++++++
.../stylesheets/rowGroup.dataTables.min.css | 1 +
.../intranet-tmpl/prog/en/modules/pos/pay.tt | 1 -
.../prog/en/modules/pos/register.tt | 41 ++++++++++++-------
4 files changed, 53 insertions(+), 15 deletions(-)
create mode 100644 koha-tmpl/intranet-tmpl/lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js
create mode 100644 koha-tmpl/intranet-tmpl/lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css
--- a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js
+++ a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js
@@ -0,0 +1,25 @@
+/*!
+ Copyright 2017-2018 SpryMedia Ltd.
+
+ This source file is free software, available under the following license:
+ MIT license - http://datatables.net/license/mit
+
+ This source file is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details.
+
+ For details please refer to: http://www.datatables.net
+ RowGroup 1.1.0
+ ©2017-2018 SpryMedia Ltd - datatables.net/license
+*/
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(a,d,c){a instanceof String&&(a=String(a));for(var e=a.length,f=0;f").append(a("
| ").attr("colspan",this._colspan()).append(b))).addClass(this.c.className).addClass(g).addClass("dtrg-level-"+c)}});h.defaults={className:"dtrg-group",dataSrc:0,emptyDataGroup:"No group",enable:!0,endClassName:"dtrg-end",endRender:null,startClassName:"dtrg-start",startRender:function(a,c){return c}};h.version="1.1.0";a.fn.dataTable.RowGroup=h;a.fn.DataTable.RowGroup=
+h;f.Api.register("rowGroup()",function(){return this});f.Api.register("rowGroup().disable()",function(){return this.iterator("table",function(a){a.rowGroup&&a.rowGroup.enable(!1)})});f.Api.register("rowGroup().enable()",function(a){return this.iterator("table",function(b){b.rowGroup&&b.rowGroup.enable(a===e?!0:a)})});f.Api.register("rowGroup().dataSrc()",function(a){return a===e?this.context[0].rowGroup.dataSrc():this.iterator("table",function(b){b.rowGroup&&b.rowGroup.dataSrc(a)})});a(c).on("preInit.dt.dtrg",
+function(b,c,d){"dt"===b.namespace&&(b=c.oInit.rowGroup,d=f.defaults.rowGroup,b||d)&&(d=a.extend({},d,b),!1!==b&&new h(c,d))});return h});
--- a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css
+++ a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css
@@ -0,0 +1, @@
+table.dataTable tr.dtrg-group td{background-color:#e0e0e0}table.dataTable tr.dtrg-group.dtrg-level-0 td{font-weight:bold}table.dataTable tr.dtrg-group.dtrg-level-1 td,table.dataTable tr.dtrg-group.dtrg-level-2 td{background-color:#f0f0f0;padding-top:0.25em;padding-bottom:0.25em;padding-left:2em;font-size:0.9em}table.dataTable tr.dtrg-group.dtrg-level-2 td{background-color:#f3f3f3}
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt
@@ -178,7 +178,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 %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt
@@ -9,6 +9,7 @@
[% INCLUDE 'doc-head-open.inc' %]
Koha › Cashup
[% INCLUDE 'doc-head-close.inc' %]
+[% Asset.css("lib/jquery/plugins/rowGroup/stylesheets/rowGroup.dataTables.min.css") | $raw %]
@@ -53,6 +54,9 @@
Receipt ID
|
+
+ Transaction
+ |
Description of charges
|
@@ -69,22 +73,10 @@
[% FOREACH accountline IN accountlines %]
[% IF accountline.is_credit %]
-
- [% accountline.accountlines_id %] |
-
- [%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])
- |
- |
-
- [% accountline.amount * -1 | $Price %]
- |
-
-
- |
-
[% FOREACH credit IN accountline.credit_offsets %]
[% accountline.accountlines_id %] |
+ { "type": "credit", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" } |
[%- PROCESS account_type_description account=credit.debit -%] |
[% credit.debit.amount | $Price %] |
|
@@ -96,7 +88,7 @@
- Total income: |
+ Total income: |
[% accountlines.total * -1 | $Price %] |
|
@@ -113,7 +105,28 @@
[% MACRO jsinclude BLOCK %]
+ [% INCLUDE 'datatables.inc' %]
+ [% Asset.js("lib/jquery/plugins/rowGroup/dataTables.rowGroup.min.js") | $raw %]