コード例 #1
0
        public BuscarDocumento(String tipoDocumento, String Documento)
        {
            InitializeComponent();
            TipoDocumento = Documento;
            if (Documento == "C")
            {
                formCre = NotaDeCredito.creditoForm;
            }
            else if (Documento == "D")
            {
                formDeb = NotaDeDebito.debitoForm;
            }
            else if (Documento == "T")
            {
                formLetraCambio = LetraCambio.letraCambioForm;
                codClie         = LetraCambio.codigoCliente;
            }

            objDocumentoDao      = new DocumentoDAO();
            objListDocumentoCab  = objDocumentoDao.buscarDocumentosNotas(tipoDocumento, Ventas.UNIDADNEGOCIO, codClie);
            objListBusquedaTotal = objListDocumentoCab;
            gridParams();
            listDocumento(objListDocumentoCab);
            txt_BuscarDocumento.TextChanged += Txt_BuscarDocumento_TextChanged;
        }
コード例 #2
0
        private void btn_Nuevo_Click(object sender, EventArgs e)
        {
            btn_Nuevo.Enabled = false;
            this.Hide();
            operacionLetra = "N";
            LetraCambio Check = new LetraCambio();

            Check.Show();
            btn_Nuevo.Enabled = true;
        }
コード例 #3
0
 public BuscarCliente(String DocumentoTipo)
 {
     InitializeComponent();
     TipoDocumento = DocumentoTipo;
     if (DocumentoTipo == "F")
     {
         formFac = Factura.formFactura;
     }
     else if (DocumentoTipo == "B")
     {
         formBole = Boleta.boletaForm;
     }
     else if (DocumentoTipo == "R")
     {
         formReport = ReporteDocumentosPorCliente.formReporteClientes;
     }
     else if (DocumentoTipo == "RT")
     {
         formReport = ReporteDocumentosPorCliente.formReporteClientes;
     }
     else if (DocumentoTipo == "T" || DocumentoTipo == "A")
     {
         formLetraCambio = LetraCambio.letraCambioForm;
     }
     else if (DocumentoTipo == "RT")
     {
         formRetencion = Retencion.retencionForm;
     }
     else if (DocumentoTipo == "AB")
     {
         formAbono = AbonoBanco.AbonoForm;
     }
     else if (DocumentoTipo == "VC")
     {
         formVoucher = ReporteVoucher.formReporteCheques;
     }
     else if (DocumentoTipo == "BAN")
     {
         formVoucher = ReporteVoucher.formReporteCheques;
     }
     objClienteDao        = new ClienteDAO();
     objListCliente       = objClienteDao.listarCliente(Ventas.UNIDADNEGOCIO);
     objListBusquedaTotal = objListCliente;
     gridParams();
     listCliente(objListCliente);
     txt_BuscarCliente.TextChanged += Txt_BuscarCliente_TextChanged;
 }
コード例 #4
0
        private void btn_ver_Click(object sender, EventArgs e)
        {
            operacionLetra = "V";
            try
            {
                int index = grd_Facturas.SelectedCells[0].RowIndex;


                objDocumentoCab = objListaDocumentoCab[index];
                this.Hide();

                LetraCambio Check = new LetraCambio();
                Check.Show();
            }
            catch
            {
                MessageBox.Show("No ha seleccionado ningún registro");
            }
        }
コード例 #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;
        }