mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-01-02 14:37:55 -05:00
- Added missing PHPdocs - Corrected Syntax - Added noinspection parameters to PHPdoc for AJAX called functions - Added missing function return types - Added missing parameter types - Added public keyword to functions without visibility modifier - Corrected incorrectly formatted PHPdocs - Added public to constants and functions missing a visibility keyword
41 lines
634 B
PHP
41 lines
634 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);
|
|
}
|
|
}
|