@@ -, +, @@
---
.../prog/en/modules/pos/register.tt | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt
@@ -99,9 +99,20 @@
[% FOREACH accountline IN accountlines %]
[% IF accountline.is_credit %]
+ [% IF accountline.credit_offsets.count == 1 %]
+
+ |
+ {} |
+ [% accountline.timestamp | $KohaDates with_hours => 1 %] ([% IF accountline.credit_number %][%- accountline.credit_number | html -%][% ELSE %][% accountline.accountlines_id | html %][% END %]) |
+ [%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_type ) | html %]) |
+ |
+ [% accountline.amount * -1 | $Price %] |
+ |
+
+ [% ELSE %]
[% FOREACH credit IN accountline.credit_offsets %]
[% IF credit.debit %]
-
+
[% accountline.accountlines_id | html %] |
{ "type": "credit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_type ) | html %])", "amount": "[% accountline.amount * -1 | $Price %]", "timestamp": "[% accountline.timestamp | $KohaDates with_hours => 1 %]" } |
|
@@ -122,6 +133,7 @@
[% END %]
[% END %]
+ [% END %]
[% ELSE %]
[% FOREACH debit IN accountline.debit_offsets %]
[% IF debit.credit %]
@@ -346,6 +358,7 @@
rowGroup: {
dataSrc: 0,
startRender: function ( rows, group ) {
+ if ( group ) {
var details = JSON.parse(rows.data().pluck(1).pop());
var identifier = details.identifier || group;
return $('
')
@@ -353,6 +366,7 @@
.append( ''+details.description+' | ' )
.append( ''+details.amount+' | ' )
.append( ' | ');
+ }
},
endRender: null,
},
--