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 | ||
enviarretencionats [2025/05/18 04:48] 195.191.219.153 se ha restaurado la vieja versión (2024/01/16 22:52) |
enviarretencionats [2025/06/15 16:44] (actual) 66.249.68.6 se ha restaurado la vieja versión (2024/06/24 18:39) |
||
---|---|---|---|
Línea 1: | Línea 1: | ||
- | ====== Método EnviarRetencionATS() ====== | + | RetenecionATS |
- | [[manual_de_integracion_obj|{{ : | + | [[manual_de_integracion_obj|{{: |
- | El request del método es el siguiente: | ||
- | |||
- | | Request: Parámetro a enviar ||| | ||
- | ^ **Tipo** ^ **Identificador** ^ **Descripción** ^ | ||
- | | String | RUC | Proporcionado por el cliente. | | ||
- | | String | Usuario | Proporcionado por The Factory HKA. | | ||
- | | String | Password | Proporcionado por The Factory HKA. | | ||
- | | Object | Documento | xml siguiente | ||
- | |||
- | ---- | ||
- | |||
- | == OBJETO EJEMPLO == | ||
- | |||
- | <code xml> < | ||
- | |||
- | <code csharp Objeto SOAP> | ||
- | |||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | <!--Zero or more repetitions: | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | <!--Zero or more repetitions: | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | <!--Zero or more repetitions: | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | <!--Zero or more repetitions: | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | <!--Zero or more repetitions: | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | <!--Zero or more repetitions: | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | <!--Zero or more repetitions: | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | <!--Zero or more repetitions: | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | | ||
- | </ | ||
- | | ||
- | <code csharp Codigo Ejemplo .NET> | ||
- | try | ||
- | { | ||
- | | ||
- | ServiceClient servicio = new ServiceClient(); | ||
- | |||
- | PeticionRetencionATS pet = new PeticionRetencionATS | ||
- | { | ||
- | Clave = " | ||
- | RUC = " | ||
- | Usuario = " | ||
- | }; | ||
- | |||
- | pet.Documento = new RetencionATS(); | ||
- | RetencionATS ret = new RetencionATS() | ||
- | { | ||
- | DirCliente = " | ||
- | CorreoNotificar = " | ||
- | Notificar = " | ||
- | | ||
- | }; | ||
- | |||
- | ret.InfoTributaria = new InfoTributaria() | ||
- | { | ||
- | RazonSocial=" | ||
- | NombreComercial = " | ||
- | Estab =" | ||
- | PtoEmi=" | ||
- | Secuencial=" | ||
- | DirMatriz=" | ||
- | AgenteRetencion=" | ||
- | CodigoNumerico=" | ||
- | RegimenMicroempresas=" | ||
- | |||
- | }; | ||
- | |||
- | |||
- | ret.infoRetencionATS = new InfoCompRetencionATS(); | ||
- | InfoCompRetencionATS inforet = new InfoCompRetencionATS | ||
- | { | ||
- | FechaEmision = " | ||
- | DirEstablecimiento = "DIR ESTABLECIMIENTO", | ||
- | ObligadoContabilidad=" | ||
- | TipoIdentificacionSujetoRetenido = " | ||
- | ParteRel =" | ||
- | RazonSocialSujetoRetenido = "RAZON SOCIALES SUJETO RETENIDO", | ||
- | IdentificacionSujetoRetenido= " | ||
- | PeriodoFiscal =" | ||
- | | ||
- | |||
- | }; | ||
- | ret.infoRetencionATS = inforet; | ||
- | |||
- | ret.docsSustento = new List< | ||
- | DocSustento doc = new DocSustento | ||
- | { | ||
- | CodDocSustento = " | ||
- | CodSustento=" | ||
- | AplicConvDobTrib=" | ||
- | FechaEmisionDocSustento=" | ||
- | FechaRegistroContable=" | ||
- | ImporteTotal=" | ||
- | NumAutDocSustento= " | ||
- | NumDocSustento=" | ||
- | PagExtSujRetNorLeg=" | ||
- | PagoLocExt= " | ||
- | PagoRegFis=" | ||
- | PaisEfecPago=" | ||
- | TipoRegi=" | ||
- | TotalBaseImponibleReembolso=" | ||
- | TotalComprobantesReembolso=" | ||
- | TotalImpuestoReembolso=" | ||
- | TotalSinImpuestos=" | ||
- | | ||
- | |||
- | }; | ||
- | |||
- | |||
- | doc.Pagos = new List< | ||
- | PagoRetencionATS pago = new PagoRetencionATS | ||
- | { | ||
- | FormaPago = " | ||
- | Total=" | ||
- | }; | ||
- | | ||
- | doc.Pagos.Add(pago); | ||
- | doc.ImpuestoDocSustento = new List< | ||
- | doc.ImpuestoDocSustento.Add(new ImpuestoDetalle {BaseImponible=" | ||
- | ret.docsSustento.Add(doc); | ||
- | doc.Retenciones = new List< | ||
- | RetencionesATS retATS = new RetencionesATS() | ||
- | { | ||
- | Codigo = " | ||
- | BaseImponible = " | ||
- | CodigoPorcentaje = " | ||
- | PorcentajeRetener = " | ||
- | Tarifa = " | ||
- | Valor = " | ||
- | Dividendos = new Dividendo() | ||
- | { | ||
- | EjerFisUtDiv = " | ||
- | FechaPagoDiv = " | ||
- | ImRentaSoc = " | ||
- | }, | ||
- | |||
- | CompraCajBan=new CompraCajBanano() | ||
- | { | ||
- | NumCajBan=" | ||
- | PrecCajBan=" | ||
- | } | ||
- | |||
- | |||
- | }; | ||
- | |||
- | |||
- | doc.Retenciones.Add(retATS); | ||
- | |||
- | ret.Version = " | ||
- | |||
- | | ||
- | ret.CorreoNotificar = " | ||
- | |||
- | pet.Documento = ret; | ||
- | |||
- | var resp = servicio.EnviarRetencionATS(pet); | ||
- | |||
- | servicio.Close(); | ||
- | |||
- | | ||
- | |||
- | |||
- | |||
- | } | ||
- | catch (Exception ex) | ||
- | { | ||
- | |||
- | MessageBox.Show(" | ||
- | } | ||
- | </ | ||