Removed redundant functions from Service::class
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user