Payment summary improvements, removed invoice/payment API calls
This commit is contained in:
@@ -20,19 +20,6 @@ class Payment extends Model
|
||||
protected $dateFormat = 'U';
|
||||
protected $with = ['account.country.currency','items'];
|
||||
|
||||
protected $appends = [
|
||||
'date_paid',
|
||||
'payment_id_url',
|
||||
'total',
|
||||
];
|
||||
|
||||
protected $visible = [
|
||||
'date_paid',
|
||||
'id',
|
||||
'payment_id_url',
|
||||
'total',
|
||||
];
|
||||
|
||||
public function account()
|
||||
{
|
||||
return $this->belongsTo(Account::class);
|
||||
@@ -48,16 +35,6 @@ class Payment extends Model
|
||||
return $this->date_payment->format('Y-m-d');
|
||||
}
|
||||
|
||||
public function getPaymentIdAttribute()
|
||||
{
|
||||
return sprintf('%02s-%04s+%05s',$this->site_id,$this->account_id,$this->id);
|
||||
}
|
||||
|
||||
public function getPaymentIdUrlAttribute()
|
||||
{
|
||||
return sprintf('<a href="/u/payment/view/%s">%s</a>',$this->id,$this->payment_id);
|
||||
}
|
||||
|
||||
public function getTotalAttribute()
|
||||
{
|
||||
return sprintf('%3.'.$this->currency()->rounding.'f',$this->total_amt);
|
||||
|
Reference in New Issue
Block a user