public AsientoCCajaChica(CajaDet obj)
        {
            InitializeComponent();
            this.ControlBox      = false;
            this.Text            = "Asientos Contables";
            this.StartPosition   = FormStartPosition.Manual;
            this.Location        = new Point(50, 20);
            objAsiento           = new Asiento();
            objAsientoDao        = new AsientoDAO();
            txt_TipoAsiento.Text = "01";
            objCajadet           = obj;
            txt_Correlativo.Text = objAsientoDao.getCorrelativoAsientoVenta(objCajadet.FechaOperacion.ToString("dd/MM/yyyy"), txt_TipoAsiento.Text);
            gridParams();
            cmbCuenta();
            cmbDocumento();
            txt_Fecha.Text  = objCajadet.FechaOperacion.ToString("dd/MM/yyyy");
            txt_Moneda.Text = objCajadet.MonedaCod;

            grd_Facturas.CellClick += Grd_Facturas_CellClick;
            objListaAsientoDetalle  = objAsientoDao.getGenerarDetalleCaja(objCajadet.NumeroCaja, objCajadet.NumeroOperacion, objCajadet.CodEnt);
            grd_Facturas.DataSource = objListaAsientoDetalle;
            grd_Facturas.Refresh();

            sumatorias();
        }
 public AbonoBanco()
 {
     InitializeComponent();
     AbonoForm         = this;
     objBancoDAO       = new BancoDAO();
     objComboBanco     = new CuentaBanco();
     objBancoDatos     = new CuentaBanco();
     objMonedaDao      = new MonedaDAO();
     objAbonoBancoDet  = new AbonoBancoDet();
     objAbonoBancoCab  = new AbonoBancoCab();
     objFacturaAbono   = new FacturaAbono();
     objAsientoDAO     = new AsientoDAO();
     objAsiento        = new Asiento();
     objAsientoDetalle = new AsientoDetalle();
     cargarCmbBanco();
     cmb_Banco.SelectedIndexChanged += Cmb_Banco_SelectedIndexChanged;
     txt_Fecha.Text     = DateTime.Now.ToString("dd/MM/yyyy");
     objComboBanco      = (CuentaBanco)cmb_Banco.SelectedItem;
     objBancoDatos      = objBancoDAO.listarBancoDatos(Ventas.UNIDADNEGOCIO, objComboBanco.Codigo, objComboBanco.Descripcion);
     txt_Cuenta.Text    = objBancoDatos.Cuenta;
     txt_Moneda.Text    = objBancoDatos.Moneda;
     txt_Tcambio.Text   = objMonedaDao.getTipoCambioVenta(DateTime.Now.ToShortDateString()).ToString().PadRight(5, '0');;
     txt_MonedaCod.Text = objBancoDatos.MonedaCod;
     //gridParams();
     grd_Detalle.CellClick += Grd_Detalle_CellClick;
 }
 public BalanceGeneral()
 {
     InitializeComponent();
     cmbAnio();
     cmbMes();
     objAsientoDao = new AsientoDAO();
 }
 public EstadosFinancieros()
 {
     InitializeComponent();
     objn = new EstadoGananciasPerdidasNaturaleza();
     cmbMes();
     cmbAnio();
     cmbEstado();
     objAsientoDao = new AsientoDAO();
 }
Exemple #5
0
 public AsientoCCompra(DocumentoCab obj)
 {
     InitializeComponent();
     this.ControlBox      = false;
     formAsientoCompra    = this;
     this.Text            = "Asientos Contables";
     this.StartPosition   = FormStartPosition.Manual;
     this.Location        = new Point(50, 20);
     objAsiento           = new Asiento();
     objAsientoDao        = new AsientoDAO();
     txt_TipoAsiento.Text = "11";
     objDocumentoCab      = obj;
     txt_Correlativo.Text = objAsientoDao.getCorrelativoAsientoVenta(objDocumentoCab.DocumentoCabFecha.ToString("dd/MM/yyyy"), txt_TipoAsiento.Text);
     txt_Fecha.Text       = objDocumentoCab.DocumentoCabFecha.ToString("dd/MM/yyyy");
     txt_Moneda.Text      = objDocumentoCab.DocumentoCabMoneda;
     txt_glosa.Text       = objDocumentoCab.DocumentoCabTipoDoc.ToString().Trim() + " " + objDocumentoCab.DocumentoCabSerie.ToString() + " " + objDocumentoCab.DocumentoCabNro.ToString();
     txt_cliente.Text     = objDocumentoCab.DocumentoCabCliente.ToString().Trim();
     //txt_Haber.Text = objDocumentoCab.DocumentoCabTotal.ToString("C").Substring(3);
     //txt_Debe.Text = objDocumentoCab.DocumentoCabTotal.ToString("C").Substring(3);
     gridParams();
     cmbCuenta();
     cmbDocumento();
     /*este if es para cuando es una nea y cuando el servicio no estaba registrando con detalle*/
     if (objDocumentoCab.tipreg == "0")
     {
         objListaAsientoDetalle = objAsientoDao.getGenerarDetalleCompra(objDocumentoCab.NumeroRegistro);
         if (objListaAsientoDetalle.Count > 2)
         {
             grd_Facturas.DataSource = objListaAsientoDetalle;
         }
         else
         {
             objListaAsientoDetalle  = objAsientoDao.getGenerarDetalleCompraServicio(objDocumentoCab.NumeroRegistro);
             grd_Facturas.DataSource = objListaAsientoDetalle;
         }
     }
     if (objDocumentoCab.tipreg == "1")
     {
         objListaAsientoDetalle = objAsientoDao.getGenerarDetalleCompraServicio1(objDocumentoCab.NumeroRegistro);
         if (objListaAsientoDetalle.Count > 2)
         {
             grd_Facturas.DataSource = objListaAsientoDetalle;
         }
         else
         {
             objListaAsientoDetalle  = objAsientoDao.getGenerarDetalleCompraServicio2(objDocumentoCab.NumeroRegistro);
             grd_Facturas.DataSource = objListaAsientoDetalle;
         }
     }
     grd_Facturas.CellClick += Grd_Facturas_CellClick;
     grd_Facturas.Refresh();
     sumatorias();
 }
Exemple #6
0
 public LibroMayor()
 {
     InitializeComponent();
     this.ControlBox    = false;
     this.Text          = "Libro Mayor";
     this.StartPosition = FormStartPosition.Manual;
     this.Location      = new Point(50, 20);
     objMonedaDao       = new MonedaDAO();
     objAsientoDao      = new AsientoDAO();
     objMonedaDao.tipoCambio();
     cmbMes();
     comboMoneda();
 }
Exemple #7
0
 public AsientoCVoucher(Voucher obj)
 {
     InitializeComponent();
     this.ControlBox    = false;
     this.Text          = "Asientos Contables";
     this.StartPosition = FormStartPosition.Manual;
     this.Location      = new Point(50, 20);
     objVoucher         = obj;
     objAsiento         = new Asiento();
     objAsientoDao      = new AsientoDAO();
     /*CHEQUES*/
     if (objVoucher.TipVoucher.ToString() == "C")
     {
         txt_TipoAsiento.Text = "23";
     }
     /*CARGOS*/
     else if (objVoucher.TipVoucher.ToString() == "CA")
     {
         txt_TipoAsiento.Text = "22";
     }
     /*ABONOS*/
     else if (objVoucher.TipVoucher.ToString() == "A")
     {
         txt_TipoAsiento.Text = "21";
     }
     txt_Correlativo.Text = objAsientoDao.getCorrelativoAsientoVenta(objVoucher.FechaEmision.ToString("dd/MM/yyyy"), txt_TipoAsiento.Text);
     gridParams();
     cmbCuenta();
     cmbDocumento();
     txt_Fecha.Text  = objVoucher.FechaPago.ToString("dd/MM/yyyy");
     txt_Moneda.Text = objVoucher.Moneda;
     if (objVoucher.TipVoucher.ToString() == "C")
     {
         objListaAsientoDetalle = objAsientoDao.getGenerarDetalleVoucher(objVoucher.NroVoucher);
     }
     else if (objVoucher.TipVoucher.ToString() == "A")
     {
         objListaAsientoDetalle = objAsientoDao.getGenerarDetalleVoucherAbono(objVoucher.NroVoucher);
     }
     else if (objVoucher.TipVoucher.ToString() == "CA")
     {
         objListaAsientoDetalle = objAsientoDao.getGenerarDetalleVoucherCargo(objVoucher.NroVoucher);
     }
     grd_Facturas.DataSource = objListaAsientoDetalle;
     grd_Facturas.Refresh();
     grd_Facturas.CellClick += Grd_Facturas_CellClick;
 }
Exemple #8
0
 public RegistrarAsientoGeneral()
 {
     InitializeComponent();
     this.StartPosition = FormStartPosition.Manual;
     this.Location      = new Point(50, 20);
     this.ControlBox    = false;
     this.Text          = "Asientos Generales";
     objAsientoDao      = new AsientoDAO();
     objMonedaDao       = new MonedaDAO();
     objMonedaDao.tipoCambio();
     comboTipoAsiento();
     comboMoneda();
     cmb_tipoAsiento.SelectedIndexChanged += Cmb_tipoAsiento_SelectedIndexChanged;
     txt_TipoAsiento.Text = cmb_tipoAsiento.SelectedValue.ToString();
     tipoCambio(dpicker_Fecha.Value.ToShortDateString());
     dpicker_Fecha.ValueChanged += Dpicker_Fecha_ValueChanged;
 }
Exemple #9
0
 public AsientoCGeneral()
 {
     InitializeComponent();
     this.ControlBox      = false;
     this.Text            = "Asientos Contables";
     this.StartPosition   = FormStartPosition.Manual;
     this.Location        = new Point(50, 20);
     objAsiento           = new Asiento();
     objAsientoDao        = new AsientoDAO();
     txt_TipoAsiento.Text = RegistrarAsientoGeneral.tipoAsiento;
     // txt_Debe.Text = RegistrarAsientoGeneral.totalComprobante.ToString();
     //txt_Haber.Text = RegistrarAsientoGeneral.totalComprobante.ToString();
     txt_Moneda.Text      = RegistrarAsientoGeneral.moneda;
     txt_Fecha.Text       = RegistrarAsientoGeneral.fechaComprobante;
     txt_Correlativo.Text = objAsientoDao.getCorrelativoAsientoVenta(txt_Fecha.Text, txt_TipoAsiento.Text);
     cmbCuenta();
     gridParams();
 }
Exemple #10
0
        public AsientoCVenta(DocumentoCab obj)
        {
            InitializeComponent();
            this.ControlBox      = false;
            this.Text            = "Asientos Contables";
            this.StartPosition   = FormStartPosition.Manual;
            this.Location        = new Point(50, 20);
            objAsiento           = new Asiento();
            objAsientoDao        = new AsientoDAO();
            txt_TipoAsiento.Text = "05";
            objDocumentoCab      = obj;
            //ára generar el correlativo se creo una funcion con un procedure donde recoge la fecha y el tipo de asiento para validar el  ultimo correlativo
            txt_Correlativo.Text = objAsientoDao.getCorrelativoAsientoVenta(objDocumentoCab.DocumentoCabFecha.ToString("dd/MM/yyyy"), txt_TipoAsiento.Text);

            txt_Fecha.Text       = objDocumentoCab.DocumentoCabFecha.ToString("dd/MM/yyyy");
            txt_Moneda.Text      = objDocumentoCab.DocumentoCabMoneda;
            txt_Haber.Text       = objDocumentoCab.DocumentoCabTotal.ToString("C").Substring(3);
            txt_Debe.Text        = objDocumentoCab.DocumentoCabTotal.ToString("C").Substring(3);
            txt_descripcion.Text = objDocumentoCab.DocumentoCabGlosa.ToString();
            txt_cliente.Text     = objDocumentoCab.DocumentoCabCliente.ToString();
            txt_glosa.Text       = objDocumentoCab.DocumentoCabTipoDoc.ToString() + " " + objDocumentoCab.DocumentoCabSerie.ToString() + " " + objDocumentoCab.DocumentoCabNro.ToString();
            gridParams();

            /*objListaAsientoDetalle = objAsientoDao.getGenerarDetalleValidar(objDocumentoCab.DocumentoCabSerie, objDocumentoCab.DocumentoCabNro);
             * if (objListaAsientoDetalle.Count > 0)
             * {
             *
             * }*/
            objListaAsientoDetalle = objAsientoDao.getGenerarDetalle(objDocumentoCab.DocumentoCabSerie, objDocumentoCab.DocumentoCabNro);

            /*if(objListaAsientoDetalle.Count>0)
             * {
             *  grd_Facturas.DataSource = objListaAsientoDetalle;
             *
             * }else
             * {
             *  objListaAsientoDetalle = objAsientoDao.getGenerarDetalleCentroCosto(objDocumentoCab.DocumentoCabSerie, objDocumentoCab.DocumentoCabNro);
             *  grd_Facturas.DataSource = objListaAsientoDetalle;
             * }*/
            grd_Facturas.DataSource = objListaAsientoDetalle;
            grd_Facturas.Refresh();
            grd_Facturas.CellClick += Grd_Facturas_CellClick;
        }
 public RegistrarCajaChica()
 {
     InitializeComponent();
     this.ControlBox    = false;
     this.Text          = "Asientos Contables";
     this.StartPosition = FormStartPosition.Manual;
     this.Location      = new Point(50, 20);
     AsientoCajaForm    = this;
     objAsientoDAO      = new AsientoDAO();
     objMonedaDao       = new MonedaDAO();
     objMonedaDao.tipoCambio();
     cargarcmb();
     gridParams();
     objListaCajaDet         = objAsientoDAO.getGenerarCaja(cmb_UnidadNegocio.SelectedValue.ToString());
     grd_Facturas.DataSource = objListaCajaDet;
     grd_Facturas.Refresh();
     cmb_UnidadNegocio.SelectedIndexChanged += Cmb_UnidadNegocio_SelectedIndexChanged;
     grd_Facturas.CellClick   += Grd_Facturas_CellClick;
     grd_Facturas.DoubleClick += Grd_Facturas_DoubleClick;
 }