Google sheet 8: ps
This commit is contained in:
parent
19fb47ca2c
commit
e6edf865bc
@ -166,8 +166,8 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
}else{
|
||||
$splitCompanyandApplicant = explode('/',$applicatantParts[0]);
|
||||
if(count($splitCompanyandApplicant)>1){
|
||||
$pd_applicant_details[$j]['applicant_name'] = $splitCompanyandApplicant[0];
|
||||
$pd_applicant_details[$j]['company_name'] = isset($splitCompanyandApplicant[1]) ? $splitCompanyandApplicant[1] : null;
|
||||
$pd_applicant_details[0]['applicant_name'] = $splitCompanyandApplicant[0];
|
||||
$pd_applicant_details[0]['company_name'] = isset($splitCompanyandApplicant[1]) ? $splitCompanyandApplicant[1] : null;
|
||||
}
|
||||
else{
|
||||
$pd_applicant_details[0]['applicant_name'] = $splitCompanyandApplicant[0];
|
||||
@ -211,8 +211,8 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
log_message('ERROR',"G-Sheet For PD Step 2.6 (Sixth Cell createdPerson) GSheet data : ".$GSdata["PersonDoing"]);
|
||||
}
|
||||
if(isset($GSdata["LoanAmount"]) && ($GSdata["LoanAmount"] != "" || $GSdata["LoanAmount"] != 0)){
|
||||
$amount = strtolower($GSdata["LoanAmount"]);
|
||||
$amount = explode(' ', $amount);
|
||||
// $amount = strtolower($GSdata["LoanAmount"]);
|
||||
// $amount = explode(' ', $amount);
|
||||
// 3 zeros in 1,000 - One Thousand
|
||||
// 4 zeros in 10,000 - Ten Thousand
|
||||
// 5 zeros in 100,000 - 1 Lakh / 100 Thousand
|
||||
@ -224,17 +224,18 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
// 11 zeros in 100,000,000,000 - 10,000 Crore / 100 Billion
|
||||
// 12 zeros in 1,000,000,000,000 - 1 Lakh Crore / 1 Trillion
|
||||
// 13 zeros in 10,000,000,000,000 - 10 Lakh Crore / 10 Trillion
|
||||
if(gettype($amount[1]) == 'string'){
|
||||
if($amount[1] == 'cr' || $amount[1] == 'crore'){
|
||||
$amount[1] = "0000000";
|
||||
}
|
||||
if($amount[1] == 'lac' || $amount[1] == 'lacs' || $amount[1] == 'lakh'){
|
||||
$amount[1] = "000000";
|
||||
}
|
||||
if($amount[1] =='k' ||$amount[1] == 'thousand'){
|
||||
$amount[1] = "000";
|
||||
}}
|
||||
$pd_details['loan_amount'] = implode("",$amount);
|
||||
// if(gettype($amount[1]) == 'string'){
|
||||
// if($amount[1] == 'cr' || $amount[1] == 'crore'){
|
||||
// $amount[1] = "0000000";
|
||||
// }
|
||||
// if($amount[1] == 'lac' || $amount[1] == 'lacs' || $amount[1] == 'lakh'){
|
||||
// $amount[1] = "000000";
|
||||
// }
|
||||
// if($amount[1] =='k' ||$amount[1] == 'thousand'){
|
||||
// $amount[1] = "000";
|
||||
// }}
|
||||
// $pd_details['loan_amount'] = implode("",$amount);
|
||||
$pd_details['loan_amount'] = (int)$GSdata["LoanAmount"];
|
||||
log_message('ERROR',"G-Sheet For PD Step 2.7 (Seventh Cell Amount) GSheet data : ".$GSdata["LoanAmount"]." PD :".$pd_details['loan_amount']);
|
||||
}
|
||||
$fk_product_id ="";
|
||||
@ -267,9 +268,10 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
}
|
||||
|
||||
if(isset($GSdata["DateofReceivingPDRequest"]) && $GSdata["DateofReceivingPDRequest"] != ""){
|
||||
$new_date_format = date('Y-m-d H:i:s', strtotime($GSdata["DateofReceivingPDRequest"]));
|
||||
$pd_details['pd_date_of_initiation'] = $new_date_format;
|
||||
log_message('ERROR',"G-Sheet For PD Step 2.10 (tenth Cell initiationdate) GSheet data : ".$GSdata["DateofReceivingPDRequest"]." PD :".$pd_details['pd_date_of_initiation']);
|
||||
// $new_date_format = date('Y-m-d H:i:s', strtotime($GSdata["DateofReceivingPDRequest"]));
|
||||
// $pd_details['pd_date_of_initiation'] = $new_date_format;
|
||||
// log_message('ERROR',"G-Sheet For PD Step 2.10 (tenth Cell initiationdate) GSheet data : ".$GSdata["DateofReceivingPDRequest"]." PD :".$pd_details['pd_date_of_initiation']);
|
||||
$pd_details['pd_date_of_initiation'] = date('Y-m-d H-i-s');
|
||||
}
|
||||
|
||||
if(isset($GSdata["RemarksonCurrentStatus"]) && $GSdata["RemarksonCurrentStatus"] != ""){
|
||||
@ -281,8 +283,8 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
log_message('ERROR',"G-Sheet For PD Step 2.11 (eleventh Cell Remarks) GSheet data : ".$GSdata["RemarksonCurrentStatus"]." PD :".$pd_details['remarks']);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// print_r($pd_applicant_details);
|
||||
// die();
|
||||
## Default Status section;
|
||||
$pd_details['pd_status'] = TRIGGERED;
|
||||
## Template ID Section.
|
||||
@ -321,6 +323,8 @@ class Data_Dump_Controller extends REST_Controller {
|
||||
$randomString .= $characters[rand(0, $charactersLength - 1)];
|
||||
}
|
||||
$pd_details['random_string'] = $randomString;
|
||||
$url = OFFICER_TRACKING_URL.$randomString;
|
||||
$pd_details['encrypted_url'] = $url;
|
||||
$pd_details['is_notify_enabled'] = 1;
|
||||
log_message('ERROR',"G-Sheet For PD Step 3 (Before Inserting Trigger)");
|
||||
try {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user