<script type="text/javascript">
$(document).ready(function(){
	$("#tunai").hide();
	$("#tunai1").hide();
	$("#kredit").hide();
	$("#kredit1").hide();
		
	$(':input:not([type="submit"])').each(function() {
		$(this).focus(function() {
			$(this).addClass('hilite');
		}).blur(function() {
			$(this).removeClass('hilite');});
	});	

$(document).ready(function(){
    $('#jnsbayar').on('change', function() {
      if ( this.value == 'T')
      {
        $("#tunai").show();
		$("#tunai1").show();
		$("#kredit").hide();
		$("#kredit1").hide();
		$("#jml_ags").val(0);
		$("#tag_ags").val(0);
		$("#jml_byr").val('');
		$("#sisa_byr").val('');
		$("#jml_byr").focus();
      }
      else if ( this.value == 'K')
      {
		$("#tunai").hide();
		$("#tunai1").hide();
		$("#kredit").show();
		$("#kredit1").show();
		$("#jml_byr").val(0);
		$("#sisa_byr").val(0);
		$("#jml_ags").val('');
		$("#tag_ags").val('');
		$("#jml_ags").focus();
      }
    });
});
	
	tampil_data();
	
	function tampil_data(){
		var kode = $("#kode_jual").val();
		//alert(kode);
		$.ajax({
			type	: 'POST',
			url		: "<?php echo site_url(); ?>/penjualan/DataDetail",
			data	: "kode="+kode,
			cache	: false,
			success	: function(data){
				$("#tampil_data").html(data);
			}
		});
		//return false();
	}
	
	$("#tgl").datepicker({
			dateFormat:"dd-mm-yy"
    });
	
	$("#kode_barcode").focus();
	
	$("#kode_brg").keyup(function(e){
		var isi = $(e.target).val();
		$(e.target).val(isi.toUpperCase());
		CariBarang();
		$("#total").val(0);
	});
	
	$("#kode_barcode").keyup(function(e){
		var isi = $(e.target).val();
		$(e.target).val(isi.toUpperCase());
		CariBarcode();
		$("#total").val(0);
	});
	
	$("#kode_brg").focus(function(e){
		var isi = $(e.target).val();
		CariBarang();
		$("#total").val(0);
	});
	
	$("#kode_customer").focus(function(e){
		var isi = $(e.target).val();
		CariCustomer();
		TotHrgBrg();
	});
	
	$("#jml_byr").keyup(function(e){
		var isi = $(e.target).val();
		$(e.target).val(isi.toUpperCase());
		SisaBayar();
	});
	
	$("#jml_ags").keyup(function(e){
		var isi = $(e.target).val();
		$(e.target).val(isi.toUpperCase());
		Angsuran();
	});
	
	function SisaBayar(){
		var harga_barang 	= $("#harga_barang").val();
		var jml_bayar 		= $("#jml_byr").val();
		var diskon			= $("#diskon").val();
		var sisa		= parseInt(jml_bayar)-(parseInt(harga_barang)-parseInt(diskon));
		$("#sisa_byr").val(sisa);
	}
	
	function Angsuran(){
		var harga_barang 	= $("#harga_barang").val();
		var jml_ags 	= $("#jml_ags").val();
		var tagihan_ags	= parseInt(harga_barang)/parseInt(jml_ags);
		$("#tag_ags").val(tagihan_ags);
	}
	
	function StatusBayar(){
		$("#status_pembayaran").val('Y');
		var kode = $("#kode_jual").val();
		$.ajax({
			type	: 'POST',
			url		: "<?php echo site_url(); ?>/ref_json/StatusBayar",
			data	: "kode="+kode,
			cache	: false,
			dataType : "json",
			success	: function(data){
			}
		});
	}
	
	function TotHrgBrg(){
		var kode = $("#kode_jual").val();
		$.ajax({
			type	: 'POST',
			url		: "<?php echo site_url(); ?>/ref_json/TotHrgBrg",
			data	: "kode="+kode,
			cache	: false,
			dataType : "json",
			success	: function(data){
				$("#harga_barang").val(data.Harga_Barang);
			}
		});
	}
	
	function CekBarcode(){	
	var kode_barang = $("#kode_brg").val();
	var nama_barang = $("#nama_brg").val();
	var satuan		= $("#satuan").val();
		$("#kode_brg_upd").val(kode_barang);
		$("#nama_brg_upd").val(nama_barang);
		$("#satuan_upd").val(satuan);
		$("#kode_barcode_upd").val('');
		$("#kode_barcode_upd").focus();
	}
	
	$("#kirim").click(function(){
		var kode	= $("#kode_jual").val();
		var hrg_brg	= $("#harga_barang").val();	
		var diskon	= $("#diskon").val();	
		var jml_byr	= $("#jml_byr").val();	
		var sisa	= $("#sisa_byr").val();	
		var telp	= $("#telp").val();		
		var tgl		= $("#tgl").val();		
		window.open('https://web.whatsapp.com/send?text=*APOTEK* *WARINGIN* *JAYA* | '+tgl+' |No: '+kode+' | Total Pesanan: '+hrg_brg+' | Diskon: '+diskon+' | Jml Byr: '+jml_byr+' | Kembalian: '+sisa+'&phone='+telp);
		return false();
	});
	
	function CariBarang(){
		var kode = $("#kode_brg").val();
		$.ajax({
			type	: 'POST',
			url		: "<?php echo site_url(); ?>/ref_json/InfoBarang",
			data	: "kode="+kode,
			cache	: false,
			dataType : "json",
			success	: function(data){
				$("#nama_brg").val(data.nama_barang);
				$("#minimum").val(data.min);
				$("#satuan").val(data.satuan);
				$("#harga").val(data.harga_jual);
				$("#harga_beli").val(data.harga_beli);
				$("#diskon_item").val(data.nominal_diskon);
			}
		});
	}
	
	function CariBarcode(){
		var kode = $("#kode_barcode").val();
		$.ajax({
			type	: 'POST',
			url		: "<?php echo site_url(); ?>/ref_json/InfoBarcode",
			data	: "kode="+kode,
			cache	: false,
			dataType : "json",
			success	: function(data){
				$("#kode_brg").val(data.kode_brg);
				$("#nama_brg").val(data.nama_barang);
				$("#satuan").val(data.satuan);
				$("#harga").val(data.harga_jual);
				$("#harga_beli").val(data.harga_beli);
				$("#jml").focus();
			}
		});
	}
	
	function CariCustomer(){
		var kode = $("#kode_customer").val();
		$.ajax({
			type	: 'POST',
			url		: "<?php echo site_url(); ?>/ref_json/InfoCustomer",
			data	: "kode="+kode,
			cache	: false,
			dataType : "json",
			success	: function(data){
				$("#nama_customer").val(data.nama_customer);
				$("#telp").val(data.telp);
				$("#status").val(data.status);
			}
		});
	}
	
	$("#harga").keypress(function(data){
		if (data.which!=8 && data.which!=0 && (data.which<48 || data.which>57)) {
			return false;
		}
	});
	$("#jml").keypress(function(data){
		if (data.which!=8 && data.which!=0 && (data.which<48 || data.which>57)) {
			return false;
		}
	});
	
	function hitung(){
		var jml = $("#jml").val();
		var harga = $("#harga").val();
		var total = parseInt(jml)*parseInt(harga);
		$("#total").val(total);
	}
	
	$("#jml").keyup(function(){
		hitung();
	});
	
	$("#diskon_item").keyup(function(){
		hitung();
	});
	
	$("#harga").keyup(function(){
		hitung();
	});
	
	$("#cetak").click(function(){
		StatusBayar();
		var kode	= $("#kode_jual").val();
			
		window.open('<?php echo site_url();?>/penjualan/cetak/'+kode);
		return false();
	});
	
	$("#simpan").click(function(){
		var kode		= $("#kode_jual").val();
		var tgl			= $("#tgl").val();
		var kode_brg	= $("#kode_brg").val();
		var jml			= $("#jml").val();
		var total		= $("#total").val();
		var kode_customer	= $("#kode_customer").val();		
		
		var string = $("#form").serialize();
		
		if(kode.length==0){
			$.messager.show({
				title:'Info',
				msg:'Maaf, Kode Beli tidak boleh kosong', 
				timeout:2000,
				showType:'show'
			});
			$("#kode").focus();
			return false();
		}
		if(tgl.length==0){
			$.messager.show({
				title:'Info',
				msg:'Maaf, Tanggal tidak boleh kosong', 
				timeout:2000,
				showType:'show'
			});
			$("#tgl").focus();
			return false();
		}
		if(kode_brg.length==0){
			$.messager.show({
				title:'Info',
				msg:'Maaf, Kode Barang tidak boleh kosong', 
				timeout:2000,
				showType:'show'
			});
			$("#kode_brg").focus();
			return false();
		}
		if(nama_brg.length==0){
			$.messager.show({
				title:'Info',
				msg:'Maaf, Nama Barang tidak boleh kosong', 
				timeout:2000,
				showType:'show'
			});
			$("#nama_brg").focus();
			return false();
		}
		if(jml.length==0){
			$.messager.show({
				title:'Info',
				msg:'Maaf, jumlah tidak boleh kosong', 
				timeout:2000,
				showType:'show'
			});
			$("#jml").focus();
			return false();
		}
		if(total<=0){
			$.messager.show({
				title:'Info',
				msg:'Maaf, jumlah tidak boleh kosong', 
				timeout:2000,
				showType:'show'
			});
			$("#jml").focus();
			return false();
		}
		$.ajax({
			type	: 'POST',
			url		: "<?php echo site_url(); ?>/penjualan/simpan",
			data	: string,
			cache	: false,
			success	: function(data){
				$.messager.show({
					title:'Info',
					msg:data, 
					timeout:2000,
					showType:'slide'
				});
				tampil_data();
				$(".detail").val('');
				$("#kode_brg").val('');
				$("#kode_barcode").val('');
				$("#kode_barcode").focus();
			},
			error : function(xhr, teksStatus, kesalahan) {
				$.messager.show({
					title:'Info',
					msg: 'Server tidak merespon :'+kesalahan,
					timeout:2000,
					showType:'slide'
				});
			}
		});
		return false();		
	});
	
		<!-- Simpan bayar -->
	$("#simpan_bayar").click(function(){
		var kode		= $("#kode_jual").val();
		var tgl			= $("#tgl").val();
		var harga_barang= $("#harga_barang").val();
		var jml_bayar	= $("#jml_byr").val();
		var sisa_bayar	= $("#sisa_byr").val();
		var kode_customer	= $("#kode_customer").val();
		
		var string = $("#form").serialize();
		var string2 = $("#form_pembayaran").serialize();
		
		if(kode.length==0){
			$.messager.show({
				title:'Info',
				msg:'Maaf, Kode Beli tidak boleh kosong', 
				timeout:2000,
				showType:'show'
			});
			$("#kode").focus();
			return false();
		}
		if(tgl.length==0){
			$.messager.show({
				title:'Info',
				msg:'Maaf, Tanggal tidak boleh kosong', 
				timeout:2000,
				showType:'show'
			});
			$("#tgl").focus();
			return false();
		}
		if(harga_barang.length==0){
			$.messager.show({
				title:'Info',
				msg:'Maaf, Harga Barang tidak boleh kosong', 
				timeout:2000,
				showType:'show'
			});
			$("#harga_barang").focus();
			return false();
		}
		if(jml_bayar.length==0){
			$.messager.show({
				title:'Info',
				msg:'Maaf, jumlah bayar tidak boleh kosong', 
				timeout:2000,
				showType:'show'
			});
			$("#jml_byr").focus();
			return false();
		}
		if(sisa_bayar<0){
			$.messager.show({
				title:'Info',
				msg:'Maaf, jumlah bayar masih kurang.', 
				timeout:2000,
				showType:'show'
			});
			$("#jml").focus();
			return false();
		}
		$.ajax({
			type	: 'POST',
			url		: "<?php echo site_url(); ?>/penjualan/simpan_bayar",
			data	: string2 + string,
			cache	: false,
			success	: function(data){
				$.messager.show({
					title:'Info',
					msg:data, 
					timeout:2000,
					showType:'slide'
				});
				
				StatusBayar();
				tampil_data();
			},			
			error : function(xhr, teksStatus, kesalahan) {
				$.messager.show({
					title:'Info',
					msg: 'Server tidak merespon :'+kesalahan,
					timeout:2000,
					showType:'slide'
				});
			}
		});	
		return false();	
	});
	<!-- End simpan bayar -->
	
	$("#tambah_data").click(function(){
		$(".detail").val('');
		$("#kode_brg").val('');
		$("#kode_barcode").val('');
		$("#kode_barcode").focus();
	});
	
$("#cetak").click(function(){
		StatusBayar();
		var kode	= $("#kode_jual").val();
			
		window.open('<?php echo site_url();?>/penjualan/cetak/'+kode);
		return false();
	});
	
	$("#cari_barang").click(function(){
		//AmbilDaftarBarang();
		$("#dlg").dialog('open');
		$("#txt_cari").val('');
		$("#txt_cari").focus();
	});
	
	$("#cari_customer").click(function(){
		$("#dlg2").dialog('open');
	});
	
	$("#tutup_byr").click(function(){
		$("#dlg3").dialog('close');
	});
	
	$("#tutup_barcode").click(function(){
		$("#dlg4").dialog('close');
	});
	
	$("#bayar").click(function(){
		$("#dlg3").dialog('open');
		TotHrgBrg();
	});
	
	$("#upd_barcode").click(function(){
		$("#dlg4").dialog('open');
		CekBarcode();
	});
	
	$("#cari_barang2").click(function(){
		AmbilDaftarBarang();
		//$("#dlg").dialog('open');
	});
	
	$("#cari_cust2").click(function(){
		AmbilDaftarCustomer();
	});
	
	function AmbilDaftarBarang(){
		var cari = $("#txt_cari").val();
		
		$.ajax({
			type	: 'POST',
			url		: "<?php echo site_url(); ?>/ref_json/DataBarang",
			data	: "cari="+cari,
			cache	: false,
			success	: function(data){
				$("#daftar_barang").html(data);
			}
		});
	}
	
	function AmbilDaftarCustomer(){
		var cari_cust = $("#txt_cari_customer").val();
		
		$.ajax({
			type	: 'POST',
			url		: "<?php echo site_url(); ?>/ref_json/DataCustomer",
			data	: "cari="+cari_cust,
			cache	: false,
			success	: function(data){
				$("#daftar_customer").html(data);
			}
		});
	}
	
	$("#simpan_barcode").click(function(){
		var kode_brg		= $("#kode_brg_upd").val();
		var kode_barcode	= $("#kode_barcode_upd").val();
		
		var string = $("#form_update_barcode").serialize();
		
		if(kode_brg.length==0){
			$.messager.show({
				title:'Info',
				msg:'Maaf, Kode Barang tidak boleh kosong', 
				timeout:2000,
				showType:'show'
			});
			$("#kode_brg_upd").focus();
			return false();
		}
		if(kode_barcode.length==0){
			$.messager.show({
				title:'Info',
				msg:'Maaf, Kode Barcode tidak boleh kosong', 
				timeout:2000,
				showType:'show'
			});
			$("#kode_barcode_upd").focus();
			return false();
		}
		$.ajax({
			type	: 'POST',
			url		: "<?php echo site_url(); ?>/penjualan/upd_barcode",
			data	: string,
			cache	: false,
			success	: function(data){
				$.messager.show({
					title:'Info',
					msg:data, 
					timeout:2000,
					showType:'slide'
				});
				CariSimpanan();
			},
			error : function(xhr, teksStatus, kesalahan) {
				$.messager.show({
					title:'Info',
					msg: 'Server tidak merespon :'+kesalahan,
					timeout:2000,
					showType:'slide'
				});
			}
		});
		return false();		
	});
	
});	
</script>
<form name="form" id="form">
<table width="100%">
<tr>
<td valign="top" width="33%">
    <fieldset>
    <table width="100%">
    <tr>    
        <td width="150">Kode Penjualan</td>
        <td width="5">:</td>
        <td><input type="text" name="kode_jual" id="kode_jual" size="12" maxlength="12" readonly value="<?php echo $kode_jual;?>" /></td>
    </tr>
    <tr>    
        <td>Tanggal Penjualan</td>
        <td>:</td>
        <td><input type="text" name="tgl" id="tgl"  size="15" maxlength="15" class="easyui-validatebox" data-options="required:true,validType:'length[3,10]'" value="<?php echo $tgl_jual;?>"/></td>
    </tr>
    <tr>
      <td>Kode Customer</td>
      <td>:</td>
      <td><input name="kode_customer" type="text" id="kode_customer" value="<?php echo $kode_cust;?>"  size="15" maxlength="15" readonly/>
      <button type="button" name="cari_customer" id="cari_customer" class="easyui-linkbutton" data-options="iconCls:'icon-search'">Cari</button></td>
    </tr>
    <tr>
      <td>Nama Lengkap</td>
      <td>:</td>
      <td><input name="nama_customer" type="text" id="nama_customer" value="<?php echo $customer;?>"  size="30" maxlength="30" readonly/></td>
    </tr>
    <tr>
      <td>Telp</td>
      <td>:</td>
      <td><input name="telp" type="text" id="telp" value="<?php echo $telp;?>"  size="30"  maxlength="30" readonly/></td>
    </tr>
    </table>
    </fieldset>
</td>
<td valign="top" width="33%">
    <fieldset>
    <table width="100%">
    <tr>    
        <td >Kode Barcode</td>
        <td width="5">:</td>
        <td><input type="text" name="kode_barcode" id="kode_barcode" size="12" maxlength="100" class="easyui-validatebox" data-options="validType:'length[3,100]'" />
          <input type="text" name="minimum" id="minimum" size="12" maxlength="100" class="easyui-validatebox" data-options="required:true,validType:'length[3,100]'" hidden/>
        </td>
    </tr>
    <tr>    
        <td >Kode Barang</td>
        <td width="5">:</td>
        <td><input type="text" name="kode_brg" id="kode_brg" size="12" maxlength="12" class="easyui-validatebox" data-options="validType:'length[3,10]'" />
        <button type="button" name="cari_barang" id="cari_barang" class="easyui-linkbutton" data-options="iconCls:'icon-search'">Cari</button>
        <button type="button" name="upd_barcode" id="upd_barcode" class="easyui-linkbutton" data-options="iconCls:'icon-edit'">Edit</button>
        </td>
    </tr>
    <tr>    
        <td>Nama Barang</td>
        <td>:</td>
        <td><input type="text" name="nama_brg" id="nama_brg"  size="25" class="detail" maxlength="50" readonly/></td>
    </tr>
    <tr>    
        <td>Satuan</td>
        <td>:</td>
        <td><input type="text" name="satuan" id="satuan"  size="20" class="detail" maxlength="20" readonly/></td>
    </tr>
    <tr>    
        <td>Harga Beli</td>
        <td>:</td>
        <td><input type="text" name="harga_beli" id="harga_beli"  size="20"class="detail" maxlength="20" readonly/></td>
    </tr> 
    <tr>    
        <td>Harga Jual</td>
        <td>:</td>
        <td><input type="text" name="harga" id="harga"  size="20"class="detail" maxlength="20" readonly/>
    </tr>
     
    <tr>    
        <td>Jumlah</td>
        <td>:</td>
        <td><input type="text" name="jml" id="jml"  size="20" class="detail" maxlength="20"/></td>
    </tr>
    <tr>  
    <tr>    
        <td>Sub Total</td>
        <td>:</td>
        <td><input type="text" name="total" id="total" class="detail" size="20" maxlength="20" readonly/></td>
    </tr>
    </table>
    </fieldset>
</td>
</tr>
</table>    
<fieldset class="bawah">
<table width="100%">
<tr>
	<td colspan="3" align="center">
    <button type="button" name="simpan" id="simpan" class="easyui-linkbutton" data-options="iconCls:'icon-save'">SIMPAN</button>
    <button type="button" name="tambah_data" id="tambah_data" class="easyui-linkbutton" data-options="iconCls:'icon-add'">TAMBAH</button>
        <button type="button" name="bayar" id="bayar" class="easyui-linkbutton" data-options="iconCls:'icon-bayar'">BAYAR</button>
    <button type="button" name="cetak" id="cetak" class="easyui-linkbutton" data-options="iconCls:'icon-print'">CETAK</button>
    <a href="<?php echo base_url();?>index.php/penjualan/">
    <button type="button" name="kembali" id="kembali" class="easyui-linkbutton" data-options="iconCls:'icon-logout'">TUTUP</button>
    </a>
    </td>
</tr>
</table>  
</fieldset>   
</form>
<fieldset>
<div id="tampil_data"></div>
</fieldset>
<div id="dlg" class="easyui-dialog" title="Daftar Barang" style="width:900px;height:400px; padding:5px;" data-options="closed:true">
	Cari Barang : 
	  <input type="text" name="txt_cari" id="txt_cari" size="50" /> <button type="button" name="cari_barang2" id="cari_barang2" class="easyui-linkbutton" data-options="iconCls:'icon-search'">Cari</button> 
	Kata kunci panjang akan mempercepat pencarian.
	  <div id="daftar_barang"></div>
</div>

<div id="dlg2" class="easyui-dialog" title="Daftar Customer" style="width:900px;height:400px; padding:5px;" data-options="closed:true">
	Cari Customer: 
	  <input type="text" name="txt_cari_customer" id="txt_cari_customer" size="50" />
      <button type="button" name="cari_cust2" id="cari_cust2" class="easyui-linkbutton" data-options="iconCls:'icon-search'">Cari</button> 
	Kata kunci panjang akan mempercepat pencarian.
	<div id="daftar_customer"></div>
</div>

<div id="dlg3" class="easyui-dialog" title="Pembayaran" style="width:500px;height:250px; padding:5px;" data-options="closed:true">
<!-- Form Pembayaran -->
<form name="form_pembayaran" id="form_pembayaran">
    <table width="100%">
            <tr>
              <td>Kode Penjualan</td>
              <td>:</td>
              <td><input name="kode_jual2" type="text" id="kode_jual2" value="<?php echo $kode_jual;?>"  size="15" maxlength="15" readonly/></td>
            </tr>
            <tr>
              <td >Total Harga Barang</td>
              <td width="5">:</td>
              <td><input name="harga_barang" type="text" id="harga_barang"  size="15" maxlength="15" readonly/></td>
            </tr>
            <tr >
              <td>Diskon</td>
              <td>:</td>
              <td><input name="diskon" type="text" id="diskon" value="0"  size="30" maxlength="30" /></td>
            </tr>
            <tr >
              <td>Jumlah Bayar</td>
              <td>:</td>
              <td><input type="text" name="jml_byr" id="jml_byr"  size="30" maxlength="30" /></td>
            </tr>
            <tr >
              <td>Sisa</td>
              <td>:</td>
              <td><input type="text" name="sisa_byr" id="sisa_byr"  size="30"  maxlength="30" readonly/></td>
            </tr>
          </table>
          <fieldset class="bawah">
<table width="100%">
<tr>
	<td colspan="3" align="center">
    <button type="button" name="simpan_bayar" id="simpan_bayar" class="easyui-linkbutton" data-options="iconCls:'icon-bayar'">BAYAR</button>
<button type="button" name="kirim" id="kirim" class="easyui-linkbutton" data-options="iconCls:'icon-print'">SEND</button>
    <button type="button" name="tutup_byr" id="tutup_byr" class="easyui-linkbutton" data-options="iconCls:'icon-logout'">TUTUP</button>

    </td>
</tr>
</table>  
</fieldset>
    <!-- End Form -->
    </form>
</div>

<div id="dlg4" class="easyui-dialog" title="Update Barcode Barang" style="width:500px;height:250px; padding:5px;" data-options="closed:true">
<!-- Form Pembayaran -->
<form name="form_update_barcode" id="form_update_barcode">
    <table width="100%">
            <tr>
              <td>Kode Barcode</td>
              <td>:</td>
              <td><input name="kode_barcode_upd" type="text" id="kode_barcode_upd" value=""  size="15" maxlength="15" /></td>
            </tr>
            <tr>
              <td >Kode Barang</td>
              <td width="5">:</td>
              <td><input name="kode_brg_upd" type="text" id="kode_brg_upd" value=""  size="15" maxlength="15" readonly/></td>
            </tr>
            <tr>
  <td>Nama Barang</td>
  <td>:</td>
  <td><input type="text" name="nama_brg_upd" id="nama_brg_upd"  size="40" maxlength="40" readonly/></td>
   </tr>
            <tr id="tunai">
              <td>Satuan</td>
              <td>:</td>
              <td><input type="text" name="satuan_upd" id="satuan_upd"  size="30" maxlength="30" readonly/></td>
            </tr>
          </table>
          <fieldset class="bawah">
<table width="100%">
<tr>
	<td colspan="3" align="center">
    <button type="button" name="simpan_barcode" id="simpan_barcode" class="easyui-linkbutton" data-options="iconCls:'icon-bayar'">SIMPAN</button>
    <button type="button" name="tutup_barcode" id="tutup_barcode" class="easyui-linkbutton" data-options="iconCls:'icon-logout'">TUTUP</button>

    </td>
</tr>
</table>  
</fieldset>
    <!-- End Form -->
  </form>
</div>