This commit is contained in:
2023-09-15 11:25:23 +07:00
parent 4a155b2b70
commit e8f90772de

View File

@@ -69,7 +69,6 @@ class ExclusionService
]);
}
if (!empty($excl_array[5])) { //plans
$exclusion->rules()->create([
'name' => 'plan',
'values' => $excl_array[5]
@@ -131,8 +130,8 @@ class ExclusionService
if (!empty($excl_array[5])) { //plans
$codePlan = explode(',', $excl_array[5]);
collect($codePlan)->each(function ($codePlan) use ($corporate, $exclusion) {
$codePlan = Plan::where(['code' => $codePlan, 'corporate_id' => $corporate->id])->first();
if (!$codePlan) {
$isCodeplan = Plan::where(['code' => $codePlan, 'corporate_id' => $corporate->id])->first();
if (!$isCodeplan) {
throw new ImportRowException(__('codePlan.NOT_FOUND'), 0, NULL, $codePlan);
}