SELECT
	  `tb_beli`.`id_beli` AS `id_beli`,
	  `tb_beli`.`tgl_beli` AS `tgl_beli`,
	  `tb_beli`.`tgl_tempo` AS `tgl_tempo`,
	  `tb_supplier`.`nama` AS `nama`,
	  IF(`tb_beli`.`status_bayar` = 'Y', 'L', 'BL') AS `status_bayar`,
	  `tb_beli`.`total_hpp` AS `total_hpp`
	FROM (`tb_supplier`
	  JOIN `tb_beli`
	    ON (`tb_supplier`.`kode` = `tb_beli`.`kode_supplier`)) 