private void tributoIgv()
        {
            DataTable ttributo = new DataTable();
            tributotasaBL BL = new tributotasaBL();
            tb_tributotasa BE = new tb_tributotasa();

            BE.tributoid = "1011";
            BE.tributofecha = Convert.ToDateTime(fRegistro.Text);

            ttributo = BL.GetAll2(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];
            decimal xtasaigv = 0;
            if ((ttributo.Rows.Count > 0))
            {
                xtasaigv += Convert.ToDecimal(ttributo.Rows[0]["tributotasa"]);
                //txtPigv.Text = ttributo.Rows[0]["tributotasa"].ToString();
                txtPigv.Text = xtasaigv.ToString("##.00");
            }
            else
            {
                txtPigv.Text = "";
            }
        }
        private Decimal TasaRretencion(DateTime xfecha)
        {
            DataTable ttributo = new DataTable();
            tributotasaBL BL = new tributotasaBL();
            tb_tributotasa BE = new tb_tributotasa();

            BE.tributoid = "1032";
            BE.tributofecha = Convert.ToDateTime(xfecha);
            //BE.tributofecha = Convert.ToDateTime(fEmision.Text);

            ttributo = BL.GetAll2(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];
            decimal xtasaigv = 0;
            if ((ttributo.Rows.Count > 0))
            {
                xtasaigv += Convert.ToDecimal(ttributo.Rows[0]["tributotasa"]);
                return xtasaigv;
            }
            else
            {
                return 0;
            }
        }
        private Decimal TasaRretencion()
        {
            DataTable ttributo = new DataTable();
            string xfecha = null;
            //if (dpTasa.Checked)
            //{
            //    xfecha = Convert.ToDateTime(dpTasa.Text).ToString();
            //}
            //else
            //{
                xfecha = Convert.ToDateTime(fRegistro.Text).ToString();
            //}
            tributotasaBL BL = new tributotasaBL();
            tb_tributotasa BE = new tb_tributotasa();

            BE.tributoid = "1032";
            //BE.tributofecha = Convert.ToDateTime(fRegistro.Text);
            BE.tributofecha = Convert.ToDateTime(xfecha);
            ttributo = BL.GetAll2(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];
            decimal xtasaigv = 0;
            if (ttributo.Rows.Count > 0)
            {
                xtasaigv += Convert.ToDecimal(ttributo.Rows[0]["tributotasa"]);
                return xtasaigv;
            }
            else
            {
                return 0;
            }
        }