SELECT
	*
FROM
	dbo.Note_Terbit_Master
WHERE
  Jenis = 20
  AND Status = 'I'
  --AND YEAR(Tgl_Buat) = 2015
  AND No_Ref LIKE '2015%'
  AND Jml_Peserta>1
---------------------
SELECT * FROM dbo.DN_Klaim_Master WHERE No_Ref = '2014.008122'
SELECT * FROM dbo.DN_Klaim_Detail WHERE No_Ref = '2014.008122'
SELECT * FROM dbo.Note_Lunas_Master WHERE No_Ref = '2014.008122'
-----
SELECT * FROM	dbo.DN_Klaim_Master WHERE No_Ref = '2015.091032'
SELECT * FROM dbo.DN_Klaim_Detail WHERE No_Ref = '2015.091032'

SELECT * FROM dbo.Note_Lunas_Master WHERE No_Ref = '2015.091032'
SELECT * FROM dbo.Note_Lunas_Detail WHERE No_Ref = '2015.091032'

SELECT * FROM dbo.Note_Terbit_Master WHERE No_Ref = '2015.091032'

SELECT  DN_Klaim_Detail.Tanggal, No_Bukti, SUM(DN_Klaim_Detail.Jumlah) AS Jumlah
FROM DN_Klaim_Master INNER JOIN DN_Klaim_Detail ON DN_Klaim_Master.No_Ref = DN_Klaim_Detail.No_Ref AND DN_Klaim_Master.No_Peserta = DN_Klaim_Detail.No_Peserta
WHERE (ISNull(DN_Klaim_Detail.No_Bukti,'')<>'') AND (DN_Klaim_Master.No_Ref='2015.091032')
GROUP BY DN_Klaim_Detail.Tanggal, DN_Klaim_Detail.No_Bukti