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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt (-63 / +64 lines)
Lines 197-269 Link Here
197
            </form>
197
            </form>
198
198
199
            [% IF trange_f %]
199
            [% IF trange_f %]
200
            <table id="past_sales" class="past_sales_table">
200
                <div class="page-section">
201
                <thead>
201
                    <table id="past_sales" class="past_sales_table">
202
                    <th>ID</th>
202
                        <thead>
203
                    <th>DATA</th>
203
                            <th>ID</th>
204
                    <th>Transaction</th>
204
                            <th>DATA</th>
205
                    <th>Description</th>
205
                            <th>Transaction</th>
206
                    <th>Price</th>
206
                            <th>Description</th>
207
                    <th>Total</th>
207
                            <th>Price</th>
208
                    <th class="noExport">Actions</th>
208
                            <th>Total</th>
209
                </thead>
209
                            <th class="noExport">Actions</th>
210
                <tbody>
210
                        </thead>
211
                    [% FOREACH accountline IN past_accountlines %]
211
                        <tbody>
212
                        [% IF accountline.is_credit %]
212
                            [% FOREACH accountline IN past_accountlines %]
213
                            [% FOREACH credit IN accountline.credit_offsets %]
213
                                [% IF accountline.is_credit %]
214
                            [% IF credit.debit %]
214
                                    [% FOREACH credit IN accountline.credit_offsets %]
215
                            <tr>
215
                                    [% IF credit.debit %]
216
                                <td>[% accountline.accountlines_id | html %]</td>
216
                                    <tr>
217
                                <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>
217
                                        <td>[% accountline.accountlines_id | html %]</td>
218
                                <td></td>
218
                                        <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>
219
                                <td>
219
                                        <td></td>
220
                                    [%- PROCESS account_type_description account=credit.debit -%]
220
                                        <td>
221
                                    [%- IF credit.debit.description -%] ([% credit.debit.description | html %])[%- END -%]
221
                                            [%- PROCESS account_type_description account=credit.debit -%]
222
                                    [%- IF ( credit.debit.itemnumber ) -%] (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% credit.debit.item.biblionumber | uri %]&amp;itemnumber=[% credit.debit.itemnumber | uri %]">[% credit.debit.item.biblio.title | html %]</a>)[%- END -%]
222
                                            [%- IF credit.debit.description -%] ([% credit.debit.description | html %])[%- END -%]
223
                                </td>
223
                                            [%- IF ( credit.debit.itemnumber ) -%] (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% credit.debit.item.biblionumber | uri %]&amp;itemnumber=[% credit.debit.itemnumber | uri %]">[% credit.debit.item.biblio.title | html %]</a>)[%- END -%]
224
                                <td>[% credit.debit.amount | $Price %]</td>
224
                                        </td>
225
                                <td></td>
225
                                        <td>[% credit.debit.amount | $Price %]</td>
226
                                <td>
226
                                        <td></td>
227
                                    [% IF CAN_user_cash_management_anonymous_refund && !(credit.debit.status == 'REFUNDED') && !(credit.debit.debit_type_code == 'PAYOUT') %]
227
                                        <td>
228
                                    <button type="button" class="btn btn-default btn-xs pos_refund" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=credit.debit -%]" data-accountline="[% credit.debit.accountlines_id | html %]" data-amount="[% credit.debit.amount | $Price %]" data-amountoutstanding="[% credit.debit.amountoutstanding | $Price %]" data-member="[% credit.debit.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button>
228
                                            [% IF CAN_user_cash_management_anonymous_refund && !(credit.debit.status == 'REFUNDED') && !(credit.debit.debit_type_code == 'PAYOUT') %]
229
                                    [% ELSIF CAN_user_updatecharges_refund && !(credit.debit.status == 'REFUNDED') && credit.debit.borrowernumber && !(credit.debit.debit_type_code == 'PAYOUT') %]
229
                                            <button type="button" class="btn btn-default btn-xs pos_refund" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=credit.debit -%]" data-accountline="[% credit.debit.accountlines_id | html %]" data-amount="[% credit.debit.amount | $Price %]" data-amountoutstanding="[% credit.debit.amountoutstanding | $Price %]" data-member="[% credit.debit.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button>
230
                                    <button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=credit.debit -%]" data-accountline="[% credit.debit.accountlines_id | html %]" data-amount="[% credit.debit.amount | $Price %]" data-amountoutstanding="[% credit.debit.amountoutstanding | $Price %]" data-member="[% credit.debit.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button>
230
                                            [% ELSIF CAN_user_updatecharges_refund && !(credit.debit.status == 'REFUNDED') && credit.debit.borrowernumber && !(credit.debit.debit_type_code == 'PAYOUT') %]
231
                                            <button type="button" class="btn btn-default btn-xs" data-toggle="modal" data-target="#issueRefundModal" data-item="[%- PROCESS account_type_description account=credit.debit -%]" data-accountline="[% credit.debit.accountlines_id | html %]" data-amount="[% credit.debit.amount | $Price %]" data-amountoutstanding="[% credit.debit.amountoutstanding | $Price %]" data-member="[% credit.debit.borrowernumber | html %]"><i class="fa fa-money"></i> Issue refund</button>
232
                                            [% END %]
233
                                        </td>
234
                                    </tr>
231
                                    [% END %]
235
                                    [% END %]
232
                                </td>
236
                                    [% END %]
233
                            </tr>
237
                                [% ELSE %]
234
                            [% END %]
238
                                    [% FOREACH debit IN accountline.debit_offsets %]
239
                                    [% IF debit.credit %]
240
                                    <tr>
241
                                        <td>[% accountline.accountlines_id | html %]</td>
242
                                        <td>{ "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 %]" }</td>
243
                                        <td></td>
244
                                        <td>
245
                                            [%- PROCESS account_type_description account=debit.credit -%]
246
                                            [%- IF debit.credit.description %][% debit.credit.description | html %][%- END -%]
247
                                            [%- IF ( debit.credit.itemnumber ) -%] (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% debit.credit.item.biblionumber | uri %]&amp;itemnumber=[% debit.credit.itemnumber | uri %]">[% debit.credit.item.biblio.title | html %]</a>)[%- END -%]
248
                                        </td>
249
                                        <td>[% debit.credit.amount | $Price %]</td>
250
                                        <td></td>
251
                                        <td>
252
                                            [%- IF debit.credit.credit_type_code == 'REFUND' -%]<a href="/cgi-bin/koha/members/accountline-details.pl?accountlines_id=[% debit.credit.accountlines_id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a>[%- END -%]
253
                                        </td>
254
                                    </tr>
255
                                    [% END %]
256
                                    [% END %]
257
                                [% END %]
235
                            [% END %]
258
                            [% END %]
236
                        [% ELSE %]
259
                        </tbody>
237
                            [% FOREACH debit IN accountline.debit_offsets %]
260
                        <tfoot>
238
                            [% IF debit.credit %]
239
                            <tr>
261
                            <tr>
240
                                <td>[% accountline.accountlines_id | html %]</td>
262
                                <td colspan="5">Total income: </td>
241
                                <td>{ "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 %]" }</td>
263
                                <td>[% past_accountlines.total * -1 | $Price %]</td>
242
                                <td></td>
264
                                <td></td>
243
                                <td>
244
                                    [%- PROCESS account_type_description account=debit.credit -%]
245
                                    [%- IF debit.credit.description %][% debit.credit.description | html %][%- END -%]
246
                                    [%- IF ( debit.credit.itemnumber ) -%] (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% debit.credit.item.biblionumber | uri %]&amp;itemnumber=[% debit.credit.itemnumber | uri %]">[% debit.credit.item.biblio.title | html %]</a>)[%- END -%]
247
                                </td>
248
                                <td>[% debit.credit.amount | $Price %]</td>
249
                                <td></td>
250
                                <td>
251
                                    [%- IF debit.credit.credit_type_code == 'REFUND' -%]<a href="/cgi-bin/koha/members/accountline-details.pl?accountlines_id=[% debit.credit.accountlines_id | uri %]" class="btn btn-default btn-xs"><i class="fa fa-list"></i> Details</a>[%- END -%]
252
                                </td>
253
                            </tr>
265
                            </tr>
254
                            [% END %]
266
                        </tfoot>
255
                            [% END %]
267
                    </table>
256
                        [% END %]
268
                </div> <!-- /.page-section -->
257
                    [% END %]
258
                </tbody>
259
                <tfoot>
260
                    <tr>
261
                        <td colspan="5">Total income: </td>
262
                        <td>[% past_accountlines.total * -1 | $Price %]</td>
263
                        <td></td>
264
                    </tr>
265
                </tfoot>
266
            </table>
267
            [% END %]
269
            [% END %]
268
270
269
            <hr/>
271
            <hr/>
270
- 

Return to bug 32254