Files
opensourcepos/composer.json
jekkos d945b65071 Add Peppol (UBL) invoice support for Phase 1
Implementation of UBL 2.1 invoice generation to comply with Belgium's 2026 Peppol mandate.

Key changes:
- Add num-num/ubl-invoice dependency via composer.json
- Create Ubl_generator library to convert OSPOS sale data to UBL format
- Create country_helper.php to map country names to ISO 3166-1 alpha-2 codes
- Extend Email_lib to support multiple attachments for PDF+UBL emails
- Add getUblInvoice() method in Sales controller for UBL download
- Modify getSendPdf() to optionally attach UBL based on invoice_format config
- Add database migration for invoice_format configuration (pdf_only/ubl_only/both)
- Add UBL download button to invoice view
- Add UBL download link to sales manage table
- Add language keys for UBL-related UI elements

Data mapping:
- Company name/address -> Supplier Party
- account_number -> Company VAT number
- Customer address/country -> Customer Party with ISO country code
- Customer tax_id -> Customer VAT number
- Cart items -> InvoiceLines
- Taxes -> TaxCategory and TaxTotal
- Totals -> LegalMonetaryTotal

Features:
- Generate valid UBL 2.1 XML invoices
- Download UBL from invoice view and manage table
- Email with PDF, UBL, or both based on configuration
- Support for multiple customer countries with ISO code mapping
- Graceful handling of missing optional customer fields
2026-04-01 18:51:23 +02:00

79 lines
2.3 KiB
JSON

{
"name": "opensourcepos/opensourcepos",
"description": "Open Source Point of Sale is a web based POS system written in the PHP language. It uses MySQL as backend and has a simple user interface",
"license": "MIT",
"authors": [
{
"name": "jekkos"
},
{
"name": "FrancescoUK"
},
{
"name": "objecttothis"
},
{
"name": "steveireland"
}
],
"type": "project",
"keywords": [
"point-of-sale",
"POS"
],
"homepage": "https://opensourcepos.org",
"support": {
"issues": "https://github.com/opensourcepos/opensourcepos/issues",
"forum": "https://github.com/opensourcepos/opensourcepos/discussions",
"wiki": "https://github.com/opensourcepos/opensourcepos/wiki",
"source": "https://github.com/opensourcepos/opensourcepos",
"docs": "https://github.com/opensourcepos/opensourcepos/wiki#documentation",
"matrix": "https://matrix.to/#/#opensourcepos_Lobby:gitter.im"
},
"require": {
"ext-intl": "*",
"php": "^8.1",
"codeigniter4/framework": "^4.6.3",
"dompdf/dompdf": "^2.0.3",
"ezyang/htmlpurifier": "^4.17",
"laminas/laminas-escaper": "2.17.0",
"num-num/ubl-invoice": "^2.4",
"paragonie/random_compat": "^2.0.21",
"picqer/php-barcode-generator": "^2.4.0",
"tamtamchik/namecase": "^3.0.0"
},
"require-dev": {
"codeigniter/coding-standard": "^1.8",
"fakerphp/faker": "^1.23.0",
"friendsofphp/php-cs-fixer": "^3.47.1",
"kint-php/kint": "^5.0.4",
"mikey179/vfsstream": "^1.6",
"nexusphp/cs-config": "^3.6",
"phpunit/phpunit": "^10.5.16 || ^11.2",
"predis/predis": "^1.1 || ^2.0"
},
"replace": {
"psr/log": "*"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"CodeIgniter\\": "vendor/codeigniter4/framework/system/"
},
"exclude-from-classmap": [
"**/Database/Migrations/**"
]
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true
},
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"scripts": {
"test": "phpunit"
}
}