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 99-107 Link Here
99
                <tbody>
99
                <tbody>
100
                    [% FOREACH accountline IN accountlines %]
100
                    [% FOREACH accountline IN accountlines %]
101
                        [% IF accountline.is_credit %]
101
                        [% IF accountline.is_credit %]
102
                        [% IF accountline.credit_offsets.count == 1 %]
103
                            <tr class="credit dtrg-group dtrg-start dtrg-level-0">
104
                                <td></td>
105
                                <td>{}</td>
106
                                <td>[% accountline.timestamp | $KohaDates with_hours => 1 %] ([% IF accountline.credit_number %][%- accountline.credit_number | html -%][% ELSE %][% accountline.accountlines_id | html %][% END %])</td>
107
                                <td>[%- PROCESS account_type_description account=accountline -%] ([% AuthorisedValues.GetByCode( 'PAYMENT_TYPE', accountline.payment_type ) | html %])</td>
108
                                <td></td>
109
                                <td>[% accountline.amount * -1 | $Price %]</td>
110
                                <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>
111
                            </tr>
112
                            [% ELSE %]
102
                            [% FOREACH credit IN accountline.credit_offsets %]
113
                            [% FOREACH credit IN accountline.credit_offsets %]
103
                            [% IF credit.debit %]
114
                            [% IF credit.debit %]
104
                            <tr>
115
                            <tr cnt="[% accountline.credit_offsets.count %]">
105
                                <td>[% accountline.accountlines_id | html %]</td>
116
                                <td>[% accountline.accountlines_id | html %]</td>
106
                                <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>
117
                                <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>
107
                                <td></td>
118
                                <td></td>
Lines 122-127 Link Here
122
                            </tr>
133
                            </tr>
123
                            [% END %]
134
                            [% END %]
124
                            [% END %]
135
                            [% END %]
136
                            [% END %]
125
                        [% ELSE %]
137
                        [% ELSE %]
126
                            [% FOREACH debit IN accountline.debit_offsets %]
138
                            [% FOREACH debit IN accountline.debit_offsets %]
127
                            [% IF debit.credit %]
139
                            [% IF debit.credit %]
Lines 346-351 Link Here
346
            rowGroup: {
358
            rowGroup: {
347
                dataSrc: 0,
359
                dataSrc: 0,
348
                startRender: function ( rows, group ) {
360
                startRender: function ( rows, group ) {
361
                    if ( group ) {
349
                    var details = JSON.parse(rows.data().pluck(1).pop());
362
                    var details = JSON.parse(rows.data().pluck(1).pop());
350
                    var identifier = details.identifier || group;
363
                    var identifier = details.identifier || group;
351
                    return $('<tr class="'+details.type+'"/>')
364
                    return $('<tr class="'+details.type+'"/>')
Lines 353-358 Link Here
353
                        .append( '<td colspan="2">'+details.description+'</td>' )
366
                        .append( '<td colspan="2">'+details.description+'</td>' )
354
                        .append( '<td>'+details.amount+'</td>' )
367
                        .append( '<td>'+details.amount+'</td>' )
355
                        .append( '<td><button class="printReceipt btn btn-default btn-xs" data-accountline="'+group+'"><i class="fa fa-print"></i> ' + _("Print receipt") + '</button></td>');
368
                        .append( '<td><button class="printReceipt btn btn-default btn-xs" data-accountline="'+group+'"><i class="fa fa-print"></i> ' + _("Print receipt") + '</button></td>');
369
                    }
356
                },
370
                },
357
                endRender: null,
371
                endRender: null,
358
            },
372
            },
359
- 

Return to bug 29987