josegus/control-code

Generate invoice's control code according to bolivian laws

1.0.1 2021-03-12 15:24 UTC

This package is auto-updated.

Last update: 2024-05-12 22:14:18 UTC


README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

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.