tecfinite/zatca-qr

This package takes ZATCA invoice data and generates ZATCA TLV string and Qr code image.

v1.0.1 2023-12-06 17:28 UTC

This package is auto-updated.

Last update: 2024-05-05 13:00:55 UTC


README

Latest Version on Packagist Total Downloads 68747470733a2f2f7777772e74656366696e6974652e636f6d2f6173736574732f696d672f74666e742d6c6f676f2e737667

E-invoice QR code generator, is a simple library to generate QR code image for e-invoice in KSA.

Installation

You can install the package via composer:

composer require tecfinite/zatca-qr

Usage

use Tecfinite\ZatcaQr\Tag\InvoiceTotalTag as ZatcaInvoiceTotalTag;
use Tecfinite\ZatcaQr\Tag\SellerTag as ZatcaSellerTag;
use Tecfinite\ZatcaQr\Tag\TimestampTag as ZatcaTimestampTag;
use Tecfinite\ZatcaQr\Tag\VatRegistrationNumberTag as ZatcaVatRegistrationNumberTag;
use Tecfinite\ZatcaQr\Tag\VatTotalTag as ZatcaVatTotalTag;
use Tecfinite\ZatcaQr\ZatcaQr;
$qr = new Tecfinite\ZatcaQr();
$qr = new ZatcaQr(
            new ZatcaSellerTag($this->sellerName),
            new ZatcaVatRegistrationNumberTag($this->sellerTaxId),
            new ZatcaTimestampTag($this->invoice->created_at),
            new ZatcaInvoiceTotalTag($this->invoice->total_fee),
            new ZatcaVatTotalTag($this->invoice->vat_fee)
          );

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.