fixing the unknown tab to list the transactions of is_mapped false and also mapped and status in rejected

This commit is contained in:
Steve Ng
2023-10-26 00:01:10 +08:00
parent b1426aa8bb
commit 24a6c8cf53
2 changed files with 6 additions and 3 deletions
+5
View File
@@ -49,6 +49,11 @@ class StatementTransaction extends Model
return $this->hasMany(StatementTransactionOwner::class);
}
public function owner_status()
{
return $this->owners()->whereIn('status',[ApprovalStatus::APPROVED,ApprovalStatus::COMPLETED,ApprovalStatus::PENDING_VERIFICATION]);
}
public function scopeDoesntMapStatement($query)
{
$query->whereDoesntHave('owners', function($query){