Template : ps

This commit is contained in:
VE10-Sanjeev 2023-06-09 12:48:59 +05:30
parent c55573596d
commit ec38c19811

View File

@ -252,7 +252,7 @@ class Flyhi_Controller extends REST_Controller {
if($user_id && is_numeric($user_id))
{ $where_condition_array['SALES_PD_DATA.createdby'] = $user_id; }
$where_condition_array['SALES_PD_DATA.sales_pd_type in (3,4)'] = null;
$where_condition_array['SALES_PD_DATA.sales_pd_type not in (1,2,3,4)'] = null; // comment this
$order_by = 'SALES_PD_DATA.sales_pd_id';
$Flyhi_pd_data = $this->Flyhi_Model->getJoinRecords($columns,$table,$joins,$where_condition_array,$order_by,'DESC','',$or_where);
@ -281,8 +281,14 @@ class Flyhi_Controller extends REST_Controller {
// $product = $records['product_id'];
$flyhi_pd_type = isset($records['sales_pd_type']) ? $records['sales_pd_type'] : null;
$product = isset($records['product_id']) ? $records['product_id'] : null;
$pd_type = 2;
if(isset($records['pd_type'])){ $pd_type = $records['pd_type'];}
$FHFSL_product = (ENVIRONMENT == 'production' ? 27 : 26);
$DFSL_lender = (ENVIRONMENT == 'production' ? 0 : 49);
$FHFSL_lender = (ENVIRONMENT == 'production' ? 19 : 31);
if(isset($records['pd_type'])){ $pd_type = $records['pd_type']; }
if((int)$lender_id === $FHFSL_lender){ $pd_type = 2; }
if((int)$lender_id === $DFSL_lender){ $pd_type = 3; }
$template = $this->Flyhi_Model->selectCustomRecords(array('*'),array('lender_id' => $lender_id,'pd_type' => $pd_type,'sales_pd_type' => $flyhi_pd_type,'isactive' => 1),SALESPDTEMPLATE);
// $template = $this->Flyhi_Model->selectCustomRecords(array('*'),array('lender_id' => $lender_id,'product_id' => $product,'pd_type' => $pd_type,'sales_pd_type' => $flyhi_pd_type,'isactive' => 1),SALESPDTEMPLATE);
if(is_array($template) && count($template))