public ContabilidadMenu(String Usuario, String CodEnt, String entidad) { InitializeComponent(); UNIDADNEGOCIO = CodEnt; nomEntidad = entidad; this.Text = "SISTEMA CONTABILIDAD - ERPS MIMCO" + " USUARIO : " + Usuario.Trim() + " " + nomEntidad.Trim(); UsuarioSession = Usuario; this.StartPosition = FormStartPosition.Manual; this.Location = new Point(50, 50); formContabilidad = this; objMonedaDao = new MonedaDAO(); objMonedaDao.tipoCambio(); libroVentasToolStripMenuItem.Click += LibroVentasToolStripMenuItem_Click; generarAsientosVentasToolStripMenuItem.Click += GenerarAsientosVentasToolStripMenuItem_Click; generarAsientosGeneralesToolStripMenuItem.Click += GenerarAsientosGeneralesToolStripMenuItem_Click; mantenimientoDePlanContableToolStripMenuItem.Click += MantenimientoDePlanContableToolStripMenuItem_Click; generarAsientosComprasToolStripMenuItem.Click += GenerarAsientosComprasToolStripMenuItem_Click; libroComprasToolStripMenuItem.Click += LibroComprasToolStripMenuItem_Click; libroDiarioToolStripMenuItem.Click += LibroDiarioToolStripMenuItem_Click; libroMayorToolStripMenuItem1.Click += LibroMayorToolStripMenuItem1_Click; libroMayorConCajaYBancoToolStripMenuItem.Click += LibroMayorConCajaYBancoToolStripMenuItem_Click; cajaChicaToolStripMenuItem.Click += CajaChicaToolStripMenuItem_Click; voucherToolStripMenuItem.Click += VoucherToolStripMenuItem_Click; reporteToolStripMenuItem.Click += ReporteToolStripMenuItem_Click; reporteBalanceGeneralToolStripMenuItem1.Click += ReporteBalanceGeneralToolStripMenuItem1_Click; }
public ListaFactura() { InitializeComponent(); this.ControlBox = false; this.Text = "FACTURAS"; this.StartPosition = FormStartPosition.Manual; this.Location = new Point(50, 20); formListaFactura = this; gridParams(); cmbEstado(); objOtDAO = new OtDAO(); objDocumentoDao = new DocumentoDAO(); DateTime d1, d2; objMonedaDao = new MonedaDAO(); objMonedaDao.tipoCambio(); d2 = DateTime.Now; d1 = new DateTime(2018, 10, 1); dpickerInicio.Value = d1; objListaDocumentoCab = objDocumentoDao.listarCabecera(d1, d2, txt_Ruc.Text, "01", Ventas.UNIDADNEGOCIO); grd_Facturas.DataSource = objListaDocumentoCab; grd_Facturas.Refresh(); grd_Facturas.CellClick += Grd_Facturas_CellClick; sumatorias(); cmb_Estado.SelectedIndexChanged += Cmb_Estado_SelectedIndexChanged; }
public CanjeLetraNuevo() { InitializeComponent(); this.ControlBox = false; txt_tipodoc.Text = "LT"; objLetra = new LetraCab(); objMonedaDao = new MonedaDAO(); objVoucherDao = new VoucherDAO(); objDocumentoDAO = new DocumentoDAO(); objMonedaDao.tipoCambio(); comboMoneda(); this.StartPosition = FormStartPosition.Manual; this.Location = new Point(50, 20); canjeletranuevo = this; txt_Tcambio.Text = objMonedaDao.getTipoCambioVenta(dpick_Fecha.Value.ToString("dd/MM/yyyy")).ToString().PadRight(5, '0'); if (CanjeLetra.operacionLetra == "V") { objLetra = CanjeLetra.objVoucher; llenarCabecera(objLetra); objListaLetraDet = objVoucherDao.listarLetraDet(objLetra.NroRegistro, Ventas.UNIDADNEGOCIO); llenarDetalle(objListaLetraDet); sumatoria(); btn_SaveData.Enabled = false; btn_Modificar.Visible = true; } else if (CanjeLetra.operacionLetra == "A") { objLetra = CanjeLetra.objVoucher; llenarCabecera(objLetra); objListaLetraDet = objVoucherDao.listarLetraDet(objLetra.NroRegistro, Ventas.UNIDADNEGOCIO); llenarDetalle(objListaLetraDet); sumatoria(); btn_Add.Enabled = false; btn_Anular.Enabled = false; btn_Buscar.Enabled = false; btn_Modificar.Enabled = false; btn_SaveData.Enabled = false; grd_facturas.Enabled = false; dpck_Fechavcto.Enabled = false; dpick_Fecha.Enabled = false; dtp_compromiso.Enabled = false; cmb_Moneda.Enabled = false; btn_Modificar.Visible = false; } else if (CanjeLetra.operacionLetra == "N") { Modificar = "N"; if (Ventas.UNIDADNEGOCIO == "01") { txt_SerieDcto.Text = "0001"; } else { txt_SerieDcto.Text = "0001"; } habilitarBotones(true, false); } }
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(); }
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; }
public Ventas(String Usuario, String CodEnt, String entidad) { InitializeComponent(); //UsuarioSession = Usuario; //UNIDADNEGOCIO = CodEnt; //this.Text = "TESORERÍA"; UNIDADNEGOCIO = CodEnt; nomEntidad = entidad; this.Text = "SISTEMA TESORERIA - ERPS MIMCO" + " USUARIO : " + Usuario.Trim() + " " + nomEntidad.Trim(); UsuarioSession = Usuario; this.StartPosition = FormStartPosition.Manual; this.Location = new Point(50, 50); formVentas = this; objMonedaDao = new MonedaDAO(); objMonedaDao.tipoCambio(); // cajaToolStripMenuItem.Enabled = false; // registrarAbonoBancoToolStripMenuItem.Enabled = false;// facturaToolStripMenuItem.Click += FacturaToolStripMenuItem_Click; boletaToolStripMenuItem.Click += BoletaToolStripMenuItem_Click; notaDeCréditoToolStripMenuItem.Click += NotaDeCréditoToolStripMenuItem_Click; notaDeDébitoToolStripMenuItem.Click += NotaDeDébitoToolStripMenuItem_Click; documentosPorFechaToolStripMenuItem.Click += DocumentosPorFechaToolStripMenuItem_Click; documentosPorClienteToolStripMenuItem.Click += DocumentosPorClienteToolStripMenuItem_Click; letraDeCambioToolStripMenuItem.Click += LetraDeCambioToolStripMenuItem_Click; renovaciónLetraToolStripMenuItem.Click += RenovaciónLetraToolStripMenuItem_Click; emisionToolStripMenuItem.Click += EmisionToolStripMenuItem_Click; pendientesPorFacturarToolStripMenuItem.Click += PendientesPorFacturarToolStripMenuItem_Click; documentosPorOTToolStripMenuItem.Click += DocumentosPorOTToolStripMenuItem_Click; registrarAbonoBancoToolStripMenuItem.Click += RegistrarAbonoBancoToolStripMenuItem_Click; cajaChicaToolStripMenuItem.Click += CajaChicaToolStripMenuItem_Click; liquidaciónToolStripMenuItem.Click += LiquidaciónToolStripMenuItem_Click; chequeToolStripMenuItem.Click += ChequeToolStripMenuItem_Click; voucherReporteToolStripMenuItem.Click += VoucherReporteToolStripMenuItem_Click; cuentasPorPagarToolStripMenuItem.Click += CuentasPorPagarToolStripMenuItem_Click; cuentasPorCobrarToolStripMenuItem.Click += CuentasPorCobrarToolStripMenuItem_Click; canjearLetrasToolStripMenuItem.Click += CanjearLetrasToolStripMenuItem_Click; reporteDiarioFacturasToolStripMenuItem.Click += reporteDiarioFacturasToolStripMenuItem_Click; documentosPorProveedorToolStripMenuItem.Click += DocumentosPorProveedorToolStripMenuItem_Click; documentoPorProveedorTotalizadoToolStripMenuItem.Click += DocumentoPorProveedorTotalizadoToolStripMenuItem_Click; reporteChequesToolStripMenuItem.Click += ReporteChequesToolStripMenuItem_Click; reporteLetraClienteToolStripMenuItem.Click += ReporteLetraClienteToolStripMenuItem_Click; }
public ListaLetraCambio() { InitializeComponent(); objDocumentoDao = new DocumentoDAO(); this.ControlBox = false; this.Text = "LETRAS DE CANJE"; this.StartPosition = FormStartPosition.Manual; this.Location = new Point(50, 20); gridParams(); objMonedaDao = new MonedaDAO(); objMonedaDao.tipoCambio(); DateTime d1, d2; d2 = DateTime.Now; d1 = new DateTime(2018, 10, 1); objListaDocumentoCab = objDocumentoDao.listarLetraCab(d1, d2, txt_Ruc.Text, Ventas.UNIDADNEGOCIO); grd_Facturas.DataSource = objListaDocumentoCab; 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; }
public RegistrarAsientosVentas() { InitializeComponent(); this.ControlBox = false; this.Text = "Asientos Contables"; this.StartPosition = FormStartPosition.Manual; this.Location = new Point(50, 20); objDocumentoDao = new DocumentoDAO(); objMonedaDao = new MonedaDAO(); objMonedaDao.tipoCambio(); AsientoVentaForm = this; cargarcmb(); gridParams(); objListaDocumentoCab = objDocumentoDao.listarDocCabAsientos("01", "01"); grd_Facturas.DataSource = objListaDocumentoCab; grd_Facturas.Refresh(); grd_Facturas.Click += Grd_Facturas_Click; grd_Facturas.DoubleClick += Grd_Facturas_DoubleClick; cmb_UnidadNegocio.SelectedIndexChanged += Cmb_UnidadNegocio_SelectedIndexChanged; }
public NotaDeCredito() { InitializeComponent(); this.ControlBox = false; this.Text = "NOTA DE CRÉDITO"; creditoForm = this; this.StartPosition = FormStartPosition.Manual; this.Location = new Point(50, 20); objMonedaDao = new MonedaDAO(); objMonedaDao.tipoCambio(); objTipoPagoDao = new TipoPagoDAO(); objDocumento = new DocumentoDAO(); objProceso = new Proceso(); objContabilidadDocuDAO = new DocumentoContabilidadDAO(); comboMoneda(); comboMotivo(); comboDocumento(); cmb_TipoDocumento.SelectedValueChanged += Cmb_TipoDocumento_SelectedValueChanged; grd_Detalle.CellValueChanged += Grd_Detalle_CellValueChanged; gridParams(); if (ListaNotaCredito.operacionFactura == "V") { if (ListaNotaCredito.objDocumentoCab.EstadoSunat == 0) { lbl_Anulado.Visible = true; } else if (ListaNotaCredito.objDocumentoCab.EstadoSunat == 1) { btn_Modificar.Visible = true; } habilitarCampos(false); Modificar = "M"; txt_GlosaCab.Enabled = false; btn_Add.Enabled = false; btn_Limpiar.Enabled = false; btn_SaveData.Enabled = false; btn_Buscar.Enabled = false; dpck_Fechadcto.Enabled = false; dpick_Fecha.Enabled = false; cmb_Moneda.Enabled = false; cmb_Motivo.Enabled = false; txt_Cliente.Text = ListaNotaCredito.objDocumentoCab.DocumentoCabCliente; txt_Ruc.Text = ListaNotaCredito.objDocumentoCab.DocumentoCabClienteDocumento; txt_Serie.Text = ListaNotaCredito.objDocumentoCab.DocumentoCabSerie; txt_Numero.Text = ListaNotaCredito.objDocumentoCab.DocumentoCabNro; txt_GlosaCab.Text = ListaNotaCredito.objDocumentoCab.DocumentoCabGlosa; cmb_Moneda.SelectedValue = ListaNotaCredito.objDocumentoCab.DocumentoCabTipoMoneda; cmb_Motivo.SelectedValue = ListaNotaCredito.objDocumentoCab.DocumentoCabTipoNotaCredito; txt_Direccion.Text = ListaNotaCredito.objDocumentoCab.DocumentoCabClienteDireccion; txt_SerieBuscar.Text = ListaNotaCredito.objDocumentoCab.DocumentoCabSerieRef; txt_NumeroBuscar.Text = ListaNotaCredito.objDocumentoCab.DocumentoCabNroRef; dpck_Fechadcto.Value = ListaNotaCredito.objDocumentoCab.DocumentoCabFechaDocRef; objListDocumentoDet = objDocumento.listarDetalle(ListaNotaCredito.numeroDocumento, ListaNotaCredito.numeroSerie, Ventas.UNIDADNEGOCIO); /*objDocumentoDet = new DocumentoDet(); * objDocumentoDet.DocumentoCabNro = txt_Numero.Text; * objDocumentoDet.DocumentoCabSerie = txt_Serie.Text; * objDocumentoDet.DocumentoDesProducto = "ANULACIÓN FACTURA " + txt_Serie.Text + "-" + txt_Numero.Text; * objDocumentoDet.DocumentoDetCantidad = 1; * objDocumentoDet.DocumentoDetId = 1; * objDocumentoDet.DocumentoDetCodEnt = Ventas.UNIDADNEGOCIO; * objDocumentoDet.DocumentoDetIGV = ListaNotaCredito.objDocumentoCab.DocumentoCabIGV; * objDocumentoDet.DocumentoDetPrecioTotal= ListaNotaCredito.objDocumentoCab.DocumentoCabTotalSinIGV; * objDocumentoDet.DocumentoDetSubTotal = ListaNotaCredito.objDocumentoCab.DocumentoCabTotalSinIGV; * objDocumentoDet.DocumentoDetPrecioSinIGV = ListaNotaCredito.objDocumentoCab.DocumentoCabTotalSinIGV; * txt_ValorVenta.Text = ListaNotaCredito.objDocumentoCab.DocumentoCabTotalSinIGV.ToString(); * txt_TotalPagar.Text = ListaNotaCredito.objDocumentoCab.DocumentoCabTotal.ToString(); * txt_IGV.Text = ListaNotaCredito.objDocumentoCab.DocumentoCabIGV.ToString(); * if (Ventas.UNIDADNEGOCIO =="02") * { * objDocumentoDet.DocumentoProdUMCod = "ZZ"; * objDocumentoDet.DocumentoProdUMcorta = "040"; * objDocumentoDet.ProductoCod = "000000000003"; * } * else * { * objDocumentoDet.DocumentoProdUMCod = "NIU"; * objDocumentoDet.ProductoCod = "000000012343"; * objDocumentoDet.DocumentoProdUMcorta = "039"; * } */ //objListDocumentoDet.Add(objDocumentoDet); grd_Detalle.DataSource = objListDocumentoDet; grd_Detalle.Refresh(); llenarSumatorias(); dpick_Fecha.Value = ListaNotaCredito.objDocumentoCab.DocumentoCabFecha; tipoCambio(dpick_Fecha.Value.ToShortDateString()); //btn_Rest.Enabled = false; } else { objListDocumentoDet = new List <DocumentoDet>(); Modificar = "G"; txt_Serie.Text = "FC01"; ContadorItem = 0; txt_Numero.Text = objDocumento.correlativoFactura("07", "01", txt_Serie.Text); //habilitarCampos(true); tipoCambio(DateTime.Now.ToShortDateString()); //btn_Rest.Enabled = true; } dpick_Fecha.TextChanged += Dpick_Fecha_TextChanged; txt_PrecioUnitario.TextChanged += Txt_PrecioUnitario_TextChanged; txt_Cantidad.TextChanged += Txt_Cantidad_TextChanged; cmb_Moneda.SelectedValueChanged += Cmb_Moneda_SelectedValueChanged; grd_Detalle.CellClick += Grd_Detalle_CellClick; }
public LetraCambio() { InitializeComponent(); this.ControlBox = false; objMonedaDao = new MonedaDAO(); objMonedaDao.tipoCambio(); gridParams(); this.StartPosition = FormStartPosition.Manual; this.Location = new Point(50, 20); letraCambioForm = this; objContabilidadDocuDAO = new DocumentoContabilidadDAO(); objTipoPagoDao = new TipoPagoDAO(); objDocumentoDao = new DocumentoDAO(); comboDocumento(); comboPago(); dpck_Fechavcto.ValueChanged += Dpck_Fechavcto_ValueChanged; dpick_Fecha.ValueChanged += Dpick_Fecha_ValueChanged; txt_Dividir.KeyPress += Txt_Dividir_KeyPress; chk_Dividir.CheckedChanged += Chk_Dividir_CheckedChanged; txt_Dividir.TextChanged += Txt_Dividir_TextChanged; txt_Porcentaje.KeyPress += Txt_Porcentaje_KeyPress; chk_Detraccion.CheckedChanged += Chk_Detraccion_CheckedChanged; txt_Porcentaje.TextChanged += Txt_Porcentaje_TextChanged; txt_Porcentaje.Text = "0"; txt_Dividir.Text = "0"; if (ListaLetraCambio.operacionLetra == "N") { Modificar = "N"; if (Ventas.UNIDADNEGOCIO == "01") { txt_Serie.Text = "M/"; } else { txt_Serie.Text = "G/"; } dpck_Fechavcto.Value = DateTime.Now.AddMonths(1); dpick_Fecha.Enabled = true; txt_Numero.Text = objDocumentoDao.correlativoLetra(Ventas.UNIDADNEGOCIO); } else { if (ListaLetraCambio.objDocumentoCab.EstadoSunat == 0) { lbl_Anulado.Visible = true; } else if (ListaLetraCambio.objDocumentoCab.EstadoSunat != 0) { btn_Modificar.Visible = true; } txt_Serie.Text = ListaLetraCambio.objDocumentoCab.DocumentoCabSerie; txt_Numero.Text = ListaLetraCambio.objDocumentoCab.DocumentoCabNro; txt_Cliente.Text = ListaLetraCambio.objDocumentoCab.DocumentoCabCliente; txt_codcliente.Text = ListaLetraCambio.objDocumentoCab.DocumentoCabClienteCod; txt_Direccion.Text = ListaLetraCambio.objDocumentoCab.DocumentoCabClienteDireccion; txt_codcliente.Text = ListaLetraCambio.objDocumentoCab.DocumentoCabClienteCod; txt_Aval.Text = ListaLetraCambio.objDocumentoCab.DocumentoCabClienteAval; txt_DireccionAval.Text = ListaLetraCambio.objDocumentoCab.DocumentoCabClienteDireccionAval; txt_Porcentaje.Text = ListaLetraCambio.objDocumentoCab.DocumentoCabDetraccionPorcentaje.ToString(); txt_Ruc.Text = ListaLetraCambio.objDocumentoCab.DocumentoCabClienteDocumento; txt_RucAval.Text = ListaLetraCambio.objDocumentoCab.DocumentoCabClienteRucAval; txt_Dividir.Text = ListaLetraCambio.objDocumentoCab.DocumentoCabDividir.ToString(); objListaLetraDet = objDocumentoDao.listarLetraDet(txt_Serie.Text, txt_Numero.Text); txt_fechaemidcto.Text = dpick_Fecha.Value.ToShortDateString(); txt_fechavctodcto.Text = dpck_Fechavcto.Value.ToShortDateString(); txt_CodMoneda.Text = ListaLetraCambio.objDocumentoCab.DocumentoCabTipoMoneda; dpick_Fecha.Value = ListaLetraCambio.objDocumentoCab.DocumentoCabFecha; dpck_Fechavcto.Value = ListaLetraCambio.objDocumentoCab.DocumentoCabFechaVcto; grdDocumento.DataSource = objListaLetraDet; grdDocumento.Refresh(); llenarSumatorias(); btn_SaveData.Enabled = false; btn_Limpiar.Enabled = false; btn_Add.Enabled = false; txt_Porcentaje.Enabled = false; btn_Buscar.Enabled = false; btn_BuscarDocu.Enabled = false; btn_BuscarAval.Enabled = false; btn_Limpiar.Enabled = false; chk_Dividir.Enabled = false; chk_Detraccion.Enabled = false; dpck_Fechavcto.Enabled = false; cmb_Pago.SelectedValue = ListaLetraCambio.objDocumentoCab.DocumentoCabTipoPago; cmb_Pago.Enabled = false; cmb_TipoDocumento.Enabled = false; } grdDocumento.CellClick += GrdDocumento_CellClick; txt_Tcambio.Text = objMonedaDao.getTipoCambioVenta(dpick_Fecha.Value.ToString("dd/MM/yyyy")).ToString().PadRight(5, '0'); cmb_Pago.SelectedIndexChanged += Cmb_Pago_SelectedIndexChanged; }
public Factura() { InitializeComponent(); Modificar = "G"; this.StartPosition = FormStartPosition.Manual; this.Location = new Point(50, 20); this.ControlBox = false; this.Text = "FACTURAS"; formFactura = this; objMonedaDao = new MonedaDAO(); objMonedaDao.tipoCambio(); objEjercicio = new Ejercicio(); objTipoPagoDao = new TipoPagoDAO(); objDocumento = new DocumentoDAO(); objProceso = new Proceso(); comboMoneda(); comboPago(); cmbejercicio(); chk_Detraccion.CheckedChanged += Chk_Detraccion_CheckedChanged; cmb_Pago.SelectedIndexChanged += Cmb_Pago_SelectedIndexChanged; gridParams(); txt_Porcentaje.TextChanged += Txt_Porcentaje_TextChanged; txt_Porcentaje.Text = "0"; if (ListaFactura.operacionFactura == "V") { if (ListaFactura.objDocumentoCab.EstadoSunat == 0) { lbl_Anulado.Visible = true; } else if (ListaFactura.objDocumentoCab.EstadoSunat == 1) { btn_Modificar.Visible = true; } habilitarBotones(false, false); habilitarCampos(false); txt_Guia.Enabled = false; txt_OT.Enabled = false; txt_Pedido.Enabled = false; txt_GlosaCab.Enabled = false; btn_BuscarOT.Enabled = false; btn_Limpiar.Enabled = false; btn_SaveData.Enabled = false; btn_Buscar.Enabled = false; dpck_Fechavcto.Enabled = false; dpick_Fecha.Enabled = false; cmb_Moneda.Enabled = false; cmb_Pago.Enabled = false; if (ListaFactura.objDocumentoCab.DocumentoCabTipoMoneda == "USD") { lbl_Moneda.Text = "$"; } else { lbl_Moneda.Text = "S/"; } objDocumentoDet = new DocumentoDet(); if (objDocumentoDet.DocumentoProdUM == "NIU") { txt_umcod.Text = "039"; } else { txt_umcod.Text = "040"; } txt_Cliente.Text = ListaFactura.objDocumentoCab.DocumentoCabCliente; txt_Ruc.Text = ListaFactura.objDocumentoCab.DocumentoCabClienteDocumento; txt_Serie.Text = ListaFactura.objDocumentoCab.DocumentoCabSerie; txt_Numero.Text = ListaFactura.objDocumentoCab.DocumentoCabNro; txt_GlosaCab.Text = ListaFactura.objDocumentoCab.DocumentoCabGlosa; txt_Direccion.Text = ListaFactura.objDocumentoCab.DocumentoCabClienteDireccion; cmb_Moneda.SelectedValue = ListaFactura.objDocumentoCab.DocumentoCabTipoMoneda; objListDocumentoDet = objDocumento.listarDetalle(ListaFactura.numeroDocumento, ListaFactura.numeroSerie, Ventas.UNIDADNEGOCIO); dpick_Fecha.Value = ListaFactura.objDocumentoCab.DocumentoCabFecha; tipoCambio(dpick_Fecha.Value.ToShortDateString()); cmb_Pago.SelectedValue = ListaFactura.objDocumentoCab.DocumentoCabTipoPago; txt_Detraccion.Text = ListaFactura.objDocumentoCab.DocumentoCabDetraccion.ToString(); txt_Porcentaje.Text = ListaFactura.objDocumentoCab.DocumentoCabDetraccionPorcentaje.ToString(); txt_Guia.Text = ListaFactura.objDocumentoCab.DocumentoCabGuia; txt_intercorp.Text = ListaFactura.objDocumentoCab.Intercorp; txt_Pedido.Text = ListaFactura.objDocumentoCab.DocumentoCabOrdenCompra; txt_codcliente.Text = ListaFactura.objDocumentoCab.DocumentoCabClienteCod; grd_Detalle.DataSource = objListDocumentoDet; grd_Detalle.Refresh(); llenarSumatorias(); } else { if (Ventas.UNIDADNEGOCIO == "01") { txt_Serie.Text = "F001"; } else { txt_Serie.Text = "F005"; } txt_Numero.Text = objDocumento.correlativoFactura("01", Ventas.UNIDADNEGOCIO, txt_Serie.Text); dpck_Fechavcto.Value = DateTime.Now.AddMonths(1); habilitarCampos(false); tipoCambio(DateTime.Now.ToShortDateString()); objDocumentoCab = new DocumentoCab(); objListDocumentoDet = new List <DocumentoDet>(); ContadorItem = 1; } rb_OT.Select(); dpick_Fecha.TextChanged += Dpick_Fecha_TextChanged; txt_PrecioUnitario.TextChanged += Txt_PrecioUnitario_TextChanged; txt_Cantidad.TextChanged += Txt_Cantidad_TextChanged; txt_Percepcion.Text = "0"; grd_Detalle.CellClick += Grd_Detalle_CellClick; cmb_Moneda.SelectedValueChanged += Cmb_Moneda_SelectedValueChanged; }
public LetraReporte(String rep) { InitializeComponent(); tipoReporte = rep; this.ControlBox = false; objMonedaDao = new MonedaDAO(); objMonedaDao.tipoCambio(); gridParams(); this.StartPosition = FormStartPosition.Manual; this.Location = new Point(50, 20); objContabilidadDocuDAO = new DocumentoContabilidadDAO(); objTipoPagoDao = new TipoPagoDAO(); objDocumentoDao = new DocumentoDAO(); comboDocumento(); comboPago(); txt_Dividir.KeyPress += Txt_Dividir_KeyPress; chk_Dividir.CheckedChanged += Chk_Dividir_CheckedChanged; txt_Dividir.TextChanged += Txt_Dividir_TextChanged; txt_Porcentaje.KeyPress += Txt_Porcentaje_KeyPress; chk_Detraccion.CheckedChanged += Chk_Detraccion_CheckedChanged; txt_Porcentaje.TextChanged += Txt_Porcentaje_TextChanged; txt_Porcentaje.Text = "0"; txt_Dividir.Text = "0"; if (tipoReporte == "F") { if (ReporteDocumentosPorFecha.objDocumentoCab.EstadoSunat == 0) { lbl_Anulado.Visible = true; } txt_Serie.Text = ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabSerie; txt_Numero.Text = ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabNro; txt_Cliente.Text = ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabCliente; txt_Direccion.Text = ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabClienteDireccion; txt_Aval.Text = ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabClienteAval; txt_DireccionAval.Text = ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabClienteDireccionAval; txt_Porcentaje.Text = ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabDetraccionPorcentaje.ToString(); txt_Ruc.Text = ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabClienteDocumento; txt_RucAval.Text = ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabClienteRucAval; txt_Dividir.Text = ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabDividir.ToString(); objListaLetraDet = objDocumentoDao.listarLetraDetReporte(txt_Serie.Text, txt_Numero.Text, ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabOrdenCompra, Ventas.UNIDADNEGOCIO); dpick_Fecha.Value = ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabFecha; dpck_Fechavcto.Value = ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabFechaVcto; cmb_Pago.SelectedValue = ReporteDocumentosPorFecha.objDocumentoCab.DocumentoCabTipoPago; } else { if (ReporteDocumentosPorCliente.objDocumentoCab.EstadoSunat == 0) { lbl_Anulado.Visible = true; } txt_Serie.Text = ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabSerie; txt_Numero.Text = ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabNro; txt_Cliente.Text = ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabCliente; txt_Direccion.Text = ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabClienteDireccion; txt_Aval.Text = ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabClienteAval; txt_DireccionAval.Text = ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabClienteDireccionAval; txt_Porcentaje.Text = ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabDetraccionPorcentaje.ToString(); txt_Ruc.Text = ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabClienteDocumento; txt_RucAval.Text = ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabClienteRucAval; txt_Dividir.Text = ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabDividir.ToString(); objListaLetraDet = objDocumentoDao.listarLetraDetReporte(txt_Serie.Text, txt_Numero.Text, ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabOrdenCompra, Ventas.UNIDADNEGOCIO); dpick_Fecha.Value = ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabFecha; dpck_Fechavcto.Value = ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabFechaVcto; cmb_Pago.SelectedValue = ReporteDocumentosPorCliente.objDocumentoCab.DocumentoCabTipoPago; } grdDocumento.DataSource = objListaLetraDet; grdDocumento.Refresh(); llenarSumatorias(); btn_SaveData.Enabled = false; btn_Limpiar.Enabled = false; txt_Porcentaje.Enabled = false; btn_Buscar.Enabled = false; btn_Limpiar.Enabled = false; chk_Dividir.Enabled = false; chk_Detraccion.Enabled = false; dpck_Fechavcto.Enabled = false; cmb_Pago.Enabled = false; cmb_TipoDocumento.Enabled = false; grdDocumento.CellClick += GrdDocumento_CellClick; txt_Tcambio.Text = objMonedaDao.getTipoCambioVenta(dpick_Fecha.Value.ToString("dd/MM/yyyy")).ToString().PadRight(5, '0'); cmb_Pago.SelectedIndexChanged += Cmb_Pago_SelectedIndexChanged; }