From e8f90772dedb07a93a89f6761240854ab02175a8 Mon Sep 17 00:00:00 2001 From: Tb Fajri Date: Fri, 15 Sep 2023 11:25:23 +0700 Subject: [PATCH] update --- Modules/Internal/Services/ExclusionService.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Modules/Internal/Services/ExclusionService.php b/Modules/Internal/Services/ExclusionService.php index cd6e4782..984d631b 100644 --- a/Modules/Internal/Services/ExclusionService.php +++ b/Modules/Internal/Services/ExclusionService.php @@ -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); }