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/03/03 19:33] 172.16.70.84 se ha restaurado la vieja versión (2024/09/20 11:17) |
enviarretencion [2025/04/06 04:43] (actual) 20.171.207.169 se ha restaurado la vieja versión (2025/04/01 03:32) |
||
---|---|---|---|
Línea 14: | Línea 14: | ||
---- | ---- | ||
- | == XML EJEMPLO == | + | == OBJETO |
<code xml> | <code xml> | ||
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 == |