[WIP] Store Limit
This commit is contained in:
@@ -11,7 +11,9 @@ class LimitJournal extends Model
|
||||
|
||||
protected $fillable = [
|
||||
'journalable',
|
||||
'mutation',
|
||||
'previous_balance',
|
||||
'total_credit',
|
||||
'total_debit',
|
||||
'type',
|
||||
'balance',
|
||||
'description',
|
||||
@@ -21,4 +23,15 @@ class LimitJournal extends Model
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
|
||||
public function setTotalCreditAttribute($value)
|
||||
{
|
||||
$this->attributes['total_credit'] = empty($value) ? 0 : $value;
|
||||
}
|
||||
|
||||
public function setTotalDebitAttribute($value)
|
||||
{
|
||||
$this->attributes['total_debit'] = empty($value) ? 0 : $value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user