public Modul_Pembelian_PembayaranHutang(Modul_Pembelian_DaftarHutang daftarHutang,DataGridViewRow dgvRow)
        {
            /*kodesupplier
            namasupplier
            faktur
            tanggal faktur
            saldo hutang
            */

            InitializeComponent();
            this.daftarHutang = daftarHutang;
            this.dgvRow = dgvRow;
            tANGGALDateTimePicker.Value = Convert.ToDateTime(dgvRow.Cells[3].Value.ToString());
            fAKTURTextBox.Text = dgvRow.Cells[2].Value.ToString();
            kodeSupplierTextBox.Text = dgvRow.Cells[0].Value.ToString();
            namaSupplierTextBox.Text = dgvRow.Cells[1].Value.ToString();
            pembayaranTxt.Text = "0" ;
            sisaHutangTxt.Text = allfunc.digit_separated(dgvRow.Cells[4].Value.ToString());
            SqlDataReader sdr = dbo.get_single_data(new string[]{"NO_Bukti","TJT"},"FAKTUR",dgvRow.Cells[2].Value.ToString()+"' AND LOWER(posisiperkiraan) = 'kredit","utang");
            while(sdr.Read())
            {
                tJTDateTimePicker.Value = (DateTime)sdr["TJT"];
                noBuktiTxt.Text = (string)sdr["NO_Bukti"];
            }
            DbObject db1 = new DbObject();
            SqlDataReader sdr1 = db1.get_single_data(new string[] { "JumlahPembelian" }, "NomorBukti", noBuktiTxt.Text, "beli");
            while (sdr1.Read())
            {
                nominalTextBox.Text = allfunc.digit_separated(Convert.ToString((double)sdr1["JumlahPembelian"]));
            }
            if(sisaHutangTxt.Text.CompareTo("0")==0)
            {
                bayarBtn.Enabled = false;
            }
            setDataGridView(noBuktiTxt.Text);
        }
 private void open_modul_pembelian_hutang()
 {
     if (login.checkPrevilege(new string[] { "moph", "prchsdef" }))
     {
         if (bayarHutang != null)
         {
             bayarHutang.Close();
             bayarHutang.Dispose();
         }
         bayarHutang = new Modul_Pembelian_DaftarHutang(this);
         bayarHutang.Show();
         //disable_Main_Form();
     }
 }