<script type="text/javascript">
$(function(){	
window.parent.$('#content_title').panel('setTitle', '<?=$this->title?>');

theight=window.parent.$('#content_title').height()-30;	

$('#dtdari').datebox({ 
	onSelect:function(date){aksi('cari')} 
})

$('#dtsampai').datebox({ 
	onSelect:function(date){aksi('cari')} 
})

$('#line').combobox({
	mode:'remote',
	url:'<?=site_url('general/dataLine'); ?>',
	valueField:'id_line',
	textField:'nm_line'
});

$('#kd_cmpy').combobox({
	panelWidth:250,
	mode:'remote', 
	url: '<?=site_url('company/gridSub')?>',  
	valueField:'KdPrshn',  
	textField:'NmPrshn',
	fitColumns: true
});

$('#KdBarang').combogrid({  
	panelWidth:500,  	
	url: '<?=site_url('general/gridBarang/'.$this->tp_barang)?>',  
	idField:'KdBarang',  
	textField:'NmBarang',  
	mode:'remote',  
	rownumbers:true,
	fitColumns:true,
	pagination:true,
	columns:[[  
		{field:'KdBarang',title:'Item Code',width:60},
		{field:'NmBarang',title:'Item Description',width:150},		
		{field:'Sat',title:'UOM',width:50}
	]]
});

$('#prodcard_id').combobox({	
	width:100,
	mode:'remote', 
	url: '<?=site_url('prod_card/gridAll')?>',  
	valueField:'prodcard_id',  
	textField:'prodcard_no',
	fitColumns: true
});

$('#line').textbox({
	width:80
});


setdg();

$('#btnPrint').click(function(){
	aksi('print');
});

$('#btnXls').click(function(){
	aksi('xls');
});

$('#btnCari').click(function(){
	aksi('cari');
});


});//Akhir Document Ready
</script>