  $tglakhir = date('Y-m-d');
}


$sql  = "SELECT spbhd.cNoSPB,spbhd.dTglSPB,spbhd.cKdProyek,supp.vNmSupplier,spbhd.cKdSupplier,spbdt.cKdBarang,brg.vNmBarang,spbdt.nqty ";
$sql  .= "FROM tr_spbhd spbhd "; 
$sql  .= "LEFT JOIN tr_spbdt spbdt ON spbhd.cNoSPB = spbdt.cNoSPB ";
$sql  .= "LEFT JOIN tm_barang brg ON brg.cKdBarang=spbdt.cKdBarang ";