update
This commit is contained in:
@@ -29,10 +29,10 @@ class CorporateService
|
||||
MCU=Medical Check Up
|
||||
KB-VACC = Family Planning/Vaccination
|
||||
LAB = Test Diagnostic
|
||||
PHAR = Pharmacy
|
||||
PHAR = Pharmacy
|
||||
**/
|
||||
protected $service_code = ['MEDIVAC', 'MSO', 'PAC', 'OPDE', 'IP', 'OP', 'MA', 'ANC', 'DE', 'GL', 'SP', 'PF', 'MCU', 'KB-VACC', 'LAB', 'PHAR'];
|
||||
|
||||
|
||||
protected function corporatePlansId($corporate_id){
|
||||
$plans = Plan::where('corporate_id', $corporate_id)->get()->toArray();
|
||||
$current_corporate_plans_id = [];
|
||||
@@ -80,8 +80,8 @@ class CorporateService
|
||||
throw new ImportRowException(__('plan.REQUIRED', [
|
||||
'attribute' => 'Customer Plan'
|
||||
]), 0, null, $row);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!in_array($row['type'], $plan_code)){
|
||||
throw new ImportRowException(__('plan.NOT_MATCH', [
|
||||
'attribute' => 'Plan Type',
|
||||
@@ -105,13 +105,13 @@ class CorporateService
|
||||
// 'code' => $row['code']
|
||||
// ]), 0, null, $row);
|
||||
// }
|
||||
|
||||
|
||||
if (!empty($row['family_plan']) && !in_array($row['family_plan'],$family_plan)) {
|
||||
throw new ImportRowException(__('plan.NOT_MATCH', [
|
||||
'attribute' => 'Family Plan',
|
||||
'code' => $row['family_plan']
|
||||
]), 0, null, $row);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($row['prorate_type']) && !in_array($row['prorate_type'], $prorate_type)) {
|
||||
throw new ImportRowException(__('plan.NOT_MATCH', [
|
||||
@@ -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,21 +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(__('Customer Benefit Code Required', [
|
||||
'attribute' => 'Customer Benefit Code'
|
||||
]), 0, null, $row);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (empty($row['description'])) {
|
||||
throw new ImportRowException(__('plan.REQUIRED', [
|
||||
'attribute' => 'Description'
|
||||
@@ -216,16 +216,16 @@ class CorporateService
|
||||
'attribute' => 'Gender'
|
||||
]), 0, null, $row);
|
||||
}
|
||||
if (!empty($row['max_frequency_period']) && $row['max_frequency_period'] >= $max_frequence){ // jenis frequence
|
||||
if (!empty($row['max_frequency_period']) && $row['max_frequency_period'] >= $max_frequence){ // jenis frequence
|
||||
throw new ImportRowException(__('plan.MAX_FREQUENCY'), 0, null, $row);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!empty($row['budget']) && !in_array($budget_aso)) {
|
||||
|
||||
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', [
|
||||
|
||||
Reference in New Issue
Block a user