FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
Error al intentar rellenar Detalle Exenta de Emitidas
Buenos días, cuando intento rellenar la parte exenta del detalle de una factura emitida, me crea un objeto null que causa exception en mi código.
La causaExención la creo de la siguiente forma: tipoConDesglose.Entrega.Sujeta.Exenta = new DetalleExentaType[1]; tipoConDesglose.Entrega.Sujeta.Exenta[0].CausaExencion = ((CausaExencionType)(numTipo)); Pero al intentar asignarle un valor me lanza error: tipoConDesglose.Entrega.Sujeta.Exenta[0].CausaExencion = 'tipoConDesglose.Entrega.Sujeta.Exenta[0].CausaExencion' inició una excepción de tipo 'System.NullReferenceException' Esto con la versión anterior (1.0) del SII no me daba problemas, a alguien más le pasa? Cómo debemos crear el objeto para adjuntar una causa de exención? |
#2
|
||||
|
||||
Cita:
Código:
<sii:TipoDesglose> <sii:DesgloseFactura> <sii:Sujeta> <sii:Exenta> <sii:DetalleExenta> <sii:CausaExencion>E2</sii:CausaExencion> <sii:BaseImponible>22.07</sii:BaseImponible> </sii:DetalleExenta> </sii:Exenta> </sii:Sujeta> </sii:DesgloseFactura> </sii:TipoDesglose> Cita:
|
#3
|
|||
|
|||
Cita:
tipoConDesglose.Entrega.Sujeta.Exenta = new DetalleExentaType[1]; CausaExencion me devuelva null. Os incluyo más líneas del proyecto: TipoConDesgloseType tipoConDesglose = new TipoConDesgloseType(); tipoConDesglose.Entrega = new TipoSinDesgloseType(); tipoConDesglose.Entrega.Sujeta = new SujetaType(); if ((campos[54] != null && !campos[54].Equals(String.Empty)) || !campos[55].Equals(String.Empty)) { if (!campos[54].Equals(String.Empty)) { for (int numTipo = 0; numTipo < 6; numTipo++) { if (campos[54].Equals(((CausaExencionType)(numTipo)).ToString())) { tipoConDesglose.Entrega.Sujeta.Exenta = new DetalleExentaType[1]; tipoConDesglose.Entrega.Sujeta.Exenta[0].CausaExencion = ((CausaExencionType)(numTipo)); break; } } } } |
#4
|
|||
|
|||
Cita:
tipoConDesglose.Entrega.Sujeta.Exenta[0] = new DetalleExentaType(); |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
TICKET BAI (TicketBAI); Nuevo sistema de la Agencia Tributaria del Pais Vasco | keys | Internet | 4192 | Hace 22 Horas 16:28:07 |
AEAT envio de datos vía Webservice problemas con WSDL | CelsoO | Internet | 11 | 09-10-2019 20:03:41 |
webService Soap de la Administración Digital Española notific@ | apicito | Internet | 3 | 31-01-2017 11:25:28 |
Error en Webservice funcion envio de sms | webmasterplc | Delphi para la web | 5 | 25-07-2013 20:10:29 |
Problemas con envío de XML a un WebService | davidvamo | Internet | 1 | 13-02-2007 15:49:20 |
|