mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-03-02 05:47:46 -05:00
- Replaced TRUE/FALSE constants with true/false keywords - Replaced NULL constant with null keyword - Replaced `<?php echo` in views with shortened `<?=` - Added missing variable declaration - Added missing function return type in declaration - replaced `== true`, `== false`, `=== true` and `=== false` in if statements with simplified forms
35 lines
570 B
PHP
35 lines
570 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;
|
|
|
|
public function __construct(string $value = '')
|
|
{
|
|
parent::__construct($value);
|
|
$this->appconfig = model(Appconfig::class);
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|