PHP Classes

Facturae PHP: Generate XML electronic bills paid in Spain

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 164 All time: 8,921 This week: 47Up
Version License PHP version Categories
facturae-php 1.2.5Custom (specified...5XML, PHP 5, E-Commerce
Description 

Author

This package is specific mainly for applications used in Spain Spain .

This package can generate XML electronic bills paid in Spain.

It takes details about products or services paid in Spain and generates XML signed using a digital certificate for the electronic bill.

In Spanish:

Genera y firma facturas electrónicas en formato XML sin necesidad de ninguna librería adicional

Innovation Award
PHP Programming Innovation award nominee
September 2017
Number 6
Customer bills can be stored in files, so they can be exported by companies that emit bills for their customers, so they can imported on other systems that can process those bills.

This package generate electronic bills on XML format for use in Spain. They use digital certificates to sign the XML data, thus preventing tampering.

Manuel Lemos
Picture of José Miguel Moreno
  Performance   Level  
Name: José Miguel Moreno <contact>
Classes: 2 packages by
Country: Spain Spain
Age: ???
All time rank: 4089111 in Spain Spain
Week rank: 178 Up6 in Spain Spain Up
Innovation award
Innovation award
Nominee: 1x

Details

Facturae-PHP

Travis Codacy Coverage Última versión estable Licencia Documentación

Facturae-PHP es un paquete escrito puramente en PHP que permite generar facturas electrónicas siguiendo el formato estructurado Facturae, añadirlas firma electrónica XAdES y sellado de tiempo, e incluso enviarlas a FACe o FACeB2B sin necesidad de ninguna librería o clase adicional.

En apenas 25 líneas de código y con un tiempo de ejecución inferior a 0,4 µs es posible generar, firmar y exportar una factura electrónica totalmente válida:

$fac = new Facturae();
$fac->setNumber('FAC201804', '123');
$fac->setIssueDate('2018-04-01');

$fac->setSeller(new FacturaeParty([
  "taxNumber" => "A00000000",
  "name"      => "Perico de los Palotes S.A.",
  "address"   => "C/ Falsa, 123",
  "postCode"  => "12345",
  "town"      => "Madrid",
  "province"  => "Madrid"
]));
$fac->setBuyer(new FacturaeParty([
  "isLegalEntity" => false,
  "taxNumber"     => "00000000A",
  "name"          => "Antonio",
  "firstSurname"  => "García",
  "lastSurname"   => "Pérez",
  "address"       => "Avda. Mayor, 7",
  "postCode"      => "54321",
  "town"          => "Madrid",
  "province"      => "Madrid"
]));

$fac->addItem("Lámpara de pie", 20.14, 3, Facturae::TAX_IVA, 21);

$fac->sign("certificado.pfx", null, "passphrase");
$fac->export("mi-factura.xsig");

Requisitos

- PHP 5.6 o superior - OpenSSL (solo para firmar facturas) - cURL (solo para timestamping y FACe / FACeB2B) - libXML (solo para FACe y FACeB2B)

Características

- Generación de facturas 100% conformes con la Ley 25/2013 del 27 de diciembre - Exportación según las versiones de formato 3.2, 3.2.1 y 3.2.2 de Facturae - Firmado de acuerdo a la política de firma de Facturae 3.1 basada en XAdES - Sellado de tiempo según el RFC3161 - Envío automatizado de facturas a FACe y FACeB2B ?

Licencia

Facturae-PHP se encuentra bajo licencia MIT. Eso implica que puedes utilizar este paquete en cualquier proyecto (incluso con fines comerciales), siempre y cuando hagas referencia al uso y autoría de la misma.


  Files folder image Files (68)  
File Role Description
Files folder imagedoc (1 file, 8 directories)
Files folder imagesrc (5 files, 4 directories)
Files folder imagetests (8 files, 2 directories)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
Accessible without login Plain text file Gemfile Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file _config.yml Data Auxiliary data

  Files folder image Files (68)  /  doc  
File Role Description
Files folder imageanexos (4 files)
Files folder imageejemplos (5 files)
Files folder imageentidades (3 files)
Files folder imageenvio-y-recepcion (3 files)
Files folder imageextensiones (2 files)
Files folder imagefirma-electronica (2 files)
Files folder imageproductos (5 files)
Files folder imagepropiedades (7 files)
  Accessible without login Plain text file index.md Data Auxiliary data

  Files folder image Files (68)  /  doc  /  anexos  
File Role Description
  Accessible without login Plain text file anexos.md Data Auxiliary data
  Accessible without login Plain text file constantes.md Data Auxiliary data
  Accessible without login Plain text file otros-metodos.md Data Auxiliary data
  Accessible without login Plain text file validacion.md Data Auxiliary data

  Files folder image Files (68)  /  doc  /  ejemplos  
File Role Description
  Accessible without login Plain text file ejemplos.md Data Auxiliary data
  Accessible without login Plain text file envio-face.md Data Auxiliary data
  Accessible without login Plain text file envio-faceb2b.md Data Auxiliary data
  Accessible without login Plain text file factura-simple.md Data Auxiliary data
  Accessible without login Plain text file sin-composer.md Data Auxiliary data

  Files folder image Files (68)  /  doc  /  entidades  
File Role Description
  Accessible without login Plain text file centros-administrativos.md Data Auxiliary data
  Accessible without login Plain text file compradores-y-vendedores.md Data Auxiliary data
  Accessible without login Plain text file entidades.md Data Auxiliary data

  Files folder image Files (68)  /  doc  /  envio-y-recepcion  
File Role Description
  Accessible without login Plain text file envio-y-recepcion.md Data Auxiliary data
  Accessible without login Plain text file face.md Data Auxiliary data
  Accessible without login Plain text file faceb2b.md Data Auxiliary data

  Files folder image Files (68)  /  doc  /  extensiones  
File Role Description
  Accessible without login Plain text file extensiones.md Data Auxiliary data
  Accessible without login Plain text file faceb2b.md Data Auxiliary data

  Files folder image Files (68)  /  doc  /  firma-electronica  
File Role Description
  Accessible without login Plain text file firma-electronica.md Data Auxiliary data
  Accessible without login Plain text file sellado-de-tiempo.md Data Auxiliary data

  Files folder image Files (68)  /  doc  /  productos  
File Role Description
  Accessible without login Plain text file campos-opcionales.md Data Auxiliary data
  Accessible without login Plain text file descuentos-y-cargos.md Data Auxiliary data
  Accessible without login Plain text file multiples-impuestos.md Data Auxiliary data
  Accessible without login Plain text file productos.md Data Auxiliary data
  Accessible without login Plain text file unidad-de-medida.md Data Auxiliary data

  Files folder image Files (68)  /  doc  /  propiedades  
File Role Description
  Accessible without login Plain text file datos-adicionales.md Data Auxiliary data
  Accessible without login Plain text file datos-del-pago.md Data Auxiliary data
  Accessible without login Plain text file descuentos-y-cargos.md Data Auxiliary data
  Accessible without login Plain text file propiedades.md Data Auxiliary data
  Accessible without login Plain text file referencias.md Data Auxiliary data
  Accessible without login Plain text file textos-literales.md Data Auxiliary data
  Accessible without login Plain text file version-de-facturae.md Data Auxiliary data

  Files folder image Files (68)  /  src  
File Role Description
Files folder imageCommon (2 files)
Files folder imageExtensions (2 files)
Files folder imageFace (3 files)
Files folder imageFacturaeTraits (4 files)
  Plain text file Facturae.php Class Class source
  Plain text file FacturaeCentre.php Class Class source
  Plain text file FacturaeFile.php Class Class source
  Plain text file FacturaeItem.php Class Class source
  Plain text file FacturaeParty.php Class Class source

  Files folder image Files (68)  /  src  /  Common  
File Role Description
  Plain text file KeyPairReader.php Class Class source
  Plain text file XmlTools.php Class Class source

  Files folder image Files (68)  /  src  /  Extensions  
File Role Description
  Plain text file FacturaeExtension.php Class Class source
  Plain text file Fb2bExtension.php Class Class source

  Files folder image Files (68)  /  src  /  Face  
File Role Description
  Plain text file Faceb2bClient.php Class Class source
  Plain text file FaceClient.php Class Class source
  Plain text file SoapClient.php Class Class source

  Files folder image Files (68)  /  src  /  FacturaeTraits  
File Role Description
  Plain text file ExportableTrait.php Class Class source
  Plain text file PropertiesTrait.php Class Class source
  Plain text file SignableTrait.php Class Class source
  Plain text file UtilsTrait.php Class Class source

  Files folder image Files (68)  /  tests  
File Role Description
Files folder imagecerts (2 files)
Files folder imageExtensions (1 file)
  Plain text file AbstractTest.php Class Class source
  Plain text file DecimalsTest.php Class Class source
  Plain text file DiscountsTest.php Class Class source
  Plain text file ExtensionsTest.php Class Class source
  Plain text file InvoiceTest.php Class Class source
  Plain text file MethodsTest.php Class Class source
  Plain text file PerformanceTest.php Class Class source
  Plain text file WebservicesTest.php Class Class source

  Files folder image Files (68)  /  tests  /  certs  
File Role Description
  Accessible without login Plain text file facturae-private.pem Data Auxiliary data
  Accessible without login Plain text file facturae-public.pem Data Auxiliary data

  Files folder image Files (68)  /  tests  /  Extensions  
File Role Description
  Plain text file DisclaimerExtension.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:164
This week:0
All time:8,921
This week:47Up
User Comments (3)
Excelent work.
6 years ago (David Pascual)
77%StarStarStarStar
Excelent work.
6 years ago (David Pascual)
77%StarStarStarStar
Excelent work.
6 years ago (David Pascual)
77%StarStarStarStar