PHPackages                             josegus/control-code - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. josegus/control-code

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

josegus/control-code
====================

Generate invoice's control code according to bolivian laws

1.0.1(5y ago)172MITPHPPHP ^7.2|^8.0

Since Mar 12Pushed 5y ago1 watchersCompare

[ Source](https://github.com/josegus/control-code)[ Packagist](https://packagist.org/packages/josegus/control-code)[ Docs](https://github.com/josegus/control-code)[ Fund](https://gustavovasquez.me)[ GitHub Sponsors](https://github.com/josegus)[ RSS](/packages/josegus-control-code/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Generate invoice's control code according to bolivian laws
==========================================================

[](#generate-invoices-control-code-according-to-bolivian-laws)

[![Latest Version on Packagist](https://camo.githubusercontent.com/55c2f550207b6fe3edb8e6f80ae8cfc40f6ba5c8f52b73713b8639706afc5425/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f73656775732f636f6e74726f6c2d636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/josegus/control-code)[![GitHub Tests Action Status](https://camo.githubusercontent.com/31cf335858e123fb16c37a1ce267a1600588a1eb86287ad47f009b67ea5d8379/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6a6f73656775732f636f6e74726f6c2d636f64652f54657374733f6c6162656c3d7465737473)](https://github.com/josegus/control-code/actions?query=workflow%3ATests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/c730130b33b41b3709bbe302dcfd7f7db08b4d7c8820fb6f52fe5154b7a264b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f73656775732f636f6e74726f6c2d636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/josegus/control-code)

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
------------

[](#installation)

You can install the package via composer:

```
composer require josegus/control-code
```

Usage
-----

[](#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
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Gustavo Vasquez](https://github.com/josegus)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1892d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65bdcc265c753c43d5a0698ed5b5e21ac35521575b913886e8b281bec716c4d6?d=identicon)[josegus](/maintainers/josegus)

---

Top Contributors

[![josegus](https://avatars.githubusercontent.com/u/13947849?v=4)](https://github.com/josegus "josegus (10 commits)")

---

Tags

gustavo vasquezcontrol-code

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/josegus-control-code/health.svg)

```
[![Health](https://phpackages.com/badges/josegus-control-code/health.svg)](https://phpackages.com/packages/josegus-control-code)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
