Payment summary improvements, removed invoice/payment API calls
This commit is contained in:
@@ -27,21 +27,6 @@ class Invoice extends Model
|
||||
// Array of items that can be updated with PushNew
|
||||
protected $pushable = ['items'];
|
||||
|
||||
protected $appends = [
|
||||
'date_due',
|
||||
'due',
|
||||
'invoice_id_url',
|
||||
'total',
|
||||
];
|
||||
|
||||
protected $visible = [
|
||||
'date_due',
|
||||
'due',
|
||||
'id',
|
||||
'invoice_id_url',
|
||||
'total',
|
||||
];
|
||||
|
||||
protected $with = [
|
||||
'account.country.currency',
|
||||
'items.taxes',
|
||||
@@ -97,21 +82,11 @@ class Invoice extends Model
|
||||
return $this->date_orig->format('Y-m-d');
|
||||
}
|
||||
|
||||
public function getInvoiceIdAttribute()
|
||||
{
|
||||
return sprintf('%06s',$this->id);
|
||||
}
|
||||
|
||||
public function getInvoiceAccountIdAttribute()
|
||||
{
|
||||
return sprintf('%02s-%04s-%06s',$this->site_id,$this->account_id,$this->invoice_id);
|
||||
}
|
||||
|
||||
public function getInvoiceIdUrlAttribute()
|
||||
{
|
||||
return sprintf('<a href="/u/invoice/%s">%s</a>',$this->id,$this->invoice_account_id);
|
||||
}
|
||||
|
||||
public function getInvoiceTextAttribute()
|
||||
{
|
||||
return sprintf('Thank you for using %s for your Internet Services.',config('SITE_SETUP')->site_name);
|
||||
|
Reference in New Issue
Block a user