[% IF credit.debit %]
<tr>
<td>[% accountline.accountlines_id | html %]</td>
- <td>{ "type": "credit", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td>
+ <td>{ "type": "credit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td>
<td></td>
<td>
[%- PROCESS account_type_description account=credit.debit -%]
[% IF debit.credit %]
<tr>
<td>[% accountline.accountlines_id | html %]</td>
- <td>{ "type": "debit", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td>
+ <td>{ "type": "debit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td>
<td></td>
<td>[%- PROCESS account_type_description account=debit.credit -%]</td>
<td>
[% IF credit.debit %]
<tr>
<td>[% accountline.accountlines_id | html %]</td>
- <td>{ "type": "credit", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td>
+ <td>{ "type": "credit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td>
<td></td>
<td>
[%- PROCESS account_type_description account=credit.debit -%]
[% IF debit.credit %]
<tr>
<td>[% accountline.accountlines_id | html %]</td>
- <td>{ "type": "debit", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td>
+ <td>{ "type": "debit", "identifier": "[%- accountline.credit_number | html -%]", "description": "[%- PROCESS account_type_description account=accountline -%] ([% accountline.payment_type | html %])", "amount": "[% accountline.amount * -1 | $Price %]" }</td>
<td></td>
<td>[%- PROCESS account_type_description account=debit.credit -%]</td>
<td>[%- IF debit.credit.description %][% debit.credit.description | html %][% END %]
dataSrc: 0,
startRender: function ( rows, group ) {
var details = JSON.parse(rows.data().pluck(1).pop());
+ var identifier = details.identifier || group;
return $('<tr class="'+details.type+'"/>')
- .append( '<td>'+group+'</td>' )
+ .append( '<td>'+identifier+'</td>' )
.append( '<td colspan="2">'+details.description+'</td>' )
.append( '<td>'+details.amount+'</td>' )
.append( '<td><button class="printReceipt btn btn-default btn-xs" data-accountline="'+group+'"><i class="fa fa-print"></i> ' + _("Print receipt") + '</button></td>');
dataSrc: 0,
startRender: function ( rows, group ) {
var details = JSON.parse(rows.data().pluck(1).pop());
+ var identifier = details.identifier || group;
return $('<tr class="'+details.type+'"/>')
- .append( '<td>'+group+'</td>' )
+ .append( '<td>'+identifier+'</td>' )
.append( '<td colspan="2">'+details.description+'</td>' )
.append( '<td>'+details.amount+'</td>' )
.append( '<td><button class="printReceipt btn btn-default btn-xs" data-accountline="'+group+'"><i class="fa fa-print"></i> Print receipt</button></td>');