cfdi40 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/README_es-MX.md +18 -1
- data/lib/cfdi40/comprobante.rb +36 -12
- data/lib/cfdi40/concepto.rb +22 -24
- data/lib/cfdi40/impuestos.rb +2 -2
- data/lib/cfdi40/traslado.rb +2 -2
- data/lib/cfdi40/version.rb +1 -1
- data/lib/xsd/Pagos20.xsd +539 -0
- data/lib/xsd/TimbreFiscalDigitalv11.xsd +83 -0
- data/lib/xsd/catPagos.xsd +9 -0
- data/lib/xsd/cfdv40.xsd +2 -0
- data/lib/xslt/ComercioExterior11.xslt +181 -0
- data/lib/xslt/cadenaoriginal_TFD_1_1.xslt +47 -0
- data/lib/xslt/ecc12.xslt +99 -0
- data/lib/xslt/ine11.xslt +51 -30
- data/lib/xslt/ventavehiculos11.xslt +53 -0
- metadata +9 -2
data/lib/xsd/cfdv40.xsd
CHANGED
@@ -8,6 +8,8 @@
|
|
8
8
|
<xs:import namespace="http://www.sat.gob.mx/sitio_internet/cfd/catalogos" schemaLocation="catCFDI.xsd"/>
|
9
9
|
<xs:import namespace="http://www.sat.gob.mx/sitio_internet/cfd/tipoDatos/tdCFDI" schemaLocation="tdCFDI.xsd"/>
|
10
10
|
<xs:import namespace="http://www.sat.gob.mx/iedu" schemaLocation="iedu.xsd"/>
|
11
|
+
<xs:import namespace="http://www.sat.gob.mx/Pagos20" schemaLocation="Pagos20.xsd"/>
|
12
|
+
<xs:import namespace="http://www.sat.gob.mx/TimbreFiscalDigital" schemaLocation="TimbreFiscalDigitalv11.xsd"/>
|
11
13
|
|
12
14
|
<xs:element name="Comprobante">
|
13
15
|
<xs:annotation>
|
@@ -0,0 +1,181 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:cce11="http://www.sat.gob.mx/ComercioExterior11">
|
3
|
+
|
4
|
+
<xsl:template match="cce11:ComercioExterior">
|
5
|
+
<!--Manejador de nodos tipo ComercioExterior-->
|
6
|
+
<xsl:call-template name="Requerido">
|
7
|
+
<xsl:with-param name="valor" select="./@Version" />
|
8
|
+
</xsl:call-template>
|
9
|
+
<xsl:call-template name="Opcional">
|
10
|
+
<xsl:with-param name="valor" select="./@MotivoTraslado" />
|
11
|
+
</xsl:call-template>
|
12
|
+
<xsl:call-template name="Requerido">
|
13
|
+
<xsl:with-param name="valor" select="./@TipoOperacion" />
|
14
|
+
</xsl:call-template>
|
15
|
+
<xsl:call-template name="Opcional">
|
16
|
+
<xsl:with-param name="valor" select="./@ClaveDePedimento" />
|
17
|
+
</xsl:call-template>
|
18
|
+
<xsl:call-template name="Opcional">
|
19
|
+
<xsl:with-param name="valor" select="./@CertificadoOrigen" />
|
20
|
+
</xsl:call-template>
|
21
|
+
<xsl:call-template name="Opcional">
|
22
|
+
<xsl:with-param name="valor" select="./@NumCertificadoOrigen" />
|
23
|
+
</xsl:call-template>
|
24
|
+
<xsl:call-template name="Opcional">
|
25
|
+
<xsl:with-param name="valor" select="./@NumeroExportadorConfiable" />
|
26
|
+
</xsl:call-template>
|
27
|
+
<xsl:call-template name="Opcional">
|
28
|
+
<xsl:with-param name="valor" select="./@Incoterm" />
|
29
|
+
</xsl:call-template>
|
30
|
+
<xsl:call-template name="Opcional">
|
31
|
+
<xsl:with-param name="valor" select="./@Subdivision" />
|
32
|
+
</xsl:call-template>
|
33
|
+
<xsl:call-template name="Opcional">
|
34
|
+
<xsl:with-param name="valor" select="./@Observaciones" />
|
35
|
+
</xsl:call-template>
|
36
|
+
<xsl:call-template name="Opcional">
|
37
|
+
<xsl:with-param name="valor" select="./@TipoCambioUSD" />
|
38
|
+
</xsl:call-template>
|
39
|
+
<xsl:call-template name="Opcional">
|
40
|
+
<xsl:with-param name="valor" select="./@TotalUSD" />
|
41
|
+
</xsl:call-template>
|
42
|
+
|
43
|
+
<!-- Iniciamos el manejo de los elementos hijo en la secuencia -->
|
44
|
+
<xsl:apply-templates select="./cce11:Emisor" />
|
45
|
+
<xsl:for-each select="./cce11:Propietario">
|
46
|
+
<xsl:apply-templates select="."/>
|
47
|
+
</xsl:for-each>
|
48
|
+
<xsl:apply-templates select="./cce11:Receptor" />
|
49
|
+
<xsl:for-each select="./cce11:Destinatario">
|
50
|
+
<xsl:apply-templates select="."/>
|
51
|
+
</xsl:for-each>
|
52
|
+
<xsl:apply-templates select="./cce11:Mercancias" />
|
53
|
+
</xsl:template>
|
54
|
+
|
55
|
+
<xsl:template match="cce11:Emisor">
|
56
|
+
<!-- Iniciamos el tratamiento de los atributos de cce11:Emisor-->
|
57
|
+
<xsl:call-template name="Opcional">
|
58
|
+
<xsl:with-param name="valor" select="./@Curp" />
|
59
|
+
</xsl:call-template>
|
60
|
+
|
61
|
+
<xsl:apply-templates select="./cce11:Domicilio" />
|
62
|
+
|
63
|
+
</xsl:template>
|
64
|
+
|
65
|
+
<xsl:template match="cce11:Propietario">
|
66
|
+
<!-- Tratamiento de los atributos de cce11:Propietario-->
|
67
|
+
|
68
|
+
<xsl:call-template name="Requerido">
|
69
|
+
<xsl:with-param name="valor" select="./@NumRegIdTrib" />
|
70
|
+
</xsl:call-template>
|
71
|
+
<xsl:call-template name="Requerido">
|
72
|
+
<xsl:with-param name="valor" select="./@ResidenciaFiscal" />
|
73
|
+
</xsl:call-template>
|
74
|
+
|
75
|
+
</xsl:template>
|
76
|
+
|
77
|
+
<xsl:template match="cce11:Receptor">
|
78
|
+
<!-- Tratamiento de los atributos de cce11:Receptor-->
|
79
|
+
|
80
|
+
<xsl:call-template name="Opcional">
|
81
|
+
<xsl:with-param name="valor" select="./@NumRegIdTrib" />
|
82
|
+
</xsl:call-template>
|
83
|
+
<xsl:apply-templates select="./cce11:Domicilio" />
|
84
|
+
|
85
|
+
</xsl:template>
|
86
|
+
|
87
|
+
<xsl:template match="cce11:Destinatario">
|
88
|
+
<!-- Tratamiento de los atributos de cce11:Destinatario-->
|
89
|
+
<xsl:call-template name="Opcional">
|
90
|
+
<xsl:with-param name="valor" select="./@NumRegIdTrib" />
|
91
|
+
</xsl:call-template>
|
92
|
+
<xsl:call-template name="Opcional">
|
93
|
+
<xsl:with-param name="valor" select="./@Nombre" />
|
94
|
+
</xsl:call-template>
|
95
|
+
<!-- Manejo de los nodos dependientes -->
|
96
|
+
<xsl:for-each select="./cce11:Domicilio">
|
97
|
+
<xsl:apply-templates select="."/>
|
98
|
+
</xsl:for-each>
|
99
|
+
</xsl:template>
|
100
|
+
|
101
|
+
<xsl:template match="cce11:Mercancias">
|
102
|
+
<!-- Iniciamos el manejo de los nodos dependientes -->
|
103
|
+
<xsl:for-each select="./cce11:Mercancia">
|
104
|
+
<xsl:apply-templates select="."/>
|
105
|
+
</xsl:for-each>
|
106
|
+
</xsl:template>
|
107
|
+
|
108
|
+
<xsl:template match="cce11:Domicilio">
|
109
|
+
<!-- Iniciamos el tratamiento de los atributos de cce11:Domicilio-->
|
110
|
+
<xsl:call-template name="Requerido">
|
111
|
+
<xsl:with-param name="valor" select="./@Calle" />
|
112
|
+
</xsl:call-template>
|
113
|
+
<xsl:call-template name="Opcional">
|
114
|
+
<xsl:with-param name="valor" select="./@NumeroExterior" />
|
115
|
+
</xsl:call-template>
|
116
|
+
<xsl:call-template name="Opcional">
|
117
|
+
<xsl:with-param name="valor" select="./@NumeroInterior" />
|
118
|
+
</xsl:call-template>
|
119
|
+
<xsl:call-template name="Opcional">
|
120
|
+
<xsl:with-param name="valor" select="./@Colonia" />
|
121
|
+
</xsl:call-template>
|
122
|
+
<xsl:call-template name="Opcional">
|
123
|
+
<xsl:with-param name="valor" select="./@Localidad" />
|
124
|
+
</xsl:call-template>
|
125
|
+
<xsl:call-template name="Opcional">
|
126
|
+
<xsl:with-param name="valor" select="./@Referencia" />
|
127
|
+
</xsl:call-template>
|
128
|
+
<xsl:call-template name="Opcional">
|
129
|
+
<xsl:with-param name="valor" select="./@Municipio" />
|
130
|
+
</xsl:call-template>
|
131
|
+
<xsl:call-template name="Requerido">
|
132
|
+
<xsl:with-param name="valor" select="./@Estado" />
|
133
|
+
</xsl:call-template>
|
134
|
+
<xsl:call-template name="Requerido">
|
135
|
+
<xsl:with-param name="valor" select="./@Pais" />
|
136
|
+
</xsl:call-template>
|
137
|
+
<xsl:call-template name="Requerido">
|
138
|
+
<xsl:with-param name="valor" select="./@CodigoPostal" />
|
139
|
+
</xsl:call-template>
|
140
|
+
</xsl:template>
|
141
|
+
|
142
|
+
<xsl:template match="cce11:Mercancia">
|
143
|
+
<xsl:call-template name="Requerido">
|
144
|
+
<xsl:with-param name="valor" select="./@NoIdentificacion" />
|
145
|
+
</xsl:call-template>
|
146
|
+
<xsl:call-template name="Opcional">
|
147
|
+
<xsl:with-param name="valor" select="./@FraccionArancelaria" />
|
148
|
+
</xsl:call-template>
|
149
|
+
<xsl:call-template name="Opcional">
|
150
|
+
<xsl:with-param name="valor" select="./@CantidadAduana" />
|
151
|
+
</xsl:call-template>
|
152
|
+
<xsl:call-template name="Opcional">
|
153
|
+
<xsl:with-param name="valor" select="./@UnidadAduana" />
|
154
|
+
</xsl:call-template>
|
155
|
+
<xsl:call-template name="Opcional">
|
156
|
+
<xsl:with-param name="valor" select="./@ValorUnitarioAduana" />
|
157
|
+
</xsl:call-template>
|
158
|
+
<xsl:call-template name="Requerido">
|
159
|
+
<xsl:with-param name="valor" select="./@ValorDolares" />
|
160
|
+
</xsl:call-template>
|
161
|
+
<xsl:for-each select="./cce11:DescripcionesEspecificas">
|
162
|
+
<xsl:apply-templates select="."/>
|
163
|
+
</xsl:for-each>
|
164
|
+
</xsl:template>
|
165
|
+
|
166
|
+
<xsl:template match="cce11:DescripcionesEspecificas">
|
167
|
+
<xsl:call-template name="Requerido">
|
168
|
+
<xsl:with-param name="valor" select="./@Marca" />
|
169
|
+
</xsl:call-template>
|
170
|
+
<xsl:call-template name="Opcional">
|
171
|
+
<xsl:with-param name="valor" select="./@Modelo" />
|
172
|
+
</xsl:call-template>
|
173
|
+
<xsl:call-template name="Opcional">
|
174
|
+
<xsl:with-param name="valor" select="./@SubModelo" />
|
175
|
+
</xsl:call-template>
|
176
|
+
<xsl:call-template name="Opcional">
|
177
|
+
<xsl:with-param name="valor" select="./@NumeroSerie" />
|
178
|
+
</xsl:call-template>
|
179
|
+
</xsl:template>
|
180
|
+
|
181
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:tfd="http://www.sat.gob.mx/TimbreFiscalDigital">
|
3
|
+
<!-- Con el siguiente método se establece que la salida deberá ser en texto -->
|
4
|
+
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>
|
5
|
+
<xsl:template name="Requerido">
|
6
|
+
<xsl:param name="valor"/>|<xsl:call-template name="ManejaEspacios">
|
7
|
+
<xsl:with-param name="s" select="$valor"/>
|
8
|
+
</xsl:call-template>
|
9
|
+
</xsl:template>
|
10
|
+
<xsl:template name="Opcional">
|
11
|
+
<xsl:param name="valor"/>
|
12
|
+
<xsl:if test="$valor">|<xsl:call-template name="ManejaEspacios"><xsl:with-param name="s" select="$valor"/></xsl:call-template></xsl:if>
|
13
|
+
</xsl:template>
|
14
|
+
|
15
|
+
<!-- Normalizador de espacios en blanco -->
|
16
|
+
<xsl:template name="ManejaEspacios">
|
17
|
+
<xsl:param name="s"/>
|
18
|
+
<xsl:value-of select="normalize-space(string($s))"/>
|
19
|
+
</xsl:template>
|
20
|
+
<!-- Aquí iniciamos el procesamiento de la cadena original con su | inicial y el terminador || -->
|
21
|
+
<xsl:template match="/">|<xsl:apply-templates select="/tfd:TimbreFiscalDigital"/>||</xsl:template>
|
22
|
+
<!-- Aquí iniciamos el procesamiento de los datos incluidos en el comprobante -->
|
23
|
+
<xsl:template match="tfd:TimbreFiscalDigital">
|
24
|
+
<!-- Iniciamos el tratamiento de los atributos del Timbre-->
|
25
|
+
<xsl:call-template name="Requerido">
|
26
|
+
<xsl:with-param name="valor" select="./@Version"/>
|
27
|
+
</xsl:call-template>
|
28
|
+
<xsl:call-template name="Requerido">
|
29
|
+
<xsl:with-param name="valor" select="./@UUID"/>
|
30
|
+
</xsl:call-template>
|
31
|
+
<xsl:call-template name="Requerido">
|
32
|
+
<xsl:with-param name="valor" select="./@FechaTimbrado"/>
|
33
|
+
</xsl:call-template>
|
34
|
+
<xsl:call-template name="Requerido">
|
35
|
+
<xsl:with-param name="valor" select="./@RfcProvCertif"/>
|
36
|
+
</xsl:call-template>
|
37
|
+
<xsl:call-template name="Opcional">
|
38
|
+
<xsl:with-param name="valor" select="./@Leyenda"/>
|
39
|
+
</xsl:call-template>
|
40
|
+
<xsl:call-template name="Requerido">
|
41
|
+
<xsl:with-param name="valor" select="./@SelloCFD"/>
|
42
|
+
</xsl:call-template>
|
43
|
+
<xsl:call-template name="Requerido">
|
44
|
+
<xsl:with-param name="valor" select="./@NoCertificadoSAT"/>
|
45
|
+
</xsl:call-template>
|
46
|
+
</xsl:template>
|
47
|
+
</xsl:stylesheet>
|
data/lib/xslt/ecc12.xslt
ADDED
@@ -0,0 +1,99 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ecc12="http://www.sat.gob.mx/EstadoDeCuentaCombustible12">
|
3
|
+
|
4
|
+
<xsl:template match="ecc12:EstadoDeCuentaCombustible">
|
5
|
+
<!--Manejador de nodos tipo EstadoDeCuentaCombustible-->
|
6
|
+
<xsl:call-template name="Requerido">
|
7
|
+
<xsl:with-param name="valor" select="./@Version" />
|
8
|
+
</xsl:call-template>
|
9
|
+
<xsl:call-template name="Requerido">
|
10
|
+
<xsl:with-param name="valor" select="./@TipoOperacion" />
|
11
|
+
</xsl:call-template>
|
12
|
+
<xsl:call-template name="Requerido">
|
13
|
+
<xsl:with-param name="valor" select="./@NumeroDeCuenta" />
|
14
|
+
</xsl:call-template>
|
15
|
+
<xsl:call-template name="Requerido">
|
16
|
+
<xsl:with-param name="valor" select="./@SubTotal" />
|
17
|
+
</xsl:call-template>
|
18
|
+
<xsl:call-template name="Requerido">
|
19
|
+
<xsl:with-param name="valor" select="./@Total" />
|
20
|
+
</xsl:call-template>
|
21
|
+
|
22
|
+
<!-- Iniciamos el manejo de los elementos hijo en la secuencia -->
|
23
|
+
<xsl:apply-templates select="./ecc12:Conceptos" />
|
24
|
+
</xsl:template>
|
25
|
+
|
26
|
+
|
27
|
+
<xsl:template match="ecc12:Conceptos">
|
28
|
+
<!-- Iniciamos el tratamiento de los atributos de ecc12:ConceptoEstadoDeCuentaCombustible-->
|
29
|
+
<xsl:for-each select="./ecc12:ConceptoEstadoDeCuentaCombustible">
|
30
|
+
<xsl:apply-templates select="."/>
|
31
|
+
</xsl:for-each>
|
32
|
+
|
33
|
+
</xsl:template>
|
34
|
+
|
35
|
+
<xsl:template match="ecc12:Traslados">
|
36
|
+
<!-- Iniciamos el tratamiento de los atributos de ecc12:Traslado-->
|
37
|
+
<xsl:for-each select="./ecc12:Traslado">
|
38
|
+
<xsl:apply-templates select="."/>
|
39
|
+
</xsl:for-each>
|
40
|
+
</xsl:template>
|
41
|
+
|
42
|
+
|
43
|
+
<!-- Iniciamos el manejo de los elementos hijo en la secuencia ConceptoEstadoDeCuentaCombustible-->
|
44
|
+
<xsl:template match="ecc12:ConceptoEstadoDeCuentaCombustible">
|
45
|
+
<!-- Iniciamos el manejo de los nodos dependientes -->
|
46
|
+
<xsl:call-template name="Requerido">
|
47
|
+
<xsl:with-param name="valor" select="./@Identificador" />
|
48
|
+
</xsl:call-template>
|
49
|
+
<xsl:call-template name="Requerido">
|
50
|
+
<xsl:with-param name="valor" select="./@Fecha" />
|
51
|
+
</xsl:call-template>
|
52
|
+
<xsl:call-template name="Requerido">
|
53
|
+
<xsl:with-param name="valor" select="./@Rfc" />
|
54
|
+
</xsl:call-template>
|
55
|
+
<xsl:call-template name="Requerido">
|
56
|
+
<xsl:with-param name="valor" select="./@ClaveEstacion" />
|
57
|
+
</xsl:call-template>
|
58
|
+
<xsl:call-template name="Requerido">
|
59
|
+
<xsl:with-param name="valor" select="./@Cantidad" />
|
60
|
+
</xsl:call-template>
|
61
|
+
<xsl:call-template name="Requerido">
|
62
|
+
<xsl:with-param name="valor" select="./@TipoCombustible" />
|
63
|
+
</xsl:call-template>
|
64
|
+
<xsl:call-template name="Opcional">
|
65
|
+
<xsl:with-param name="valor" select="./@Unidad" />
|
66
|
+
</xsl:call-template>
|
67
|
+
<xsl:call-template name="Requerido">
|
68
|
+
<xsl:with-param name="valor" select="./@NombreCombustible" />
|
69
|
+
</xsl:call-template>
|
70
|
+
<xsl:call-template name="Requerido">
|
71
|
+
<xsl:with-param name="valor" select="./@FolioOperacion" />
|
72
|
+
</xsl:call-template>
|
73
|
+
<xsl:call-template name="Requerido">
|
74
|
+
<xsl:with-param name="valor" select="./@ValorUnitario" />
|
75
|
+
</xsl:call-template>
|
76
|
+
<xsl:call-template name="Requerido">
|
77
|
+
<xsl:with-param name="valor" select="./@Importe" />
|
78
|
+
</xsl:call-template>
|
79
|
+
|
80
|
+
<!-- Iniciamos el manejo de los elementos hijo en la secuencia -->
|
81
|
+
<xsl:apply-templates select="./ecc12:Traslados" />
|
82
|
+
|
83
|
+
</xsl:template>
|
84
|
+
|
85
|
+
<!-- Iniciamos el manejo de los elementos hijo en la secuencia Traslado-->
|
86
|
+
<xsl:template match="ecc12:Traslado">
|
87
|
+
<xsl:call-template name="Requerido">
|
88
|
+
<xsl:with-param name="valor" select="./@Impuesto" />
|
89
|
+
</xsl:call-template>
|
90
|
+
<xsl:call-template name="Requerido">
|
91
|
+
<xsl:with-param name="valor" select="./@TasaOCuota" />
|
92
|
+
</xsl:call-template>
|
93
|
+
<xsl:call-template name="Requerido">
|
94
|
+
<xsl:with-param name="valor" select="./@Importe" />
|
95
|
+
</xsl:call-template>
|
96
|
+
</xsl:template>
|
97
|
+
|
98
|
+
|
99
|
+
</xsl:stylesheet>
|
data/lib/xslt/ine11.xslt
CHANGED
@@ -1,30 +1,51 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ine="http://www.sat.gob.mx/ine">
|
3
|
+
|
4
|
+
<xsl:template match="ine:INE">
|
5
|
+
<!--Manejador de nodos tipo INE-->
|
6
|
+
<xsl:call-template name="Requerido">
|
7
|
+
<xsl:with-param name="valor" select="./@Version" />
|
8
|
+
</xsl:call-template>
|
9
|
+
<xsl:call-template name="Requerido">
|
10
|
+
<xsl:with-param name="valor" select="./@TipoProceso" />
|
11
|
+
</xsl:call-template>
|
12
|
+
<xsl:call-template name="Opcional">
|
13
|
+
<xsl:with-param name="valor" select="./@TipoComite" />
|
14
|
+
</xsl:call-template>
|
15
|
+
<xsl:call-template name="Opcional">
|
16
|
+
<xsl:with-param name="valor" select="./@IdContabilidad" />
|
17
|
+
</xsl:call-template>
|
18
|
+
|
19
|
+
<!-- Iniciamos el manejo de los elementos hijo en la secuencia -->
|
20
|
+
<xsl:for-each select="./ine:Entidad">
|
21
|
+
<xsl:apply-templates select="."/>
|
22
|
+
</xsl:for-each>
|
23
|
+
</xsl:template>
|
24
|
+
|
25
|
+
<xsl:template match="ine:Entidad">
|
26
|
+
<!--Manejador de nodos tipo Entidad-->
|
27
|
+
<xsl:call-template name="Requerido">
|
28
|
+
<xsl:with-param name="valor" select="./@ClaveEntidad" />
|
29
|
+
</xsl:call-template>
|
30
|
+
<xsl:call-template name="Opcional">
|
31
|
+
<xsl:with-param name="valor" select="./@Ambito" />
|
32
|
+
</xsl:call-template>
|
33
|
+
|
34
|
+
<!-- Iniciamos el tratamiento de los atributos de ine:Contabilidad-->
|
35
|
+
<xsl:for-each select="./ine:Contabilidad">
|
36
|
+
<xsl:apply-templates select="."/>
|
37
|
+
</xsl:for-each>
|
38
|
+
|
39
|
+
</xsl:template>
|
40
|
+
|
41
|
+
<!-- Iniciamos el manejo de los elementos hijo en la secuencia Contabilidad-->
|
42
|
+
<xsl:template match="ine:Contabilidad">
|
43
|
+
<!-- Iniciamos el manejo de los nodos dependientes -->
|
44
|
+
<xsl:call-template name="Requerido">
|
45
|
+
<xsl:with-param name="valor" select="./@IdContabilidad" />
|
46
|
+
</xsl:call-template>
|
47
|
+
</xsl:template>
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
</xsl:stylesheet>
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ventavehiculos="http://www.sat.gob.mx/ventavehiculos">
|
3
|
+
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="no"/>
|
4
|
+
|
5
|
+
<!-- Manejador de nodos tipo VentaVehiculos-->
|
6
|
+
|
7
|
+
<xsl:template match="ventavehiculos:VentaVehiculos">
|
8
|
+
|
9
|
+
<!--Iniciamos el tratamiento de los atributos del complemento concepto VentaVehiculos-->
|
10
|
+
|
11
|
+
<xsl:call-template name="Requerido">
|
12
|
+
<xsl:with-param name="valor" select="./@version"/>
|
13
|
+
</xsl:call-template>
|
14
|
+
|
15
|
+
<xsl:call-template name="Requerido">
|
16
|
+
<xsl:with-param name="valor" select="./@ClaveVehicular"/>
|
17
|
+
</xsl:call-template>
|
18
|
+
|
19
|
+
<xsl:if test="./@version='1.1'">
|
20
|
+
|
21
|
+
<xsl:call-template name="Requerido">
|
22
|
+
<xsl:with-param name="valor" select="./@Niv"/>
|
23
|
+
</xsl:call-template>
|
24
|
+
|
25
|
+
</xsl:if>
|
26
|
+
|
27
|
+
<!-- Manejo de los atributos de la información aduanera del complemento de terceros -->
|
28
|
+
|
29
|
+
<xsl:for-each select=".//ventavehiculos:InformacionAduanera">
|
30
|
+
<xsl:apply-templates select="."/>
|
31
|
+
</xsl:for-each>
|
32
|
+
|
33
|
+
</xsl:template>
|
34
|
+
|
35
|
+
<!-- Manejador de nodos tipo Información Aduanera -->
|
36
|
+
|
37
|
+
<xsl:template match="ventavehiculos:InformacionAduanera">
|
38
|
+
|
39
|
+
<!-- Manejo de los atributos de la información aduanera -->
|
40
|
+
|
41
|
+
<xsl:call-template name="Requerido">
|
42
|
+
<xsl:with-param name="valor" select="./@numero"/>
|
43
|
+
</xsl:call-template>
|
44
|
+
|
45
|
+
<xsl:call-template name="Requerido">
|
46
|
+
<xsl:with-param name="valor" select="./@fecha"/>
|
47
|
+
</xsl:call-template>
|
48
|
+
|
49
|
+
<xsl:call-template name="Opcional">
|
50
|
+
<xsl:with-param name="valor" select="./@aduana"/>
|
51
|
+
</xsl:call-template>
|
52
|
+
</xsl:template>
|
53
|
+
</xsl:stylesheet>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfdi40
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Israel Benítez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -57,18 +57,23 @@ files:
|
|
57
57
|
- lib/cfdi40/traslado.rb
|
58
58
|
- lib/cfdi40/traslados.rb
|
59
59
|
- lib/cfdi40/version.rb
|
60
|
+
- lib/xsd/Pagos20.xsd
|
60
61
|
- lib/xsd/README.md
|
62
|
+
- lib/xsd/TimbreFiscalDigitalv11.xsd
|
61
63
|
- lib/xsd/catCFDI.xsd
|
64
|
+
- lib/xsd/catPagos.xsd
|
62
65
|
- lib/xsd/cfdv40.xsd
|
63
66
|
- lib/xsd/iedu.xsd
|
64
67
|
- lib/xsd/tdCFDI.xsd
|
65
68
|
- lib/xslt/CartaPorte20.xslt
|
69
|
+
- lib/xslt/ComercioExterior11.xslt
|
66
70
|
- lib/xslt/GastosHidrocarburos10.xslt
|
67
71
|
- lib/xslt/IngresosHidrocarburos.xslt
|
68
72
|
- lib/xslt/Pagos20.xslt
|
69
73
|
- lib/xslt/TuristaPasajeroExtranjero.xslt
|
70
74
|
- lib/xslt/aerolineas.xslt
|
71
75
|
- lib/xslt/cadenaoriginal.xslt
|
76
|
+
- lib/xslt/cadenaoriginal_TFD_1_1.xslt
|
72
77
|
- lib/xslt/cadenaoriginal_local.xslt
|
73
78
|
- lib/xslt/certificadodedestruccion.xslt
|
74
79
|
- lib/xslt/cfdiregistrofiscal.xslt
|
@@ -76,6 +81,7 @@ files:
|
|
76
81
|
- lib/xslt/detallista.xslt
|
77
82
|
- lib/xslt/divisas.xslt
|
78
83
|
- lib/xslt/donat11.xslt
|
84
|
+
- lib/xslt/ecc12.xslt
|
79
85
|
- lib/xslt/iedu.xslt
|
80
86
|
- lib/xslt/implocal.xslt
|
81
87
|
- lib/xslt/ine11.xslt
|
@@ -90,6 +96,7 @@ files:
|
|
90
96
|
- lib/xslt/utilerias.xslt
|
91
97
|
- lib/xslt/valesdedespensa.xslt
|
92
98
|
- lib/xslt/vehiculousado.xslt
|
99
|
+
- lib/xslt/ventavehiculos11.xslt
|
93
100
|
- sig/cfdi40.rbs
|
94
101
|
homepage: https://github.com/israelbz/cfdi40
|
95
102
|
licenses:
|