zatca
v1.0.2
Published
Generate E-Invoice qr-code and valid XML then submitting to ZATCA API
Downloads
60
Maintainers
Readme
Installation
You can install the package via composer:
npm i zatca --save
Usage
// Import in your app
const TT_Zatca = require('zatca');
/*
* Run Generate QrCode Class
* @param1=company_name
* @param2=tax_id
* @param3=invoice_date
* @param4=grand_total
* @param5=tax_total
*/
const generateQrCode = new TT_Zatca.GenerateQrCode('Tatwerat', '302520021521453', '2011-10-05T14:48:00.000Z', 100.00, 15.00);
Generate Base64
let base64 = await generateQrCode.toBase64();
Generate TLV
let TLV = await generateQrCode.getTLV();
Render QR Code Image
let qrCode = await generateQrCode.render();