???

1 Introducción

Una factura electrónica es una factura con los mismos efectos legales que una factura en papel, pero que se expide y recibe en formato electrónico. El formato español admitido por la plataforma es Facturae, concretamente las versiones 3.2, 3.2.1 y 3.2.2. Apesar de estar disponible la versión más reciente, 3.2.2, las pruebas y ejemplos que se realizaran aqui, estan sujetos a la versión 3.2.1.

Enlaces

Se puede encontrar màs información sobre la versión 3.2.2 en este enlace e información sobre las versiones anteriores en este enlace.

2 Estructura XML

La factura electrónica sobre la que trabajaremos sigue el esquema XSD proporcionado en este enlace. También se puede encontrar información sobre los campos en este documento PDF.

Axional ERP ya ofrece la forma de gestionar facturas de acuerdo con los estándares. Ahora traduciendo la función cvenfach_print_efactura a lenguaje Ax y con la creación de una plantilla Freemarker basada en el XSD de la versión 3.2.2, podremos montar facturas y obtenerlas firmadas en un mismo sitio.

Un ejemplo de factura-E de versión 3.2.1 és el siguiente.

Enlaces

Puedes descargar la factura v.3.2.1 desde aqui.
Copy
<fe:Facturae xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:fe="http://www.facturae.es/Facturae/2014/v3.2.1/Facturae">
               <FileHeader>
                  <SchemaVersion>3.2.1</SchemaVersion>
                  <Modality>I</Modality>
                  <InvoiceIssuerType>EM</InvoiceIssuerType>
                  <Batch>
                     <BatchIdentifier>B123456741Emit-</BatchIdentifier>
                     <InvoicesCount>1</InvoicesCount>
                     <TotalInvoicesAmount>
                        <TotalAmount>1384.58</TotalAmount>
                     </TotalInvoicesAmount>
                     <TotalOutstandingAmount>
                        <TotalAmount>1384.58</TotalAmount>
                     </TotalOutstandingAmount>
                     <TotalExecutableAmount>
                        <TotalAmount>1384.58</TotalAmount>
                     </TotalExecutableAmount>
                     <InvoiceCurrencyCode>EUR</InvoiceCurrencyCode>
                  </Batch>
               </FileHeader>
               <Parties>
                  <SellerParty>
                     <TaxIdentification>
                        <PersonTypeCode>F</PersonTypeCode>
                        <ResidenceTypeCode>R</ResidenceTypeCode>
                        <TaxIdentificationNumber>12345678Z</TaxIdentificationNumber>
                     </TaxIdentification>
                     <Individual>
                        <Name>Emisor</Name>
                        <FirstSurname>primer_apellido_E</FirstSurname>
                        <SecondSurname>segundo_apellido_E</SecondSurname>
                        <AddressInSpain>
                           <Address>direccion_E</Address>
                           <PostCode>18230</PostCode>
                           <Town>problacion_E</Town>
                           <Province>provincia_E</Province>
                           <CountryCode>ESP</CountryCode>
                        </AddressInSpain>
                     </Individual>
                  </SellerParty>
                  <BuyerParty>
                     <TaxIdentification>
                        <PersonTypeCode>J</PersonTypeCode>
                        <ResidenceTypeCode>R</ResidenceTypeCode>
                        <TaxIdentificationNumber>B12345674</TaxIdentificationNumber>
                     </TaxIdentification>
                     <AdministrativeCentres>
                        <AdministrativeCentre>
                           <CentreCode>P00000010</CentreCode>
                           <RoleTypeCode>03</RoleTypeCode>
                           <Name>nombre_UT</Name>
                           <FirstSurname>primer_apellido_U</FirstSurname>
                           <SecondSurname>segundo_Apellido_U</SecondSurname>
                           <AddressInSpain>
                              <Address>direccion_U</Address>
                              <PostCode>18230</PostCode>
                              <Town>poblacion_U</Town>
                              <Province>provincia_U</Province>
                              <CountryCode>ESP</CountryCode>
                           </AddressInSpain>
                           <CentreDescription>Unidad tramitacion</CentreDescription>
                        </AdministrativeCentre>
                        <AdministrativeCentre>
                           <CentreCode>P00000010</CentreCode>
                           <RoleTypeCode>02</RoleTypeCode>
                           <Name>nombre_OG</Name>
                           <FirstSurname>primer_apellido_OG</FirstSurname>
                           <SecondSurname>segundo_apellido_OG</SecondSurname>
                           <AddressInSpain>
                              <Address>direccion_OG</Address>
                              <PostCode>18230</PostCode>
                              <Town>poblacion_OG</Town>
                              <Province>provincia_OG</Province>
                              <CountryCode>ESP</CountryCode>
                           </AddressInSpain>
                           <CentreDescription>Descripcion Organo Gestor</CentreDescription>
                        </AdministrativeCentre>
                        <AdministrativeCentre>
                           <CentreCode>P00000010</CentreCode>
                           <RoleTypeCode>01</RoleTypeCode>
                           <Name>nombre_OC</Name>
                           <FirstSurname>primer_apellido_OC</FirstSurname>
                           <SecondSurname>segundo_apellido_OC</SecondSurname>
                           <AddressInSpain>
                              <Address>direccion_OC</Address>
                              <PostCode>18230</PostCode>
                              <Town>poblacion_OC</Town>
                              <Province>provincia_OC</Province>
                              <CountryCode>ESP</CountryCode>
                           </AddressInSpain>
                           <CentreDescription>Descripcion Oficina Contable</CentreDescription>
                        </AdministrativeCentre>
                     </AdministrativeCentres>
                     <LegalEntity>
                        <CorporateName>receptor</CorporateName>
                        <TradeName>nombre_comercial_R</TradeName>
                        <AddressInSpain>
                           <Address>direccion_R</Address>
                           <PostCode>18230</PostCode>
                           <Town>poblacion_R</Town>
                           <Province>provincia_R</Province>
                           <CountryCode>ESP</CountryCode>
                        </AddressInSpain>
                     </LegalEntity>
                  </BuyerParty>
               </Parties>
               <Invoices>
                  <Invoice>
                     <InvoiceHeader>
                        <InvoiceNumber>1</InvoiceNumber>
                        <InvoiceSeriesCode>Emit-</InvoiceSeriesCode>
                        <InvoiceDocumentType>FC</InvoiceDocumentType>
                        <InvoiceClass>OO</InvoiceClass>
                     </InvoiceHeader>
                     <InvoiceIssueData>
                        <IssueDate>2013-01-17</IssueDate>
                        <InvoicingPeriod>
                           <StartDate>2013-01-17</StartDate>
                           <EndDate>2013-01-17</EndDate>
                        </InvoicingPeriod>
                        <InvoiceCurrencyCode>EUR</InvoiceCurrencyCode>
                        <TaxCurrencyCode>EUR</TaxCurrencyCode>
                        <LanguageName>es</LanguageName>
                     </InvoiceIssueData>
                     <TaxesOutputs>
                        <Tax>
                           <TaxTypeCode>02</TaxTypeCode>
                           <TaxRate>3.00</TaxRate>
                           <TaxableBase>
                              <TotalAmount>1163.52</TotalAmount>
                           </TaxableBase>
                           <TaxAmount>
                              <TotalAmount>34.91</TotalAmount>
                           </TaxAmount>
                           <EquivalenceSurcharge>3.00</EquivalenceSurcharge>
                           <EquivalenceSurchargeAmount>
                              <TotalAmount>34.91</TotalAmount>
                           </EquivalenceSurchargeAmount>
                        </Tax>
                        <Tax>
                           <TaxTypeCode>01</TaxTypeCode>
                           <TaxRate>18.00</TaxRate>
                           <TaxableBase>
                              <TotalAmount>1163.52</TotalAmount>
                           </TaxableBase>
                           <TaxAmount>
                              <TotalAmount>209.43</TotalAmount>
                           </TaxAmount>
                        </Tax>
                     </TaxesOutputs>
                     <TaxesWithheld>
                        <Tax>
                           <TaxTypeCode>03</TaxTypeCode>
                           <TaxRate>5.0</TaxRate>
                           <TaxableBase>
                              <TotalAmount>1163.52</TotalAmount>
                           </TaxableBase>
                           <TaxAmount>
                              <TotalAmount>58.18</TotalAmount>
                           </TaxAmount>
                        </Tax>
                     </TaxesWithheld>
                     <InvoiceTotals>
                        <TotalGrossAmount>1212.0</TotalGrossAmount>
                        <GeneralDiscounts>
                           <Discount>
                              <DiscountReason>descuento_general</DiscountReason>
                              <DiscountRate>4.0</DiscountRate>
                              <DiscountAmount>48.48</DiscountAmount>
                           </Discount>
                        </GeneralDiscounts>
                        <TotalGeneralDiscounts>48.48</TotalGeneralDiscounts>
                        <TotalGeneralSurcharges>0.0</TotalGeneralSurcharges>
                        <TotalGrossAmountBeforeTaxes>1163.52</TotalGrossAmountBeforeTaxes>
                        <TotalTaxOutputs>279.24</TotalTaxOutputs>
                        <TotalTaxesWithheld>58.18</TotalTaxesWithheld>
                        <InvoiceTotal>1384.58</InvoiceTotal>
                        <TotalOutstandingAmount>1384.58</TotalOutstandingAmount>
                        <TotalExecutableAmount>1384.58</TotalExecutableAmount>
                     </InvoiceTotals>
                     <Items>
                        <InvoiceLine>
                           <ItemDescription>Descripcion de factura de mesas</ItemDescription>
                           <Quantity>4.0</Quantity>
                           <UnitOfMeasure>01</UnitOfMeasure>
                           <UnitPriceWithoutTax>300.000000</UnitPriceWithoutTax>
                           <TotalCost>1200.000000</TotalCost>
                           <DiscountsAndRebates>
                              <Discount>
                                 <DiscountReason>descuento</DiscountReason>
                                 <DiscountRate>3.0</DiscountRate>
                                 <DiscountAmount>36.0</DiscountAmount>
                              </Discount>
                           </DiscountsAndRebates>
                           <Charges>
                              <Charge>
                                 <ChargeReason>cargo</ChargeReason>
                                 <ChargeRate>4.0</ChargeRate>
                                 <ChargeAmount>48.0</ChargeAmount>
                              </Charge>
                           </Charges>
                           <GrossAmount>1212.000000</GrossAmount>
                           <TaxesWithheld>
                              <Tax>
                                 <TaxTypeCode>03</TaxTypeCode>
                                 <TaxRate>5.0</TaxRate>
                                 <TaxableBase>
                                    <TotalAmount>1212.00</TotalAmount>
                                 </TaxableBase>
                                 <TaxAmount>
                                    <TotalAmount>60.60</TotalAmount>
                                 </TaxAmount>
                              </Tax>
                           </TaxesWithheld>
                           <TaxesOutputs>
                              <Tax>
                                 <TaxTypeCode>01</TaxTypeCode>
                                 <TaxRate>18.00</TaxRate>
                                 <TaxableBase>
                                    <TotalAmount>1212.00</TotalAmount>
                                 </TaxableBase>
                                 <TaxAmount>
                                    <TotalAmount>218.16</TotalAmount>
                                 </TaxAmount>
                                 <EquivalenceSurcharge>0.00</EquivalenceSurcharge>
                                 <EquivalenceSurchargeAmount>
                                    <TotalAmount>0.00</TotalAmount>
                                 </EquivalenceSurchargeAmount>
                              </Tax>
                              <Tax>
                                 <TaxTypeCode>02</TaxTypeCode>
                                 <TaxRate>3.00</TaxRate>
                                 <TaxableBase>
                                    <TotalAmount>1212.00</TotalAmount>
                                 </TaxableBase>
                                 <TaxAmount>
                                    <TotalAmount>36.36</TotalAmount>
                                 </TaxAmount>
                                 <EquivalenceSurcharge>3.00</EquivalenceSurcharge>
                                 <EquivalenceSurchargeAmount>
                                    <TotalAmount>36.36</TotalAmount>
                                 </EquivalenceSurchargeAmount>
                              </Tax>
                           </TaxesOutputs>
                           <AdditionalLineItemInformation>Informacion adicional de la factura de la mesas</AdditionalLineItemInformation>
                        </InvoiceLine>
                     </Items>
                  </Invoice>
               </Invoices>
            </fe:Facturae>
Table header 1 Table header 2
Table first row first column Table first row second column
Table second row first column Table second row second column

3 Firmar factura

Las facturas electrónicas tienen que estar firmadas con los estándares XMLDsig y ampliados con las especificaciones del estándar XAdES. Este método se mantiene desde la factura-E con versión 3.1.

Enlaces

Se puede consultar el documento de Política de firma aqui.

Hay que tener en cuenta que el certificado con el que firmaremos la factura tiene que ser un certificado electrónico admitido por @firma. Ademas este documento hay que guardarlo con la extensión .xsig y su contenido va a tener que ser codificado en Base64 antes de introducirlo en la petición al web service.

Enlaces

Se puede consultar un listado de los proveedores de este servicio aqui.

TODO

Poder construir esta firma desde Ax, està en proceso.

La siguiente factura esta firmada usando el software Facturae, proporcionado por las mismas entidades gubernamentales. Este software permite importar XMLs y firmarlos, entre otras cosas.

Enlaces

La aplicación Facturae se puede obtener desde el siguiente enlace.
Copy
<fe:Facturae xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:fe="http://www.facturae.es/Facturae/2014/v3.2.1/Facturae">
               <FileHeader>
                  <SchemaVersion>3.2.1</SchemaVersion>
                  <Modality>I</Modality>
                  <InvoiceIssuerType>EM</InvoiceIssuerType>
                  <Batch>
                     <BatchIdentifier>B123456741Emit-</BatchIdentifier>
                     <InvoicesCount>1</InvoicesCount>
                     <TotalInvoicesAmount>
                        <TotalAmount>1384.58</TotalAmount>
                     </TotalInvoicesAmount>
                     <TotalOutstandingAmount>
                        <TotalAmount>1384.58</TotalAmount>
                     </TotalOutstandingAmount>
                     <TotalExecutableAmount>
                        <TotalAmount>1384.58</TotalAmount>
                     </TotalExecutableAmount>
                     <InvoiceCurrencyCode>EUR</InvoiceCurrencyCode>
                  </Batch>
               </FileHeader>
               <Parties>
                  <SellerParty>
                     <TaxIdentification>
                        <PersonTypeCode>F</PersonTypeCode>
                        <ResidenceTypeCode>R</ResidenceTypeCode>
                        <TaxIdentificationNumber>12345678Z</TaxIdentificationNumber>
                     </TaxIdentification>
                     <Individual>
                        <Name>Emisor</Name>
                        <FirstSurname>primer_apellido_E</FirstSurname>
                        <SecondSurname>segundo_apellido_E</SecondSurname>
                        <AddressInSpain>
                           <Address>direccion_E</Address>
                           <PostCode>18230</PostCode>
                           <Town>problacion_E</Town>
                           <Province>provincia_E</Province>
                           <CountryCode>ESP</CountryCode>
                        </AddressInSpain>
                     </Individual>
                  </SellerParty>
                  <BuyerParty>
                     <TaxIdentification>
                        <PersonTypeCode>J</PersonTypeCode>
                        <ResidenceTypeCode>R</ResidenceTypeCode>
                        <TaxIdentificationNumber>B12345674</TaxIdentificationNumber>
                     </TaxIdentification>
                     <AdministrativeCentres>
                        <AdministrativeCentre>
                           <CentreCode>P00000010</CentreCode>
                           <RoleTypeCode>03</RoleTypeCode>
                           <Name>nombre_UT</Name>
                           <FirstSurname>primer_apellido_U</FirstSurname>
                           <SecondSurname>segundo_Apellido_U</SecondSurname>
                           <AddressInSpain>
                              <Address>direccion_U</Address>
                              <PostCode>18230</PostCode>
                              <Town>poblacion_U</Town>
                              <Province>provincia_U</Province>
                              <CountryCode>ESP</CountryCode>
                           </AddressInSpain>
                           <CentreDescription>Unidad tramitacion</CentreDescription>
                        </AdministrativeCentre>
                        <AdministrativeCentre>
                           <CentreCode>P00000010</CentreCode>
                           <RoleTypeCode>02</RoleTypeCode>
                           <Name>nombre_OG</Name>
                           <FirstSurname>primer_apellido_OG</FirstSurname>
                           <SecondSurname>segundo_apellido_OG</SecondSurname>
                           <AddressInSpain>
                              <Address>direccion_OG</Address>
                              <PostCode>18230</PostCode>
                              <Town>poblacion_OG</Town>
                              <Province>provincia_OG</Province>
                              <CountryCode>ESP</CountryCode>
                           </AddressInSpain>
                           <CentreDescription>Descripcion Organo Gestor</CentreDescription>
                        </AdministrativeCentre>
                        <AdministrativeCentre>
                           <CentreCode>P00000010</CentreCode>
                           <RoleTypeCode>01</RoleTypeCode>
                           <Name>nombre_OC</Name>
                           <FirstSurname>primer_apellido_OC</FirstSurname>
                           <SecondSurname>segundo_apellido_OC</SecondSurname>
                           <AddressInSpain>
                              <Address>direccion_OC</Address>
                              <PostCode>18230</PostCode>
                              <Town>poblacion_OC</Town>
                              <Province>provincia_OC</Province>
                              <CountryCode>ESP</CountryCode>
                           </AddressInSpain>
                           <CentreDescription>Descripcion Oficina Contable</CentreDescription>
                        </AdministrativeCentre>
                     </AdministrativeCentres>
                     <LegalEntity>
                        <CorporateName>receptor</CorporateName>
                        <TradeName>nombre_comercial_R</TradeName>
                        <AddressInSpain>
                           <Address>direccion_R</Address>
                           <PostCode>18230</PostCode>
                           <Town>poblacion_R</Town>
                           <Province>provincia_R</Province>
                           <CountryCode>ESP</CountryCode>
                        </AddressInSpain>
                     </LegalEntity>
                  </BuyerParty>
               </Parties>
               <Invoices>
                  <Invoice>
                     <InvoiceHeader>
                        <InvoiceNumber>1</InvoiceNumber>
                        <InvoiceSeriesCode>Emit-</InvoiceSeriesCode>
                        <InvoiceDocumentType>FC</InvoiceDocumentType>
                        <InvoiceClass>OO</InvoiceClass>
                     </InvoiceHeader>
                     <InvoiceIssueData>
                        <IssueDate>2013-01-17</IssueDate>
                        <InvoicingPeriod>
                           <StartDate>2013-01-17</StartDate>
                           <EndDate>2013-01-17</EndDate>
                        </InvoicingPeriod>
                        <InvoiceCurrencyCode>EUR</InvoiceCurrencyCode>
                        <TaxCurrencyCode>EUR</TaxCurrencyCode>
                        <LanguageName>es</LanguageName>
                     </InvoiceIssueData>
                     <TaxesOutputs>
                        <Tax>
                           <TaxTypeCode>02</TaxTypeCode>
                           <TaxRate>3.00</TaxRate>
                           <TaxableBase>
                              <TotalAmount>1163.52</TotalAmount>
                           </TaxableBase>
                           <TaxAmount>
                              <TotalAmount>34.91</TotalAmount>
                           </TaxAmount>
                           <EquivalenceSurcharge>3.00</EquivalenceSurcharge>
                           <EquivalenceSurchargeAmount>
                              <TotalAmount>34.91</TotalAmount>
                           </EquivalenceSurchargeAmount>
                        </Tax>
                        <Tax>
                           <TaxTypeCode>01</TaxTypeCode>
                           <TaxRate>18.00</TaxRate>
                           <TaxableBase>
                              <TotalAmount>1163.52</TotalAmount>
                           </TaxableBase>
                           <TaxAmount>
                              <TotalAmount>209.43</TotalAmount>
                           </TaxAmount>
                        </Tax>
                     </TaxesOutputs>
                     <TaxesWithheld>
                        <Tax>
                           <TaxTypeCode>03</TaxTypeCode>
                           <TaxRate>5.0</TaxRate>
                           <TaxableBase>
                              <TotalAmount>1163.52</TotalAmount>
                           </TaxableBase>
                           <TaxAmount>
                              <TotalAmount>58.18</TotalAmount>
                           </TaxAmount>
                        </Tax>
                     </TaxesWithheld>
                     <InvoiceTotals>
                        <TotalGrossAmount>1212.0</TotalGrossAmount>
                        <GeneralDiscounts>
                           <Discount>
                              <DiscountReason>descuento_general</DiscountReason>
                              <DiscountRate>4.0</DiscountRate>
                              <DiscountAmount>48.48</DiscountAmount>
                           </Discount>
                        </GeneralDiscounts>
                        <TotalGeneralDiscounts>48.48</TotalGeneralDiscounts>
                        <TotalGeneralSurcharges>0.0</TotalGeneralSurcharges>
                        <TotalGrossAmountBeforeTaxes>1163.52</TotalGrossAmountBeforeTaxes>
                        <TotalTaxOutputs>279.24</TotalTaxOutputs>
                        <TotalTaxesWithheld>58.18</TotalTaxesWithheld>
                        <InvoiceTotal>1384.58</InvoiceTotal>
                        <TotalOutstandingAmount>1384.58</TotalOutstandingAmount>
                        <TotalExecutableAmount>1384.58</TotalExecutableAmount>
                     </InvoiceTotals>
                     <Items>
                        <InvoiceLine>
                           <ItemDescription>Descripcion de factura de mesas</ItemDescription>
                           <Quantity>4.0</Quantity>
                           <UnitOfMeasure>01</UnitOfMeasure>
                           <UnitPriceWithoutTax>300.000000</UnitPriceWithoutTax>
                           <TotalCost>1200.000000</TotalCost>
                           <DiscountsAndRebates>
                              <Discount>
                                 <DiscountReason>descuento</DiscountReason>
                                 <DiscountRate>3.0</DiscountRate>
                                 <DiscountAmount>36.0</DiscountAmount>
                              </Discount>
                           </DiscountsAndRebates>
                           <Charges>
                              <Charge>
                                 <ChargeReason>cargo</ChargeReason>
                                 <ChargeRate>4.0</ChargeRate>
                                 <ChargeAmount>48.0</ChargeAmount>
                              </Charge>
                           </Charges>
                           <GrossAmount>1212.000000</GrossAmount>
                           <TaxesWithheld>
                              <Tax>
                                 <TaxTypeCode>03</TaxTypeCode>
                                 <TaxRate>5.0</TaxRate>
                                 <TaxableBase>
                                    <TotalAmount>1212.00</TotalAmount>
                                 </TaxableBase>
                                 <TaxAmount>
                                    <TotalAmount>60.60</TotalAmount>
                                 </TaxAmount>
                              </Tax>
                           </TaxesWithheld>
                           <TaxesOutputs>
                              <Tax>
                                 <TaxTypeCode>01</TaxTypeCode>
                                 <TaxRate>18.00</TaxRate>
                                 <TaxableBase>
                                    <TotalAmount>1212.00</TotalAmount>
                                 </TaxableBase>
                                 <TaxAmount>
                                    <TotalAmount>218.16</TotalAmount>
                                 </TaxAmount>
                                 <EquivalenceSurcharge>0.00</EquivalenceSurcharge>
                                 <EquivalenceSurchargeAmount>
                                    <TotalAmount>0.00</TotalAmount>
                                 </EquivalenceSurchargeAmount>
                              </Tax>
                              <Tax>
                                 <TaxTypeCode>02</TaxTypeCode>
                                 <TaxRate>3.00</TaxRate>
                                 <TaxableBase>
                                    <TotalAmount>1212.00</TotalAmount>
                                 </TaxableBase>
                                 <TaxAmount>
                                    <TotalAmount>36.36</TotalAmount>
                                 </TaxAmount>
                                 <EquivalenceSurcharge>3.00</EquivalenceSurcharge>
                                 <EquivalenceSurchargeAmount>
                                    <TotalAmount>36.36</TotalAmount>
                                 </EquivalenceSurchargeAmount>
                              </Tax>
                           </TaxesOutputs>
                           <AdditionalLineItemInformation>Informacion adicional de la factura de la mesas</AdditionalLineItemInformation>
                        </InvoiceLine>
                     </Items>
                  </Invoice>
               </Invoices>
               <ds:Signature Id="Signature375440" xmlns:etsi="http://uri.etsi.org/01903/v1.3.2#">
                  <ds:SignedInfo Id="Signature-SignedInfo160791">
                     <ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
                     <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
                     <ds:Reference Id="SignedPropertiesID325115" Type="http://uri.etsi.org/01903#SignedProperties" URI="#Signature375440-SignedProperties555175">
                        <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                        <ds:DigestValue>EClx1wRDv45yMADa1FJyqmHt6ts=</ds:DigestValue>
                     </ds:Reference>
                     <ds:Reference URI="#Certificate1358761">
                        <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                        <ds:DigestValue>ZxcSlRRwgVfwxVoPmcC185EdUJ0=</ds:DigestValue>
                     </ds:Reference>
                     <ds:Reference Id="Reference-ID-884150" URI="">
                        <ds:Transforms>
                           <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
                        </ds:Transforms>
                        <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                        <ds:DigestValue>ZdRRDFpqi7dKb/tTeL1L0uR2cwU=</ds:DigestValue>
                     </ds:Reference>
                  </ds:SignedInfo>
                  <ds:SignatureValue Id="SignatureValue204055">V6L...3Ww==</ds:SignatureValue>
                  <ds:KeyInfo Id="Certificate1358761">
                     <ds:X509Data>
                        <ds:X509Certificate>MII...bew=</ds:X509Certificate>
                     </ds:X509Data>
                     <ds:KeyValue>
                        <ds:RSAKeyValue>
                           <ds:Modulus>sLg...kgw==</ds:Modulus>
                           <ds:Exponent>AQAB</ds:Exponent>
                        </ds:RSAKeyValue>
                     </ds:KeyValue>
                  </ds:KeyInfo>
                  <ds:Object Id="Signature375440-Object411719">
                     <etsi:QualifyingProperties Target="#Signature375440">
                        <etsi:SignedProperties Id="Signature375440-SignedProperties555175">
                           <etsi:SignedSignatureProperties>
                              <etsi:SigningTime>2019-11-20T18:21:37+01:00</etsi:SigningTime>
                              <etsi:SigningCertificate>
                                 <etsi:Cert>
                                    <etsi:CertDigest>
                                       <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                                       <ds:DigestValue>timNqs3OWXMLwv9IfcuBOi6Vfx8=</ds:DigestValue>
                                    </etsi:CertDigest>
                                    <etsi:IssuerSerial>
                                       <ds:X509IssuerName>CN=AC FNMT Usuarios,OU=Ceres,O=FNMT-RCM,C=ES</ds:X509IssuerName>
                                       <ds:X509SerialNumber>15..98</ds:X509SerialNumber>
                                    </etsi:IssuerSerial>
                                 </etsi:Cert>
                              </etsi:SigningCertificate>
                              <etsi:SignaturePolicyIdentifier>
                                 <etsi:SignaturePolicyId>
                                    <etsi:SigPolicyId>
                                       <etsi:Identifier>http://www.facturae.es/politica_de_firma_formato_facturae/politica_de_firma_formato_facturae_v3_1.pdf</etsi:Identifier>
                                       <etsi:Description>Política de Firma FacturaE v3.1</etsi:Description>
                                    </etsi:SigPolicyId>
                                    <etsi:SigPolicyHash>
                                       <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                                       <ds:DigestValue>Ohixl6upD6av8N7pEvDABhEL6hM=</ds:DigestValue>
                                    </etsi:SigPolicyHash>
                                 </etsi:SignaturePolicyId>
                              </etsi:SignaturePolicyIdentifier>
                              <etsi:SignerRole>
                                 <etsi:ClaimedRoles>
                                    <etsi:ClaimedRole>emisor</etsi:ClaimedRole>
                                 </etsi:ClaimedRoles>
                              </etsi:SignerRole>
                           </etsi:SignedSignatureProperties>
                           <etsi:SignedDataObjectProperties>
                              <etsi:DataObjectFormat ObjectReference="#Reference-ID-884150">
                                 <etsi:Description>Factura electrónica</etsi:Description>
                                 <etsi:MimeType>text/xml</etsi:MimeType>
                              </etsi:DataObjectFormat>
                           </etsi:SignedDataObjectProperties>
                        </etsi:SignedProperties>
                     </etsi:QualifyingProperties>
                  </ds:Object>
               </ds:Signature>
            </fe:Facturae>