added default account name

This commit is contained in:
denisdulici 2020-03-23 20:02:00 +03:00
parent 8e4f28a8a7
commit 59cc7b4fd1

View File

@ -32,7 +32,7 @@ class Transfer extends Model
public function expense_account()
{
return $this->belongsTo('App\Models\Banking\Account', 'expense_transaction.account_id', 'id');
return $this->belongsTo('App\Models\Banking\Account', 'expense_transaction.account_id', 'id')->withDefault(['name' => trans('general.na')]);
}
public function income_transaction()
@ -42,6 +42,6 @@ class Transfer extends Model
public function income_account()
{
return $this->belongsTo('App\Models\Banking\Account', 'income_transaction.account_id', 'id');
return $this->belongsTo('App\Models\Banking\Account', 'income_transaction.account_id', 'id')->withDefault(['name' => trans('general.na')]);
}
}