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
enviarnotadebito [2025/04/06 04:43]
20.171.207.169 se ha restaurado la vieja versión (2025/03/11 21:15)
enviarnotadebito [2025/04/06 05:17] (actual)
20.171.207.169 se ha restaurado la vieja versión (2025/03/10 00:21)
Línea 176: Línea 176:
  
 ---- ----
-=== Proceso para consumo EnviarNotaDebito === 
- 
-  * Se inicializa un objeto ServiceClient o Servicio 
-  * Se inicializa un objeto PeticionNotaDebito donde se ingresan el RUC, el usuario de Integración ,clave de Integración y Documento 
-  * Se hace consumo del método EnviarNotaDebito contenido en el objeto serviceClient y se coloca como parámetro la petición anterior, la respuesta estará contenida en un objeto llamado RespuestaPeticion, la respuesta tendrá los parámetros Código,Mensaje y Archivo 
- 
-<code csharp Codigo Ejemplo .NET> 
-         try 
-            { 
-                ServiceClient servicio = new ServiceClient(); 
-                servicio.Endpoint.Address = new System.ServiceModel.EndpointAddress(Url()); 
-                PeticionNotaDebito pet = new PeticionNotaDebito(); 
-                pet.Clave = "dfacture"; 
-                pet.RUC = "1792433738001"; 
-                pet.Usuario = "usuario1"; 
-                pet.Documento = new NotaDebito(); 
-                NotaDebito deb = new NotaDebito(); 
-                pet.Documento = deb; 
-                deb.DirCliente = "DIRECCION DEL CLIENTE"; 
- 
-                //****************************************INFO TRIBUTARIA*********************** 
-                deb.InfoTributaria = new InfoTributaria(); 
-                deb.InfoTributaria = InformacionTrib(); 
-                deb.Notificar = "SI"; 
-                deb.Motivos = new List<Motivo>(); 
-                Motivo mot = new Motivo() 
-                { 
-                    Razon = "raxoness", 
-                    Valor = "100.00" 
-                }; 
- 
-                deb.Motivos.Add(mot); 
- 
- 
- 
- 
- 
-                //************************************INFO NOTA DEBITO*************************** 
-                deb.InfoNotaDebito = new InfoNotaDebito(); 
-                InfoNotaDebito info = new InfoNotaDebito 
-                { 
-                    CodDocModificado = textBox47.Text, 
-                    ContribuyenteEspecial = textBox48.Text, 
-                    DirEstablecimiento = textBox49.Text, 
-                    FechaEmision = textBox1.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, 
-                    ValorTotal = textBox62.Text, 
-                                      
-                }; 
-                 
-                info.Impuestos = new List<ImpuestoTotalNotaDebito>(); 
-                ImpuestoTotalNotaDebito imp = new ImpuestoTotalNotaDebito() 
- 
-                { 
-                    BaseImponible = textBox35.Text, 
-                    Codigo = textBox36.Text, 
-                    CodigoPorcentaje = textBox37.Text, 
-                    Tarifa = textBox39.Text, 
-                    Valor = textBox40.Text, 
-                    ValorDevolucionIva = "0.00", 
-                     
-                }; 
- 
-                info.Impuestos.Add(imp); 
-                info.Pagos = new List<Pago>(); 
-                Pago pago = new Pago() 
-                { 
-                    FormaPago = textBox63.Text, 
-                    Total = textBox64.Text, 
-                    Plazo = textBox65.Text, 
-                    UnidadTiempo = textBox66.Text 
-                }; 
-                info.Pagos.Add(pago); 
-                deb.Version = "1.0.0"; 
-                deb.InfoNotaDebito = info; 
- 
-                var resp = servicio.EnviarNotaDebito(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> 
  
 == ARCHIVOS NOTA DE DEBITO XML/XSD == == ARCHIVOS NOTA DE DEBITO XML/XSD ==