コード例 #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_excel.Enabled = false;
            this.Hide();
            operacionFactura = "N";
            NotaDeDebito Check = new NotaDeDebito();

            Check.Show();
            btn_excel.Enabled = true;
        }
コード例 #3
0
        private void btn_ver_Click(object sender, EventArgs e)
        {
            operacionFactura = "V";
            try
            {
                int index = grd_Facturas.SelectedCells[0].RowIndex;

                numeroDocumento = objListaDocumentoCab[index].DocumentoCabNro;
                numeroSerie     = objListaDocumentoCab[index].DocumentoCabSerie;
                objDocumentoCab = objListaDocumentoCab[index];
                this.Hide();

                NotaDeDebito Check = new NotaDeDebito();
                Check.Show();
            }
            catch
            {
                MessageBox.Show("No ha seleccionado ningún registro");
            }
        }
コード例 #4
0
        public NotaDeDebito()
        {
            InitializeComponent();

            this.ControlBox = false;
            this.Text       = "NOTA DE DÉBITO";
            debitoForm      = 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 (ListaNotaDebito.operacionFactura == "V")
            {
                if (ListaNotaDebito.objDocumentoCab.EstadoSunat == 0)
                {
                    lbl_Anulado.Visible = true;
                }
                else if (ListaNotaDebito.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         = ListaNotaDebito.objDocumentoCab.DocumentoCabCliente;
                txt_Ruc.Text             = ListaNotaDebito.objDocumentoCab.DocumentoCabClienteDocumento;
                txt_Serie.Text           = ListaNotaDebito.objDocumentoCab.DocumentoCabSerie;
                txt_Numero.Text          = ListaNotaDebito.objDocumentoCab.DocumentoCabNro;
                txt_GlosaCab.Text        = ListaNotaDebito.objDocumentoCab.DocumentoCabGlosa;
                cmb_Moneda.SelectedValue = ListaNotaDebito.objDocumentoCab.DocumentoCabTipoMoneda;
                cmb_Motivo.SelectedValue = ListaNotaDebito.objDocumentoCab.DocumentoCabTipoNotaCredito;
                txt_Direccion.Text       = ListaNotaDebito.objDocumentoCab.DocumentoCabClienteDireccion;
                txt_SerieBuscar.Text     = ListaNotaDebito.objDocumentoCab.DocumentoCabSerieRef;
                txt_NumeroBuscar.Text    = ListaNotaDebito.objDocumentoCab.DocumentoCabNroRef;
                dpck_Fechadcto.Value     = ListaNotaDebito.objDocumentoCab.DocumentoCabFechaDocRef;
                objListDocumentoDet      = objDocumento.listarDetalle(ListaNotaDebito.numeroDocumento, ListaNotaDebito.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 = ListaNotaDebito.objDocumentoCab.DocumentoCabFecha;
                tipoCambio(dpick_Fecha.Value.ToShortDateString());
                //btn_Rest.Enabled = false;
            }
            else
            {
                objListDocumentoDet = new List <DocumentoDet>();
                Modificar           = "G";
                if (Ventas.UNIDADNEGOCIO == "01")
                {
                    txt_Serie.Text = "FD01";
                }
                else
                {
                    txt_Serie.Text = "FD05";
                }

                ContadorItem = 0;


                txt_Numero.Text = objDocumento.correlativoFactura("08", Ventas.UNIDADNEGOCIO, 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;
        }