SMC FEEBACK CHNAGES
This commit is contained in:
parent
8255acfab2
commit
b6545b1167
@ -45,11 +45,11 @@ class readexceldata
|
|||||||
$section_ref_data = $CI->PD_Model->selectCustomRecords(array('*'),$where_condition_array,EXCEL_COLUMN_REF_NAME);
|
$section_ref_data = $CI->PD_Model->selectCustomRecords(array('*'),$where_condition_array,EXCEL_COLUMN_REF_NAME);
|
||||||
// print_r($section_ref_data);die();
|
// print_r($section_ref_data);die();
|
||||||
$return_data = array();
|
$return_data = array();
|
||||||
|
// $section_id = is_null($section_id) ? '' : $section_id;
|
||||||
switch($section_id)
|
if($section_id)
|
||||||
{
|
{
|
||||||
case is_numeric($section_id):
|
|
||||||
|
|
||||||
$return_data = SELF::getIndividualSectionData($sheetData,$section_ref_data);
|
$return_data = SELF::getIndividualSectionData($sheetData,$section_ref_data);
|
||||||
if($section_id == 2) //get pd initialted address as custom function
|
if($section_id == 2) //get pd initialted address as custom function
|
||||||
{
|
{
|
||||||
@ -65,13 +65,14 @@ class readexceldata
|
|||||||
if(count($pd_master)){ $return_data['sub_product'] = $pd_master[0]['fk_subproduct_id']; }
|
if(count($pd_master)){ $return_data['sub_product'] = $pd_master[0]['fk_subproduct_id']; }
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
|
|
||||||
|
|
||||||
default:
|
}
|
||||||
|
else
|
||||||
$return_data = SELF::getTriggerData($sheetData,$section_ref_data);
|
{
|
||||||
|
$return_data = SELF::getTriggerData($sheetData,$section_ref_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ($return_data);
|
return ($return_data);
|
||||||
|
|
||||||
@ -79,7 +80,7 @@ class readexceldata
|
|||||||
|
|
||||||
static function getIndividualSectionData($sheetData,$section_ref_data)
|
static function getIndividualSectionData($sheetData,$section_ref_data)
|
||||||
{
|
{
|
||||||
//$start_letter = 'B';$i = 1;
|
|
||||||
$return_data = array();
|
$return_data = array();
|
||||||
$keys = array();
|
$keys = array();
|
||||||
foreach ($sheetData as $key => $value)
|
foreach ($sheetData as $key => $value)
|
||||||
@ -115,12 +116,15 @@ class readexceldata
|
|||||||
}
|
}
|
||||||
static function getTriggerData($sheetData,$section_ref_data)
|
static function getTriggerData($sheetData,$section_ref_data)
|
||||||
{
|
{
|
||||||
// echo 'worked';die();
|
// echo 'worked';die();
|
||||||
$return_data = array();
|
$return_data = array();
|
||||||
unset($sheetData[1]);
|
unset($sheetData[1]);
|
||||||
|
$main_applicant_column_name = '';
|
||||||
foreach ($sheetData as $key => $value)
|
foreach ($sheetData as $key => $value)
|
||||||
{
|
{
|
||||||
// print_r($value);//die();
|
|
||||||
|
$value = SELF::trimExcelEmptyCells($value);
|
||||||
|
//print_r($value);//die();
|
||||||
$tmp = SELF::returnMatchedData($section_ref_data,$value);
|
$tmp = SELF::returnMatchedData($section_ref_data,$value);
|
||||||
if(is_array($tmp) && isset($tmp['key_name']))
|
if(is_array($tmp) && isset($tmp['key_name']))
|
||||||
{
|
{
|
||||||
@ -131,9 +135,13 @@ class readexceldata
|
|||||||
if($key == 8)
|
if($key == 8)
|
||||||
{
|
{
|
||||||
//print_r($value);
|
//print_r($value);
|
||||||
$temp['key_name'] = 'applicant_name';
|
$value = (array_splice(($value),3));$value = array_reverse($value);
|
||||||
$temp['value'] = $value['C'];
|
foreach ($value as $val)
|
||||||
$return_data[] = $temp;
|
{
|
||||||
|
$return_data['co_applicants'][] = array('applicant_name' => $val);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if($key == 9)
|
if($key == 9)
|
||||||
{break;}
|
{break;}
|
||||||
@ -215,7 +223,7 @@ class readexceldata
|
|||||||
{
|
{
|
||||||
for($j=0;$j<$total_no_of_data;$j++)
|
for($j=0;$j<$total_no_of_data;$j++)
|
||||||
{
|
{
|
||||||
$temp[$j][ $arr[$i] ] = isset($data_to_be_transform[ $arr[$i] ][$j]) ? $data_to_be_transform[ $arr[$i] ][$j] : 'DNA';
|
$temp[$j][ $arr[$i] ] = isset($data_to_be_transform[ $arr[$i] ][$j]) ? $data_to_be_transform[ $arr[$i] ][$j] : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user