tiime / cross-industry-invoice
Installs: 211 315
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 0
Forks: 1
Open Issues: 3
Language:XSLT
Requires
- php: >=8.3
- ext-dom: *
- ext-libxml: *
- tiime/en-16931: ^0.10.0
- twig/intl-extra: ^3.15
- twig/twig: ^3.15
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.16
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^10.1
README
How to add this library in Symfony ?
Download this library :
composer require tiime/cross-industry-invoice
If you want to use templates which are available in src/Resources/views/
folder, you will need to add this configuration :
twig: # ... paths: '%kernel.project_dir%/vendor/tiime/cross-industry-invoice/src/Resources/views/': 'TiimeCII'
If you want to use templates from this library, you will also need to download twig/extra-bundle
package :
composer require twig/extra-bundle
In config/services.yaml
, add this configuration :
Tiime\CrossIndustryInvoice\Renderer\TwigRenderer: arguments: $environment: '@twig' Tiime\CrossIndustryInvoice\Renderer\CrossIndustryInvoiceRendererInterface: '@Tiime\CrossIndustryInvoice\Renderer\TwigRenderer'
How to use it ?
use Tiime\CrossIndustryInvoice\EN16931\CrossIndustryInvoice; use Tiime\CrossIndustryInvoice\Renderer\CrossIndustryInvoiceRendererInterface; class MyService { public function __construct(private readonly CrossIndustryInvoiceRendererInterface $renderer) { } public function doSomething() { // Create CrossIndustryInvoice object with needed parameters $crossIndustryInvoice = new CrossIndustryInvoice(...); $this->renderer->render($crossIndustryInvoice, '@TiimeCII/en16931_invoice.html.twig') } }