From f6258fb0dfa229fd5fd69fa67858305af3f7033d Mon Sep 17 00:00:00 2001 From: Linksehat Staging Server Date: Wed, 3 Jan 2024 10:27:15 +0700 Subject: [PATCH] update --- Modules/Internal/Services/CorporateService.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Modules/Internal/Services/CorporateService.php b/Modules/Internal/Services/CorporateService.php index 75bd80c8..6d1d9ed3 100644 --- a/Modules/Internal/Services/CorporateService.php +++ b/Modules/Internal/Services/CorporateService.php @@ -171,7 +171,7 @@ class CorporateService 'code' => $row['service_code'] ]), 0, null, $row); } - + if (empty($row['plan_code'])) { throw new ImportRowException(__('benefit.PLAN_CODE_REQUIRED'), 0, null, $row); } else if (!in_array($row['plan_code'], $current_corporate_plans)){ @@ -181,16 +181,21 @@ class CorporateService // ]), 0, null, $row); } + + if (empty($row['code'])) { throw new ImportRowException(__('plan.REQUIRED', [ 'attribute' => 'Benefit Code' ]), 0, null, $row); } + if (empty($row['corporate_benefit_code'])) { - throw new ImportRowException(__('plan.REQUIRED', [ + throw new ImportRowException(__('Customer Benefit Code Required', [ 'attribute' => 'Customer Benefit Code' ]), 0, null, $row); } + + if (empty($row['description'])) { throw new ImportRowException(__('plan.REQUIRED', [ 'attribute' => 'Description' @@ -215,9 +220,12 @@ class CorporateService throw new ImportRowException(__('plan.MAX_FREQUENCY'), 0, null, $row); } + + if (!empty($row['budget']) && !in_array($budget_aso)) { throw new ImportRowException(__('plan.MAX_FREQUENCY'), 0, null, $row); } + // if (empty($row['limit_free_tc'])){ // throw new ImportRowException(__('plan.REQUIRED', [