From 6d5096ecd89eff2e6af86bcdfa19a6837614eca8 Mon Sep 17 00:00:00 2001 From: sanjeev Date: Fri, 24 Dec 2021 12:51:39 +0530 Subject: [PATCH] isactive condition added : ps --- api/application/models/Template_Management_Model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/application/models/Template_Management_Model.php b/api/application/models/Template_Management_Model.php index 17eac98d..a552c263 100644 --- a/api/application/models/Template_Management_Model.php +++ b/api/application/models/Template_Management_Model.php @@ -285,6 +285,7 @@ class Template_Management_Model extends SPARQ_Model { $this->db->JOIN(ENTITY.' as ENTITY','TEMPLATE_MAP_V2.entity_id = ENTITY.entity_id','LEFT'); $this->db->JOIN(PRODUCTS.' as PRODUCTS','TEMPLATE_MAP_V2.product_id = PRODUCTS.product_id','LEFT'); $this->db->JOIN(CUSTOMERSEGMENT.' as CUSTOMERSEGMENT','TEMPLATE_MAP_V2.customer_segment_id = CUSTOMERSEGMENT.customer_segment_id','LEFT'); + $this->db->WHERE('TEMPLATE_MAP_V2.isactive',1); if(!empty($value)) { if(is_array($value)){ if(isset($value['entity_id'])) @@ -312,6 +313,7 @@ class Template_Management_Model extends SPARQ_Model { $this->db->SELECT('TEMPLATE_JSON_V2.form_id,PDFORMS.pd_form_name as form_name,TEMPLATE_JSON_V2.json'); $this->db->FROM(TEMPLATE_JSON_V2.' as TEMPLATE_JSON_V2'); $this->db->JOIN(PDFORMS.' as PDFORMS','TEMPLATE_JSON_V2.form_id = PDFORMS.pd_form_id','LEFT'); + $this->db->WHERE('TEMPLATE_JSON_V2.isactive',1); $this->db->WHERE('TEMPLATE_JSON_V2.map_id',$value); $result = $this->db->GET()->result_array(); return $result;