From aa811d7daad6a6b1d10ec473d2bf9db4e4717174 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Fri, 30 Sep 2022 10:23:49 +0530 Subject: [PATCH] 90 day Data 1 : ps --- .../controllers/Data_Dump_Controller.php | 14 +++++++------- api/application/helpers/pdalerts_helper.php | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/api/application/controllers/Data_Dump_Controller.php b/api/application/controllers/Data_Dump_Controller.php index f5a2a0cc..ca081dfd 100644 --- a/api/application/controllers/Data_Dump_Controller.php +++ b/api/application/controllers/Data_Dump_Controller.php @@ -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++) { diff --git a/api/application/helpers/pdalerts_helper.php b/api/application/helpers/pdalerts_helper.php index 68c50308..ffeb4a4c 100644 --- a/api/application/helpers/pdalerts_helper.php +++ b/api/application/helpers/pdalerts_helper.php @@ -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");