API reference / Quittio \ Core \ Countries
NumberingRules
final readonly class in quittio/core
Quittio\Core\Countries\NumberingRules · Source
Requirements for invoice numbering in a country. The Managed layer applies the default pattern, the default reset and the allowed resets.
Properties#
| Property | Type | Description |
|---|---|---|
$allowedResets readonly | list<string> | never, yearly, monthly |
$defaultPattern readonly | string | |
$defaultReset readonly | string | |
$gapless readonly | bool | numbers must be consecutive without unexplained gaps. Informational metadata for applications; Quittio does not read it |
$numberConsumedOnRejection readonly | bool | the number of an issued invoice that the recipient rejects stays used and is never issued again. Informational metadata for applications; Quittio does not read it |
Methods#
| Method | Description |
|---|---|
->__construct() |
__construct()#
public function __construct(
string $defaultPattern = 'INV-{Y}-{seq:4}',
string $defaultReset = 'yearly',
list<string> $allowedResets = ['never', 'yearly', 'monthly'],
bool $gapless = true,
bool $numberConsumedOnRejection = true,
)| Parameter | Type | Description |
|---|---|---|
$defaultPattern | string = 'INV-{Y}-{seq:4}' | |
$defaultReset | string = 'yearly' | |
$allowedResets | list<string> = ['never', 'yearly', 'monthly'] | never, yearly, monthly |
$gapless | bool = true | numbers must be consecutive without unexplained gaps. Informational metadata for applications; Quittio does not read it |
$numberConsumedOnRejection | bool = true | the number of an issued invoice that the recipient rejects stays used and is never issued again. Informational metadata for applications; Quittio does not read it |