client MOB : ps
This commit is contained in:
parent
b93eb3c8f8
commit
ef6336349d
@ -2076,6 +2076,7 @@ public function assignPDTempalate($data)
|
||||
if($this->get('tdate')) { $tdate = $this->get('tdate'); }
|
||||
if($this->get('status')) { $status = $this->get('status'); }
|
||||
if($this->get('user_type')) { $user_type = $this->get('user_type'); }
|
||||
if($this->get('client')) { $client = $this->get('client'); }
|
||||
|
||||
|
||||
//if lender id exists, then make custom filter for only SMC usage
|
||||
@ -2107,7 +2108,7 @@ public function assignPDTempalate($data)
|
||||
|
||||
}
|
||||
// die();
|
||||
$result_data = $this->PD_Model->listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status,$lender_details,$pdagencyid,$vendor_pdofficer,$user_type,$createdby);
|
||||
$result_data = $this->PD_Model->listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status,$lender_details,$pdagencyid,$vendor_pdofficer,$user_type,$createdby,$client);
|
||||
// echo count($result_data['data']);die();
|
||||
if($result_data['data_status'] == true)
|
||||
{
|
||||
@ -2215,6 +2216,7 @@ public function assignPDTempalate($data)
|
||||
// echo "B4 date_type ".$records['date_type']." and my return type is ".gettype($records['date_type'])."\n";
|
||||
$date_type = isset($records['date_type']) ? (int)$records['date_type'] : null;
|
||||
// echo "After date_type ".$date_type." and my return type is ".gettype($date_type)."\n";
|
||||
$client = isset($records['client']) ? $records['client'] : null;
|
||||
|
||||
$lender_details = array();
|
||||
//if lender id exists, then make custom filter for only SMC usage
|
||||
@ -2245,7 +2247,7 @@ public function assignPDTempalate($data)
|
||||
|
||||
}
|
||||
|
||||
$result_data = $this->PD_Model->PDListwithGlobalFilters($pd_type,$pd_status,$pd_from_date,$pd_to_date,$pd_city,$pd_products,$pd_lender,$pd_applicant_name,$pd_applicant_lender_ref,$pd_officer_name,$include_archive,$pd_officer_id,$pd_agency_id,$vendor_pdofficer,$user_type,$createdby,$date_type);
|
||||
$result_data = $this->PD_Model->PDListwithGlobalFilters($pd_type,$pd_status,$pd_from_date,$pd_to_date,$pd_city,$pd_products,$pd_lender,$pd_applicant_name,$pd_applicant_lender_ref,$pd_officer_name,$include_archive,$pd_officer_id,$pd_agency_id,$vendor_pdofficer,$user_type,$createdby,$date_type,$client);
|
||||
|
||||
if(count($result_data))
|
||||
{
|
||||
|
||||
@ -11,7 +11,7 @@ class PD_Model extends SPARQ_Model {
|
||||
}
|
||||
|
||||
|
||||
public function listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status,$lender_details,$pdagencyid,$vendor_pdofficer,$user_type,$createdby)// $page represents mysql offset
|
||||
public function listLessPDDetails($page,$limit,$sort,$pdofficerid,$datetype,$fdate,$tdate,$lenderid,$status,$lender_details,$pdagencyid,$vendor_pdofficer,$user_type,$createdby,$client)// $page represents mysql offset
|
||||
{
|
||||
// echo $lenderid;die();
|
||||
$this->db->SELECT('PDTRIGGER.pd_id,PDTRIGGER.imgc_fin_institute,PDTRIGGER.pd_sno,PDTRIGGER.fk_lender_id,PDTRIGGER.sub_entity_id,SUBENTITY.short_name as sub_entity_short_name,ENTITY.full_name as lender_full_name,ENTITY.short_name as lender_short_name,PDTRIGGER.fk_entity_billing_id,ENTITYBILLING.billing_name, PDTRIGGER.lender_applicant_id, DATE_FORMAT(PDTRIGGER.pd_date_of_initiation, "%d/%m/%Y") as pd_date_of_initiation, PDTRIGGER.fk_product_id,PRODUCTS.name as product_name,PRODUCTS.abbr as product_abbr, PRODUCTS.prod_catagory,PDTRIGGER.fk_subproduct_id,SUBPRODUCTS.name as subproduct_name,SUBPRODUCTS.abbr as subproduct_abbr, PDTRIGGER.fk_pd_type,PDTYPE.type_name as pd_type_name, PDTRIGGER.pd_status,PDTRIGGER.pd_specific_clarification, DATE_FORMAT(PDTRIGGER.createdon,"%d/%m/%Y %H:%i:%s") as createdon, PDTRIGGER.fk_createdby, DATE_FORMAT(PDTRIGGER.updatedon,"%d/%m/%Y %H:%i:%s") as master_updatedon, PDTRIGGER.fk_updatedby,concat(USERPROFILE.first_name," ",USERPROFILE.last_name) as createdby,concat(USERPROFILE1.first_name," ",USERPROFILE1.last_name) as updatedby, PDTRIGGER.fk_pd_allocation_type,,PDALLOCATIONTYPE.pd_allocation_type_name, PDTRIGGER.fk_pd_allocated_to,concat(USERPROFILE2.first_name," ",USERPROFILE2.last_name) as pd_allocated_to,PDTRIGGER.executive_id,concat(EXECUTIVE.first_name," ",EXECUTIVE.last_name) as executive_name,PDTRIGGER.central_pd_officer_id,concat(CENTRALOFFICER.first_name," ",CENTRALOFFICER.last_name) as centralofficer,PDTRIGGER.fk_pd_template_id,TEMPLATE.template_name, PDTRIGGER.fk_customer_segment,CUSTOMERSEGMENT.name as customer_segment_name,CUSTOMERSEGMENT.abbr as customer_segment_abbr, PDTRIGGER.pd_officier_final_judgement, PDTRIGGER.pd_agency_id,AGENCY.full_name as agency_name,AGENCY.short_name as agency_short_name,AGENCY.is_qc_enabled, PDTRIGGER.loan_amount,PDTRIGGER.addressline1,PDTRIGGER.addressline2,PDTRIGGER.addressline3,PDTRIGGER.fk_city,CITY.name as city_name,PDTRIGGER.fk_state,STATE.name as state_name,PINCODE.pincode,PDTRIGGER.pincode as pincode_id,PDTRIGGER.pd_contact_person,PDTRIGGER.pd_contact_mobileno,DATE_FORMAT(PDTRIGGER.scheduled_on,"%d/%m/%Y %h:%i %p") as scheduled_on,DATE_FORMAT(PDTRIGGER.completed_on,"%d/%m/%Y %h:%i:%s %p") as completed_on,PDTRIGGER.remarks,PDTRIGGER.is_original_report_created,PDTRIGGER.pd_report_latest_version,PDTRIGGER.pd_branch_id,ENTITYLENDERBRANCH.branch_name,PDTRIGGER.qc_feedback,PDTRIGGER.qc_rating,PDTRIGGER.qc_remarks,PDTRIGGER.lender_rating,PDTRIGGER.lender_feedback,PDTRIGGER.other_pincode,PDAPPLICANTSDETAILS.applicant_name,PDTRIGGER.is_otp_done,PDTRIGGER.is_child,PDTRIGGER.parent_pd_id,PDTRIGGER.fk_primary_address_id,PDTRIGGER.fk_address_id,PDTRIGGER.encrypted_url,PDTRIGGER.random_string,PDTRIGGER.pd_qc_note,ENTITY.is_sms_enabled,ENTITY.is_mail_enabled,ENTITY.is_app_notify_enabled,PDTRIGGER.is_notify_enabled,(SELECT DATE_FORMAT(createdon,"%d/%m/%Y") FROM h_common_masters where PDTRIGGER.pd_id = primary_key AND field_name = "pd_status" order by log_id DESC limit 1) as updatedon,ENTITYFININSTITUTION.institute_name as fin_institute_name,PDTRIGGER.is_video_merged,PDTRIGGER.vendor_status');
|
||||
@ -44,6 +44,10 @@ class PD_Model extends SPARQ_Model {
|
||||
// $this->db->JOIN(COMMONMASTER.' as COMMONMASTER','PDTRIGGER.pd_id = COMMONMASTER.primary_key && COMMONMASTER.field_name = pd_status ','LEFT');
|
||||
$this->db->WHERE('PDTRIGGER.pd_status !=',ARCHIVED);
|
||||
$this->db->WHERE('PDTRIGGER.pd_status !=',TRUNCATED);
|
||||
if($client != '' && $client == 'MOB')
|
||||
{
|
||||
$this->db->WHERE('PDTRIGGER.fk_pd_type != ',2);
|
||||
}
|
||||
|
||||
if($createdby != '')
|
||||
{
|
||||
@ -203,7 +207,7 @@ class PD_Model extends SPARQ_Model {
|
||||
|
||||
|
||||
//PD List with Common Filters
|
||||
public function PDListwithGlobalFilters($pd_type,$pd_status,$pd_from_date,$pd_to_date,$pd_city,$pd_products,$pd_lender,$pd_applicant_name,$pd_applicant_lender_ref,$pd_officer_name,$include_archive,$pd_officer_id,$pd_agency_id,$vendor_pdofficer,$user_type,$createdby,$date_type)
|
||||
public function PDListwithGlobalFilters($pd_type,$pd_status,$pd_from_date,$pd_to_date,$pd_city,$pd_products,$pd_lender,$pd_applicant_name,$pd_applicant_lender_ref,$pd_officer_name,$include_archive,$pd_officer_id,$pd_agency_id,$vendor_pdofficer,$user_type,$createdby,$date_type,$client)
|
||||
{
|
||||
|
||||
$limit = 1000;
|
||||
@ -243,10 +247,13 @@ class PD_Model extends SPARQ_Model {
|
||||
{
|
||||
$this->db->OR_WHERE('PDTRIGGER.pd_status',ARCHIVED);
|
||||
}
|
||||
|
||||
if(!empty($client) && $client == 'MOB')
|
||||
{
|
||||
$this->db->WHERE('PDTRIGGER.fk_pd_type != ',2);
|
||||
$pd_type = '';
|
||||
}
|
||||
if(!empty($pd_type))
|
||||
{
|
||||
|
||||
$this->db->WHERE_IN('PDTRIGGER.fk_pd_type',$pd_type);
|
||||
}
|
||||
if(!empty($createdby))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user