
	   $("#piutang").flexigrid({
                url : 'response.php',
                dataType : 'json',
				        method: 'POST',
                colModel :
								[
									{display:'<b class="w3-small">NO</b>', name:'nomor', width:80, align:'center'},
									//{display:'<b class="w3-small">ID</b>', name:'id', width:200, sortable:true, align:'center'},
									{display:'<b class="w3-small">NIP</b>', name:'nip',width:100,sortable:true, align:'left'},
									{display:'<b class="w3-small">NAMA</b>', name:'nama', width:250, sortable:true, align:'center'},
									{display:'<b class="w3-small">UNIT</b>', name:'unit', width:200, sortable:true, align:'left'},
									{display:'<b class="w3-small">JABATAN</b>', name:'jab', width:300, sortable:true, align:'left'},
									{display:'<b class="w3-small">LOKASI</b>', name:'lok', width:200, sortable:true, align:'left'},
									{display:'<b class="w3-small">KODE JAB</b>', name:'kodejab', width:100, sortable:true, align:'left'},
									{display:'<b class="w3-small">ATASAN</b>', name:'bos', width:100, sortable:true, align:'left'},
									{display:'<b class="w3-small">OPTION</b>', name:'tomb', width:300, sortable:true, align:'left'}
								],
								buttons :
								[
									{name:'TAMBAH DATA KARYAWAN BARU', bclass:'w3-button w3-blue w3-card-4', onpress:tambahkan},
                  {separator:true}
                ],
                searchitems :
								[
                  {display:'NIP', name:'nip'},
									{display:'NAMA', name:'nama', isdefault:false},
                  {display:'UNIT', name:'unit', isdefault:false},
									{display:'JABATAN', name:'jab', isdefault : false},
									{display:'LOKASI', name:'lokasi', isdefault : false},
									{display:'KODE JABATAN', name:'kodejab', isdefault : false},
									{display:'ATASAN', name:'bos', isdefault : false},
               	],
                sortname:"nama",
                sortorder:"asc",
                usepager:true,
                title:'<b>DATA KARYAWAN</b>',
                useRp:true,
                rp:500,
                showTableToggleBtn:true,
								//height:'600',
								striped:true,
                width:'auto'
            });


function editkan(x){
  document.getElementById('id01').style.display='block';
	document.getElementById('rangka').src="formeditkar.php?id="+x;
}

function hapuskan(x,n){
	var r = confirm("APAKAH DATA KARYAWAN DENGAN NIP : "+n+" AKAN DIHAPUS ?...");
	if(r == true){
		document.getElementById('rangka').src="hapuskan.php?id="+x;
	}
}

function tambahkan(){
	document.getElementById('id01').style.display='block';
	document.getElementById('rangka').src="tambahdatakar.php";
}

function keluar(){
	document.getElementById('id01').style.display='none';
	document.getElementById('rangka').src="hapusrec.php";
}

function kembalikan(){
  $("#piutang").flexReload();
}

function tambah(){
  document.getElementById('ipack').src="tes.php";
}

function uploadkan(){
  document.getElementById('formdoc').submit();
  document.getElementById('keluar').click();
  //alert('uploadkan');
}
