Completed On : ps

This commit is contained in:
VE10-Sanjeev 2023-05-04 16:25:37 +05:30
parent 12620b6855
commit 0d31583ca9
2 changed files with 8 additions and 5 deletions

View File

@ -9926,6 +9926,7 @@ class PD_Controller extends REST_Controller
if ($smc_lender_id == $current_lender_id && isset($agency_id) && $agency_id != null && $records['is_smc_vendor'] == true) {
if (isset($records['vendor_status']) && ($records['vendor_status'] == QC_COMPLETED)) {
$fields_to_update['pd_status'] = COMPLETED; //Here vendor_status is (QC_COMPLETED) means i have to update the Normal Status as COMPLETED.
$fields_to_update['completed_on'] = date('Y-m-d H:i:s');
$this->load->helper('smc_creditpd');
if(isset($records['random_string'])){
$random_string = $records['random_string'];

View File

@ -1406,7 +1406,9 @@ class SMC_Credit_PD_Controller extends REST_Controller {
//Dont Delete below Select Statement Because 3rd dec22 MIS Officer Name REPORTED by Venkat
//$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.pd_sno, PDTYPE.type_name, PDTRIGGER.lender_applicant_id, PDTRIGGER.fk_product_id, PRODUCT.abbr, PDTRIGGER.pd_status, PDAPPLICANTSDETAILS.applicant_name, (SELECT createdon FROM h_common_masters where PDTRIGGER.pd_id = primary_key AND field_name = "pd_status" order by log_id DESC limit 1) as updatedon, (SELECT concat(m_user_profile.first_name," " ,m_user_profile.last_name) FROM h_common_masters JOIN m_user_profile on h_common_masters.new_value = m_user_profile.userid where PDTRIGGER.pd_id = primary_key AND field_name = "fk_pd_allocated_to" order by log_id DESC limit 1) as officer_name,PDTRIGGER.mis_report_remarks,PDTRIGGER.vendor_status,PDTRIGGER.fk_city,CITY.name as city_name');
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.pd_sno, PDTYPE.type_name, PDTRIGGER.lender_applicant_id, PDTRIGGER.fk_product_id, PRODUCT.abbr, PDTRIGGER.pd_status, PDAPPLICANTSDETAILS.applicant_name, (SELECT createdon FROM h_common_masters where PDTRIGGER.pd_id = primary_key AND field_name = "pd_status" order by log_id DESC limit 1) as updatedon,PDTRIGGER.mis_report_remarks,PDTRIGGER.vendor_status,PDTRIGGER.fk_city,CITY.name as city_name');
$this->db->SELECT('PDTRIGGER.pd_id, PDTRIGGER.pd_sno, PDTYPE.type_name, PDTRIGGER.lender_applicant_id, PDTRIGGER.fk_product_id, PRODUCT.abbr, PDTRIGGER.pd_status, PDAPPLICANTSDETAILS.applicant_name,
(SELECT createdon FROM h_common_masters where PDTRIGGER.pd_id = primary_key AND field_name = "pd_status" order by log_id DESC limit 1) as updatedon,
PDTRIGGER.mis_report_remarks,PDTRIGGER.vendor_status,PDTRIGGER.fk_city,CITY.name as city_name');
$this->db->SELECT('(SELECT GROUP_CONCAT(concat(m_user_profile.first_name, " ", m_user_profile.last_name,"(",DATE_FORMAT(h_common_masters.createdon, "%d-%m-%Y %r"),") ")) FROM h_common_masters JOIN m_user_profile on h_common_masters.fk_createdby = m_user_profile.userid where PDTRIGGER.pd_id = h_common_masters.primary_key and field_name = "video_call_initiate_user" order by log_id DESC) as video_call_initiate_user, (SELECT count(log_id) FROM h_common_masters where PDTRIGGER.pd_id = h_common_masters.primary_key and field_name = "video_call_initiate_user") as total_video');
$this->db->SELECT('concat(ifnull(mup.first_name, mup1.first_name)," ",ifnull(mup.last_name, mup1.last_name)) AS officer_name');
$this->db->FROM(PDTRIGGER.' as PDTRIGGER');
@ -1423,14 +1425,14 @@ class SMC_Credit_PD_Controller extends REST_Controller {
if($from_date)
{
//$this->db->WHERE('date(PDTRIGGER.updatedon) >=',$from_date);
$this->db->WHERE('date(PDTRIGGER.completed_on) >=',$from_date);
$this->db->WHERE('date(PDTRIGGER.updatedon) >=',$from_date);
// $this->db->WHERE('date(PDTRIGGER.completed_on) >=',$from_date);
}
if($to_date)
{
//$this->db->WHERE('date(PDTRIGGER.updatedon) <=',$to_date);
$this->db->WHERE('date(PDTRIGGER.completed_on) <=',$to_date);
$this->db->WHERE('date(PDTRIGGER.updatedon) <=',$to_date);
// $this->db->WHERE('date(PDTRIGGER.completed_on) <=',$to_date);
}
if($officer_name)