diff --git a/app/Controllers/Customer.php b/app/Controllers/Customer.php index fd173e58..6d50b29e 100644 --- a/app/Controllers/Customer.php +++ b/app/Controllers/Customer.php @@ -301,7 +301,9 @@ class Customer extends BaseController ['value'=>'','fieldflag'=>1,'text'=> 'Choose the Field','disable' => false], ['value'=>'C.type','fieldflag'=>1,'text'=> 'Type','disable' => false], ['value'=>'CA.city','fieldflag'=>1,'text'=> 'City','disable' => false], - ['value'=>'CA.state','fieldflag'=>1,'text'=> 'State','disable' => false], + // ['value'=>'CA.state','fieldflag'=>1,'text'=> 'State','disable' => false], + ['value'=>'CA.postal_code','fieldflag'=>1,'text'=> 'Postal Code','disable' => false], + ['value'=>'C.mode','fieldflag'=>3,'text'=> 'Mode','disable' => false], ['value'=>'CM.name','fieldflag'=>1,'text'=> 'Category','disable' => false], ['value'=>'I.invoice_date','fieldflag'=>2,'text'=> 'Invoice Date','disable' => false], ['value'=>'S.to_subscription','fieldflag'=>2,'text'=> 'Expiry Date','disable' => false]]; @@ -355,7 +357,7 @@ class Customer extends BaseController $result = $model->where($where)->findAll(); $db = \Config\Database::connect(); $sql = (string)$result[0]['group_query']; - // print_r($sql);die; + print_r($sql);die; if($sql){ $query = $db->query($sql); $results = $query->getResultArray(); @@ -428,7 +430,6 @@ class Customer extends BaseController $column = $request_data['column'][$i]; $operator = $request_data['operator'][$i]; $value = $request_data['values'][$i]; - // Handle different operators and build corresponding conditions switch ($operator) { case 'equal': diff --git a/app/Helpers/NotificationHelper.php b/app/Helpers/NotificationHelper.php index d7c44d63..4603c5a5 100644 --- a/app/Helpers/NotificationHelper.php +++ b/app/Helpers/NotificationHelper.php @@ -77,7 +77,7 @@ class NotificationHelper $this->logger->info('Helper : Whatsapp'); $curl = curl_init(); $headers = array('Content-Type:application/json'); - $jsonencoded = json_encode($data, JSON_HEX_TAG | JSON_HEX_APOS | JSON_HEX_QUOT | JSON_HEX_AMP | JSON_UNESCAPED_UNICODE); + $jsonencoded = json_encode($data); curl_setopt( $curl,CURLOPT_URL, $url); $this->logger->info('Helper : Whatsapp url = '.$url); switch ($method) { diff --git a/app/Views/customer_group_form.php b/app/Views/customer_group_form.php index 2937a3e1..2ceec09f 100644 --- a/app/Views/customer_group_form.php +++ b/app/Views/customer_group_form.php @@ -64,6 +64,12 @@ name="values[]" placeholder="Enter the Multiple Values with comma Seprator" onkeypress="return restriction(event,'M')" value="= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" /> name="values[]" placeholder="Enter the Values" value="= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" /> + + name="values[]" placeholder="Enter the Values" onkeypress="return restriction(event,2)" value="= (isset($customer_group['values'][$i]) && $customer_group['values'][$i] != "" ) ? $customer_group['values'][$i] : '' ?>" /> @@ -485,7 +491,9 @@ function FieldChange(selectElement, rowCounter) { $('#' + inputId).replaceWith(''); }else if(selectedOperator === 'is null' || selectedOperator == 'is not null') { $('#' + inputId).replaceWith(''); - } else { + }else if(column == 3 && (selectedOperator === 'equal' || selectedOperator == 'not equal' || selectedOperator == 'like' )){ + $('#' + inputId).replaceWith(''); + }else{ $('#' + inputId).replaceWith(''); } diff --git a/app/Views/notifications_form.php b/app/Views/notifications_form.php index ac20c904..ef0c535c 100644 --- a/app/Views/notifications_form.php +++ b/app/Views/notifications_form.php @@ -119,7 +119,7 @@