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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt (-10 / +16 lines)
Lines 72-77 Link Here
72
                                    <th>Quantity</th>
72
                                    <th>Quantity</th>
73
                                    <th>Total</th>
73
                                    <th>Total</th>
74
                                    <th>Action</th>
74
                                    <th>Action</th>
75
                                    <th>CODE</th>
75
                                </tr>
76
                                </tr>
76
                            </thead>
77
                            </thead>
77
                            <tbody>
78
                            <tbody>
Lines 81-86 Link Here
81
                                    <td colspan="3">Total payable:</td>
82
                                    <td colspan="3">Total payable:</td>
82
                                    <td></td>
83
                                    <td></td>
83
                                    <td></td>
84
                                    <td></td>
85
                                    <td></td>
84
                                </tr>
86
                                </tr>
85
                            </tfoot>
87
                            </tfoot>
86
                        </table>
88
                        </table>
Lines 181-194 Link Here
181
    [% INCLUDE 'datatables.inc' %]
183
    [% INCLUDE 'datatables.inc' %]
182
    [% Asset.js("lib/jquery/plugins/jquery.jeditable.mini.js") | $raw %]
184
    [% Asset.js("lib/jquery/plugins/jquery.jeditable.mini.js") | $raw %]
183
    <script>
185
    <script>
184
    function fnClickAddRow( table, invoiceTitle, invoicePrice ) {
186
    function fnClickAddRow( table, invoiceCode, invoiceTitle, invoicePrice ) {
185
      table.fnAddData( [
187
      table.fnAddData( [
186
        invoiceTitle,
188
        invoiceTitle,
187
        invoicePrice,
189
        invoicePrice,
188
        1,
190
        1,
189
        null,
191
        null,
190
        '<button class="drop"><i class="fa fa-trash"></i> Remove</button>'
192
        '<button class="drop"><i class="fa fa-trash"></i> Remove</button>',
191
         ]
193
        invoiceCode
194
        ]
192
      );
195
      );
193
    }
196
    }
194
197
Lines 263-283 Link Here
263
            "bInfo": false,
266
            "bInfo": false,
264
            "bAutoWidth": false,
267
            "bAutoWidth": false,
265
            "aoColumnDefs": [{
268
            "aoColumnDefs": [{
266
                "aTargets": [-2],
269
                "aTargets": [-3],
267
                "bSortable": false,
270
                "bSortable": false,
268
                "bSearchable": false,
271
                "bSearchable": false,
269
            }, {
272
            }, {
270
                "aTargets": [-2],
273
                "aTargets": [-3],
271
                "mRender": function ( data, type, full ) {
274
                "mRender": function ( data, type, full ) {
272
                    var price = Number.parseFloat(data);
275
                    var price = Number.parseFloat(data);
273
                    return price.format_price();
276
                    return price.format_price();
274
                }
277
                }
275
            }, {
278
            }, {
276
                "aTargets": [-4],
279
                "aTargets": [-5],
277
                "sClass" : "editable",
280
                "sClass" : "editable",
278
            }, {
281
            }, {
279
                "aTargets": [-3],
282
                "aTargets": [-4],
280
                "sClass" : "editable_int",
283
                "sClass" : "editable_int",
284
            }, {
285
                "targets": [-1],
286
                "visible": false,
287
                "searchable": false
281
            }],
288
            }],
282
            "aaSorting": [
289
            "aaSorting": [
283
                [1, "asc"]
290
                [1, "asc"]
Lines 335-341 Link Here
335
342
336
        $(".add_button").on("click", function(e) {
343
        $(".add_button").on("click", function(e) {
337
            e.preventDefault();
344
            e.preventDefault();
338
            fnClickAddRow(sale_table, $( this ).data('invoiceTitle'), $( this ).data('invoicePrice') );
345
            fnClickAddRow(sale_table, $( this ).data('invoiceCode'), $( this ).data('invoiceTitle'), $( this ).data('invoicePrice') );
339
            items_table.fnFilter( '' );
346
            items_table.fnFilter( '' );
340
        });
347
        });
341
348
Lines 362-368 Link Here
362
                var rows = sale_table.fnGetData();
369
                var rows = sale_table.fnGetData();
363
                rows.forEach(function (row, index) {
370
                rows.forEach(function (row, index) {
364
                    var sale = {
371
                    var sale = {
365
                        code: row[0],
372
                        code: row[5],
366
                        price: row[1],
373
                        price: row[1],
367
                        quantity: row[2]
374
                        quantity: row[2]
368
                    };
375
                    };
369
- 

Return to bug 23354