diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php
index 90a5a4bf..24b3b6b2 100755
--- a/app/Views/client_policy.php
+++ b/app/Views/client_policy.php
@@ -129,7 +129,7 @@
-
+
@@ -1832,33 +1832,35 @@
}
- $('#policy_no').change(function(){
+ //check dublicate policy number
+ function checkPolicyNo() {
- var policy_no = $(this).val();
- console.log(policy_no +'-'+policy_no.length);
+ var policy_no = $('#policy_no').val();
+ console.log(policy_no + '-' + policy_no.length);
policy_no = policy_no.trim();
- console.log(policy_no +'-'+policy_no.length);
-
+ console.log(policy_no + '-' + policy_no.length);
$.ajax({
- url: ''+policy_no,
+ url: '' + policy_no,
type: "GET",
dataType: 'json',
success: function (res) {
+ console.log(res);
+ if (res.status == true) {
- console.log(res)
- if(res.status == true){
toastr.warning(res.message, 'warning');
$('#policy_no').val('');
+
+ }else{
+
}
},
error: function (xhr, status, error) {
console.error(xhr.responseText);
console.error(status, error);
- }
+ }
});
-
- })
+ }
$(document).ready(function () {
// Check if the URL contains a hash