public ReporteDocumentosPorFecha()
        {
            InitializeComponent();
            this.ControlBox    = false;
            this.Text          = "REPORTE DOCUMENTOS POR FECHA";
            this.StartPosition = FormStartPosition.Manual;
            this.Location      = new System.Drawing.Point(20, 20);
            objDocContaDao     = new DocumentoContabilidadDAO();
            objDocumentoDao    = new DocumentoDAO();
            objMoneda          = new MonedaDAO();
            comboContabilidad();
            comboMoneda();
            gridParams();
            DateTime d1, d2;

            d2 = DateTime.Now;
            d1 = new DateTime(d2.Year, d2.Month, 1);
            dpickerInicio.Value = d1;
            if (Ventas.UNIDADNEGOCIO == "01")
            {
                objListaDocCab = objDocumentoDao.documentoPorFechaM(cmb_TipoDocumento.SelectedValue.ToString(),
                                                                    dpickerInicio.Value, dpickerFin.Value, cmb_Moneda.SelectedValue.ToString(), Ventas.UNIDADNEGOCIO);
            }
            else
            {
                objListaDocCab = objDocumentoDao.documentoPorFechaG(cmb_TipoDocumento.SelectedValue.ToString(),
                                                                    dpickerInicio.Value, dpickerFin.Value, cmb_Moneda.SelectedValue.ToString(), Ventas.UNIDADNEGOCIO);
            }
            grd_Documentos.DataSource = objListaDocCab;
            grd_Documentos.Refresh();
            llenarSumatorias();
        }
Esempio n. 2
0
        public Retencion()
        {
            InitializeComponent();
            this.Text              = "RETENCIONES";
            this.ControlBox        = false;
            objContabilidadDocuDAO = new DocumentoContabilidadDAO();
            objDocumento           = new DocumentoDAO();
            objRetencionDAO        = new RetencionDAO();
            retencionForm          = this;


            txt_Serie.Text = "R001";

            if (ListaRetencion.operacionRetencion == "N")
            {
                txt_Observacion.Enabled = true;
                txt_Ruc.Text            = "15603034403";
                gridParams();
            }
            else
            {
                gridParams2();
                btn_Buscar.Enabled         = false;
                btn_BuscarDocu.Enabled     = false;
                btn_SaveData.Enabled       = false;
                txt_Numero.Text            = ListaRetencion.objRetencionCab.RetencionCab_Numero;
                txt_Cliente.Text           = ListaRetencion.objRetencionCab.RetencionCab_Proveedor;
                txt_codot.Text             = ListaRetencion.objRetencionCab.RetencionCab_CodOt;
                txt_MonedaCod.Text         = ListaRetencion.objRetencionCab.RetencionCab_CodMoneda;
                txt_Observacion.Text       = ListaRetencion.objRetencionCab.RetencionCab_Observacion;
                txt_Ruc.Text               = ListaRetencion.objRetencionCab.RetencionCab_RucProv;
                txt_TotalDolares.Text      = ListaRetencion.objRetencionCab.RetencionCab_MontoDolar.ToString();
                txt_TotalSoles.Text        = ListaRetencion.objRetencionCab.RetencionCab_Monto.ToString();
                txt_TRetencionDolares.Text = ListaRetencion.objRetencionCab.RetencionCab_RetencionDolar.ToString();
                txt_TRetencionSoles.Text   = ListaRetencion.objRetencionCab.RetencionCab_Retencion.ToString();
                objListaRetencionDet       = objRetencionDAO.listarRetencionDet(txt_Serie.Text, txt_Numero.Text);
                try { txt_Voucher.Text = objListaRetencionDet[0].RetencionDet_Voucher; }
                catch
                {
                }
                grdDocumento.DataSource = objListaRetencionDet;
                grdDocumento.Refresh();
            }
        }
        public ReporteLetraCliente()
        {
            InitializeComponent();
            formReporteLetrasClientes = this;
            this.ControlBox           = false;
            this.StartPosition        = FormStartPosition.Manual;
            this.Location             = new System.Drawing.Point(20, 20);
            objDocContaDao            = new DocumentoContabilidadDAO();
            objDocumentoDao           = new DocumentoDAO();
            this.Text = "REPORTE LETRAS";
            DateTime d1, d2;

            d2 = DateTime.Now;
            d1 = new DateTime(2019, 01, 1);
            dtp_desde.Value = d1;
            gridParams();
            objListaDocCab         = objDocumentoDao.reporteLetraCliente(Ventas.UNIDADNEGOCIO, d1, d2, "NN", "NN");
            dgv_reporte.DataSource = null;
            dgv_reporte.DataSource = objListaDocCab;
            dgv_reporte.Refresh();
        }
        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;
        }
Esempio n. 5
0
        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;
        }
Esempio n. 6
0
        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;
        }