private double GetSaldoPrendaxCodVenta(Int32 CodVenta)
        {
            double Saldo = 0;

            Clases.cPrenda prenda  = new Clases.cPrenda();
            DataTable      tPrenda = prenda.GetPrendaxCodVenta(CodVenta);

            if (tPrenda.Rows.Count > 0)
            {
                if (tPrenda.Rows[0]["Saldo"].ToString() != "")
                {
                    Saldo = Convert.ToDouble(tPrenda.Rows[0]["Saldo"].ToString());
                }
            }
            return(Saldo);
        }
Beispiel #2
0
        private void CargarDatos(Int32 CodVenta)
        {
            GetAutoPartePago(CodVenta);
            Clases.cCliente cliente = new Clases.cCliente();
            Clases.cVenta   venta   = new Clases.cVenta();
            DataTable       trdo    = venta.GetVentaxCodigo(CodVenta);

            if (trdo.Rows.Count > 0)
            {
                Int32     CodCliente = Convert.ToInt32(trdo.Rows[0]["CodCliente"].ToString());
                DataTable tcli       = cliente.GetClientesxCodigo(CodCliente);
                if (tcli.Rows.Count > 0)
                {
                    string nombre = tcli.Rows[0]["Nombre"].ToString();
                    nombre = nombre + " " + tcli.Rows[0]["Apellido"].ToString();
                    string Direccion = tcli.Rows[0]["Calle"].ToString();
                    Direccion         = Direccion + " " + tcli.Rows[0]["Numero"].ToString();
                    txtDireccion.Text = Direccion;
                    txtTelefono.Text  = tcli.Rows[0]["Telefono"].ToString();
                    txtNombre.Text    = nombre;
                }
            }
            txtEfectivo.Text   = trdo.Rows[0]["ImporteEfectivo"].ToString();
            txtDocumentos.Text = trdo.Rows[0]["ImporteCredito"].ToString();
            Int32 CodAuto = Convert.ToInt32(trdo.Rows[0]["CodAutoVendido"].ToString());

            Clases.cAuto auto  = new Clases.cAuto();
            DataTable    tauto = auto.GetAutoxCodigo(CodAuto);

            {
                if (tauto.Rows.Count > 0)
                {
                    string Descrip = tauto.Rows[0]["Descripcion"].ToString();
                    Descrip      = Descrip + " AÑO " + tauto.Rows[0]["Anio"].ToString();
                    Descrip      = Descrip + " DOMINIO " + tauto.Rows[0]["Patente"].ToString();
                    Descrip      = Descrip + " MOTOR N º" + tauto.Rows[0]["Motor"].ToString();
                    Descrip      = Descrip + " CHASIS N º" + tauto.Rows[0]["Chasis"].ToString();
                    txtAuto.Text = Descrip;
                }
            }
            Clases.cFunciones fun = new Clases.cFunciones();
            if (txtEfectivo.Text != "0" && txtEfectivo.Text != "")
            {
                txtEfectivo.Text = fun.SepararDecimales(txtEfectivo.Text);
                txtEfectivo.Text = fun.FormatoEnteroMiles(txtEfectivo.Text);
            }

            if (txtDocumentos.Text != "0" && txtDocumentos.Text != "")
            {
                txtDocumentos.Text = fun.SepararDecimales(txtDocumentos.Text);
                txtDocumentos.Text = fun.FormatoEnteroMiles(txtDocumentos.Text);
            }
            Clases.cPrenda prenda     = new Clases.cPrenda();
            DataTable      trdoPrenda = prenda.GetPrendaxCodVenta(Convert.ToInt32(Principal.CodigoPrincipalAbm));

            if (trdoPrenda.Rows.Count > 0)
            {
                string Importe = trdoPrenda.Rows[0]["Importe"].ToString();
                Importe = fun.SepararDecimales(Importe);
                Importe = fun.FormatoEnteroMiles(Importe);
                txtImportePrenda.Text = Importe;
            }
        }
Beispiel #3
0
        private string GetFormasPago()
        {
            Clases.cFunciones fun   = new Clases.cFunciones();
            string            texto = "";
            int b = 0;

            if (txtSenia.Text != "")
            {
                texto = "Seña adelanto " + txtSenia.Text;
                b     = 1;
            }
            if (txtEfectivo.Text != "")
            {
                if (b == 0)
                {
                    texto = " efectivo en este acto " + txtEfectivo.Text;
                }
                else
                {
                    texto = texto + ",efectivo en este acto " + txtEfectivo.Text;
                }
                b = 1;
            }
            if (txtDocumentos.Text != "")
            {
                if (b == 0)
                {
                    texto = " Documento de " + txtDocumentos.Text;
                }
                else
                {
                    texto = texto + ", Documento de " + txtDocumentos.Text;
                }
            }

            if (txtAutoPartePago.Text != "")
            {
                texto = texto + txtAutoPartePago.Text;
            }

            // busco si hubo prenda
            Clases.cPrenda prenda = new Clases.cPrenda();
            DataTable      trdo   = prenda.GetPrendaxCodVenta(Convert.ToInt32(Principal.CodigoPrincipalAbm));

            if (trdo.Rows.Count > 0)
            {
                string Importe = trdo.Rows[0]["Importe"].ToString();
                Importe = fun.SepararDecimales(Importe);
                Importe = fun.FormatoEnteroMiles(Importe);
                string Descripcion = trdo.Rows[0]["Descripcion"].ToString();
                texto = texto + ",crédito prendario a cargo de " + Descripcion;
                texto = texto + ", por un valor de " + Importe;
            }

            texto = texto + ",sobre el cual se aplicaran los siguientes descuentos:";
            if (txtRentas.Text != "")
            {
                texto = texto + ", rentas :" + txtRentas.Text;
            }

            if (txtMunicipalidad.Text != "")
            {
                texto = texto + ", municipalidad :" + txtMunicipalidad.Text;
            }

            if (txtMultas.Text != "")
            {
                texto = texto + ", multas :" + txtMultas.Text;
            }

            if (txtMultas.Text != "")
            {
                texto = texto + ", rentas :" + txtMultas.Text;
            }

            if (txtVerificacion.Text != "")
            {
                texto = texto + ", verificación :" + txtVerificacion.Text;
            }

            if (txtFirmasyForm.Text != "")
            {
                texto = texto + ", firmas y form. :" + txtFirmasyForm.Text;
            }

            if (txtCancelacionPrenda.Text != "")
            {
                texto = texto + ", cancelac prenda. :" + txtCancelacionPrenda.Text;
            }

            if (txtOtros.Text != "")
            {
                texto = texto + ", cancelac prenda. :" + txtOtros.Text;
            }


            return(texto);
        }