From 0cc5ed47e65bec6954e5b011167836a25069f295 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 19 May 2021 14:55:01 +0100 Subject: [PATCH] Bug 28390: Move timestamp into grouping row This patch moves the timestamp that was getting repeated for each transaction breakdown row into the group header row. Test plan 1/ Add a series of transactions to to a register (via Point of Sale or/and Borrower Accounts) 2/ View the transactions (and past transactions tables) on the Register details page 3/ Apply the patch and compare the display Signed-off-by: Lucas Gass Signed-off-by: Nick Clemens --- .../prog/en/modules/pos/register.tt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 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 4ebc04669b..bdef70e02a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt @@ -103,8 +103,8 @@ [% 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 %]" } - [% IF accountline.timestamp %][% accountline.timestamp | $KohaDates with_hours => 1 %][% END %] + { "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 %]" } + [%- PROCESS account_type_description account=credit.debit -%] [%- IF credit.debit.description -%] ([% credit.debit.description | html %])[%- END -%] @@ -127,7 +127,7 @@ [% IF debit.credit %] [% accountline.accountlines_id | html %] - { "type": "debit", "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 %]" } + { "type": "debit", "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 %]" } [%- PROCESS account_type_description account=debit.credit -%] @@ -192,8 +192,8 @@ [% 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 %]" } - [% IF accountline.timestamp %][% accountline.timestamp | $KohaDates with_hours => 1 %][% END %] + { "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 %]" } + [%- PROCESS account_type_description account=credit.debit -%] [%- IF credit.debit.description -%] ([% credit.debit.description | html %])[%- END -%] @@ -216,7 +216,7 @@ [% IF debit.credit %] [% accountline.accountlines_id | html %] - { "type": "debit", "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 %]" } + { "type": "debit", "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 %]" } [%- PROCESS account_type_description account=debit.credit -%] @@ -342,7 +342,7 @@ var details = JSON.parse(rows.data().pluck(1).pop()); var identifier = details.identifier || group; return $('') - .append( ''+identifier+'' ) + .append( ''+details.timestamp+' ('+identifier+')' ) .append( ''+details.description+'' ) .append( ''+details.amount+'' ) .append( ''); @@ -366,7 +366,7 @@ var details = JSON.parse(rows.data().pluck(1).pop()); var identifier = details.identifier || group; return $('') - .append( ''+identifier+'' ) + .append( ''+details.timestamp+' ('+identifier+')' ) .append( ''+details.description+'' ) .append( ''+details.amount+'' ) .append( ''); -- 2.20.1