\ No newline at end of file
diff --git a/app/Models/CDMasterModel.php b/app/Models/CDMasterModel.php
index 0e5c39a1..b936650f 100644
--- a/app/Models/CDMasterModel.php
+++ b/app/Models/CDMasterModel.php
@@ -61,24 +61,33 @@ class CDMasterModel extends Model
return $data;
}
- public function getCDMasterList(){
+ public function getCDMasterList()
+ {
$query = $this->db->table('cd_master')
- ->select('cd_master.*, clients.client_name, clients.short_name, insurers.name AS insurer_name, user_profiles.first_name AS user_name, IFNULL(cd_ac_counts.cd_ac_no_count, 0) AS cd_ac_no_count')
- ->join('clients', 'clients.id = cd_master.client_id')
- ->join('insurers', 'insurers.id = cd_master.insurer_id')
- ->join('user_profiles', 'user_profiles.id = cd_master.created_by')
- ->join(
- '(SELECT cd_master.cd_ac_no, COUNT(client_policy.cd_ac_no) AS cd_ac_no_count
- FROM cd_master
- JOIN client_policy ON client_policy.cd_ac_no = cd_master.cd_ac_no
- GROUP BY cd_master.cd_ac_no) AS cd_ac_counts',
- 'cd_ac_counts.cd_ac_no = cd_master.cd_ac_no',
- 'left'
- )
- ->where('cd_master.is_active', 1)
- ->get();
-
+ ->select('cd_master.*, clients.client_name, clients.short_name, insurers.name AS insurer_name, user_profiles.first_name AS user_name, IFNULL(cd_ac_counts.cd_ac_no_count, 0) AS cd_ac_no_count, IFNULL(cd_ac_counts_for_cdt.cd_ac_no_count_cd_tranction, 0) AS cd_ac_no_count_cd_tranction')
+ ->join('clients', 'clients.id = cd_master.client_id')
+ ->join('insurers', 'insurers.id = cd_master.insurer_id')
+ ->join('user_profiles', 'user_profiles.id = cd_master.created_by')
+ ->join(
+ '(SELECT cd_master.cd_ac_no, COUNT(client_policy.cd_ac_no) AS cd_ac_no_count
+ FROM cd_master
+ JOIN client_policy ON client_policy.cd_ac_no = cd_master.cd_ac_no
+ GROUP BY cd_master.cd_ac_no) AS cd_ac_counts',
+ 'cd_ac_counts.cd_ac_no = cd_master.cd_ac_no',
+ 'left'
+ )
+ ->join(
+ '(SELECT cd_master.cd_ac_no, COUNT(cash_deposit.cd_ac_no) AS cd_ac_no_count_cd_tranction
+ FROM cd_master
+ JOIN cash_deposit ON cash_deposit.cd_ac_no = cd_master.cd_ac_no
+ GROUP BY cd_master.cd_ac_no) AS cd_ac_counts_for_cdt',
+ 'cd_ac_counts_for_cdt.cd_ac_no = cd_master.cd_ac_no',
+ 'left'
+ )
+ ->where('cd_master.is_active', 1)
+ ->get();
+
$result = $query->getResultArray();
return $result;
}
diff --git a/app/Models/ChatBotModel.php b/app/Models/ChatBotModel.php
index caae27a5..65270779 100644
--- a/app/Models/ChatBotModel.php
+++ b/app/Models/ChatBotModel.php
@@ -11,6 +11,7 @@ class ChatBotModel extends Model
"id",
"request",
"options",
+ "is_option",
"created_by",
"updated_by",
"is_active",
diff --git a/app/Models/ClientBranchModel.php b/app/Models/ClientBranchModel.php
index 1ace7a2a..c6083a49 100644
--- a/app/Models/ClientBranchModel.php
+++ b/app/Models/ClientBranchModel.php
@@ -19,6 +19,11 @@ class ClientBranchModel extends Model
"created_by",
"updated_by",
"is_active",
+ "pincode",
+ "address1",
+ "address2",
+ "gst",
+ "sez",
];
public function getBranchAndContactByBranchId($branch_id){
diff --git a/app/Models/ClientPolicyModel.php b/app/Models/ClientPolicyModel.php
index 8d2af103..65bb32cd 100644
--- a/app/Models/ClientPolicyModel.php
+++ b/app/Models/ClientPolicyModel.php
@@ -131,11 +131,12 @@ class ClientPolicyModel extends Model
public function getinsurerswithclientid($id){
return $this->db->table('client_policy')
- ->select('client_policy.*')
+ ->select('client_policy.*, cd_master.cd_ac_no')
->select('insurers.name as insurer_name, insurers.short_name as insurer_short')
->select('clients.client_name as client_name')
->join('clients','clients.id=client_policy.client_id')
->join('insurers', 'insurers.id = client_policy.insurer_id')
+ ->join('cd_master', 'cd_master.insurer_id = client_policy.insurer_id')
->where('client_policy.client_id', $id)
->groupBy('client_policy.insurer_id')
->groupBy('client_policy.client_id', $id) // Group by insurer_id
@@ -186,15 +187,18 @@ class ClientPolicyModel extends Model
->select('cash_deposit.*')
->select('insurers.name as insurer_name, insurers.short_name as insurer_short')
->select('clients.client_name as clientname, clients.short_name as clientshort')
- ->select('policies.name as policy_name')
+ // ->select('policies.name as policy_name')
+ ->select('policy_type.policy_type')
->select('user_profiles.first_name as username')
->join('user_profiles', 'user_profiles.id = cash_deposit.created_by', 'left')
->join('insurers', 'insurers.id = cash_deposit.insurer_id', 'left')
->join('clients', 'clients.id = cash_deposit.client_id', 'left')
->join('client_policy', 'client_policy.id = cash_deposit.client_policy_id', 'left')
- ->join('policies', 'policies.id = client_policy.policy_id', 'left')
+ // ->join('policies', 'policies.id = client_policy.policy_id', 'left')
+ ->join('policy_type', 'policy_type.id = client_policy.policy_type_id', 'left')
->where('cash_deposit.client_id', $clientId)
->where('cash_deposit.insurer_id', $insurerId)
+ ->where('cash_deposit.is_active', 1)
->orderBy('cash_deposit.id', 'DESC')
->get()
->getResult();
diff --git a/app/Models/InsurerModel.php b/app/Models/InsurerModel.php
index 6c5d3617..f388b93b 100644
--- a/app/Models/InsurerModel.php
+++ b/app/Models/InsurerModel.php
@@ -23,21 +23,22 @@ class InsurerModel extends Model
- public function getCreatedByUserName(){
+ public function getCreatedByUserName()
+ {
return $this->db->table('insurers')
->select('insurers.*')
// ->select('user_profiles.first_name as user_name')
// ->join('user_profiles', 'user_profiles.id = clients.created_by')
->get()
- ->getResult();
-
+ ->getResult();
}
public function getInsurerName($insurerId)
{
// Fetch the insurer name based on the insurer ID
- $query = $this->select('id,name')
- ->where('id', $insurerId)
+ $query = $this->select('insurers.id,insurers.name, cd_master.cd_ac_no')
+ ->join('cd_master', 'cd_master.insurer_id = insurers.id')
+ ->where('insurers.id', $insurerId)
->get();
if ($query->resultID->num_rows > 0) {
@@ -47,19 +48,6 @@ class InsurerModel extends Model
return null; // or handle accordingly if the insurer is not found
}
- // public function getdepositData($id)
- // {
- // // Fetch the insurer name based on the insurer ID
- // $query = $this->db->table('cash_deposit')
-
-
- // ->get()
-
-
- // ->getResult();
-
- // }
-
- }
+}
\ No newline at end of file
diff --git a/app/Views/add_image_list.php b/app/Views/add_image_list.php
new file mode 100644
index 00000000..9658053d
--- /dev/null
+++ b/app/Views/add_image_list.php
@@ -0,0 +1,210 @@
+
+
+
+
+
+
+
+
+
Advertisement Image List
+
+
+
+
+
+
+ | Advertisement Image Name |
+ Status |
+ Action |
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Add Advertise Image
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/cd_master_list.php b/app/Views/cd_master_list.php
index 21e599ce..30c848f6 100644
--- a/app/Views/cd_master_list.php
+++ b/app/Views/cd_master_list.php
@@ -40,7 +40,7 @@ table.dataTable thead th {
Insurer Name |
Opening Date |
CD Account No |
-
Deposite Amount |
+
Opening Amount |
Date/User |
Action |
@@ -60,7 +60,9 @@ table.dataTable thead th {