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
Próxima revisión
Revisión previa
enviarretencionats [2025/11/05 21:19]
57.141.2.20 se ha restaurado la vieja versión (2025/08/08 23:44)
enviarretencionats [2025/12/04 07:30] (actual)
57.141.0.43 se ha restaurado la vieja versión (2025/08/08 23:45)
Línea 16: Línea 16:
 == OBJETO EJEMPLO == == OBJETO EJEMPLO ==
  
-<code xml> <soapenv:Envelope xmlns:soapenv="[[http://schemas.xmlsoap.org/soap/envelope/]]" xmlns:tem="[[http://tempuri.org/]]" xmlns:wsec="[[http://schemas.datacontract.org/2004/07/WSEcuadorService.Request]]" xmlns:ecu="[[http://schemas.datacontract.org/2004/07/EcuadorLibraryObject]]" xmlns:ecu1="[[http://schemas.datacontract.org/2004/07/EcuadorLibraryObject.Other]]" xmlns:ecu2="[[http://schemas.datacontract.org/2004/07/EcuadorLibraryObject.Common.Detail]]" xmlns:ecu3="[[http://schemas.datacontract.org/2004/07/EcuadorLibraryObject.Common.Body]]" xmlns:ecu4="[[http://schemas.datacontract.org/2004/07/EcuadorLibraryObject.Common.Other]]"> +<code xml> 
 +<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:wsec="http://schemas.datacontract.org/2004/07/WSEcuadorService.Request" xmlns:ecu="http://schemas.datacontract.org/2004/07/EcuadorLibraryObject" xmlns:ecu1="http://schemas.datacontract.org/2004/07/EcuadorLibraryObject.Other" xmlns:ecu2="http://schemas.datacontract.org/2004/07/EcuadorLibraryObject.Common.Detail" xmlns:ecu3="http://schemas.datacontract.org/2004/07/EcuadorLibraryObject.Common.Body" xmlns:ecu4="http://schemas.datacontract.org/2004/07/EcuadorLibraryObject.Common.Other">
    <soapenv:Header/>    <soapenv:Header/>
    <soapenv:Body>    <soapenv:Body>
Línea 259: Línea 259:
                   <!--Optional:-->                   <!--Optional:-->
                   <ecu3:TipoIdentificacionSujetoRetenido>?</ecu3:                   <ecu3:TipoIdentificacionSujetoRetenido>?</ecu3:
-   
-  </code> 
-   
-<code csharp Codigo Ejemplo .NET> 
-         try 
-            { 
-             
-            ServiceClient servicio = new ServiceClient(); 
- 
-                PeticionRetencionATS pet = new PeticionRetencionATS 
-                { 
-                    Clave = "ClaveIntegracion", 
-                    RUC = "1792433738481", 
-                    Usuario = "usuarioIntegracion" 
-                }; 
- 
-                pet.Documento = new RetencionATS(); 
-                RetencionATS ret = new RetencionATS() 
-                { 
-                    DirCliente = "direccion del cliente", 
-                    CorreoNotificar = "sam@gmail.com", 
-                    Notificar = "SI", 
-                     
-                }; 
- 
-                ret.InfoTributaria = new InfoTributaria() 
-                { 
-                    RazonSocial="Razon social empresa emisora", 
-                    NombreComercial = "NOmbre comercial", 
-                    Estab ="001", 
-                    PtoEmi="001", 
-                    Secuencial="000000321", 
-                    DirMatriz="Direccion matriz", 
-                    AgenteRetencion="1245", 
-                    CodigoNumerico="12345678", 
-                    RegimenMicroempresas="12345" 
-                    
-                }; 
- 
- 
-                ret.infoRetencionATS = new InfoCompRetencionATS(); 
-                InfoCompRetencionATS inforet = new InfoCompRetencionATS 
-                { 
-                    FechaEmision = "16/03/2022", 
-                    DirEstablecimiento = "DIR ESTABLECIMIENTO",                    
-                    ObligadoContabilidad="SI", 
-                    TipoIdentificacionSujetoRetenido = "08", 
-                    ParteRel ="SI", 
-                    RazonSocialSujetoRetenido = "RAZON SOCIALES SUJETO RETENIDO", 
-                    IdentificacionSujetoRetenido= "1234567891234", 
-                    PeriodoFiscal ="01/2022", 
-                     
- 
-                }; 
-                ret.infoRetencionATS = inforet; 
- 
-                ret.docsSustento = new List<DocSustento>(); 
-                DocSustento doc = new DocSustento 
-                { 
-                    CodDocSustento = "01", 
-                    CodSustento="10", 
-                    AplicConvDobTrib="SI", 
-                    FechaEmisionDocSustento="11/03/2022", 
-                    FechaRegistroContable="11/03/2023", 
-                    ImporteTotal="10.00", 
-                    NumAutDocSustento= "1503202207179243373800110010029000032160000000111", 
-                    NumDocSustento="001002000888777", 
-                    PagExtSujRetNorLeg="NO", 
-                    PagoLocExt= "02", 
-                    PagoRegFis="SI", 
-                    PaisEfecPago="597", 
-                    TipoRegi="01", 
-                    TotalBaseImponibleReembolso="90.00", 
-                    TotalComprobantesReembolso="100.00", 
-                    TotalImpuestoReembolso="10.00", 
-                    TotalSinImpuestos="90.00", 
-                     
-                                                                    
-                }; 
-                
- 
-                doc.Pagos = new List<PagoRetencionATS>(); 
-                PagoRetencionATS pago = new PagoRetencionATS 
-                { 
-                    FormaPago = "01", 
-                    Total="10.00" 
-                }; 
-                 
-                doc.Pagos.Add(pago); 
-                doc.ImpuestoDocSustento = new List<ImpuestoDetalle>(); 
-                doc.ImpuestoDocSustento.Add(new ImpuestoDetalle {BaseImponible="50.00",Codigo="2",CodigoPorRet="0",Tarifa="10",Valor="5.00" }); 
-                ret.docsSustento.Add(doc); 
-                doc.Retenciones = new List<RetencionesATS>(); 
-                RetencionesATS retATS = new RetencionesATS() 
-                { 
-                    Codigo = "1", 
-                    BaseImponible = "50.00", 
-                    CodigoPorcentaje = "303", 
-                    PorcentajeRetener = "10", 
-                    Tarifa = "0.00", 
-                    Valor = "5.00", 
-                    Dividendos = new Dividendo() 
-                    { 
-                        EjerFisUtDiv = "1900", 
-                        FechaPagoDiv = "01/03/2023", 
-                        ImRentaSoc = "50.00" 
-                    }, 
- 
-                CompraCajBan=new CompraCajBanano() 
-                { 
-                    NumCajBan="0", 
-                    PrecCajBan="50.00" 
-                } 
-                
- 
-                }; 
- 
- 
-                doc.Retenciones.Add(retATS); 
- 
-                ret.Version = "2.0.0"; 
- 
-                 
-                ret.CorreoNotificar = "SI"; 
- 
-                pet.Documento = ret; 
- 
-                var resp = servicio.EnviarRetencionATS(pet); 
- 
-                servicio.Close(); 
- 
-               richTextBox1.Text = "Codigo: " + resp.Codigo + "\n\r" + "Mensaje: " + resp.Mensaje + "\r\n" + resp.Archivo; 
- 
- 
-            
-            } 
-            catch (Exception ex) 
-            { 
- 
-                MessageBox.Show("Mensaje error: " + ex); 
-            } 
-</code> 
-