View | Details | Raw Unified | Return to bug 29987
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt (-2 / +15 lines)
Lines 102-110 Link Here
102
                <tbody>
102
                <tbody>
103
                    [% FOREACH accountline IN accountlines %]
103
                    [% FOREACH accountline IN accountlines %]
104
                        [% IF accountline.is_credit %]
104
                        [% IF accountline.is_credit %]
105
                        [% IF accountline.credit_offsets.count == 1 %]
106
                            <tr class="credit dtrg-group dtrg-start dtrg-level-0">
107
                                <td></td>
108
                                <td>{}</td>
109
                                <td>[% accountline.timestamp | $KohaDates with_hours => 1 %] ([% IF accountline.credit_number %][%- accountline.credit_number | html -%][% ELSE %][% accountline.accountlines_id | html %][% END %])</td>
110
                                <td>[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_type ) | html %])</td>
111
                                <td></td>
112
                                <td>[% accountline.amount * -1 | $Price %]</td>
113
                                <td><button class="printReceipt btn btn-default btn-xs" data-accountline="[% accountline.accountlines_id | uri %]"><i class="fa fa-print"></i> Print receipt</button></td>
114
                            </tr>
115
                            [% ELSE %]
105
                            [% FOREACH credit IN accountline.credit_offsets %]
116
                            [% FOREACH credit IN accountline.credit_offsets %]
106
                            [% IF credit.debit %]
117
                            [% IF credit.debit %]
107
                            <tr>
118
                            <tr cnt="[% accountline.credit_offsets.count %]">
108
                                <td>[% accountline.accountlines_id | html %]</td>
119
                                <td>[% accountline.accountlines_id | html %]</td>
109
                                <td>{ "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 %]" }</td>
120
                                <td>{ "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 %]" }</td>
110
                                <td></td>
121
                                <td></td>
Lines 125-130 Link Here
125
                            </tr>
136
                            </tr>
126
                            [% END %]
137
                            [% END %]
127
                            [% END %]
138
                            [% END %]
139
                            [% END %]
128
                        [% ELSE %]
140
                        [% ELSE %]
129
                            [% FOREACH debit IN accountline.debit_offsets %]
141
                            [% FOREACH debit IN accountline.debit_offsets %]
130
                            [% IF debit.credit %]
142
                            [% IF debit.credit %]
Lines 349-354 Link Here
349
            rowGroup: {
361
            rowGroup: {
350
                dataSrc: 0,
362
                dataSrc: 0,
351
                startRender: function ( rows, group ) {
363
                startRender: function ( rows, group ) {
364
                    if ( group ) {
352
                    var details = JSON.parse(rows.data().pluck(1).pop());
365
                    var details = JSON.parse(rows.data().pluck(1).pop());
353
                    var identifier = details.identifier || group;
366
                    var identifier = details.identifier || group;
354
                    return $('<tr class="'+details.type+'"/>')
367
                    return $('<tr class="'+details.type+'"/>')
Lines 356-361 Link Here
356
                        .append( '<td colspan="2">'+details.description+'</td>' )
369
                        .append( '<td colspan="2">'+details.description+'</td>' )
357
                        .append( '<td>'+details.amount+'</td>' )
370
                        .append( '<td>'+details.amount+'</td>' )
358
                        .append( '<td><button class="printReceipt btn btn-default btn-xs" data-accountline="'+group+'"><i class="fa fa-print"></i> ' + _("Print receipt") + '</button></td>');
371
                        .append( '<td><button class="printReceipt btn btn-default btn-xs" data-accountline="'+group+'"><i class="fa fa-print"></i> ' + _("Print receipt") + '</button></td>');
372
                    }
359
                },
373
                },
360
                endRender: null,
374
                endRender: null,
361
            },
375
            },
362
- 

Return to bug 29987