Проверка на статус карты при выдаче
This commit is contained in:
@@ -52,7 +52,12 @@ class SttMedicalHistory extends Model
|
||||
->where('has_lost', false)
|
||||
->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