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 | ||
enviarnotacredito [2025/05/19 13:30] 217.182.134.106 se ha restaurado la vieja versión (2024/01/23 05:45) |
enviarnotacredito [2025/05/19 13:31] (actual) 217.182.134.106 se ha restaurado la vieja versión (2024/11/26 22:00) |
||
---|---|---|---|
Línea 1: | Línea 1: | ||
- | ====== Método EnviarNotaCredito() ====== | + | Enviar nota de credito |
- | + | ||
- | [[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> | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | <!--Zero or more repetitions: | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | <!--Zero or more repetitions: | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | <!--Zero or more repetitions: | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | <!--Zero or more repetitions: | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | === 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 == | ||
- | |||
- | En este enlace se encuentran disponibles los xml y xsd de Nota de Credito | ||
- | |||
- | {{ : | ||
- | |||
- | ---- | ||
- | |||
- | [[manual_de_integracion_obj|{{: | ||