meta data de esta página
  •  

Diferencias

Muestra las diferencias entre dos versiones de la página.

Enlace a la vista de comparación

Ambos lados, revisión anterior Revisión previa
enviarnotacredito [2025/10/16 05:03]
57.141.2.62 se ha restaurado la vieja versión (2025/08/25 08:36)
enviarnotacredito [2025/10/16 18:37] (actual)
57.141.2.87 se ha restaurado la vieja versión (2025/08/08 23:29)
Línea 211: Línea 211:
             {             {
                 ServiceClient servicio = new ServiceClient();                 ServiceClient servicio = new ServiceClient();
-                PeticionNotaCredito pet = new PeticionNotaCredito(); +                PeticionEstatusDocumento peticion = new PeticionEstatusDocumento(); 
-                pet.Clave = "claveintegracion"; +                peticion.Usuario = "usuariointegracion"; 
-                pet.RUC = "1792455544432"; +                peticion.RUC = "1723456789012"; 
-                pet.Usuario = "usuariointegracion"; +                peticion.Clave = "claveintegracion"; 
-                pet.Documento = new NotaCredito(); +                peticion.Documento = "01-001-001-000000001"; 
-                NotaCredito not = new NotaCredito(); +                RespuestaEstadoDocumento resp = servicio.EstatusDocumento(peticion); 
- +                richTextBox.Text = "Codigo: " + resp.Codigo + "\n\r" + "Mensaje: " + resp.Mensaje;
- +
-                //******************************INFOTRIBUTARIA********************************* +
-                not.InfoTributaria = new InfoTributaria(); +
-                not.InfoTributaria = InformacionTrib(); +
-                not.CorreoNotificar = textBox76.Text; +
-                not.DirCliente = "Direccopn del clinete"; +
- +
- +
- +
-                //*******************************INFONOTACREDITO********************************* +
-                not.InfoNotaCredito = new InfoNotaCredito(); +
-                InfoNotaCredito infonot = new InfoNotaCredito +
-                { +
-                    CodDocModificado = textBox47.Text, +
-                    ContribuyenteEspecial = textBox48.Text, +
-                    DirEstablecimiento = textBox49.Text, +
-                    FechaEmision = textBox50.Text, +
-                    IdentificacionComprador = textBox51.Text, +
-                    ObligadoContabilidad = textBox52.Text, +
-                    Rise = textBox53.Text, +
-                    FechaEmisionDocSustento = textBox54.Text, +
-                    NumDocModificado = textBox55.Text, +
-                    RazonSocialComprador = textBox56.Text, +
-                    TotalSinImpuestos = textBox57.Text, +
-                    TipoIdentificacionComprador = textBox58.Text, +
-                    Motivo = textBox59.Text, +
-                    ValorModificacion = textBox61.Text, +
-                     +
-                }; +
-                infonot.Moneda = "USD"; +
- +
-                ImpuestoTotalNotaCredito totalConImpuesto = new ImpuestoTotalNotaCredito +
-                { +
-                    BaseImponible = textBox35.Text, +
-                    Codigo = textBox36.Text, +
-                    CodigoPorcentaje = textBox37.Text, +
-                    Valor = textBox40.Text, +
-                                        +
-                }; +
- +
- +
-                totalConImpuesto.ValorDevolucionIva = "0.00"; +
-                infonot.TotalConImpuestos = new List<ImpuestoTotalNotaCredito>(); +
-                infonot.TotalConImpuestos.Add(totalConImpuesto); +
-                not.InfoNotaCredito = infonot; +
- +
- +
-                //**********************************************DETALLES********************************* +
-                not.Detalles = new List<DetalleNotaCredito>(); +
- +
-                DetalleNotaCredito det = new DetalleNotaCredito +
-                { +
-                    CodigoAdicional = textBox67.Text, +
-                    CodigoInterno = textBox68.Text, +
-                    Descripcion = textBox69.Text, +
-                    Cantidad = textBox70.Text, +
-                    PrecioUnitario = textBox71.Text,               +
-                    Descuento = textBox73.Text,                 +
-                    PrecioTotalSinImpuesto = textBox75.Text, +
-                     +
-                     +
- +
-                }; +
- +
-                det.DetAdicional = new List<DetAdicional>(); +
-                DetAdicional detAd = new DetAdicional(); +
-                detAd.Nombre = "NOmbredetadicioanl"; +
-                detAd.Valor = "valordetadicional"; +
-                det.DetAdicional.Add(detAd); +
-                det.Impuestos = new List<ImpuestoDetalle>();            +
-                det.Impuestos.Add(ImpuestDet()); +
-                not.Detalles.Add(det); +
-                not.Notificar = "SI"; +
-                not.Version = "1.1.0"; +
-                pet.Documento = not; +
- +
-                var resp = servicio.EnviarNotaCredito(pet); +
-                 +
-                servicio.Close(); +
- +
-                richTextBox1.Text = resp.Mensaje + "--" + resp.Codigo + "--" + "\r\n" + resp.Archivo;+
             }             }
             catch (Exception ex)             catch (Exception ex)