verifactu-rails 0.1.0.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +7 -0
  2. data/COMPLIANCE.md +149 -0
  3. data/LICENSE +21 -0
  4. data/README.md +404 -0
  5. data/doc/FUENTES.md +505 -0
  6. data/lib/generators/verifactu/install/install_generator.rb +61 -0
  7. data/lib/generators/verifactu/install/templates/instalar_verifactu.rb.tt +19 -0
  8. data/lib/generators/verifactu/install/templates/verifactu.rb.tt +64 -0
  9. data/lib/verifactu-rails.rb +31 -0
  10. data/lib/verifactu_rails/certificado.rb +122 -0
  11. data/lib/verifactu_rails/consulta.rb +279 -0
  12. data/lib/verifactu_rails/desglose.rb +396 -0
  13. data/lib/verifactu_rails/envio.rb +153 -0
  14. data/lib/verifactu_rails/error.rb +31 -0
  15. data/lib/verifactu_rails/formato.rb +199 -0
  16. data/lib/verifactu_rails/huella.rb +130 -0
  17. data/lib/verifactu_rails/importe.rb +80 -0
  18. data/lib/verifactu_rails/libro/autochequeo.rb +67 -0
  19. data/lib/verifactu_rails/libro/cadena.rb +110 -0
  20. data/lib/verifactu_rails/libro/migracion.rb +92 -0
  21. data/lib/verifactu_rails/libro/reconciliacion.rb +224 -0
  22. data/lib/verifactu_rails/libro/registro.rb +74 -0
  23. data/lib/verifactu_rails/libro/remesa.rb +120 -0
  24. data/lib/verifactu_rails/libro.rb +89 -0
  25. data/lib/verifactu_rails/qr.rb +56 -0
  26. data/lib/verifactu_rails/railtie.rb +30 -0
  27. data/lib/verifactu_rails/registro.rb +833 -0
  28. data/lib/verifactu_rails/respuesta.rb +154 -0
  29. data/lib/verifactu_rails/schemas/ConsultaLR.xsd +54 -0
  30. data/lib/verifactu_rails/schemas/EventosSIF.xsd +823 -0
  31. data/lib/verifactu_rails/schemas/PROCEDENCIA.md +64 -0
  32. data/lib/verifactu_rails/schemas/RespuestaConsultaLR.xsd +201 -0
  33. data/lib/verifactu_rails/schemas/RespuestaSuministro.xsd +139 -0
  34. data/lib/verifactu_rails/schemas/RespuestaValRegistNoVeriFactu.xsd +103 -0
  35. data/lib/verifactu_rails/schemas/SuministroInformacion.xsd +1390 -0
  36. data/lib/verifactu_rails/schemas/SuministroLR.xsd +25 -0
  37. data/lib/verifactu_rails/schemas/catalog.xml +5 -0
  38. data/lib/verifactu_rails/schemas/xmldsig-core-schema.xsd +318 -0
  39. data/lib/verifactu_rails/sistema_informatico.rb +88 -0
  40. data/lib/verifactu_rails/transporte.rb +127 -0
  41. data/lib/verifactu_rails/version.rb +5 -0
  42. metadata +124 -0
@@ -0,0 +1,1390 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:sf="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd" targetNamespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd" elementFormDefault="qualified">
3
+ <import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
4
+ <complexType name="CabeceraType">
5
+ <annotation>
6
+ <documentation xml:lang="es"> Datos de cabecera </documentation>
7
+ </annotation>
8
+ <sequence>
9
+ <element name="ObligadoEmision" type="sf:PersonaFisicaJuridicaESType">
10
+ <annotation>
11
+ <documentation xml:lang="es"> Obligado a expedir la factura. </documentation>
12
+ </annotation>
13
+ </element>
14
+ <element name="Representante" type="sf:PersonaFisicaJuridicaESType" minOccurs="0">
15
+ <annotation>
16
+ <documentation xml:lang="es"> Representante del obligado tributario. A rellenar solo en caso de que los registros de facturación remitdos hayan sido generados por un representante/asesor del obligado tributario. </documentation>
17
+ </annotation>
18
+ </element>
19
+ <element name="RemisionVoluntaria" minOccurs="0">
20
+ <complexType>
21
+ <sequence>
22
+ <element name="FechaFinVeriFactu" type="sf:fecha" minOccurs="0"/>
23
+ <element name="Incidencia" type="sf:IncidenciaType" minOccurs="0"/>
24
+ </sequence>
25
+ </complexType>
26
+ </element>
27
+ <element name="RemisionRequerimiento" minOccurs="0">
28
+ <complexType>
29
+ <sequence>
30
+ <element name="RefRequerimiento" type="sf:TextMax18Type"/>
31
+ <element name="FinRequerimiento" type="sf:FinRequerimientoType" minOccurs="0"/>
32
+ </sequence>
33
+ </complexType>
34
+ </element>
35
+ </sequence>
36
+ </complexType>
37
+ <element name="RegistroAlta" type="sf:RegistroFacturacionAltaType"/>
38
+ <element name="RegistroAnulacion" type="sf:RegistroFacturacionAnulacionType"/>
39
+ <!-- Datos de presentacion en la respuesta
40
+ -->
41
+ <complexType name="DatosPresentacionType">
42
+ <sequence>
43
+ <element name="NIFPresentador" type="sf:NIFType"/>
44
+ <element name="TimestampPresentacion" type="dateTime"/>
45
+ </sequence>
46
+ </complexType>
47
+ <complexType name="DatosPresentacion2Type">
48
+ <sequence>
49
+ <element name="NIFPresentador" type="sf:NIFType"/>
50
+ <element name="TimestampPresentacion" type="dateTime"/>
51
+ <element name="IdPeticion" type="sf:TextMax20Type"/>
52
+ </sequence>
53
+ </complexType>
54
+ <complexType name="PeriodoImputacionType">
55
+ <sequence>
56
+ <element name="Ejercicio" type="sf:YearType"/>
57
+ <element name="Periodo" type="sf:TipoPeriodoType"/>
58
+ </sequence>
59
+ </complexType>
60
+ <complexType name="IDFacturaExpedidaBCType">
61
+ <annotation>
62
+ <documentation xml:lang="es"> Datos de identificación de factura expedida para operaciones de consulta</documentation>
63
+ </annotation>
64
+ <sequence>
65
+ <element name="IDEmisorFactura" type="sf:NIFType"/>
66
+ <element name="NumSerieFactura" type="sf:TextoIDFacturaType">
67
+ <annotation>
68
+ <documentation xml:lang="es"> Nº Serie+Nº Factura de la Factura del Emisor.</documentation>
69
+ </annotation>
70
+ </element>
71
+ <element name="FechaExpedicionFactura" type="sf:fecha">
72
+ <annotation>
73
+ <documentation xml:lang="es"> Fecha de emisión de la factura</documentation>
74
+ </annotation>
75
+ </element>
76
+ </sequence>
77
+ </complexType>
78
+ <complexType name="IDFacturaExpedidaBajaType">
79
+ <annotation>
80
+ <documentation xml:lang="es"> Datos de identificación de factura que se anula para operaciones de baja</documentation>
81
+ </annotation>
82
+ <sequence>
83
+ <element name="IDEmisorFacturaAnulada" type="sf:NIFType">
84
+ <annotation>
85
+ <documentation xml:lang="es"> NIF del obligado</documentation>
86
+ </annotation>
87
+ </element>
88
+ <element name="NumSerieFacturaAnulada" type="sf:TextoIDFacturaType">
89
+ <annotation>
90
+ <documentation xml:lang="es"> Nº Serie+Nº Factura de la Factura que se anula.</documentation>
91
+ </annotation>
92
+ </element>
93
+ <element name="FechaExpedicionFacturaAnulada" type="sf:fecha">
94
+ <annotation>
95
+ <documentation xml:lang="es"> Fecha de emisión de la factura que se anula</documentation>
96
+ </annotation>
97
+ </element>
98
+ </sequence>
99
+ </complexType>
100
+ <complexType name="RegistroFacturacionAltaType">
101
+ <annotation>
102
+ <documentation xml:lang="es">Datos correspondientes al registro de facturacion de alta </documentation>
103
+ </annotation>
104
+ <sequence>
105
+ <element name="IDVersion" type="sf:VersionType"/>
106
+ <element name="IDFactura" type="sf:IDFacturaExpedidaType"/>
107
+ <element name="RefExterna" type="sf:TextMax60Type" minOccurs="0"/>
108
+ <element name="NombreRazonEmisor" type="sf:TextMax120Type"/>
109
+ <element name="Subsanacion" type="sf:SubsanacionType" minOccurs="0"/>
110
+ <element name="RechazoPrevio" type="sf:RechazoPrevioType" minOccurs="0"/>
111
+ <element name="TipoFactura" type="sf:ClaveTipoFacturaType">
112
+ <annotation>
113
+ <documentation xml:lang="es"> Clave del tipo de factura </documentation>
114
+ </annotation>
115
+ </element>
116
+ <element name="TipoRectificativa" type="sf:ClaveTipoRectificativaType" minOccurs="0">
117
+ <annotation>
118
+ <documentation xml:lang="es"> Identifica si el tipo de factura rectificativa es por sustitución o por diferencia </documentation>
119
+ </annotation>
120
+ </element>
121
+ <element name="FacturasRectificadas" minOccurs="0">
122
+ <complexType>
123
+ <annotation>
124
+ <documentation xml:lang="es">El ID de las facturas rectificadas, únicamente se rellena en el caso de rectificación de facturas</documentation>
125
+ </annotation>
126
+ <sequence>
127
+ <element name="IDFacturaRectificada" type="sf:IDFacturaARType" maxOccurs="1000"/>
128
+ </sequence>
129
+ </complexType>
130
+ </element>
131
+ <element name="FacturasSustituidas" minOccurs="0">
132
+ <complexType>
133
+ <annotation>
134
+ <documentation xml:lang="es">El ID de las facturas sustituidas, únicamente se rellena en el caso de facturas sustituidas</documentation>
135
+ </annotation>
136
+ <sequence>
137
+ <element name="IDFacturaSustituida" type="sf:IDFacturaARType" maxOccurs="1000"/>
138
+ </sequence>
139
+ </complexType>
140
+ </element>
141
+ <element name="ImporteRectificacion" type="sf:DesgloseRectificacionType" minOccurs="0"/>
142
+ <element name="FechaOperacion" type="sf:fecha" minOccurs="0"/>
143
+ <element name="DescripcionOperacion" type="sf:TextMax500Type"/>
144
+ <element name="FacturaSimplificadaArt7273" type="sf:SimplificadaCualificadaType" minOccurs="0"/>
145
+ <element name="FacturaSinIdentifDestinatarioArt61d" type="sf:CompletaSinDestinatarioType" minOccurs="0"/>
146
+ <element name="Macrodato" type="sf:MacrodatoType" minOccurs="0"/>
147
+ <element name="EmitidaPorTerceroODestinatario" type="sf:TercerosODestinatarioType" minOccurs="0"/>
148
+ <element name="Tercero" type="sf:PersonaFisicaJuridicaType" minOccurs="0">
149
+ <annotation>
150
+ <documentation xml:lang="es"> Tercero que expida la factura y/o genera el registro de alta. </documentation>
151
+ </annotation>
152
+ </element>
153
+ <element name="Destinatarios" minOccurs="0">
154
+ <complexType>
155
+ <annotation>
156
+ <documentation xml:lang="es">Contraparte de la operación. Cliente</documentation>
157
+ </annotation>
158
+ <sequence>
159
+ <element name="IDDestinatario" type="sf:PersonaFisicaJuridicaType" maxOccurs="1000"/>
160
+ </sequence>
161
+ </complexType>
162
+ </element>
163
+ <element name="Cupon" type="sf:CuponType" minOccurs="0"/>
164
+ <element name="Desglose" type="sf:DesgloseType"/>
165
+ <element name="CuotaTotal" type="sf:ImporteSgn12.2Type"/>
166
+ <element name="ImporteTotal" type="sf:ImporteSgn12.2Type"/>
167
+ <element name="Encadenamiento">
168
+ <complexType>
169
+ <choice>
170
+ <element name="PrimerRegistro" type="sf:PrimerRegistroCadenaType"/>
171
+ <element name="RegistroAnterior" type="sf:EncadenamientoFacturaAnteriorType"/>
172
+ </choice>
173
+ </complexType>
174
+ </element>
175
+ <element name="SistemaInformatico" type="sf:SistemaInformaticoType"/>
176
+ <element name="FechaHoraHusoGenRegistro" type="dateTime"/>
177
+ <element name="NumRegistroAcuerdoFacturacion" type="sf:TextMax15Type" minOccurs="0"/>
178
+ <element name="IdAcuerdoSistemaInformatico" type="sf:TextMax16Type" minOccurs="0"/>
179
+ <element name="TipoHuella" type="sf:TipoHuellaType"/>
180
+ <element name="Huella" type="sf:TextMax64Type"/>
181
+ <element ref="ds:Signature" minOccurs="0"/>
182
+ </sequence>
183
+ </complexType>
184
+ <complexType name="RegistroFacturacionAnulacionType">
185
+ <annotation>
186
+ <documentation xml:lang="es">Datos correspondientes al registro de facturacion de anulacion </documentation>
187
+ </annotation>
188
+ <sequence>
189
+ <element name="IDVersion" type="sf:VersionType"/>
190
+ <element name="IDFactura" type="sf:IDFacturaExpedidaBajaType"/>
191
+ <element name="RefExterna" type="sf:TextMax60Type" minOccurs="0"/>
192
+ <element name="SinRegistroPrevio" type="sf:SinRegistroPrevioType" minOccurs="0"/>
193
+ <element name="RechazoPrevio" type="sf:RechazoPrevioAnulacionType" minOccurs="0"/>
194
+ <element name="GeneradoPor" type="sf:GeneradoPorType" minOccurs="0"/>
195
+ <element name="Generador" type="sf:PersonaFisicaJuridicaType" minOccurs="0"/>
196
+ <element name="Encadenamiento">
197
+ <complexType>
198
+ <choice>
199
+ <element name="PrimerRegistro" type="sf:PrimerRegistroCadenaType"/>
200
+ <element name="RegistroAnterior" type="sf:EncadenamientoFacturaAnteriorType"/>
201
+ </choice>
202
+ </complexType>
203
+ </element>
204
+ <element name="SistemaInformatico" type="sf:SistemaInformaticoType"/>
205
+ <element name="FechaHoraHusoGenRegistro" type="dateTime"/>
206
+ <element name="TipoHuella" type="sf:TipoHuellaType"/>
207
+ <element name="Huella" type="sf:TextMax64Type"/>
208
+ <element ref="ds:Signature" minOccurs="0"/>
209
+ </sequence>
210
+ </complexType>
211
+ <complexType name="EncadenamientoFacturaAnteriorType">
212
+ <annotation>
213
+ <documentation xml:lang="es">Datos de encadenamiento </documentation>
214
+ </annotation>
215
+ <sequence>
216
+ <element name="IDEmisorFactura" type="sf:NIFType">
217
+ <annotation>
218
+ <documentation xml:lang="es"> NIF del obligado a expedir la factura a que se refiere el registro de facturación anterior</documentation>
219
+ </annotation>
220
+ </element>
221
+ <element name="NumSerieFactura" type="sf:TextMax60Type"/>
222
+ <element name="FechaExpedicionFactura" type="sf:fecha"/>
223
+ <element name="Huella" type="sf:TextMax64Type"/>
224
+ </sequence>
225
+ </complexType>
226
+ <complexType name="SistemaInformaticoType">
227
+ <sequence>
228
+ <sequence>
229
+ <element name="NombreRazon" type="sf:TextMax120Type"/>
230
+ <choice>
231
+ <element name="NIF" type="sf:NIFType"/>
232
+ <element name="IDOtro" type="sf:IDOtroType"/>
233
+ </choice>
234
+ </sequence>
235
+ <element name="NombreSistemaInformatico" type="sf:TextMax30Type"/>
236
+ <element name="IdSistemaInformatico" type="sf:TextMax2Type"/>
237
+ <element name="Version" type="sf:TextMax50Type"/>
238
+ <element name="NumeroInstalacion" type="sf:TextMax100Type"/>
239
+ <element name="TipoUsoPosibleSoloVerifactu" type="sf:SiNoType"/>
240
+ <element name="TipoUsoPosibleMultiOT" type="sf:SiNoType"/>
241
+ <element name="IndicadorMultiplesOT" type="sf:SiNoType"/>
242
+ </sequence>
243
+ </complexType>
244
+ <complexType name="SistemaInformaticoConsultaType">
245
+ <sequence>
246
+ <sequence>
247
+ <element name="NombreRazon" type="sf:TextMax120Type"/>
248
+ <choice>
249
+ <element name="NIF" type="sf:NIFType"/>
250
+ <element name="IDOtro" type="sf:IDOtroType"/>
251
+ </choice>
252
+ </sequence>
253
+ <element name="NombreSistemaInformatico" type="sf:TextMax30Type" minOccurs="0"/>
254
+ <element name="IdSistemaInformatico" type="sf:TextMax2Type"/>
255
+ <element name="Version" type="sf:TextMax50Type" minOccurs="0"/>
256
+ <element name="NumeroInstalacion" type="sf:TextMax100Type"/>
257
+ <element name="TipoUsoPosibleSoloVerifactu" type="sf:SiNoType" minOccurs="0"/>
258
+ <element name="TipoUsoPosibleMultiOT" type="sf:SiNoType" minOccurs="0"/>
259
+ <element name="IndicadorMultiplesOT" type="sf:SiNoType" minOccurs="0"/>
260
+ </sequence>
261
+ </complexType>
262
+ <complexType name="IDFacturaExpedidaType">
263
+ <annotation>
264
+ <documentation xml:lang="es"> Datos de identificación de factura </documentation>
265
+ </annotation>
266
+ <sequence>
267
+ <element name="IDEmisorFactura" type="sf:NIFType">
268
+ <annotation>
269
+ <documentation xml:lang="es"> NIF del obligado</documentation>
270
+ </annotation>
271
+ </element>
272
+ <element name="NumSerieFactura" type="sf:TextoIDFacturaType">
273
+ <annotation>
274
+ <documentation xml:lang="es"> Nº Serie+Nº Factura de la Factura del Emisor</documentation>
275
+ </annotation>
276
+ </element>
277
+ <element name="FechaExpedicionFactura" type="sf:fecha">
278
+ <annotation>
279
+ <documentation xml:lang="es"> Fecha de emisión de la factura</documentation>
280
+ </annotation>
281
+ </element>
282
+ </sequence>
283
+ </complexType>
284
+ <!--tipo definido para la identificacion de facturas sustituidas o rectificadas-->
285
+ <complexType name="IDFacturaARType">
286
+ <annotation>
287
+ <documentation xml:lang="es"> Datos de identificación de factura sustituida o rectificada. El NIF se cogerá del NIF indicado en el bloque IDFactura</documentation>
288
+ </annotation>
289
+ <sequence>
290
+ <element name="IDEmisorFactura" type="sf:NIFType">
291
+ <annotation>
292
+ <documentation xml:lang="es"> NIF del obligado</documentation>
293
+ </annotation>
294
+ </element>
295
+ <element name="NumSerieFactura" type="sf:TextoIDFacturaType">
296
+ <annotation>
297
+ <documentation xml:lang="es">Nº Serie+Nº Factura de la factura</documentation>
298
+ </annotation>
299
+ </element>
300
+ <element name="FechaExpedicionFactura" type="sf:fecha">
301
+ <annotation>
302
+ <documentation xml:lang="es"> Fecha de emisión de la factura sustituida o rectificada</documentation>
303
+ </annotation>
304
+ </element>
305
+ </sequence>
306
+ </complexType>
307
+ <complexType name="DetalleType">
308
+ <sequence>
309
+ <element name="Impuesto" type="sf:ImpuestoType" minOccurs="0"/>
310
+ <element name="ClaveRegimen" type="sf:IdOperacionesTrascendenciaTributariaType" minOccurs="0"/>
311
+ <choice>
312
+ <element name="CalificacionOperacion" type="sf:CalificacionOperacionType"/>
313
+ <element name="OperacionExenta" type="sf:OperacionExentaType"/>
314
+ </choice>
315
+ <element name="TipoImpositivo" type="sf:Tipo2.2Type" minOccurs="0"/>
316
+ <element name="BaseImponibleOimporteNoSujeto" type="sf:ImporteSgn12.2Type"/>
317
+ <element name="BaseImponibleACoste" type="sf:ImporteSgn12.2Type" minOccurs="0"/>
318
+ <element name="CuotaRepercutida" type="sf:ImporteSgn12.2Type" minOccurs="0"/>
319
+ <element name="TipoRecargoEquivalencia" type="sf:Tipo2.2Type" minOccurs="0"/>
320
+ <element name="CuotaRecargoEquivalencia" type="sf:ImporteSgn12.2Type" minOccurs="0"/>
321
+ </sequence>
322
+ </complexType>
323
+ <complexType name="DesgloseRectificacionType">
324
+ <annotation>
325
+ <documentation xml:lang="es">Desglose de Base y Cuota sustituida en las Facturas Rectificativas sustitutivas</documentation>
326
+ </annotation>
327
+ <sequence>
328
+ <element name="BaseRectificada" type="sf:ImporteSgn12.2Type"/>
329
+ <element name="CuotaRectificada" type="sf:ImporteSgn12.2Type"/>
330
+ <element name="CuotaRecargoRectificado" type="sf:ImporteSgn12.2Type" minOccurs="0"/>
331
+ </sequence>
332
+ </complexType>
333
+ <!-- Datos de persona Física o jurídica : Denominación, representación, identificación (NIF) -->
334
+ <complexType name="PersonaFisicaJuridicaESType">
335
+ <annotation>
336
+ <documentation xml:lang="es">Datos de una persona física o jurídica Española con un NIF asociado</documentation>
337
+ </annotation>
338
+ <sequence>
339
+ <element name="NombreRazon" type="sf:TextMax120Type"/>
340
+ <element name="NIF" type="sf:NIFType"/>
341
+ </sequence>
342
+ </complexType>
343
+ <!-- Datos de persona Física o jurídica : Denominación, representación, identificación (NIF/Otro) -->
344
+ <complexType name="PersonaFisicaJuridicaType">
345
+ <annotation>
346
+ <documentation xml:lang="es">Datos de una persona física o jurídica Española o Extranjera</documentation>
347
+ </annotation>
348
+ <sequence>
349
+ <element name="NombreRazon" type="sf:TextMax120Type"/>
350
+ <choice>
351
+ <element name="NIF" type="sf:NIFType"/>
352
+ <element name="IDOtro" type="sf:IDOtroType"/>
353
+ </choice>
354
+ </sequence>
355
+ </complexType>
356
+ <!-- Datos de persona Física o jurídica : Denominación, representación, identificación (NIF/Otro) -->
357
+ <complexType name="IDOtroType">
358
+ <annotation>
359
+ <documentation xml:lang="es">Identificador de persona Física o jurídica distinto del NIF
360
+ (Código pais, Tipo de Identificador, y hasta 15 caractéres)
361
+ No se permite CodigoPais=ES e IDType=01-NIFContraparte
362
+ para ese caso, debe utilizarse NIF en lugar de IDOtro.
363
+ </documentation>
364
+ </annotation>
365
+ <sequence>
366
+ <element name="CodigoPais" type="sf:CountryType2" minOccurs="0"/>
367
+ <element name="IDType" type="sf:PersonaFisicaJuridicaIDTypeType"/>
368
+ <element name="ID" type="sf:TextMax20Type"/>
369
+ </sequence>
370
+ </complexType>
371
+ <complexType name="RangoFechaExpedicionType">
372
+ <annotation>
373
+ <documentation xml:lang="es">Rango de fechas de expedicion</documentation>
374
+ </annotation>
375
+ <sequence>
376
+ <element name="Desde" type="sf:fecha" minOccurs="0"/>
377
+ <element name="Hasta" type="sf:fecha" minOccurs="0"/>
378
+ </sequence>
379
+ </complexType>
380
+ <complexType name="FechaExpedicionConsultaType">
381
+ <choice>
382
+ <element name="FechaExpedicionFactura" type="sf:fecha" minOccurs="0"/>
383
+ <element name="RangoFechaExpedicion" type="sf:RangoFechaExpedicionType" minOccurs="0"/>
384
+ </choice>
385
+ </complexType>
386
+ <complexType name="RegistroDuplicadoType">
387
+ <sequence>
388
+ <element name="IdPeticionRegistroDuplicado" type="sf:TextMax20Type">
389
+ <annotation>
390
+ <documentation xml:lang="es">
391
+ IdPeticion asociado a la factura registrada previamente en el sistema. Solo se suministra si la factura enviada es rechazada por estar duplicada
392
+ </documentation>
393
+ </annotation>
394
+ </element>
395
+ <element name="EstadoRegistroDuplicado" type="sf:EstadoRegistroSFType">
396
+ <annotation>
397
+ <documentation xml:lang="es">
398
+ Estado del registro duplicado almacenado en el sistema. Los estados posibles son: Correcta, AceptadaConErrores y Anulada. Solo se suministra si la factura enviada es rechazada por estar duplicada
399
+ </documentation>
400
+ </annotation>
401
+ </element>
402
+ <element name="CodigoErrorRegistro" type="sf:ErrorDetalleType" minOccurs="0">
403
+ <annotation>
404
+ <documentation xml:lang="es">
405
+ Código del error de registro duplicado almacenado en el sistema, en su caso.
406
+ </documentation>
407
+ </annotation>
408
+ </element>
409
+ <element name="DescripcionErrorRegistro" type="sf:TextMax500Type" minOccurs="0">
410
+ <annotation>
411
+ <documentation xml:lang="es">
412
+ Descripción detallada del error de registro duplicado almacenado en el sistema, en su caso.
413
+ </documentation>
414
+ </annotation>
415
+ </element>
416
+ </sequence>
417
+ </complexType>
418
+ <simpleType name="VersionType">
419
+ <restriction base="string">
420
+ <enumeration value="1.0"/>
421
+ </restriction>
422
+ </simpleType>
423
+ <!-- ==== Tipos básicos (Listas de claves y patrones) ============================================= -->
424
+ <!-- Año en formato YYYY -->
425
+ <simpleType name="YearType">
426
+ <annotation>
427
+ <documentation xml:lang="es"> Año en formato YYYY </documentation>
428
+ </annotation>
429
+ <restriction base="string">
430
+ <length value="4"/>
431
+ <pattern value="\d{4,4}"/>
432
+ </restriction>
433
+ </simpleType>
434
+ <simpleType name="TipoPeriodoType">
435
+ <annotation>
436
+ <documentation xml:lang="es"> Período de la factura </documentation>
437
+ </annotation>
438
+ <restriction base="string">
439
+ <enumeration value="01">
440
+ <annotation>
441
+ <documentation xml:lang="es"> Enero </documentation>
442
+ </annotation>
443
+ </enumeration>
444
+ <enumeration value="02">
445
+ <annotation>
446
+ <documentation xml:lang="es"> Febrero </documentation>
447
+ </annotation>
448
+ </enumeration>
449
+ <enumeration value="03">
450
+ <annotation>
451
+ <documentation xml:lang="es"> Marzo </documentation>
452
+ </annotation>
453
+ </enumeration>
454
+ <enumeration value="04">
455
+ <annotation>
456
+ <documentation xml:lang="es"> Abril </documentation>
457
+ </annotation>
458
+ </enumeration>
459
+ <enumeration value="05">
460
+ <annotation>
461
+ <documentation xml:lang="es"> Mayo </documentation>
462
+ </annotation>
463
+ </enumeration>
464
+ <enumeration value="06">
465
+ <annotation>
466
+ <documentation xml:lang="es"> Junio </documentation>
467
+ </annotation>
468
+ </enumeration>
469
+ <enumeration value="07">
470
+ <annotation>
471
+ <documentation xml:lang="es"> Julio </documentation>
472
+ </annotation>
473
+ </enumeration>
474
+ <enumeration value="08">
475
+ <annotation>
476
+ <documentation xml:lang="es"> Agosto </documentation>
477
+ </annotation>
478
+ </enumeration>
479
+ <enumeration value="09">
480
+ <annotation>
481
+ <documentation xml:lang="es"> Septiembre </documentation>
482
+ </annotation>
483
+ </enumeration>
484
+ <enumeration value="10">
485
+ <annotation>
486
+ <documentation xml:lang="es"> Octubre </documentation>
487
+ </annotation>
488
+ </enumeration>
489
+ <enumeration value="11">
490
+ <annotation>
491
+ <documentation xml:lang="es"> Noviembre </documentation>
492
+ </annotation>
493
+ </enumeration>
494
+ <enumeration value="12">
495
+ <annotation>
496
+ <documentation xml:lang="es"> Diciembre </documentation>
497
+ </annotation>
498
+ </enumeration>
499
+ </restriction>
500
+ </simpleType>
501
+ <!-- Identificador único de facturas -->
502
+ <simpleType name="TextoIDenvioType">
503
+ <restriction base="string">
504
+ <maxLength value="20"/>
505
+ </restriction>
506
+ </simpleType>
507
+ <!-- Identificador único de facturas -->
508
+ <simpleType name="TextoIDFacturaType">
509
+ <restriction base="string">
510
+ <minLength value="1"/>
511
+ <maxLength value="60"/>
512
+ </restriction>
513
+ </simpleType>
514
+ <!-- Tipo de 10 dígitos -->
515
+ <simpleType name="Tipo10Type">
516
+ <restriction base="string">
517
+ <pattern value="\d{0,10}"/>
518
+ </restriction>
519
+ </simpleType>
520
+ <!-- Importe de 15 dígitos (12+2) "." como separador decimal -->
521
+ <simpleType name="ImporteSgn12.2Type">
522
+ <restriction base="string">
523
+ <pattern value="(\+|-)?\d{1,12}(\.\d{0,2})?"/>
524
+ </restriction>
525
+ </simpleType>
526
+ <!-- Importe de 17 dígitos (14+2) "." como separador decimal -->
527
+ <simpleType name="ImporteSgn14.2Type">
528
+ <restriction base="string">
529
+ <pattern value="(\+|-)?\d{1,14}(\.\d{0,2})?"/>
530
+ </restriction>
531
+ </simpleType>
532
+ <!-- Tipo de 6 dígitos (3+2) "." como separador decimal -->
533
+ <simpleType name="Tipo2.2Type">
534
+ <restriction base="string">
535
+ <pattern value="\d{1,3}(\.\d{0,2})?"/>
536
+ </restriction>
537
+ </simpleType>
538
+ <!-- Tipo de 3 dígitos -->
539
+ <simpleType name="Tipo3Type">
540
+ <restriction base="string">
541
+ <pattern value="\d{0,3}"/>
542
+ </restriction>
543
+ </simpleType>
544
+ <!-- Tipo de 6 dígitos -->
545
+ <simpleType name="Tipo6Type">
546
+ <restriction base="string">
547
+ <pattern value="\d{0,4}"/>
548
+ </restriction>
549
+ </simpleType>
550
+ <!-- Cadena de 1500 caracteres -->
551
+ <simpleType name="TextMax1500Type">
552
+ <restriction base="string">
553
+ <maxLength value="1500"/>
554
+ </restriction>
555
+ </simpleType>
556
+ <!-- Cadena de 500 caracteres -->
557
+ <simpleType name="TextMax500Type">
558
+ <restriction base="string">
559
+ <maxLength value="500"/>
560
+ </restriction>
561
+ </simpleType>
562
+ <!-- Cadena de 250 caracteres -->
563
+ <simpleType name="TextMax250Type">
564
+ <restriction base="string">
565
+ <maxLength value="250"/>
566
+ </restriction>
567
+ </simpleType>
568
+ <!-- Cadena de 150 caracteres -->
569
+ <simpleType name="TextMax150Type">
570
+ <restriction base="string">
571
+ <maxLength value="150"/>
572
+ </restriction>
573
+ </simpleType>
574
+ <!-- Cadena de 120 caracteres -->
575
+ <simpleType name="TextMax120Type">
576
+ <restriction base="string">
577
+ <maxLength value="120"/>
578
+ </restriction>
579
+ </simpleType>
580
+ <!-- Cadena de 100 caracteres -->
581
+ <simpleType name="TextMax100Type">
582
+ <restriction base="string">
583
+ <maxLength value="100"/>
584
+ </restriction>
585
+ </simpleType>
586
+ <!-- Cadena de 70 caracteres -->
587
+ <simpleType name="TextMax70Type">
588
+ <restriction base="string">
589
+ <maxLength value="70"/>
590
+ </restriction>
591
+ </simpleType>
592
+ <!-- Cadena de 65 caracteres -->
593
+ <simpleType name="TextMax65Type">
594
+ <restriction base="string">
595
+ <maxLength value="65"/>
596
+ </restriction>
597
+ </simpleType>
598
+ <!-- Cadena de 60 caracteres -->
599
+ <simpleType name="TextMax60Type">
600
+ <restriction base="string">
601
+ <maxLength value="60"/>
602
+ </restriction>
603
+ </simpleType>
604
+ <!-- Cadena de 64 caracteres -->
605
+ <simpleType name="TextMax64Type">
606
+ <restriction base="string">
607
+ <maxLength value="64"/>
608
+ </restriction>
609
+ </simpleType>
610
+ <!-- Cadena de 40 caracteres -->
611
+ <simpleType name="TextMax40Type">
612
+ <restriction base="string">
613
+ <maxLength value="40"/>
614
+ </restriction>
615
+ </simpleType>
616
+ <!-- Cadena de 34 caracteres -->
617
+ <simpleType name="TextMax34Type">
618
+ <restriction base="string">
619
+ <maxLength value="34"/>
620
+ </restriction>
621
+ </simpleType>
622
+ <!-- Cadena de 20 caracteres -->
623
+ <simpleType name="TextMax20Type">
624
+ <restriction base="string">
625
+ <maxLength value="20"/>
626
+ </restriction>
627
+ </simpleType>
628
+ <!-- Cadena de 18 caracteres -->
629
+ <simpleType name="TextMax18Type">
630
+ <restriction base="string">
631
+ <maxLength value="18"/>
632
+ </restriction>
633
+ </simpleType>
634
+ <!-- Cadena de 15 caracteres -->
635
+ <simpleType name="TextMax15Type">
636
+ <restriction base="string">
637
+ <maxLength value="15"/>
638
+ </restriction>
639
+ </simpleType>
640
+ <!-- Cadena de 16 caracteres -->
641
+ <simpleType name="TextMax16Type">
642
+ <restriction base="string">
643
+ <maxLength value="16"/>
644
+ </restriction>
645
+ </simpleType>
646
+ <!-- Cadena de 25 caracteres -->
647
+ <simpleType name="TextMax25Type">
648
+ <restriction base="string">
649
+ <maxLength value="25"/>
650
+ </restriction>
651
+ </simpleType>
652
+ <!-- Cadena de 30 caracteres -->
653
+ <simpleType name="TextMax30Type">
654
+ <restriction base="string">
655
+ <maxLength value="30"/>
656
+ </restriction>
657
+ </simpleType>
658
+ <!-- Referencia Catastral -->
659
+ <simpleType name="ReferenciaCatastralType">
660
+ <restriction base="string">
661
+ <maxLength value="25"/>
662
+ </restriction>
663
+ </simpleType>
664
+ <!-- Cadena de 2 caracteres -->
665
+ <simpleType name="TextMax2Type">
666
+ <restriction base="string">
667
+ <maxLength value="2"/>
668
+ </restriction>
669
+ </simpleType>
670
+ <!-- Cadena de 50 caracteres -->
671
+ <simpleType name="TextMax50Type">
672
+ <restriction base="string">
673
+ <maxLength value="50"/>
674
+ </restriction>
675
+ </simpleType>
676
+ <!-- NIF -->
677
+ <simpleType name="NIFType">
678
+ <annotation>
679
+ <documentation xml:lang="es">NIF</documentation>
680
+ </annotation>
681
+ <restriction base="string">
682
+ <length value="9"/>
683
+ </restriction>
684
+ </simpleType>
685
+ <simpleType name="fecha">
686
+ <restriction base="string">
687
+ <length value="10"/>
688
+ <pattern value="\d{2,2}-\d{2,2}-\d{4,4}"/>
689
+ </restriction>
690
+ </simpleType>
691
+ <simpleType name="Timestamp">
692
+ <restriction base="string">
693
+ <length value="19"/>
694
+ <pattern value="\d{2,2}-\d{2,2}-\d{4,4} \d{2,2}:\d{2,2}:\d{2,2}"/>
695
+ </restriction>
696
+ </simpleType>
697
+ <simpleType name="OperacionExentaType">
698
+ <restriction base="string">
699
+ <enumeration value="E1"/>
700
+ <enumeration value="E2"/>
701
+ <enumeration value="E3"/>
702
+ <enumeration value="E4"/>
703
+ <enumeration value="E5"/>
704
+ <enumeration value="E6"/>
705
+ <enumeration value="E7"/>
706
+ <enumeration value="E8"/>
707
+ </restriction>
708
+ </simpleType>
709
+ <!-- Códigos de Tipo de factura -->
710
+ <simpleType name="ClaveTipoFacturaType">
711
+ <restriction base="string">
712
+ <enumeration value="F1">
713
+ <annotation>
714
+ <documentation xml:lang="es">FACTURA (ART. 6, 7.2 Y 7.3 DEL RD 1619/2012)</documentation>
715
+ </annotation>
716
+ </enumeration>
717
+ <enumeration value="F2">
718
+ <annotation>
719
+ <documentation xml:lang="es">FACTURA SIMPLIFICADA Y FACTURAS SIN IDENTIFICACIÓN DEL DESTINATARIO ART. 6.1.D) RD 1619/2012</documentation>
720
+ </annotation>
721
+ </enumeration>
722
+ <enumeration value="R1">
723
+ <annotation>
724
+ <documentation xml:lang="es">FACTURA RECTIFICATIVA (Art 80.1 y 80.2 y error fundado en derecho)</documentation>
725
+ </annotation>
726
+ </enumeration>
727
+ <enumeration value="R2">
728
+ <annotation>
729
+ <documentation xml:lang="es">FACTURA RECTIFICATIVA (Art. 80.3)</documentation>
730
+ </annotation>
731
+ </enumeration>
732
+ <enumeration value="R3">
733
+ <annotation>
734
+ <documentation xml:lang="es">FACTURA RECTIFICATIVA (Art. 80.4)</documentation>
735
+ </annotation>
736
+ </enumeration>
737
+ <enumeration value="R4">
738
+ <annotation>
739
+ <documentation xml:lang="es">FACTURA RECTIFICATIVA (Resto)</documentation>
740
+ </annotation>
741
+ </enumeration>
742
+ <enumeration value="R5">
743
+ <annotation>
744
+ <documentation xml:lang="es">FACTURA RECTIFICATIVA EN FACTURAS SIMPLIFICADAS</documentation>
745
+ </annotation>
746
+ </enumeration>
747
+ <enumeration value="F3">
748
+ <annotation>
749
+ <documentation xml:lang="es">FACTURA EMITIDA EN SUSTITUCIÓN DE FACTURAS SIMPLIFICADAS FACTURADAS Y DECLARADAS</documentation>
750
+ </annotation>
751
+ </enumeration>
752
+ </restriction>
753
+ </simpleType>
754
+ <simpleType name="RechazoPrevioType">
755
+ <restriction base="string">
756
+ <enumeration value="N">
757
+ <annotation>
758
+ <documentation xml:lang="es">No ha habido rechazo previo por la AEAT.</documentation>
759
+ </annotation>
760
+ </enumeration>
761
+ <enumeration value="S">
762
+ <annotation>
763
+ <documentation xml:lang="es">Ha habido rechazo previo por la AEAT.</documentation>
764
+ </annotation>
765
+ </enumeration>
766
+ <enumeration value="X">
767
+ <annotation>
768
+ <documentation xml:lang="es">Independientemente de si ha habido o no algún rechazo previo por la AEAT, el registro de facturación no existe en la AEAT (registro existente en ese SIF o en algún SIF del obligado tributario y que no se remitió a la AEAT, por ejemplo, al acogerse a Veri*factu desde no Veri*factu). No deberían existir operaciones de alta (N,X), por lo que no se admiten. </documentation>
769
+ </annotation>
770
+ </enumeration>
771
+ </restriction>
772
+ </simpleType>
773
+ <simpleType name="RechazoPrevioAnulacionType">
774
+ <restriction base="string">
775
+ <enumeration value="S"/>
776
+ <enumeration value="N"/>
777
+ </restriction>
778
+ </simpleType>
779
+ <simpleType name="SinRegistroPrevioType">
780
+ <restriction base="string">
781
+ <enumeration value="S"/>
782
+ <enumeration value="N"/>
783
+ </restriction>
784
+ </simpleType>
785
+ <simpleType name="PrimerRegistroCadenaType">
786
+ <restriction base="string">
787
+ <enumeration value="S"/>
788
+ </restriction>
789
+ </simpleType>
790
+ <simpleType name="SubsanacionType">
791
+ <restriction base="string">
792
+ <enumeration value="S"/>
793
+ <enumeration value="N"/>
794
+ </restriction>
795
+ </simpleType>
796
+ <simpleType name="ClaveTipoRectificativaType">
797
+ <restriction base="string">
798
+ <enumeration value="S">
799
+ <annotation>
800
+ <documentation xml:lang="es">SUSTITUTIVA</documentation>
801
+ </annotation>
802
+ </enumeration>
803
+ <enumeration value="I">
804
+ <annotation>
805
+ <documentation xml:lang="es">INCREMENTAL</documentation>
806
+ </annotation>
807
+ </enumeration>
808
+ </restriction>
809
+ </simpleType>
810
+ <!-- Tercero o Destinatario -->
811
+ <simpleType name="TercerosODestinatarioType">
812
+ <restriction base="string">
813
+ <enumeration value="D">
814
+ <annotation>
815
+ <documentation xml:lang="es">Destinatario</documentation>
816
+ </annotation>
817
+ </enumeration>
818
+ <enumeration value="T">
819
+ <annotation>
820
+ <documentation xml:lang="es">Tercero</documentation>
821
+ </annotation>
822
+ </enumeration>
823
+ </restriction>
824
+ </simpleType>
825
+ <!-- Factura simplificada Articulo 7,2 Y 7,3 RD 1619/2012, -->
826
+ <simpleType name="SimplificadaCualificadaType">
827
+ <restriction base="string">
828
+ <enumeration value="S"/>
829
+ <enumeration value="N"/>
830
+ </restriction>
831
+ </simpleType>
832
+ <!-- Factura sin identificación destinatario artículo 6,1,d) RD 1619/2012 -->
833
+ <simpleType name="CompletaSinDestinatarioType">
834
+ <restriction base="string">
835
+ <enumeration value="S"/>
836
+ <enumeration value="N"/>
837
+ </restriction>
838
+ </simpleType>
839
+ <!-- Permitira identificar aquellas facturas con importe de la factura superior a un umbral -->
840
+ <simpleType name="MacrodatoType">
841
+ <restriction base="string">
842
+ <enumeration value="S"/>
843
+ <enumeration value="N"/>
844
+ </restriction>
845
+ </simpleType>
846
+ <!-- Identificador que especifica si la generación del registro de facturación se ha realizado durante algún tipo de incidencia -->
847
+ <simpleType name="IncidenciaType">
848
+ <restriction base="string">
849
+ <enumeration value="S"/>
850
+ <enumeration value="N"/>
851
+ </restriction>
852
+ </simpleType>
853
+ <!-- Indicador que especifica que se ha finalizado la remisión de registros de facturación tras un requerimiento -->
854
+ <simpleType name="FinRequerimientoType">
855
+ <restriction base="string">
856
+ <enumeration value="S"/>
857
+ <enumeration value="N"/>
858
+ </restriction>
859
+ </simpleType>
860
+ <!--Indicador que especifica si se quiere obtener en la respuesta el bloque SistemaInformatico en la información del registro se facturacion. Si el Valor es S aumenta el tiempo de respuesta en la cosulta. Si se consulta por Destinatario el valor del campo MostrarSistemaInformatico debe valer 'N' o no estar cumplimentado -->
861
+ <simpleType name="MostrarSistemaInformaticoType">
862
+ <restriction base="string">
863
+ <enumeration value="S"/>
864
+ <enumeration value="N"/>
865
+ </restriction>
866
+ </simpleType>
867
+ <!--Indicador de la cosulta que especifica si se quiere recibir en la respuesta el campo NombreRazonEmisor en la información registro se facturacion. Si el Valor es S aumenta el tiempo de respuesta en la cosulta por detinatario -->
868
+ <simpleType name="MostrarNombreRazonEmisorType">
869
+ <restriction base="string">
870
+ <enumeration value="S"/>
871
+ <enumeration value="N"/>
872
+ </restriction>
873
+ </simpleType>
874
+ <simpleType name="GeneradoPorType">
875
+ <restriction base="string">
876
+ <enumeration value="E">
877
+ <annotation>
878
+ <documentation xml:lang="es">Expedidor (obligado a Expedir la factura anulada).</documentation>
879
+ </annotation>
880
+ </enumeration>
881
+ <enumeration value="D">
882
+ <annotation>
883
+ <documentation xml:lang="es">Destinatario</documentation>
884
+ </annotation>
885
+ </enumeration>
886
+ <enumeration value="T">
887
+ <annotation>
888
+ <documentation xml:lang="es">Tercero</documentation>
889
+ </annotation>
890
+ </enumeration>
891
+ </restriction>
892
+ </simpleType>
893
+ <!-- Tipo de identificador fiscal de persona Física o jurídica -->
894
+ <simpleType name="PersonaFisicaJuridicaIDTypeType">
895
+ <restriction base="string">
896
+ <enumeration value="02">
897
+ <annotation>
898
+ <documentation xml:lang="es">NIF-IVA</documentation>
899
+ </annotation>
900
+ </enumeration>
901
+ <enumeration value="03">
902
+ <annotation>
903
+ <documentation xml:lang="es">Pasaporte</documentation>
904
+ </annotation>
905
+ </enumeration>
906
+ <enumeration value="04">
907
+ <annotation>
908
+ <documentation xml:lang="es">IDEnPaisResidencia</documentation>
909
+ </annotation>
910
+ </enumeration>
911
+ <enumeration value="05">
912
+ <annotation>
913
+ <documentation xml:lang="es">Certificado Residencia</documentation>
914
+ </annotation>
915
+ </enumeration>
916
+ <enumeration value="06">
917
+ <annotation>
918
+ <documentation xml:lang="es">Otro documento Probatorio</documentation>
919
+ </annotation>
920
+ </enumeration>
921
+ <enumeration value="07">
922
+ <annotation>
923
+ <documentation xml:lang="es">No Censado</documentation>
924
+ </annotation>
925
+ </enumeration>
926
+ </restriction>
927
+ </simpleType>
928
+ <!-- Tipo Hash -->
929
+ <simpleType name="TipoHuellaType">
930
+ <restriction base="string">
931
+ <enumeration value="01">
932
+ <annotation>
933
+ <documentation xml:lang="es">SHA-256</documentation>
934
+ </annotation>
935
+ </enumeration>
936
+ </restriction>
937
+ </simpleType>
938
+ <!-- CLAVE QUE IDENTIFICARÁ EL TIPO DE RÉGIMEN DEL IVA/IGIC
939
+ -->
940
+ <simpleType name="IdOperacionesTrascendenciaTributariaType">
941
+ <restriction base="string">
942
+ <enumeration value="01"/>
943
+ <enumeration value="02"/>
944
+ <enumeration value="03"/>
945
+ <enumeration value="04"/>
946
+ <enumeration value="05"/>
947
+ <enumeration value="06"/>
948
+ <enumeration value="07"/>
949
+ <enumeration value="08"/>
950
+ <enumeration value="09"/>
951
+ <enumeration value="10"/>
952
+ <enumeration value="11"/>
953
+ <enumeration value="14"/>
954
+ <enumeration value="15"/>
955
+ <enumeration value="17"/>
956
+ <enumeration value="18"/>
957
+ <enumeration value="19"/>
958
+ <enumeration value="20"/>
959
+ <enumeration value="21"/>
960
+ </restriction>
961
+ </simpleType>
962
+ <!-- ISO 3166-1 alpha-2 codes -->
963
+ <simpleType name="CountryType2">
964
+ <restriction base="string">
965
+ <enumeration value="AF"/>
966
+ <enumeration value="AL"/>
967
+ <enumeration value="DE"/>
968
+ <enumeration value="AD"/>
969
+ <enumeration value="AO"/>
970
+ <enumeration value="AI"/>
971
+ <enumeration value="AQ"/>
972
+ <enumeration value="AG"/>
973
+ <enumeration value="SA"/>
974
+ <enumeration value="DZ"/>
975
+ <enumeration value="AR"/>
976
+ <enumeration value="AM"/>
977
+ <enumeration value="AW"/>
978
+ <enumeration value="AU"/>
979
+ <enumeration value="AT"/>
980
+ <enumeration value="AZ"/>
981
+ <enumeration value="BS"/>
982
+ <enumeration value="BH"/>
983
+ <enumeration value="BD"/>
984
+ <enumeration value="BB"/>
985
+ <enumeration value="BE"/>
986
+ <enumeration value="BZ"/>
987
+ <enumeration value="BJ"/>
988
+ <enumeration value="BM"/>
989
+ <enumeration value="BY"/>
990
+ <enumeration value="BO"/>
991
+ <enumeration value="BA"/>
992
+ <enumeration value="BW"/>
993
+ <enumeration value="BV"/>
994
+ <enumeration value="BR"/>
995
+ <enumeration value="BN"/>
996
+ <enumeration value="BG"/>
997
+ <enumeration value="BF"/>
998
+ <enumeration value="BI"/>
999
+ <enumeration value="BT"/>
1000
+ <enumeration value="CV"/>
1001
+ <enumeration value="KY"/>
1002
+ <enumeration value="KH"/>
1003
+ <enumeration value="CM"/>
1004
+ <enumeration value="CA"/>
1005
+ <enumeration value="CF"/>
1006
+ <enumeration value="CC"/>
1007
+ <enumeration value="CO"/>
1008
+ <enumeration value="KM"/>
1009
+ <enumeration value="CG"/>
1010
+ <enumeration value="CD"/>
1011
+ <enumeration value="CK"/>
1012
+ <enumeration value="KP"/>
1013
+ <enumeration value="KR"/>
1014
+ <enumeration value="CI"/>
1015
+ <enumeration value="CR"/>
1016
+ <enumeration value="HR"/>
1017
+ <enumeration value="CU"/>
1018
+ <enumeration value="TD"/>
1019
+ <enumeration value="CZ"/>
1020
+ <enumeration value="CL"/>
1021
+ <enumeration value="CN"/>
1022
+ <enumeration value="CY"/>
1023
+ <enumeration value="CW"/>
1024
+ <enumeration value="DK"/>
1025
+ <enumeration value="DM"/>
1026
+ <enumeration value="DO"/>
1027
+ <enumeration value="EC"/>
1028
+ <enumeration value="EG"/>
1029
+ <enumeration value="AE"/>
1030
+ <enumeration value="ER"/>
1031
+ <enumeration value="SK"/>
1032
+ <enumeration value="SI"/>
1033
+ <enumeration value="ES"/>
1034
+ <enumeration value="US"/>
1035
+ <enumeration value="EE"/>
1036
+ <enumeration value="ET"/>
1037
+ <enumeration value="FO"/>
1038
+ <enumeration value="PH"/>
1039
+ <enumeration value="FI"/>
1040
+ <enumeration value="FJ"/>
1041
+ <enumeration value="FR"/>
1042
+ <enumeration value="GA"/>
1043
+ <enumeration value="GM"/>
1044
+ <enumeration value="GE"/>
1045
+ <enumeration value="GS"/>
1046
+ <enumeration value="GH"/>
1047
+ <enumeration value="GI"/>
1048
+ <enumeration value="GD"/>
1049
+ <enumeration value="GR"/>
1050
+ <enumeration value="GL"/>
1051
+ <enumeration value="GU"/>
1052
+ <enumeration value="GT"/>
1053
+ <enumeration value="GG"/>
1054
+ <enumeration value="GN"/>
1055
+ <enumeration value="GQ"/>
1056
+ <enumeration value="GW"/>
1057
+ <enumeration value="GY"/>
1058
+ <enumeration value="HT"/>
1059
+ <enumeration value="HM"/>
1060
+ <enumeration value="HN"/>
1061
+ <enumeration value="HK"/>
1062
+ <enumeration value="HU"/>
1063
+ <enumeration value="IN"/>
1064
+ <enumeration value="ID"/>
1065
+ <enumeration value="IR"/>
1066
+ <enumeration value="IQ"/>
1067
+ <enumeration value="IE"/>
1068
+ <enumeration value="IM"/>
1069
+ <enumeration value="IS"/>
1070
+ <enumeration value="IL"/>
1071
+ <enumeration value="IT"/>
1072
+ <enumeration value="JM"/>
1073
+ <enumeration value="JP"/>
1074
+ <enumeration value="JE"/>
1075
+ <enumeration value="JO"/>
1076
+ <enumeration value="KZ"/>
1077
+ <enumeration value="KE"/>
1078
+ <enumeration value="KG"/>
1079
+ <enumeration value="KI"/>
1080
+ <enumeration value="KW"/>
1081
+ <enumeration value="LA"/>
1082
+ <enumeration value="LS"/>
1083
+ <enumeration value="LV"/>
1084
+ <enumeration value="LB"/>
1085
+ <enumeration value="LR"/>
1086
+ <enumeration value="LY"/>
1087
+ <enumeration value="LI"/>
1088
+ <enumeration value="LT"/>
1089
+ <enumeration value="LU"/>
1090
+ <enumeration value="XG"/>
1091
+ <enumeration value="MO"/>
1092
+ <enumeration value="MK"/>
1093
+ <enumeration value="MG"/>
1094
+ <enumeration value="MY"/>
1095
+ <enumeration value="MW"/>
1096
+ <enumeration value="MV"/>
1097
+ <enumeration value="ML"/>
1098
+ <enumeration value="MT"/>
1099
+ <enumeration value="FK"/>
1100
+ <enumeration value="MP"/>
1101
+ <enumeration value="MA"/>
1102
+ <enumeration value="MH"/>
1103
+ <enumeration value="MU"/>
1104
+ <enumeration value="MR"/>
1105
+ <enumeration value="YT"/>
1106
+ <enumeration value="UM"/>
1107
+ <enumeration value="MX"/>
1108
+ <enumeration value="FM"/>
1109
+ <enumeration value="MD"/>
1110
+ <enumeration value="MC"/>
1111
+ <enumeration value="MN"/>
1112
+ <enumeration value="ME"/>
1113
+ <enumeration value="MS"/>
1114
+ <enumeration value="MZ"/>
1115
+ <enumeration value="MM"/>
1116
+ <enumeration value="NA"/>
1117
+ <enumeration value="NR"/>
1118
+ <enumeration value="CX"/>
1119
+ <enumeration value="NP"/>
1120
+ <enumeration value="NI"/>
1121
+ <enumeration value="NE"/>
1122
+ <enumeration value="NG"/>
1123
+ <enumeration value="NU"/>
1124
+ <enumeration value="NF"/>
1125
+ <enumeration value="NO"/>
1126
+ <enumeration value="NC"/>
1127
+ <enumeration value="NZ"/>
1128
+ <enumeration value="IO"/>
1129
+ <enumeration value="OM"/>
1130
+ <enumeration value="NL"/>
1131
+ <enumeration value="BQ"/>
1132
+ <enumeration value="PK"/>
1133
+ <enumeration value="PW"/>
1134
+ <enumeration value="PA"/>
1135
+ <enumeration value="PG"/>
1136
+ <enumeration value="PY"/>
1137
+ <enumeration value="PE"/>
1138
+ <enumeration value="PN"/>
1139
+ <enumeration value="PF"/>
1140
+ <enumeration value="PL"/>
1141
+ <enumeration value="PT"/>
1142
+ <enumeration value="PR"/>
1143
+ <enumeration value="QA"/>
1144
+ <enumeration value="GB"/>
1145
+ <enumeration value="RW"/>
1146
+ <enumeration value="RO"/>
1147
+ <enumeration value="RU"/>
1148
+ <enumeration value="RE"/>
1149
+ <enumeration value="SB"/>
1150
+ <enumeration value="SV"/>
1151
+ <enumeration value="WS"/>
1152
+ <enumeration value="AS"/>
1153
+ <enumeration value="KN"/>
1154
+ <enumeration value="SM"/>
1155
+ <enumeration value="SX"/>
1156
+ <enumeration value="PM"/>
1157
+ <enumeration value="VC"/>
1158
+ <enumeration value="SH"/>
1159
+ <enumeration value="LC"/>
1160
+ <enumeration value="ST"/>
1161
+ <enumeration value="SN"/>
1162
+ <enumeration value="RS"/>
1163
+ <enumeration value="SC"/>
1164
+ <enumeration value="SL"/>
1165
+ <enumeration value="SG"/>
1166
+ <enumeration value="SY"/>
1167
+ <enumeration value="SO"/>
1168
+ <enumeration value="LK"/>
1169
+ <enumeration value="SZ"/>
1170
+ <enumeration value="ZA"/>
1171
+ <enumeration value="SD"/>
1172
+ <enumeration value="SS"/>
1173
+ <enumeration value="SE"/>
1174
+ <enumeration value="CH"/>
1175
+ <enumeration value="SR"/>
1176
+ <enumeration value="TH"/>
1177
+ <enumeration value="TW"/>
1178
+ <enumeration value="TZ"/>
1179
+ <enumeration value="TJ"/>
1180
+ <enumeration value="PS"/>
1181
+ <enumeration value="TF"/>
1182
+ <enumeration value="TL"/>
1183
+ <enumeration value="TG"/>
1184
+ <enumeration value="TK"/>
1185
+ <enumeration value="TO"/>
1186
+ <enumeration value="TT"/>
1187
+ <enumeration value="TN"/>
1188
+ <enumeration value="TC"/>
1189
+ <enumeration value="TM"/>
1190
+ <enumeration value="TR"/>
1191
+ <enumeration value="TV"/>
1192
+ <enumeration value="UA"/>
1193
+ <enumeration value="UG"/>
1194
+ <enumeration value="UY"/>
1195
+ <enumeration value="UZ"/>
1196
+ <enumeration value="VU"/>
1197
+ <enumeration value="VA"/>
1198
+ <enumeration value="VE"/>
1199
+ <enumeration value="VN"/>
1200
+ <enumeration value="VG"/>
1201
+ <enumeration value="VI"/>
1202
+ <enumeration value="WF"/>
1203
+ <enumeration value="YE"/>
1204
+ <enumeration value="DJ"/>
1205
+ <enumeration value="ZM"/>
1206
+ <enumeration value="ZW"/>
1207
+ <enumeration value="QU"/>
1208
+ <enumeration value="XB"/>
1209
+ <enumeration value="XU"/>
1210
+ <enumeration value="XN"/>
1211
+ </restriction>
1212
+ </simpleType>
1213
+ <!-- Estado del registro duplicado almacenado en el sistema -->
1214
+ <simpleType name="EstadoRegistroSFType">
1215
+ <restriction base="string">
1216
+ <enumeration value="Correcta">
1217
+ <annotation>
1218
+ <documentation xml:lang="es">El registro se ha almacenado sin errores</documentation>
1219
+ </annotation>
1220
+ </enumeration>
1221
+ <enumeration value="AceptadaConErrores">
1222
+ <annotation>
1223
+ <documentation xml:lang="es">El registro que se ha almacenado tiene algunos errores. Ver detalle del error</documentation>
1224
+ </annotation>
1225
+ </enumeration>
1226
+ <enumeration value="Anulada">
1227
+ <annotation>
1228
+ <documentation xml:lang="es">El registro almacenado ha sido anulado</documentation>
1229
+ </annotation>
1230
+ </enumeration>
1231
+ </restriction>
1232
+ </simpleType>
1233
+ <simpleType name="ErrorDetalleType">
1234
+ <restriction base="integer"/>
1235
+ </simpleType>
1236
+ <simpleType name="CalificacionOperacionType">
1237
+ <restriction base="string">
1238
+ <enumeration value="S1">
1239
+ <annotation>
1240
+ <documentation xml:lang="es"> OPERACIÓN SUJETA Y NO EXENTA - SIN INVERSIÓN DEL SUJETO PASIVO.</documentation>
1241
+ </annotation>
1242
+ </enumeration>
1243
+ <enumeration value="S2">
1244
+ <annotation>
1245
+ <documentation xml:lang="es">OPERACIÓN SUJETA Y NO EXENTA - CON INVERSIÓN DEL SUJETO PASIVO</documentation>
1246
+ </annotation>
1247
+ </enumeration>
1248
+ <enumeration value="N1">
1249
+ <annotation>
1250
+ <documentation xml:lang="es">OPERACIÓN NO SUJETA ARTÍCULO 7, 14, OTROS.</documentation>
1251
+ </annotation>
1252
+ </enumeration>
1253
+ <enumeration value="N2">
1254
+ <annotation>
1255
+ <documentation xml:lang="es">OPERACIÓN NO SUJETA POR REGLAS DE LOCALIZACIÓN</documentation>
1256
+ </annotation>
1257
+ </enumeration>
1258
+ </restriction>
1259
+ </simpleType>
1260
+ <!-- Lineas de detalle del desglose -->
1261
+ <complexType name="DesgloseType">
1262
+ <sequence>
1263
+ <element name="DetalleDesglose" type="sf:DetalleType" maxOccurs="12"/>
1264
+ </sequence>
1265
+ </complexType>
1266
+ <simpleType name="SiNoType">
1267
+ <restriction base="string">
1268
+ <enumeration value="S"/>
1269
+ <enumeration value="N"/>
1270
+ </restriction>
1271
+ </simpleType>
1272
+ <complexType name="ContraparteConsultaType">
1273
+ <annotation>
1274
+ <documentation xml:lang="es">Datos de una persona física o jurídica Española o Extranjera</documentation>
1275
+ </annotation>
1276
+ <sequence>
1277
+ <element name="NombreRazon" type="sf:TextMax120Type"/>
1278
+ <choice>
1279
+ <element name="NIF" type="sf:NIFType"/>
1280
+ <element name="IDOtro" type="sf:IDOtroType"/>
1281
+ </choice>
1282
+ </sequence>
1283
+ </complexType>
1284
+ <complexType name="CabeceraConsultaSf">
1285
+ <annotation>
1286
+ <documentation xml:lang="es"> Cabecera de la Cobnsulta </documentation>
1287
+ </annotation>
1288
+ <sequence>
1289
+ <element name="IDVersion" type="sf:VersionType"/>
1290
+ <choice>
1291
+ <element name="ObligadoEmision" type="sf:ObligadoEmisionConsultaType" minOccurs="0">
1292
+ <annotation>
1293
+ <documentation xml:lang="es"> Obligado a la emision de los registros de facturacion </documentation>
1294
+ </annotation>
1295
+ </element>
1296
+ <element name="Destinatario" type="sf:PersonaFisicaJuridicaESType" minOccurs="0">
1297
+ <annotation>
1298
+ <documentation xml:lang="es"> Destinatario (a veces también denominado contraparte, es decir, el cliente) de la operación </documentation>
1299
+ </annotation>
1300
+ </element>
1301
+ </choice>
1302
+ <element name="IndicadorRepresentante" type="sf:IndicadorRepresentanteType" minOccurs="0">
1303
+ <annotation>
1304
+ <documentation xml:lang="es"> Flag opcional que tendrá valor S si quien realiza la cosulta es el representante/asesor del obligado tributario. Permite, a quien realiza la cosulta, obtener los registros de facturación en los que figura como representante. Este flag solo se puede cumplimentar cuando esté informado el obligado tributario en la consulta </documentation>
1305
+ </annotation>
1306
+ </element>
1307
+ </sequence>
1308
+ </complexType>
1309
+ <!-- Obligado a la emision consulta -->
1310
+ <complexType name="ObligadoEmisionConsultaType">
1311
+ <annotation>
1312
+ <documentation xml:lang="es">Datos de una persona física o jurídica Española con un NIF asociado</documentation>
1313
+ </annotation>
1314
+ <sequence>
1315
+ <element name="NombreRazon" type="sf:TextMax120Type"/>
1316
+ <element name="NIF" type="sf:NIFType"/>
1317
+ </sequence>
1318
+ </complexType>
1319
+ <!-- Obligado a la gerneracion de la anulacion -->
1320
+ <complexType name="ObligadoGeneracionType">
1321
+ <sequence>
1322
+ <element name="NombreRazon" type="sf:TextMax120Type"/>
1323
+ <element name="NIF" type="sf:NIFType"/>
1324
+ </sequence>
1325
+ </complexType>
1326
+ <simpleType name="Numerico4Type">
1327
+ <restriction base="string">
1328
+ <pattern value="\d{1,4}"/>
1329
+ </restriction>
1330
+ </simpleType>
1331
+ <!-- Minoración de la base imponible por la concesión de cupones, bonificaciones o descuentos cuando solo se expide el original de la factura -->
1332
+ <simpleType name="CuponType">
1333
+ <restriction base="string">
1334
+ <enumeration value="S"/>
1335
+ <enumeration value="N"/>
1336
+ </restriction>
1337
+ </simpleType>
1338
+ <simpleType name="IndicadorRepresentanteType">
1339
+ <restriction base="string">
1340
+ <enumeration value="S"/>
1341
+ </restriction>
1342
+ </simpleType>
1343
+ <simpleType name="ImpuestoType">
1344
+ <restriction base="string">
1345
+ <enumeration value="01">
1346
+ <annotation>
1347
+ <documentation xml:lang="es"> Impuesto sobre el Valor Añadido (IVA)</documentation>
1348
+ </annotation>
1349
+ </enumeration>
1350
+ <enumeration value="02">
1351
+ <annotation>
1352
+ <documentation xml:lang="es">Impuesto sobre la Producción, los Servicios y la Importación (IPSI) de Ceuta y Melilla</documentation>
1353
+ </annotation>
1354
+ </enumeration>
1355
+ <enumeration value="03">
1356
+ <annotation>
1357
+ <documentation xml:lang="es">Impuesto General Indirecto Canario (IGIC)</documentation>
1358
+ </annotation>
1359
+ </enumeration>
1360
+ <enumeration value="05">
1361
+ <annotation>
1362
+ <documentation xml:lang="es">Otros</documentation>
1363
+ </annotation>
1364
+ </enumeration>
1365
+ </restriction>
1366
+ </simpleType>
1367
+ <!--Información de la operación realizada que se devuelve como respuesta al envío de un registro de facturación -->
1368
+ <complexType name="OperacionType">
1369
+ <sequence>
1370
+ <element name="TipoOperacion" type="sf:TipoOperacionType"/>
1371
+ <element name="Subsanacion" type="sf:SubsanacionType" minOccurs="0"/>
1372
+ <element name="RechazoPrevio" type="sf:RechazoPrevioType" minOccurs="0"/>
1373
+ <element name="SinRegistroPrevio" type="sf:SinRegistroPrevioType" minOccurs="0"/>
1374
+ </sequence>
1375
+ </complexType>
1376
+ <simpleType name="TipoOperacionType">
1377
+ <restriction base="string">
1378
+ <enumeration value="Alta">
1379
+ <annotation>
1380
+ <documentation xml:lang="es">La operación realizada ha sido un alta</documentation>
1381
+ </annotation>
1382
+ </enumeration>
1383
+ <enumeration value="Anulacion">
1384
+ <annotation>
1385
+ <documentation xml:lang="es">La operación realizada ha sido una anulación</documentation>
1386
+ </annotation>
1387
+ </enumeration>
1388
+ </restriction>
1389
+ </simpleType>
1390
+ </schema>