createdon to completedon : ps

This commit is contained in:
VE10-Sanjeev 2022-11-04 13:26:28 +05:30
parent 25d306ca88
commit f3c7303dd5

View File

@ -577,7 +577,7 @@ class Data_Dump_Controller extends REST_Controller
$pdid_arr = array(); // testing purpose
$msg = '';
$columns = array('PDTRIGGER.pd_id', 'PDTRIGGER.addressline1', 'PDTRIGGER.addressline2', 'PDTRIGGER.addressline3', 'PDTRIGGER.pd_contact_mobileno', 'PDTRIGGER.pd_contact_landline', 'PDTRIGGER.pd_sno', 'DATE_FORMAT(PDTRIGGER.createdon, "%d/%m/%Y") as createdon', 'PDAPPLICANTSDETAILS.pd_co_applicant_id', 'PDTRIGGER.pd_contact_person_mail', 'PDTRIGGER.fk_lender_id');
$columns = array('PDTRIGGER.pd_id', 'PDTRIGGER.addressline1', 'PDTRIGGER.addressline2', 'PDTRIGGER.addressline3', 'PDTRIGGER.pd_contact_mobileno', 'PDTRIGGER.pd_contact_landline', 'PDTRIGGER.pd_sno', 'DATE_FORMAT(PDTRIGGER.createdon, "%d/%m/%Y") as createdon','DATE_FORMAT(PDTRIGGER.completed_on, "%d/%m/%Y") as completedon','PDAPPLICANTSDETAILS.pd_co_applicant_id', 'PDTRIGGER.pd_contact_person_mail', 'PDTRIGGER.fk_lender_id');
$table = PDTRIGGER . ' as PDTRIGGER';
$joins = array(array(
'table' => PDAPPLICANTSDETAILS . ' as PDAPPLICANTSDETAILS',
@ -591,15 +591,15 @@ class Data_Dump_Controller extends REST_Controller
}else if(($from_date != "" || $from_date != null) && ($to_date != "" || $to_date != null)){
$newDate1 = date("Y-m-d", strtotime($from_date));
$newDate2 = date("Y-m-d", strtotime($to_date));
$msg = "PD Created Date Given Format => " . $from_date ." to ".$to_date;
$msg = "PD Completed Date Given Format => " . $from_date ." to ".$to_date;
log_message('ERROR', $msg." Changed ".$newDate1." to ".$newDate2);
$where = 'DATE(PDTRIGGER.createdon) BETWEEN ' ."'$newDate1'". ' AND ' ."'$newDate2'";
$where = 'DATE(PDTRIGGER.completed_on) BETWEEN ' ."'$newDate1'". ' AND ' ."'$newDate2'";
$tgr_cond_arr = array('PDTRIGGER.pd_status' => QC_COMPLETED, $where => null);
}
else{
$msg = "90th date => " . $_90th_date;
log_message('ERROR', $msg);
$tgr_cond_arr = array('PDTRIGGER.pd_status' => QC_COMPLETED, 'DATE_FORMAT(PDTRIGGER.createdon, "%d/%m/%Y") <=' => $_90th_date);
$tgr_cond_arr = array('PDTRIGGER.pd_status' => QC_COMPLETED, 'DATE_FORMAT(PDTRIGGER.completed_on, "%d/%m/%Y") <=' => $_90th_date);
}
// 'PDTRIGGER.fk_customer_segment'=> 11 // 1 4 5 8 9 10 11