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 | |||
|
enviarnotacredito [2026/01/17 04:37] 57.141.16.9 se ha restaurado la vieja versión (2025/09/09 04:38) |
enviarnotacredito [2026/01/17 09:19] (actual) 57.141.16.10 se ha restaurado la vieja versión (2025/06/28 21:51) |
||
|---|---|---|---|
| Línea 14: | Línea 14: | ||
| ---- | ---- | ||
| - | == XML EJEMPLO == | + | == OBJETO |
| <code xml> | <code xml> | ||
| Línea 200: | Línea 200: | ||
| ---- | ---- | ||
| + | |||
| + | === Proceso para consumo EnviarNotaCredito === | ||
| + | |||
| + | * Se inicializa un objeto ServiceClient o Servicio | ||
| + | * Se inicializa un objeto PeticionNotaCredito donde se ingresan el RUC, el usuario de Integración ,clave de Integración y Documento | ||
| + | * Se hace consumo del método EnviarNotaCredito 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(); | ||
| + | PeticionNotaCredito pet = new PeticionNotaCredito(); | ||
| + | pet.Clave = " | ||
| + | pet.RUC = " | ||
| + | pet.Usuario = " | ||
| + | pet.Documento = new NotaCredito(); | ||
| + | NotaCredito not = new NotaCredito(); | ||
| + | |||
| + | |||
| + | // | ||
| + | not.InfoTributaria = new InfoTributaria(); | ||
| + | not.InfoTributaria = InformacionTrib(); | ||
| + | not.CorreoNotificar = textBox76.Text; | ||
| + | not.DirCliente = " | ||
| + | |||
| + | |||
| + | |||
| + | // | ||
| + | not.InfoNotaCredito = new InfoNotaCredito(); | ||
| + | InfoNotaCredito infonot = new InfoNotaCredito | ||
| + | { | ||
| + | CodDocModificado = textBox47.Text, | ||
| + | ContribuyenteEspecial = textBox48.Text, | ||
| + | DirEstablecimiento = textBox49.Text, | ||
| + | FechaEmision = textBox50.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, | ||
| + | Motivo = textBox59.Text, | ||
| + | ValorModificacion = textBox61.Text, | ||
| + | | ||
| + | }; | ||
| + | infonot.Moneda = " | ||
| + | |||
| + | ImpuestoTotalNotaCredito totalConImpuesto = new ImpuestoTotalNotaCredito | ||
| + | { | ||
| + | BaseImponible = textBox35.Text, | ||
| + | Codigo = textBox36.Text, | ||
| + | CodigoPorcentaje = textBox37.Text, | ||
| + | Valor = textBox40.Text, | ||
| + | |||
| + | }; | ||
| + | |||
| + | |||
| + | totalConImpuesto.ValorDevolucionIva = " | ||
| + | infonot.TotalConImpuestos = new List< | ||
| + | infonot.TotalConImpuestos.Add(totalConImpuesto); | ||
| + | not.InfoNotaCredito = infonot; | ||
| + | |||
| + | |||
| + | // | ||
| + | not.Detalles = new List< | ||
| + | |||
| + | DetalleNotaCredito det = new DetalleNotaCredito | ||
| + | { | ||
| + | CodigoAdicional = textBox67.Text, | ||
| + | CodigoInterno = textBox68.Text, | ||
| + | Descripcion = textBox69.Text, | ||
| + | Cantidad = textBox70.Text, | ||
| + | PrecioUnitario = textBox71.Text, | ||
| + | Descuento = textBox73.Text, | ||
| + | PrecioTotalSinImpuesto = textBox75.Text, | ||
| + | | ||
| + | | ||
| + | |||
| + | }; | ||
| + | |||
| + | det.DetAdicional = new List< | ||
| + | DetAdicional detAd = new DetAdicional(); | ||
| + | detAd.Nombre = " | ||
| + | detAd.Valor = " | ||
| + | det.DetAdicional.Add(detAd); | ||
| + | det.Impuestos = new List< | ||
| + | det.Impuestos.Add(ImpuestDet()); | ||
| + | not.Detalles.Add(det); | ||
| + | not.Notificar = " | ||
| + | not.Version = " | ||
| + | pet.Documento = not; | ||
| + | |||
| + | var resp = servicio.EnviarNotaCredito(pet); | ||
| + | | ||
| + | servicio.Close(); | ||
| + | |||
| + | richTextBox1.Text = resp.Mensaje + " | ||
| + | } | ||
| + | catch (Exception ex) | ||
| + | { | ||
| + | |||
| + | MessageBox.Show(" | ||
| + | } | ||
| + | </ | ||
| == ARCHIVOS NOTA DE CREDITO XML/XSD == | == ARCHIVOS NOTA DE CREDITO XML/XSD == | ||
| Línea 209: | Línea 315: | ||
| ---- | ---- | ||
| - | [[manual_de_integracion_obj|Ir Atrás]] | + | [[manual_de_integracion_obj|{{: |