90 day Data 1 : ps

This commit is contained in:
VE10-Sanjeev 2022-09-30 10:23:49 +05:30
parent 66302add17
commit aa811d7daa
2 changed files with 8 additions and 7 deletions

View File

@ -585,21 +585,21 @@ class Data_Dump_Controller extends REST_Controller
log_message('ERROR', "PD Serial No => " . $pdsno);
$tgr_cond_arr = array('PDTRIGGER.pd_status' => QC_COMPLETED, 'PDTRIGGER.pd_sno' => $pdsno);
}else if(($from_date != "" || $from_date != null) && ($to_date != "" || $to_date != null)){
$newDate1 = date("d/m/Y", strtotime($from_date));
$newDate2 = date("d/m/Y", strtotime($to_date));
$where = 'DATE_FORMAT(PDTRIGGER.createdon, "%d/%m/%Y") BETWEEN ' ."'$newDate1'". ' AND ' ."'$newDate2'";
$newDate1 = date("Y-m-d", strtotime($from_date));
$newDate2 = date("Y-m-d", strtotime($to_date));
log_message('ERROR', "PD Date Given Format => " . $from_date ." to ".$to_date." Changed ".$newDate1." to ".$newDate2);
$where = 'DATE_FORMAT(PDTRIGGER.createdon, "%Y-%m-%d") BETWEEN ' ."'$newDate1'". ' AND ' ."'$newDate2'";
$tgr_cond_arr = array('PDTRIGGER.pd_status' => QC_COMPLETED, $where => null);
}
else {
else{
log_message('ERROR', "90th date => " . $_90th_date);
$tgr_cond_arr = array('PDTRIGGER.pd_status' => QC_COMPLETED, 'DATE_FORMAT(PDTRIGGER.createdon, "%d/%m/%Y") <=' => $_90th_date);
}
// 'PDTRIGGER.fk_customer_segment'=> 11 // 1 4 5 8 9 10 11
log_message('ERROR', "trigger details Total count " . count($tgr_cond_arr));
$tgr_dtls = $this->PD_Model->getJoinRecords($columns, $table, $joins, $tgr_cond_arr);
// print_r($this->db->last_query());die();
// print_r($tgr_dtls);die();
log_message('ERROR', "Trigger Details Total Records => " . count($tgr_dtls));
// print_r($tgr_dtls); print_r($this->db->last_query());die();
// $i = 0; // testing Purpose only
// for($i = 0 ;$i < 3;$i++){ // testing purpose only.
for ($i = 0; $i < count($tgr_dtls); $i++) {

View File

@ -552,6 +552,7 @@ class PDALERTS
$mail->addBCC("cpa@smcfinance.com");
$mail->addBCC("neville@sinemanagement.com");
$mail->addBCC("ssa@venbainfotech.com");
$mail->addBCC("aakashjadhav@smcfinance.com");
$mail->addAddress('cpumumbai@smcfinance.com');
if(in_array((string)$city,$city_arg)){ $mail->addBCC("satendersingh@smcfinance.com");}
// $mail->addBCC("vitvelz@gmail.com");