
--SELECT * FROM dbo.Note_Terbit_Master WHERE No_Note = '071446/DN.CL/GT/IX/2015'

SELECT * FROM dbo.Note_Terbit_Master WHERE No_Ref = '2015.071446'
  
--UPDATE  
--  dbo.Note_Terbit_Master
--SET
--  Jml_Lunas = 122500,
--  Tgl_Lunas = '2016-05-17'
--WHERE
--  No_Ref = '2015.071446'
	
SELECT
	*
FROM
	dbo.Note_Lunas_Master
WHERE
  No_Ref = '2015.071446'
  AND No_Bukti = 'JV 2014/07/0018916'

--DELETE FROM
--  dbo.Note_Lunas_Master
--WHERE
--  No_Ref = '2015.071446'
--  AND No_Bukti = 'JV 2014/07/0018916'

SELECT
	*
FROM
	dbo.Note_Lunas_Detail
WHERE
  No_Ref = '2015.071446'
  AND No_Bukti = 'JV 2014/07/0018916'

--DELETE FROM
--  dbo.Note_Lunas_Detail
--WHERE
--  No_Ref = '2015.071446'
--  AND No_Bukti = 'JV 2014/07/0018916'