Welcome Guest, Not a member yet? Register   Sign In
CI for Accounting
#11

This is my akun view


<div class="row" style="margin-bottom: 10px">
<div class="col-md-4">
<h2 style="margin-top:0px"><b>Data</b> | Akun</h2>
</div>
<div class="col-md-4 text-center">
<div style="margin-top: 4px" id="message">
<?php echo $this->session->userdata('message') <> '' ? $this->session->userdata('message') : ''; ?>
</div>
</div>
<div class="col-md-4 text-right">
<?php echo anchor(site_url('akun/create'), 'Create', 'class="btn btn-primary"'); ?>
<?php echo anchor(site_url('akun/excel'), 'Excel', 'class="btn btn-primary"'); ?>
<?php echo anchor(site_url('akun/word'), 'Word', 'class="btn btn-primary"'); ?>
</div>
</div>
<table class="table table-bordered table-striped table-hover" id="mytable">
<thead>
<tr>
<th width="80px">No</th>
<th>Kode Akun</th>
<th>Nama Akun</th>
<th>Saldo Normal</th>
<th>Saldo</th>
<th width="200px">Action</th>
</tr>
</thead>

</table>
<script src="<?php echo base_url('assets/js/jquery-1.11.2.min.js') ?>"></script>
<script src="<?php echo base_url('assets/datatables/jquery.dataTables.js') ?>"></script>
<script src="<?php echo base_url('assets/datatables/dataTables.bootstrap.js') ?>"></script>
<script type="text/javascript">
$(document).ready(function() {
$.fn.dataTableExt.oApi.fnPagingInfo = function(oSettings)
{
return {
"iStart": oSettings._iDisplayStart,
"iEnd": oSettings.fnDisplayEnd(),
"iLength": oSettings._iDisplayLength,
"iTotal": oSettings.fnRecordsTotal(),
"iFilteredTotal": oSettings.fnRecordsDisplay(),
"iPage": Math.ceil(oSettings._iDisplayStart / oSettings._iDisplayLength),
"iTotalPages": Math.ceil(oSettings.fnRecordsDisplay() / oSettings._iDisplayLength)
};
};

var t = $("#mytable").dataTable({
initComplete: function() {
var api = this.api();
$('#mytable_filter input')
.off('.DT')
.on('keyup.DT', function(e) {
if (e.keyCode == 13) {
api.search(this.value).draw();
}
});
},
oLanguage: {
sProcessing: "loading..."
},
processing: true,
serverSide: true,
ajax: {"url": "akun/json", "type": "POST"},
columns: [
{
"data": "id",
"orderable": false
},{"data": "kode_akun"},{"data": "nama_akun"},{"data": "saldo_normal"},{"data": "saldo"},
{
"data" : "action",
"orderable": false,
"className" : "text-center"
}
],
order: [[0, 'desc']],
rowCallback: function(row, data, iDisplayIndex) {
var info = this.fnPagingInfo();
var page = info.iPage;
var length = info.iLength;
var index = page * length + (iDisplayIndex + 1);
$('td:eq(0)', row).html(index);
}
});
});
</script>
Reply


Messages In This Thread
CI for Accounting - by tamam - 09-29-2017, 02:17 AM
RE: CI for Accounting - by rtenny - 09-29-2017, 07:15 AM
RE: CI for Accounting - by tamam - 09-30-2017, 03:50 PM
RE: CI for Accounting - by krystian2160 - 09-30-2017, 01:31 AM
RE: CI for Accounting - by tamam - 09-30-2017, 03:54 PM
RE: CI for Accounting - by PaulD - 10-01-2017, 08:29 AM
RE: CI for Accounting - by tamam - 10-01-2017, 02:44 PM
RE: CI for Accounting - by tamam - 10-01-2017, 02:51 PM
RE: CI for Accounting - by tamam - 10-01-2017, 02:52 PM
RE: CI for Accounting - by tamam - 10-01-2017, 02:53 PM
RE: CI for Accounting - by tamam - 10-01-2017, 02:55 PM
RE: CI for Accounting - by tamam - 10-01-2017, 02:56 PM
RE: CI for Accounting - by tamam - 10-01-2017, 02:57 PM
RE: CI for Accounting - by PaulD - 10-01-2017, 04:44 PM
RE: CI for Accounting - by tamam - 10-01-2017, 06:56 PM
RE: CI for Accounting - by ciadmin - 10-01-2017, 07:00 PM
RE: CI for Accounting - by tamam - 10-01-2017, 09:38 PM
RE: CI for Accounting - by PaulD - 10-02-2017, 10:10 AM
RE: CI for Accounting - by tamam - 10-10-2017, 05:22 AM



Theme © iAndrew 2016 - Forum software by © MyBB