meta data de esta página
Diferencias
Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anterior Revisión previa Próxima revisión | Revisión previa | ||
enviarretencion [2025/10/06 18:40] 57.141.2.85 se ha restaurado la vieja versión (2025/07/30 00:58) |
enviarretencion [2025/10/21 00:01] (actual) 57.141.2.69 se ha restaurado la vieja versión (2025/08/08 22:49) |
||
---|---|---|---|
Línea 134: | Línea 134: | ||
---- | ---- | ||
- | |||
- | === Proceso para consumo EnviarRetencion === | ||
- | |||
- | * Se inicializa un objeto ServiceClient o Servicio | ||
- | * Se inicializa un objeto PeticionRetencion donde se ingresan el RUC, el usuario de Integración ,clave de Integración y Documento | ||
- | * Se hace consumo del método EnviarRetencion contenido en el objeto serviceClient y se coloca como parámetro la petición anterior, la respuesta estará contenida en un objeto llamado RespuestaPeticion, | ||
- | |||
- | <code csharp Codigo Ejemplo .NET> | ||
- | |||
- | try | ||
- | { | ||
- | ServiceClient servicio = new ServiceClient(); | ||
- | PeticionRetencion pet = new PeticionRetencion() | ||
- | { | ||
- | Clave = " | ||
- | RUC = " | ||
- | Usuario = " | ||
- | }; | ||
- | |||
- | pet.Documento = new ComprobanteRetencion(); | ||
- | ComprobanteRetencion ret = new ComprobanteRetencion(); | ||
- | |||
- | |||
- | // | ||
- | ret.InfoTributaria = new InfoTributaria(); | ||
- | ret.InfoTributaria = InformacionTrib(); | ||
- | ret.CorreoNotificar = textBox76.Text; | ||
- | ret.DirCliente = " | ||
- | ret.CPCliente = " | ||
- | ret.TelefonoCliente = " | ||
- | | ||
- | |||
- | |||
- | // | ||
- | |||
- | |||
- | ret.InfoRetencion = new InfoCompRetencion() | ||
- | { | ||
- | ContribuyenteEspecial = " | ||
- | DirEstablecimiento = " | ||
- | FechaEmision = textBox1.Text, | ||
- | IdentificacionSujetoRetenido = textBox7.Text, | ||
- | ObligadoContabilidad = " | ||
- | PeriodoFiscal = " | ||
- | RazonSocialSujetoRetenido = "razon social sujeto detenido", | ||
- | TipoIdentificacionSujetoRetenido = " | ||
- | |||
- | }; | ||
- | |||
- | ret.Impuestos = new List< | ||
- | ImpuestoDetalleRetencion imp = new ImpuestoDetalleRetencion | ||
- | { | ||
- | CodDocSustento = " | ||
- | BaseImponible = " | ||
- | Codigo = " | ||
- | CodigoPorRet = " | ||
- | Valor = " | ||
- | FechaEmisionDocSustento = " | ||
- | NumDocSustento = " | ||
- | PorcentajeRetener = " | ||
- | |||
- | }; | ||
- | | ||
- | |||
- | ret.Impuestos.Add(imp); | ||
- | ret.Impuestos.Add(imp); | ||
- | ret.Version = " | ||
- | pet.Documento = ret; | ||
- | |||
- | var resp = servicio.EnviarRetencion(pet); | ||
- | servicio.Close(); | ||
- | |||
- | richTextBox1.Text = " | ||
- | } | ||
- | catch (Exception ex) | ||
- | { | ||
- | |||
- | MessageBox.Show(" | ||
- | } | ||
- | </ | ||
== ARCHIVOS RETENCIÓN XML/XSD == | == ARCHIVOS RETENCIÓN XML/XSD == |