Проверка на статус карты при выдаче
This commit is contained in:
@@ -39,7 +39,12 @@ class SttMedicalHistory extends Model
|
|||||||
->where('has_lost', false)
|
->where('has_lost', false)
|
||||||
->exists();
|
->exists();
|
||||||
|
|
||||||
return !$hasOpenIssue;
|
$hasNotBadStatus = $this->archiveInfo()
|
||||||
|
->whereNotNull('status_id')
|
||||||
|
->whereNot('status_id', 1)
|
||||||
|
->exists();
|
||||||
|
|
||||||
|
return ($hasOpenIssue !== true && $hasNotBadStatus === true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -52,7 +52,12 @@ class SttMedicalHistory extends Model
|
|||||||
->where('has_lost', false)
|
->where('has_lost', false)
|
||||||
->exists();
|
->exists();
|
||||||
|
|
||||||
return !$hasOpenIssue;
|
$hasNotBadStatus = $this->archiveInfo()
|
||||||
|
->whereNotNull('status_id')
|
||||||
|
->whereNot('status_id', 1)
|
||||||
|
->exists();
|
||||||
|
|
||||||
|
return ($hasOpenIssue !== true && $hasNotBadStatus === true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user