thelia/facturx-module
Composer 安装命令:
composer require thelia/facturx-module
包简介
Generates PDF/A-3 invoices compliant with Factur-X (EN16931) for electronic invoicing
README 文档
README
Generates PDF/A-3 invoices compliant with the Factur-X (EN16931) standard for French electronic invoicing requirements.
How it works
The module intercepts Thelia's PDF invoice generation. When an invoice is produced, it:
- Builds a CrossIndustryInvoice XML (CII) from the order data
- Embeds the XML into the PDF and converts it to PDF/A-3 using atgp/factur-x
- Archives the resulting PDF to disk
- Returns the compliant PDF to the user
The process is transparent — existing invoice generation continues to work as before, with Factur-X compliance added on top.
Requirements
- Thelia 3
- PHP 8.2+
Installation
Via Composer:
composer require thelia/facturx-module php Thelia module:activate FacturX php Thelia cache:clear
Manual installation:
git clone <repository-url> local/modules/FacturX composer require atgp/factur-x php Thelia module:activate FacturX php Thelia cache:clear
Configuration
Navigate to Back-office > Modules > Factur-X and fill in:
| Field | Description |
|---|---|
| SIRET | Your company's 14-digit SIRET number |
| VAT identification number | EU VAT number, e.g. FR12345678901 |
| Enable Factur-X | Toggle automatic generation on/off |
Seller name and address are read from the store configuration (Settings > Store).
EN16931 Compliance
The generated XML covers the EN16931 comfort profile:
- Seller: name, address, SIRET (BT-30), VAT number (BT-31)
- Buyer: name and address from the invoice address
- Invoice: number, date, currency, type code (380)
- Lines: product name, quantity, unit price, VAT rate
- Totals: line total, tax basis, tax amount, grand total, due payable amount
Archive
Generated Factur-X PDFs are automatically archived on disk, organized by year. The storage path is configurable in the module settings.
File Structure
FacturX/
├── composer.json
├── FacturX.php
├── Config/
│ ├── module.xml
│ └── config.xml
├── EventListener/
│ └── InvoicePdfListener.php
├── Service/
│ └── FacturXService.php
├── Form/
│ └── ConfigurationForm.php
├── Controller/
│ └── Admin/
│ └── ConfigurationController.php
├── I18n/
│ ├── fr_FR.php
│ └── en_US.php
└── templates/
└── backOffice/
└── default/
└── facturx-configuration.html
License
This module is part of the Thelia e-commerce ecosystem.
thelia/facturx-module 适用场景与选型建议
thelia/facturx-module 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 02 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 thelia/facturx-module 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 thelia/facturx-module 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 40
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-3.0
- 更新时间: 2026-02-08