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