Move charge actions to ChargeController, implemented charge delete
This commit is contained in:
@@ -70,7 +70,7 @@ class Charge extends Model
|
||||
|
||||
/* ATTRIBUTES */
|
||||
|
||||
public function getNameAttribute()
|
||||
public function getNameAttribute(): string
|
||||
{
|
||||
return sprintf('%s %s',
|
||||
$this->description,
|
||||
@@ -93,4 +93,14 @@ class Charge extends Model
|
||||
{
|
||||
return Arr::get(InvoiceItem::type,$this->type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this charge processable
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getUnprocessedAttribute(): bool
|
||||
{
|
||||
return $this->active && (! $this->processed);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user