Next/Future invoices for users

This commit is contained in:
Deon George
2020-02-08 22:51:50 +11:00
parent b61e00d80f
commit eb316f65fc
18 changed files with 277 additions and 96 deletions

View File

@@ -2,24 +2,33 @@
namespace App\Models\Service;
use App\Interfaces\ServiceItem;
use App\Models\Base\ServiceType;
use App\Traits\NextKey;
class Voip extends \App\Models\Base\ServiceType
class Voip extends ServiceType implements ServiceItem
{
use NextKey;
const RECORD_ID = 'service__adsl';
protected $table = 'ab_service__voip';
public function getFullNameAttribute()
/**
* Return the service address
*
* @return string
*/
public function getServiceDescriptionAttribute(): string
{
return ($this->service_number AND $this->service_address)
? sprintf('%s: %s',$this->service_number, $this->service_address)
: $this->name;
return $this->service_address ?: 'VOIP';
}
public function getNameAttribute()
/**
* Return the service number
*
* @return string
*/
public function getServiceNameAttribute(): string
{
return $this->service_number;
}