ok
Direktori : /home2/selectio/public_html/mm-tailor-billing/themes/default/views/sales/ |
Current File : /home2/selectio/public_html/mm-tailor-billing/themes/default/views/sales/opened.php |
<?php (defined('BASEPATH')) OR exit('No direct script access allowed'); ?> <script type="text/javascript"> $(document).ready(function() { var table = $('#OBData').DataTable({ 'ajax' : { url: '<?=site_url('sales/get_opened_list');?>', type: 'POST', "data": function ( d ) { d.<?=$this->security->get_csrf_token_name();?> = "<?=$this->security->get_csrf_hash()?>"; }}, "buttons": [ { extend: 'copyHtml5', 'footer': true, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5 ] } }, { extend: 'excelHtml5', 'footer': true, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5 ] } }, { extend: 'csvHtml5', 'footer': true, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5 ] } }, { extend: 'pdfHtml5', orientation: 'landscape', pageSize: 'A4', 'footer': true, exportOptions: { columns: [ 0, 1, 2, 3, 4, 5 ] } }, { extend: 'colvis', text: 'Columns'}, ], "columns": [ { "data": "id", "visible": false }, { "data": "date", "render": hrld }, { "data": "customer_name" }, { "data": "hold_ref" }, { "data": "items" }, { "data": "grand_total", "render": currencyFormat }, { "data": "Actions", "searchable": false, "orderable": false } ], "footerCallback": function ( tfoot, data, start, end, display ) { var api = this.api(), data; $(api.column(5).footer()).html( cf(api.column(5).data().reduce( function (a, b) { return pf(a) + pf(b); }, 0)) ); } }); $('#search_table').on( 'keyup change', function (e) { var code = (e.keyCode ? e.keyCode : e.which); if (((code == 13 && table.search() !== this.value) || (table.search() !== '' && this.value === ''))) { table.search( this.value ).draw(); } }); table.columns().every(function () { var self = this; $( 'input.datepicker', this.footer() ).on('dp.change', function (e) { self.search( this.value ).draw(); }); $( 'input:not(.datepicker)', this.footer() ).on('keyup change', function (e) { var code = (e.keyCode ? e.keyCode : e.which); if (((code == 13 && self.search() !== this.value) || (self.search() !== '' && this.value === ''))) { self.search( this.value ).draw(); } }); $( 'select', this.footer() ).on( 'change', function (e) { self.search( this.value ).draw(); }); }); }); </script> <style type="text/css">.table td:nth-child(4), .table td:nth-child(5) { text-align: right; }</style> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box box-primary"> <div class="box-header"> <h3 class="box-title"><?= lang('list_results'); ?></h3> </div> <div class="box-body"> <div class="table-responsive"> <table id="OBData" class="table table-striped table-bordered table-condensed table-hover" style="margin-bottom:5px;"> <thead> <tr class="active"> <th style="max-width:30px;"><?= lang("id"); ?></th> <th class="col-xs-2"><?= lang("date"); ?></th> <th class="col-xs-2"><?= lang("customer"); ?></th> <th><?= lang("reference_note"); ?></th> <th class="col-xs-1"><?= lang("total_items"); ?></th> <th class="col-xs-1"><?= lang("grand_total"); ?></th> <th style="width:85px; text-align:center;"><?= lang("actions"); ?></th> </tr> </thead> <tbody> <tr> <td colspan="7" class="dataTables_empty"><?= lang('loading_data_from_server'); ?></td> </tr> </tbody> <tfoot> <tr class="active"> <th style="max-width:30px;"><input type="text" class="text_filter" placeholder="[<?= lang('id'); ?>]"></th> <th class="col-sm-2"><span class="datepickercon"><input type="text" class="text_filter datepicker" placeholder="[<?= lang('date'); ?>]"></span></th> <th class="col-sm-2"><input type="text" class="text_filter" placeholder="[<?= lang('customer'); ?>]"></th> <th><input type="text" class="text_filter" placeholder="[<?= lang('reference_note'); ?>]"></th> <th><input type="text" class="text_filter" placeholder="[<?= lang('total_items'); ?>]"></th> <th class="col-xs-1"><?= lang("grand_total"); ?></th> <th style="width:85px; text-align:center;"><?= lang("actions"); ?></th> </tr> <tr> <td colspan="7" class="p0"><input type="text" class="form-control b0" name="search_table" id="search_table" placeholder="<?= lang('type_hit_enter'); ?>" style="width:100%;"></td> </tr> </tfoot> </table> </div> <div class="clearfix"></div> </div> </div> </div> </div> </section> <script src="<?= $assets ?>plugins/bootstrap-datetimepicker/js/moment.min.js" type="text/javascript"></script> <script src="<?= $assets ?>plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $('.datepicker').datetimepicker({format: 'YYYY-MM-DD', showClear: true, showClose: true, useCurrent: false, widgetPositioning: {horizontal: 'auto', vertical: 'bottom'}, widgetParent: $('.dataTable tfoot')}); }); </script>