Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fatoora-ksa

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fatoora-ksa

E-invoicing module that generates hex, base64 values and qr code as image

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

fatoora-ksa

A simple nodejs module to generate the Qrcode image /value for the E-invoicing (Fatoora) to generate tax invoice. Values are to be given as tagged list and then generate the values in a 2 step process.

Install

$ npm install fatoora-ksa

This module targets Node.js 6 or later and not in the browser. Do add a request if you need to do it in the browser.

Usage

const fatooraKsa = require('fatoora-ksa');

// Create an object with the details below
const obj = {
        seller : 'Valuetens Records',
        vatRegNumber : '310122393500003',
        timeStamp : '2021-11-29T10:55:00Z',
        totalAmount : '100',
        vatAmount : '15'
}

const hexString = fatooraKsa.toHex(obj);
console.log(hexString);
//=> 010c426f6273205265636f726473020f3331303132323339333530303030330314323032312d31312d32395431303a35353a30305a0404313030300503313530

const base64String = fatooraKsa.toBase64(obj);
console.log(base64String);
//=> AQxCb2JzIFJlY29yZHMCDzMxMDEyMjM5MzUwMDAwMwMUMjAyMS0xMS0yOVQxMDo1NTowMFoEBDEwMDAFAzE1MA==


// Below method returns a promise
const qrCode = await fatooraKsa.toQrCode(obj);
// Will return a base64 image


Qrcode

Keywords

FAQs

Package last updated on 03 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc