date_type : ps

This commit is contained in:
Sanjeev 2021-05-20 11:54:27 +05:30
parent 02ec890348
commit 27ef449cf3
2 changed files with 9 additions and 3 deletions

View File

@ -2211,6 +2211,7 @@ public function assignPDTempalate($data)
$vendor_pdofficer = isset($records['vendor_pdofficer']) ? $records['vendor_pdofficer'] : null;
$user_type = isset($records['user_type']) ? $records['user_type'] : null;
$createdby = $records['createdby'];
$date_type = isset($records['date_type']) ? $records['date_type'] : null;
$lender_details = array();
//if lender id exists, then make custom filter for only SMC usage
@ -2240,7 +2241,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);
$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);
if(count($result_data))
{

View File

@ -203,7 +203,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)
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)
{
$limit = 1000;
@ -261,7 +261,12 @@ class PD_Model extends SPARQ_Model {
}
if(($pd_from_date != "" || $pd_from_date != null) && ($pd_to_date != "" || $pd_to_date != null))
{
$this->db->where('PDTRIGGER.pd_date_of_initiation BETWEEN ' ."'$pd_from_date'". ' AND ' ."'$pd_to_date'");
// $this->db->where('PDTRIGGER.pd_date_of_initiation BETWEEN ' ."'$pd_from_date'". ' AND ' ."'$pd_to_date'");
if((!empty($date_type)) && ($date_type == 2)){
$this->db->where('PDTRIGGER.completed_on BETWEEN ' ."'$pd_from_date'". ' AND ' ."'$pd_to_date'");
}else{
$this->db->where('PDTRIGGER.pd_date_of_initiation BETWEEN ' ."'$pd_from_date'". ' AND ' ."'$pd_to_date'");
}
}
if(!empty($pd_city))