mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-01-24 17:27:55 -05:00
27 lines
433 B
PHP
27 lines
433 B
PHP
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
|
|
|
/**
|
|
* Token_invoice_count class
|
|
*/
|
|
|
|
class Token_invoice_count extends Token
|
|
{
|
|
public function __construct($value = '')
|
|
{
|
|
parent::__construct($value);
|
|
|
|
$this->CI->load->model('Sale');
|
|
}
|
|
|
|
public function token_id()
|
|
{
|
|
return 'CO';
|
|
}
|
|
|
|
public function get_value()
|
|
{
|
|
return empty($value) ? $this->CI->Sale->get_invoice_count() : $value;
|
|
}
|
|
}
|
|
?>
|