Files
opensourcepos/app/Models/Tokens/Token_invoice_sequence.php
2024-06-15 17:19:15 +02:00

34 lines
567 B
PHP

<?php
namespace App\Models\Tokens;
use app\Models\Appconfig;
use ReflectionException;
/**
* Token_invoice_sequence class
*
* @property appconfig appconfig
*/
class Token_invoice_sequence extends Token
{
public function __construct(string $value = '')
{
parent::__construct($value);
$this->appconfig = model('Appconfig');
}
public function token_id(): string
{
return 'ISEQ';
}
/**
* @throws ReflectionException
*/
public function get_value(bool $save = TRUE): string
{
return $this->appconfig->acquire_next_invoice_sequence($save);
}
}