定制 bluspark/dgfip-datamatrix 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bluspark/dgfip-datamatrix

最新稳定版本:v0.0.2

Composer 安装命令:

composer require bluspark/dgfip-datamatrix

包简介

Way to generate, in PHP, a datamatrix for DGFIP (French tax administration).

README 文档

README

Way to generate, in PHP, a datamatrix for DGFIP (French tax administration).

Installation

With composer:

composer require bluspark/dgfip-datamatrix

Usage

use Bluspark\DgfipDatamatrix\DataMatrixGenerator;
use Bluspark\DgfipDatamatrix\DataMatrixReference;

$reference = new DataMatrixReference();
$reference
    ->setEmitterCode("...")
    ->setEstablishmentCode("...")
    ->setRevenueCode("...")
    ->setAccountantCode("...")
    ->setFiscalYear("...")
    ->setInvoiceNumber("...")
    ->setAmountInCents("...")
    ;

$generator = new DataMatrixGenerator();
$datamatrix = $generator->generate($reference);


echo "The datamatrix code is: " . $datamatrix->asString();

Generating images

If you want to generate an image of the datamatrix, we suggest you to install the jucksearm\\barcode package:

composer require jucksearm/barcode

Then you can generate the image like this:

// For a PNG image
$png = $datamatrix->asPng();
file_put_contents("datamatrix.png", $png);

// For a SVG image
$svg = $datamatrix->asSvg();
file_put_contents("datamatrix.svg", $svg);

License

This project is licensed under the CeCILL-B License - see the LICENSE file for details.

Sponsors

Bluspark logo

Bluspark is a Saas application to operate infrastructure of agglomerations and cities. It is a complete solution to manage the life cycle of your infrastructure, from the design to the maintenance.

Consoneo logo

The digital SaaS platform for financing and managing energy renovation aid

统计信息

  • 总下载量: 8.15k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: CECILL-B
  • 更新时间: 2024-04-12