From f46ee62e772ca1eb408232c558932118fa2ba228 Mon Sep 17 00:00:00 2001 From: "venkatesh.r" Date: Sat, 20 Sep 2025 11:22:14 +0530 Subject: [PATCH] CHANGE_BDS --- app/Views/policy_transaction_inception_form.php | 2 ++ app/Views/policy_transaction_inception_list.php | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/Views/policy_transaction_inception_form.php b/app/Views/policy_transaction_inception_form.php index e77664a4..c26f6991 100644 --- a/app/Views/policy_transaction_inception_form.php +++ b/app/Views/policy_transaction_inception_form.php @@ -5139,6 +5139,7 @@ $('.loader-mask').delay(350).fadeOut('slow'); if (response.status == true) { + getClientAndBranchAndPolicy(false); toastr.success(response.message, 'SUCCESS'); appendClients(response.clients, response.client_id); appendVehicles(response.vehicles, response.vehicle_id); @@ -5215,6 +5216,7 @@ $('.loader-mask').delay(350).fadeOut('slow'); if (response.status == true) { + getClientAndBranchAndPolicy(false); toastr.success(response.message, 'SUCCESS'); appendClients(response.clients, response.client_id); appendBranch(response.branches, response.branch_id); diff --git a/app/Views/policy_transaction_inception_list.php b/app/Views/policy_transaction_inception_list.php index f1b63dfc..c3e72dcf 100644 --- a/app/Views/policy_transaction_inception_list.php +++ b/app/Views/policy_transaction_inception_list.php @@ -701,7 +701,7 @@ function show_list_hide_add() count = 0 } -function getClientAndBranchAndPolicy() +function getClientAndBranchAndPolicy(appendStatus = true) { $.ajax({ url: '', @@ -710,15 +710,21 @@ function getClientAndBranchAndPolicy() success: function(res) { console.log('getClientAndBranchAndPolicy', res); + if(res.status == true){ + client_list = res.client_data; branch_list = res.branch_data; policy_list = res.policy_data; vehicle_list = res.vehicle_data; unit_list = res.unit_data; - appendClients(res.client_data); - appendVehicles(res.vehicle_data); - // appendOwner(client_list) + + if(appendStatus == true){ + appendClients(res.client_data); + appendVehicles(res.vehicle_data); + // appendOwner(client_list) + } + }else{ console.log('No data found'); }