mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
fixing the unknown tab to list the transactions of is_mapped false and also mapped and status in rejected
This commit is contained in:
@@ -16,9 +16,7 @@ class IsMappedFalseOrMappedButStatusIn implements Filter
|
||||
{
|
||||
return $builder->where(function($q) use ($value) {
|
||||
$q->whereDoesntHave('owners');
|
||||
$q->orwhereHas('owners', function($query) use ($value) {
|
||||
$query->whereIn('status', $value);
|
||||
});
|
||||
$q->orwhereDoesntHave('owner_status');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -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){
|
||||
|
||||
Reference in New Issue
Block a user