From 40fd8ba4ae302b17576e6bcd0dc8b5f0ea121291 Mon Sep 17 00:00:00 2001 From: Smart Date: Mon, 7 Oct 2024 12:29:14 +0530 Subject: [PATCH] CHANGE_in FloterNotesConvertion --- app/Controllers/EmployeeRestController.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/Controllers/EmployeeRestController.php b/app/Controllers/EmployeeRestController.php index 79a02293..aba83570 100755 --- a/app/Controllers/EmployeeRestController.php +++ b/app/Controllers/EmployeeRestController.php @@ -1453,7 +1453,7 @@ class EmployeeRestController extends AdminController if ($value > 0) { if($value == 1 && $key ==='either-parents-pil') { $result .= ' + Either 2 Parents or 2 Parents in law'; - }if($value == 2 && $key ==='either-parents-pil') { + }else if($value == 2 && $key ==='either-parents-pil') { $result .= ' + Any 2 of Parents and Parents in law'; }else if($value != 0 && $key ==='spouse') { $string = str_replace('-', ' ', $key); @@ -1463,13 +1463,15 @@ class EmployeeRestController extends AdminController $result = 'Can Add Self '; }else if($value != 0 && $key ==='childrens') { if($value > 1){ $result .= ' + '.$value.' Children'; }else{ $result .= ' + '.$value.' Child'; } - }else if($value != 0 && $key ==='parents'){ - if($value > 1){ $result .= ' + '.$value.' Parents'; }else{ $result .= ' + '.$value.' Parent'; } - }else if($value != 0 && $key ==='parents-in-law'){ - if($value > 1){ $result .= ' + '.$value.' Parent in law'; }else{ $result .= ' + '.$value.' Parents in law'; } }else if($value != 0 && $key ==='elders_count') { + }else{ + $string = str_replace('-', ' ', $key); + $string = ucwords($string); + $result .= ' + '.$value.' '.$string; } + + } }