From 88c143c321e58f84b61872526029aea2a073b2c5 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 6 Aug 2020 12:28:48 +0100 Subject: [PATCH] Bug 19036: (QA follow-up) Add credit_number handling to POS This patch adds the display of 'credit_number' as a replacement for the internal 'accountlines_id' as the transaction identifier on the register summary page when using cash registers. --- .../intranet-tmpl/prog/en/modules/pos/register.tt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 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 2d96682a2f..e5a350f5c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt @@ -69,7 +69,7 @@ [% IF credit.debit %] [% accountline.accountlines_id | html %] - { "type": "credit", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" } + { "type": "credit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" } [%- PROCESS account_type_description account=credit.debit -%] @@ -93,7 +93,7 @@ [% IF debit.credit %] [% accountline.accountlines_id | html %] - { "type": "debit", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" } + { "type": "debit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" } [%- PROCESS account_type_description account=debit.credit -%] @@ -158,7 +158,7 @@ [% IF credit.debit %] [% accountline.accountlines_id | html %] - { "type": "credit", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" } + { "type": "credit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" } [%- PROCESS account_type_description account=credit.debit -%] @@ -180,7 +180,7 @@ [% IF debit.credit %] [% accountline.accountlines_id | html %] - { "type": "debit", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" } + { "type": "debit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" } [%- PROCESS account_type_description account=debit.credit -%] [%- IF debit.credit.description %][% debit.credit.description | html %][% END %] @@ -298,8 +298,9 @@ dataSrc: 0, startRender: function ( rows, group ) { var details = JSON.parse(rows.data().pluck(1).pop()); + var identifier = details.identifier || group; return $('') - .append( ''+group+'' ) + .append( ''+identifier+'' ) .append( ''+details.description+'' ) .append( ''+details.amount+'' ) .append( ''); @@ -318,8 +319,9 @@ dataSrc: 0, startRender: function ( rows, group ) { var details = JSON.parse(rows.data().pluck(1).pop()); + var identifier = details.identifier || group; return $('') - .append( ''+group+'' ) + .append( ''+identifier+'' ) .append( ''+details.description+'' ) .append( ''+details.amount+'' ) .append( ''); -- 2.20.1