Merge remote-tracking branch 'origin/staging' into origin/production

This commit is contained in:
Linksehat Staging Server
2024-01-03 15:02:22 +07:00
16 changed files with 1540 additions and 364 deletions

View File

@@ -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', [
@@ -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'
@@ -211,14 +216,17 @@ 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', [
// 'attribute' => 'Limit Free TC'