greenterfin/report

用于电子发票的打印表示 - SUNAT - 秘鲁

v2.2.2 2020-02-18 17:55 UTC

This package is auto-updated.

Last update: 2024-09-25 07:54:41 UTC


README

Codacy Badge Travis-CI Scrutinizer Code Quality Code Coverage Build Status

在电子发票中使用的电子凭证的HTML格式表示 - SUNAT - 秘鲁。

要生成PDF,可以使用wkhtmltopdf和/或greenter/htmltopdf

安装

通过Composer从packagist.org安装

composer require greenter/report

示例

$invoice = new Invoice();
// $invoice->set...

$report = new HtmlReport();

$report->setTemplate('invoice.html.twig');

$html = $report->render($invoice, [
    'system' => [
        'logo' => $logo,
        'hash' => 'qqnr2dN4p/HmaEA/CJuVGo7dv5g=',
    ],
    'user' => [
        'header' => 'Telf: <b>(056) 123375</b>',
        'resolucion' => '212321',
    ]
]);

echo $html;

预览

Factura

文档

  • 电子发票
  • 电子收据
  • 电子信用证
  • 电子借记单
  • 电子装货单
  • 电子扣缴
  • 电子预扣
  • 每日电子收据摘要
  • 下架通知
  • 每日冲销摘要

功能

  • 生成二维码
  • Logo(PNG, JPEG, GIF)
  • 获取数字签名的哈希值
  • 添加自定义页眉和页脚
  • 向凭证添加额外数据
  • 根据需求创建新的模板