fixed reconciliations list page broken deleted account ( #8669n0ywu )
This commit is contained in:
parent
7bdc7c834e
commit
ca0843c4b6
@ -34,6 +34,7 @@ class DeleteAccount extends Job implements ShouldDelete
|
|||||||
{
|
{
|
||||||
$rels = [
|
$rels = [
|
||||||
'transactions' => 'transactions',
|
'transactions' => 'transactions',
|
||||||
|
'reconciliations' => 'reconciliations',
|
||||||
];
|
];
|
||||||
|
|
||||||
$relationships = $this->countRelationships($this->model, $rels);
|
$relationships = $this->countRelationships($this->model, $rels);
|
||||||
|
@ -65,6 +65,11 @@ class Account extends Model
|
|||||||
return $this->hasMany('App\Models\Banking\Transaction');
|
return $this->hasMany('App\Models\Banking\Transaction');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function reconciliations()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\Models\Banking\Reconciliation');
|
||||||
|
}
|
||||||
|
|
||||||
public function scopeName($query, $name)
|
public function scopeName($query, $name)
|
||||||
{
|
{
|
||||||
return $query->where('name', '=', $name);
|
return $query->where('name', '=', $name);
|
||||||
|
@ -41,7 +41,7 @@ class Reconciliation extends Model
|
|||||||
|
|
||||||
public function account()
|
public function account()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Models\Banking\Account');
|
return $this->belongsTo('App\Models\Banking\Account')->withDefault(['name' => trans('general.na')]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user