1.0.8 • Published 7 years ago

invoiceman v1.0.8

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

invoiceman

Obtiene el formato generico de una factura a partir de un documento XML (PAX Facturación), con las normas fiscales aplicadas en México.

Instalación

npm install invoiceman

Uso

var invoiceman = require('invoiceman');

invoiceman.generate(options, function (err, data) {
  if (err) throw err;
  // Do stuffs with data.
});

Ejemplo

var invoiceman = require('invoiceman');

var options = {
  pdf: "./output.pdf",
  logo: "./logoPrixz.png",
  esArchivo: true, // false to send content XML format
  xml: "./test.xml" // Or XML content and esArchivo to false
};

invoiceman.generate(options, function (err, data) {
  if (err) throw err;
  // Do stuffs with data and your new PDF file is on your output path
});

Respuesta OK

{
  "success": true,
  "message": "PDF Created on /output.pdf"
}

Respuesta error

{
  "success": false,
  "message": "Error interno"
}

Test

npm test
1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago