Files
opensourcepos/app/Models/Tokens/Token_invoice_sequence.php
objecttothis e90b5b87da Replace tabs with spaces (#4196)
Signed-off-by: objecttothis <objecttothis@gmail.com>
2025-03-28 21:24:21 +04:00

41 lines
715 B
PHP

<?php
namespace App\Models\Tokens;
use App\Models\Appconfig;
use ReflectionException;
/**
* Token_invoice_sequence class
**/
class Token_invoice_sequence extends Token
{
private Appconfig $appconfig;
/**
* @param string $value
*/
public function __construct(string $value = '')
{
parent::__construct($value);
$this->appconfig = model(Appconfig::class);
}
/**
* @return string
*/
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);
}
}