Removed redundant functions from Service::class

This commit is contained in:
Deon George
2022-04-22 10:36:41 +10:00
parent d53643ef55
commit 8ed9e38290
29 changed files with 307 additions and 514 deletions

View File

@@ -125,12 +125,6 @@ class Account extends Model implements IDs
/* ATTRIBUTES */
public function getActiveDisplayAttribute($value)
{
abort(500,'deprecated');
return sprintf('<span class="btn-sm btn-block btn-%s text-center">%s</span>',$this->active ? 'success' : 'danger',$this->active ? 'Active' : 'Inactive');
}
/**
* Get the address for the account
*
@@ -160,31 +154,7 @@ class Account extends Model implements IDs
return $this->company ? 'Business' : 'Private';
}
/**
* Return the Admin URL to manage the account
*
* @return string
* @deprecated
*/
public function getUrlAdminAttribute(): string
{
abort(500,'deprecated');
return sprintf('<a href="/r/account/view/%s">%s</a>',$this->id,$this->account_id);
}
/**
* Return the User URL to manage the account
*
* @return string
* @deprecated
*/
public function getUrlUserAttribute(): string
{
abort(500,'deprecated');
return sprintf('<a href="/u/account/view/%s">%s</a>',$this->id,$this->account_id);
}
/* GENERAL METHODS */
/* METHODS */
/**
* Get the due invoices on an account
@@ -197,19 +167,4 @@ class Account extends Model implements IDs
return $item->active AND $item->due > 0;
});
}
/**
* Get the external account ID for a specific integration
*
* @param External\Integrations $o
* @return mixed
*/
public function ExternalAccounting(External\Integrations $o)
{
return $this
->external()
->where('id','=',$o->id)
->where('site_id','=',$this->site_id)
->first();
}
}