josegus / control-code
Generate invoice's control code according to bolivian laws
Fund package maintenance!
josegus
gustavovasquez.me
Requires
- php: ^7.2|^8.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.17
- phpunit/phpunit: ^8.0|^9.5
- vimeo/psalm: ^4.3
This package is auto-updated.
Last update: 2025-04-13 00:25:55 UTC
README
This package can generate invoice's control code, according to bolivian laws.
Here's how to use it:
ControlCode::make() ->authorizationNumber('29040011007') ->invoiceNumber('1503') ->customerDocumentNumber('4189179011') ->transactionDate('2007-07-02') ->transactionMount('2500') ->dosificationKey('9rCB7Sv4X29d)5k7N%3ab89p-3(5[A') ->generate();
Installation
You can install the package via composer:
composer require josegus/control-code
Usage
ControlCode::make() ->authorizationNumber('29040011007') ->invoiceNumber('1503') ->customerDocumentNumber('4189179011') ->transactionDate('2007-07-02') ->transactionMount('2500') ->dosificationKey('9rCB7Sv4X29d)5k7N%3ab89p-3(5[A') ->generate();
Notice that, in order to make it work properly:
- all params must be string
- transaction date must be in one of the following format: "Y-m-d", "Y/m/d", "Ymd"
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email jgvv15@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.