1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for activities

This commit is contained in:
= 2021-05-07 21:00:55 +10:00
parent b074338947
commit ab0de39c75
3 changed files with 11 additions and 1 deletions

View File

@ -128,6 +128,11 @@ class Credit extends BaseModel
return $this->hasManyThrough(Backup::class, Activity::class);
}
public function activities()
{
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(300);
}
public function company()
{
return $this->belongsTo(Company::class);

View File

@ -204,7 +204,7 @@ class Invoice extends BaseModel
public function activities()
{
return $this->hasMany(Activity::class);
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(300);
}
public function history()

View File

@ -130,6 +130,11 @@ class Quote extends BaseModel
return $this->hasManyThrough(Backup::class, Activity::class);
}
public function activities()
{
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(300);
}
public function user()
{
return $this->belongsTo(User::class)->withTrashed();