mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/unity.git
synced 2026-08-22 22:04:08 +00:00
contract active api
This commit is contained in:
@@ -82,6 +82,21 @@ class ExistCheck implements Rule
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->type == 'contract_active') {
|
||||
foreach ($value as $key => $row) {
|
||||
if(!empty($row)) {
|
||||
$id = Hasher::decode('contracts', $row);
|
||||
$data = Contract::
|
||||
where('id', $id)
|
||||
->where('status', config('constants.contract.status.active'))
|
||||
->count();
|
||||
if (!$data) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->type == 'contract_entity') {
|
||||
foreach ($value as $key => $row) {
|
||||
if(!empty($row)) {
|
||||
|
||||
Reference in New Issue
Block a user