fix relation name
This commit is contained in:
@@ -335,7 +335,7 @@ class RequestAssignmentController extends Controller
|
|||||||
})
|
})
|
||||||
->orWhereNull('function_type');
|
->orWhereNull('function_type');
|
||||||
})
|
})
|
||||||
->whereHas('pbg_task_details', function ($q4) {
|
->whereHas('pbg_task_detail', function ($q4) {
|
||||||
$q4->where('unit', '>', 1);
|
$q4->where('unit', '>', 1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -530,7 +530,7 @@ class RequestAssignmentController extends Controller
|
|||||||
})
|
})
|
||||||
->orWhereNull('function_type');
|
->orWhereNull('function_type');
|
||||||
})
|
})
|
||||||
->whereHas('pbg_task_details', function ($q4) {
|
->whereHas('pbg_task_detail', function ($q4) {
|
||||||
$q4->where('unit', '>', 1);
|
$q4->where('unit', '>', 1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -554,10 +554,10 @@ class RequestAssignmentController extends Controller
|
|||||||
->whereIn("status", PbgTaskStatus::getNonVerified())
|
->whereIn("status", PbgTaskStatus::getNonVerified())
|
||||||
// Additional condition: unit IS NULL OR unit <= 1
|
// Additional condition: unit IS NULL OR unit <= 1
|
||||||
->where(function ($q3) {
|
->where(function ($q3) {
|
||||||
$q3->whereDoesntHave('pbg_task_details', function ($q4) {
|
$q3->whereDoesntHave('pbg_task_detail', function ($q4) {
|
||||||
$q4->where('unit', '>', 1);
|
$q4->where('unit', '>', 1);
|
||||||
})
|
})
|
||||||
->orWhereDoesntHave('pbg_task_details');
|
->orWhereDoesntHave('pbg_task_detail');
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
->where('is_valid', true)
|
->where('is_valid', true)
|
||||||
|
|||||||
Reference in New Issue
Block a user