Пример #1
0
        public DataTable listarTiposInformesRemito(int lIdCliente, string lFechaDesde, string lFechaHasta, int lTipoDocumentacion, int lnroRemito)
        {
            string strSQL = " WHERE b.idCliente = " + lIdCliente +
                            " AND b.estado=3 ";

            //" AND p.fecDesde < b.fechaFin " +
            //" AND p.actual = 1 ";

            if (lTipoDocumentacion == 1)
            {
                strSQL = strSQL + "AND (b.FechaCarga BETWEEN " + lFechaDesde + " AND " + lFechaHasta +
                         " OR b.idEncabezado IN ( " +
                         " SELECT idEncabezado FROM remitoinforme " +
                         " WHERE nroRemito = " + lnroRemito + " )) ";
            }

            if (lTipoDocumentacion == 2)
            {
                strSQL = strSQL + "AND (b.FechaCarga BETWEEN " + lFechaDesde + " AND " + lFechaHasta +
                         " OR b.idEncabezado IN ( " +
                         " SELECT idEncabezado FROM parteEntregaInforme " +
                         " WHERE nroParte = " + lnroRemito + " )) ";
            }

            strSQL = strSQL + "GROUP BY b.idTipoInforme, ti.descripcion, p.precio " + //, c.descripcion
                     "ORDER BY b.idTipoInforme ASC ";

            DataTable Datos = GestorPrecios.RemitoListarTiposInformes(strSQL);

            return(Datos);
        }
Пример #2
0
        /*
         *      public static bool AsentarMovimiento(int lIdCliente, int lIdEncabezado, int lIdTipoInforme)
         *      {
         *              return AsentarMovimiento(lIdCliente, lIdEncabezado, lIdTipoInforme, 3);
         *
         *      }
         *
         *      public static bool AsentarMovimiento(int lIdCliente, int lIdEncabezado, int lIdTipoInforme, byte lTipoPrecio)
         *      {
         *              float flPrecio = GestorPrecios.TraerPrecioActual(lIdTipoInforme, lTipoPrecio);
         *              return CuentaCorrienteDal.AsentarMovimiento(lIdCliente, lIdEncabezado, lIdTipoInforme, lTipoPrecio, flPrecio);
         *
         *      }
         */

        public DataTable listarTiposInformesRemito(int lIdCliente, string lFechaDesde, string lFechaHasta)
        {
            if (lFechaDesde != "")
            {
                lFechaDesde = "'" + lFechaDesde + " 00:00:00.000'";
            }

            if (lFechaHasta != "")
            {
                lFechaHasta = "'" + lFechaHasta + " 23:59:59.999'";
            }

            string FechaActual = DateTime.Today.ToShortDateString();

            FechaActual = "'" + FechaActual + " 00:00:00.000'";

            string strSQL = "WHERE b.FechaCarga BETWEEN " + lFechaDesde + " AND " + lFechaHasta +
                            " AND b.idCliente = " + lIdCliente +
                            " AND b.estado=3 " +
                            //"AND p.fecDesde < b.FechaFin " +
                            //"AND p.actual = 1 " +
                            "AND b.idEncabezado NOT IN ( " +
                            "SELECT bb.idEncabezado FROM remitoinforme ri " +
                            "INNER JOIN bandejaentrada bb ON ri.idEncabezado=bb.idEncabezado " +
                            "WHERE bb.idCliente = " + lIdCliente + " ) " +
                            "AND b.idEncabezado NOT IN ( " +
                            "SELECT bb.idEncabezado FROM parteEntregaInforme pei " +
                            "INNER JOIN bandejaentrada bb ON pei.idEncabezado=bb.idEncabezado " +
                            "WHERE bb.idCliente = " + lIdCliente + " ) " +
                            "GROUP BY b.idTipoInforme, ti.descripcion, p.precio " + //, c.descripcion
                            "ORDER BY b.idTipoInforme ASC ";
            DataTable Datos = GestorPrecios.RemitoListarTiposInformes(strSQL);

            return(Datos);
        }
Пример #3
0
        protected void btnAgregar_Click(object sender, EventArgs e)
        {
            //GestorPrecios CajaEncabezado = new GestorPrecios();

            GestorPrecios.CrearCajaDetalle(int.Parse(hdIdCaja.Value), int.Parse(cmbTipoIngreso.SelectedValue), int.Parse(cmbConcepto.SelectedValue), cmbConcepto.SelectedItem.ToString(), float.Parse(txtMonto.Text), txtObservaciones.Text);
            Response.Redirect("ListaCajaDetalles.aspx?id=" + hdIdCaja.Value);
        }
Пример #4
0
        public int crearRemitoParte(int idTipoDocumentacion, int idtipoCobranza, int idCliente, int idUsuarioIntra)
        {
            GestorPrecios gp       = new GestorPrecios();
            int           idRemito = gp.CrearRemitoParte(idTipoDocumentacion, idtipoCobranza, idCliente, idUsuarioIntra);

            return(idRemito);
        }
Пример #5
0
        protected void btnAgregar_Click(object sender, EventArgs e)
        {
            //GestorPrecios CajaEncabezado = new GestorPrecios();

            GestorPrecios.CambiarEstadoCheque(int.Parse(hdIdChequeCartera.Value), float.Parse(lblMontoCheque.Text), int.Parse(cmbEstado.SelectedValue));
            Response.Redirect("ListaChequesCartera.aspx");
        }
Пример #6
0
        private void CargarAdicional(int lId)
        {
            string strDescr = "";

            strDescr            = GestorPrecios.CargarAdicional(lId);
            txtDescripcion.Text = strDescr;
        }
Пример #7
0
        public int crearMovimiento(int idTipoDocumentacion, int idCliente, int idUsuarioIntra)
        {
            GestorPrecios gp           = new GestorPrecios();
            int           idMovimiento = gp.CrearMovimiento(idTipoDocumentacion, idCliente, idUsuarioIntra);

            return(idMovimiento);
        }
Пример #8
0
        public void agregarRemitoParteEntregaMovimiento(int idTipoDocumentacion, int nroMovimiento, int idRemito)
        {
            GestorPrecios gp = new GestorPrecios();

            gp.agregarRemitoParteEntregaMovimiento(idTipoDocumentacion, nroMovimiento, idRemito);
            //return idRemito;
        }
Пример #9
0
        public void modificarInformesRemitoParte(int idTipoDocumentacion, int idRemito, int idTipoInforme, int idEncabezado, decimal precio)
        {
            GestorPrecios gp = new GestorPrecios();

            gp.modificarInformesRemitoParte(idTipoDocumentacion, idRemito, idTipoInforme, idEncabezado, precio);
            //return idRemito;
        }
Пример #10
0
        private void ListadoDeuda(int tipoPeriodo, int tipoMorosidad)
        {
            string fechaDesde = "";
            string fechaHasta = "";
            string clientes   = "";

            lblTipoPeriodo.Text = (tipoPeriodo == 2) ? "Mensuales" : "Diarios";

            fechaDesde       = Request.QueryString["fechaDesde"];
            fechaHasta       = Request.QueryString["fechaHasta"];
            clientes         = Request.QueryString["clientes"];
            lblTotal.Visible = (Request.QueryString["subtotal"] == "1") ? true : false;

            if (fechaDesde == "")
            {
                lblFechaDesde.Text = lblFechaDesde.Text = DateTime.Today.AddYears(-7).ToShortDateString();
            }
            else
            {
                lblFechaDesde.Text = fechaDesde;
            }

            if (fechaHasta == "")
            {
                lblFechaHasta.Text = DateTime.Today.ToShortDateString();
            }
            else
            {
                lblFechaHasta.Text = fechaHasta;
            }


            lvListadoClientes.DataSource = GestorPrecios.ListaPendientesCobrosClientes(tipoPeriodo, fechaDesde, fechaHasta, clientes, tipoMorosidad).DefaultView;
            lvListadoClientes.DataBind();
        }
Пример #11
0
        public void modificarAdicionalRemito(int idTipoDocumentacion, int idRemito, int idAdicional, int Cantidad, decimal precio)
        {
            GestorPrecios gp = new GestorPrecios();

            gp.agregarAdicionalRemito(idTipoDocumentacion, idRemito, idAdicional, Cantidad, precio);
            //return idRemito;
        }
Пример #12
0
        public bool eliminarAdicionalRemito(int tipoDocumentacion, int nroRemito, int id)
        {
            bool          estado = false;
            GestorPrecios gp     = new GestorPrecios();

            estado = gp.eliminarAdicionalRemito(tipoDocumentacion, nroRemito, id);
            return(true);
        }
Пример #13
0
        public bool eliminarTodosAdicionalesRemitosParteEntrega(int tipoDocumentacion, int nroRemito)
        {
            bool          estado = false;
            GestorPrecios gp     = new GestorPrecios();

            estado = gp.eliminarTodosAdicionalesRemitosParteEntrega(tipoDocumentacion, nroRemito);
            return(true);
        }
Пример #14
0
        public bool eliminarRemitoMovimiento(int idTipoDocumentacion, int nroMovimiento, int nroRemito)
        {
            bool          estado = false;
            GestorPrecios gp     = new GestorPrecios();

            estado = gp.eliminarRemitoMovimiento(idTipoDocumentacion, nroMovimiento, nroRemito);
            return(estado);
        }
Пример #15
0
        protected void btnCerrar_Click(object sender, System.EventArgs e)
        {
            if (intId != -1)
            {
                GestorPrecios.ModificarCaja(intId, float.Parse(txtEfectivoInicial.Text), float.Parse(txtChequeInicial.Text), float.Parse(txtSaldoEfectivo.Text), float.Parse(txtSaldoCheque.Text), 1);
            }

            Response.Redirect("ListaCaja.aspx");
        }
Пример #16
0
        private void CargarMontosCajaAnterior()
        {
            //string strDescr = "";
            GestorPrecios gCarga = new GestorPrecios();

            gCarga.CargarMontosCajaAnterior();

            txtEfectivoInicial.Text = gCarga.EfectivoInicial.ToString();
            txtChequeInicial.Text   = gCarga.ChequeInicial.ToString();
        }
Пример #17
0
 private void CargarEncabezadoCCDetalle(int idCuentaCliente)
 {
     GestorPrecios CajaEncabezado = new GestorPrecios();
     //CajaEncabezado.CargarCaja(int.Parse(idCaja));
     //lblFechaApertura.Text = CajaEncabezado.Apertura;
     //lblFechaCierre.Text = CajaEncabezado.Cierre;
     //lblEfectivoInicial.Text = CajaEncabezado.EfectivoInicial.ToString();
     //lblChequeInicial.Text = CajaEncabezado.ChequeInicial.ToString();
     //lblSaldoEfectivo.Text = CajaEncabezado.SaldoEfectivo.ToString();
     //lblSaldoCheque.Text = CajaEncabezado.SaldoCheque.ToString();
 }
Пример #18
0
        private void CargarEncabezadoChequeCartera(string idChequeCartera)
        {
            GestorPrecios ChequeCarteraEncabezado = new GestorPrecios();

            ChequeCarteraEncabezado.CargarChequeCartera(int.Parse(idChequeCartera));
            lblFechaCobro.Text   = DateTime.Parse(ChequeCarteraEncabezado.CHFechaCobro).ToShortDateString();
            lblFechaEmision.Text = DateTime.Parse(ChequeCarteraEncabezado.CHFechaEmision).ToShortDateString();
            lblNroCheque.Text    = ChequeCarteraEncabezado.CHNumero;
            lblMontoCheque.Text  = ChequeCarteraEncabezado.CHMonto.ToString();
            hdMonto.Value        = ChequeCarteraEncabezado.CHMonto.ToString();
            lblBanco.Text        = ChequeCarteraEncabezado.CHBanco;
        }
Пример #19
0
        private void CargarEncabezadoCaja(string idCaja)
        {
            GestorPrecios CajaEncabezado = new GestorPrecios();

            CajaEncabezado.CargarCaja(int.Parse(idCaja));
            lblFechaApertura.Text   = CajaEncabezado.Apertura;
            lblFechaCierre.Text     = CajaEncabezado.Cierre;
            lblEfectivoInicial.Text = CajaEncabezado.EfectivoInicial.ToString();
            lblChequeInicial.Text   = CajaEncabezado.ChequeInicial.ToString();
            lblSaldoEfectivo.Text   = CajaEncabezado.SaldoEfectivo.ToString();
            lblSaldoCheque.Text     = CajaEncabezado.SaldoCheque.ToString();
        }
Пример #20
0
 private void ActualizarGrilla()
 {
     if (Request.QueryString["idTipoPropiedad"] != null && Request.QueryString["idTipoPropiedad"] != "")
     {
         dgTipoInforme.DataSource = GestorPrecios.TraerPreciosPropiedad(idTipoPropiedad);
         dgTipoInforme.DataBind();
     }
     else
     {
         dgTipoInforme.DataSource = GestorPrecios.TraerPrecios(intIdTipoInforme);
         dgTipoInforme.DataBind();
     }
 }
Пример #21
0
        protected void btnAceptar_Click(object sender, System.EventArgs e)
        {
            if (intId != -1)
            {
                GestorPrecios.ModificarAdicional(intId, txtDescripcion.Text);
            }
            else
            {
                GestorPrecios.CrearAdicional(txtDescripcion.Text);
            }

            Response.Redirect("ListaAdicionales.aspx");
        }
Пример #22
0
        private void CargarCaja(int lId)
        {
            //string strDescr = "";
            GestorPrecios gCarga = new GestorPrecios();

            gCarga.CargarCaja(lId);

            //strDescr = GestorPrecios.CargarCaja(lId);
            txtEfectivoInicial.Text = gCarga.EfectivoInicial.ToString();
            txtChequeInicial.Text   = gCarga.ChequeInicial.ToString();
            txtSaldoEfectivo.Text   = gCarga.SaldoEfectivo.ToString();
            txtSaldoCheque.Text     = gCarga.SaldoCheque.ToString();
        }
Пример #23
0
        private void ListaConceptos(int idTipoIngreso)
        {
            cmbConcepto.Items.Clear();
            DataTable myTb;

            myTb = GestorPrecios.ListarConceptos("", 2, idTipoIngreso);
            ListItem myItem;

            foreach (DataRow myRow in myTb.Rows)
            {
                myItem = new ListItem(myRow[1].ToString(), myRow[0].ToString());
                cmbConcepto.Items.Add(myItem);
            }
        }
Пример #24
0
        protected void btnAceptar_Click(object sender, System.EventArgs e)
        {
            if (intId != -1)
            {
                GestorPrecios.ModificarCaja(intId, float.Parse(txtEfectivoInicial.Text), float.Parse(txtChequeInicial.Text), float.Parse(txtSaldoEfectivo.Text), float.Parse(txtSaldoCheque.Text), 0);
            }
            else
            {
                UsuarioAutenticado Usuario = (UsuarioAutenticado)Session["UsuarioAutenticado"];
                GestorPrecios.CrearCaja(float.Parse(txtEfectivoInicial.Text), float.Parse(txtChequeInicial.Text), Usuario.IdUsuario);
            }

            Response.Redirect("ListaCaja.aspx");
        }
Пример #25
0
        private void ListaEstados()
        {
            cmbEstado.Items.Clear();
            DataTable myTb;

            myTb = GestorPrecios.ListarEstadosCheques("");
            ListItem myItem;

            foreach (DataRow myRow in myTb.Rows)
            {
                myItem = new ListItem(myRow[1].ToString(), myRow[0].ToString());
                cmbEstado.Items.Add(myItem);
            }
        }
Пример #26
0
        private void ListaAdicionales()
        {
            ddAdicional.Items.Clear();
            DataTable myTb;

            myTb = GestorPrecios.ListarAdicionales("");
            ListItem myItem;

            foreach (DataRow myRow in myTb.Rows)
            {
                myItem = new ListItem(myRow[1].ToString(), myRow[0].ToString());
                ddAdicional.Items.Add(myItem);
            }
        }
Пример #27
0
        public DataTable listarInformesRemitoParteEntrega(int idTipoDocumento, int lnroRemito, int lTipoInforme)
        {
            string strSQL = "";

            if (idTipoDocumento == 1)
            {
                if (lnroRemito == 0)
                {
                    strSQL = "WHERE p.actual=1 " +
                             "AND b.idEncabezado IN ( " +
                             "SELECT idEncabezado FROM remitoinforme " +
                             "WHERE nroRemito = " + lnroRemito +
                             " AND idTipoInforme = " + lTipoInforme + ") " +
                             "ORDER BY b.idTipoInforme ASC ";
                }
                else
                {
                    strSQL = "WHERE " +
                             "ri.nroRemito= " + lnroRemito +
                             " ORDER BY b.idTipoInforme ASC";
                }
            }

            if (idTipoDocumento == 2)
            {
                if (lnroRemito == 0)
                {
                    strSQL = "WHERE p.actual=1 " +
                             "AND b.idEncabezado IN ( " +
                             "SELECT idEncabezado FROM parteEntregaInforme " +
                             "WHERE nroParte = " + lnroRemito +
                             " AND idTipoInforme = " + lTipoInforme + ") " +
                             "ORDER BY b.idTipoInforme ASC ";
                }
                else
                {
                    strSQL = "WHERE " +
                             "ri.nroparte= " + lnroRemito +
                             " ORDER BY b.idTipoInforme ASC";
                }
            }

            DataTable Datos = GestorPrecios.RemitoParteEntregaListarInformes(idTipoDocumento, lTipoInforme, lnroRemito, strSQL);

            return(Datos);
        }
Пример #28
0
        protected void btnAgregar_Click(object sender, EventArgs e)
        {
            int vIdCajaDetalle           = 0;
            CuentaCorrienteApp ccCliente = new CuentaCorrienteApp();
            //ccCliente.ValClienteCC(hdIdCuentaCliente);
            int idCuentaCliente = int.Parse(hdIdCuentaCliente.Value);
            int idCajaDiaria    = ccCliente.ObtenerNroCajaDiaria();

            //GestorPrecios CajaEncabezado = new GestorPrecios();

            GestorPrecios.CrearCuentaClienteDetalle(int.Parse(hdIdCuentaCliente.Value), int.Parse(cmbTipoIngreso.SelectedValue), cmbConcepto.SelectedItem.ToString() + ", " + txtConceptoAdicional.Text, int.Parse(cmbFormaPago.SelectedValue), float.Parse(txtMonto.Text));

            ClienteDal dalCliente = new ClienteDal();
            int        idCliente  = int.Parse(Request.QueryString["id"]);

            dalCliente.Cargar(idCliente);
            string NombreCliente = dalCliente.NombreFantasia;

            if (dalCliente.Sucursal != "")
            {
                NombreCliente = NombreCliente + "( " + dalCliente.Sucursal + ")";
            }
            NombreCliente = NombreCliente + ": ";


            if (raIngresaCaja.SelectedItem.Text == "SI")
            {
                int idCajaDetalleFormaPago = 0;
                vIdCajaDetalle = AgregarMovimientoCaja(idCajaDiaria, int.Parse(cmbTipoIngreso.SelectedValue), int.Parse(cmbConcepto.SelectedValue), NombreCliente + cmbConcepto.SelectedItem.ToString() + ", " + txtConceptoAdicional.Text, float.Parse(txtMonto.Text), float.Parse(txtMonto.Text), txtObservaciones.Text);

                // Se agrega Forma de Pago
                if (txtMonto.Text != "" && int.Parse(txtMonto.Text) != 0)
                {
                    idCajaDetalleFormaPago = AgregarFormaPago(vIdCajaDetalle, int.Parse(cmbFormaPago.SelectedValue), float.Parse(txtMonto.Text), int.Parse(cmbTipoIngreso.SelectedValue));
                }

                // Cheques en Cartera
                if (cmbFormaPago.SelectedValue == "2")
                {
                    AgregarChequeCartera(idCajaDetalleFormaPago, float.Parse(txtMonto.Text), txtBanco.Text, txtNroCheque.Text, txtFechaEmision.Text, txtFechaCobro.Text, idCliente);
                }
            }

            Response.Redirect("ListaCuentaCorrienteCliente.aspx?idCliente=" + Request.QueryString["id"]);
        }
Пример #29
0
        private void CargarEncabezadoCaja(string idCaja)
        {
            btnNuevo.Enabled = true;
            GestorPrecios CajaEncabezado = new GestorPrecios();

            CajaEncabezado.CargarCaja(int.Parse(idCaja));
            lblFechaApertura.Text   = CajaEncabezado.Apertura;
            lblFechaCierre.Text     = CajaEncabezado.Cierre;
            lblEfectivoInicial.Text = CajaEncabezado.EfectivoInicial.ToString();
            lblChequeInicial.Text   = CajaEncabezado.ChequeInicial.ToString();
            lblSaldoEfectivo.Text   = CajaEncabezado.SaldoEfectivo.ToString();
            lblSaldoCheque.Text     = CajaEncabezado.SaldoCheque.ToString();

            if (CajaEncabezado.Cierre != "")
            {
                btnNuevo.Enabled = false;
            }
        }
 protected void btnAceptar_Click(object sender, EventArgs e)
 {
     if (hIdCliente.Value != "")
     {
         try
         {
             int idCliente = int.Parse(hIdCliente.Value);
             if (intIdTipoInforme != 1 && intIdTipoInforme != 13)
             {
                 GestorPrecios.AgregarClienteCuentaCorriente(idCliente);
             }
         }
         catch
         {
         }
     }
     ActualizarGrilla();
     btnCancelar_Click(null, null);
 }