Fix error 500 when cancelling and ordering broadband

This commit is contained in:
Deon George
2022-04-04 20:29:45 +10:00
parent 9659621ba0
commit ebf08ea414
4 changed files with 8 additions and 9 deletions

View File

@@ -18,6 +18,7 @@ use Leenooks\Carbon;
use Symfony\Component\HttpKernel\Exception\HttpException;
use App\Interfaces\IDs;
use App\Traits\NextKey;
/**
* Class Service
@@ -38,7 +39,7 @@ use App\Interfaces\IDs;
// @todo All the methods/attributes in this file need to be checked.
class Service extends Model implements IDs
{
use HasFactory;
use HasFactory,NextKey;
const RECORD_ID = 'service';
public $incrementing = FALSE;
@@ -786,7 +787,6 @@ class Service extends Model implements IDs
*/
public function getProductCategoryAttribute(): string
{
abort(500,'deprecated');
return $this->product->getProductTypeAttribute();
}
@@ -798,8 +798,7 @@ class Service extends Model implements IDs
*/
public function getProductNameAttribute(): string
{
abort(500,'deprecated');
return $this->product->name($this->account->language);
return $this->product->getNameAttribute();
}
public function getRecurScheduleAttribute($value): int