diff --git a/app/Views/UserList.php b/app/Views/UserList.php index bb51b99d..219eb11c 100644 --- a/app/Views/UserList.php +++ b/app/Views/UserList.php @@ -44,7 +44,7 @@ table.dataTable tbody td {

User List

-
+
diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index 18d6ee36..c7636ad4 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -1018,7 +1018,7 @@ 80: "Eighty", 90: "Ninety" }; - + function convertNumberToWords(number) { if (number === 0) { return numberWords[number]; @@ -1027,22 +1027,34 @@ let word = ''; if (number >= 10000000) { - word += convertNumberToWords(Math.floor(number / 10000000)) + " Crore "; + const crore = Math.floor(number / 10000000); + if (crore > 0) { + word += convertNumberToWords(crore) + " Crore "; + } number %= 10000000; } if (number >= 100000) { - word += convertNumberToWords(Math.floor(number / 100000)) + " Lakh "; + const lakh = Math.floor(number / 100000); + if (lakh > 0) { + word += convertNumberToWords(lakh) + " Lakh "; + } number %= 100000; } if (number >= 1000) { - word += convertNumberToWords(Math.floor(number / 1000)) + " Thousand "; + const thousand = Math.floor(number / 1000); + if (thousand > 0) { + word += convertNumberToWords(thousand) + " Thousand "; + } number %= 1000; } if (number >= 100) { - word += convertNumberToWords(Math.floor(number / 100)) + " Hundred "; + const hundred = Math.floor(number / 100); + if (hundred > 0) { + word += convertNumberToWords(hundred) + " Hundred "; + } number %= 100; } @@ -1059,44 +1071,65 @@ return word.trim(); } + function convertCommaNumberToWords(input) { + let number; if (input instanceof HTMLElement) { const inputValue = input.value; - number = parseInt(inputValue.replace(/,/g, ''), 10); - var convert_word_value = convertNumberToWords(number); - - if (input.nextElementSibling !== null) { - input.nextElementSibling.textContent = convert_word_value; - } + number = parseFloat(inputValue.replace(/,/g, ''), 10); } else { - number = parseInt(input.replace(/,/g, ''), 10); + number = parseFloat(input.replace(/,/g, ''), 10); } - var convert_word_value = convertNumberToWords(number); - return convert_word_value; + const [integerPart, decimalPart] = number.toFixed(2).split('.'); + const integerWord = convertNumberToWords(parseInt(integerPart, 10)); + let result = `${integerWord}`; + + console.log('decimalPart',decimalPart) + + if (decimalPart != '00') { + result += ` and `; + let decimalWord = convertNumberToWords(parseInt(decimalPart, 10)) + result += `${decimalWord}` + result += ` Paisa`; + } + + return result.trim(); } + function onlyNumbers(event) { var charcode; charcode = event.which || event.keyCode; - if (charcode >= 48 && charcode <= 57) return true; + if (charcode >= 48 && charcode <= 57 || charcode == 46) return true; return false; } function formatNumber(input, maxLength) { - // console.log("input", input); + console.log("input", input); + console.log("input value", input.value); + maxLength = 16; - let value = input.value.replace(/\D/g, ''); // Remove non-numeric characters + let value = input.value.replace(/[^\d.]/g, ''); // Remove non-numeric characters + console.log('Remove non-numeric characters', value) + // Limit the number of digits value = value.slice(0, maxLength); + console.log('Limited value', value); + // Format the number with commas using Indian numbering system - value = Number(value).toLocaleString('en-IN'); - input.value = value; + value = parseFloat(value).toLocaleString("en-IN",{ + maximumFractionDigits: 2 + }); + + console.log('formetted value', value); + + input.value = (value); basicPayMultiple(input) if (input.id == 'gpa_si') { diff --git a/app/Views/insurer_basic_info.php b/app/Views/insurer_basic_info.php index a6671c62..8ba9dcc2 100644 --- a/app/Views/insurer_basic_info.php +++ b/app/Views/insurer_basic_info.php @@ -60,8 +60,6 @@ input:checked + .slider:before { } - -
diff --git a/app/Views/insurer_list.php b/app/Views/insurer_list.php index 9a24b1de..0487ca37 100644 --- a/app/Views/insurer_list.php +++ b/app/Views/insurer_list.php @@ -6,7 +6,7 @@

Insurer List

- diff --git a/app/Views/kyc_list.php b/app/Views/kyc_list.php index a4bb712a..ec460a28 100644 --- a/app/Views/kyc_list.php +++ b/app/Views/kyc_list.php @@ -6,7 +6,7 @@

KYC List

- diff --git a/app/Views/login.php b/app/Views/login.php index e6519f06..580a9a0e 100644 --- a/app/Views/login.php +++ b/app/Views/login.php @@ -30,6 +30,18 @@ a:hover { cursor: pointer; } + + + /* .auth-fluid { + position: relative; + display: flex; + align-items: center; + min-height: 100vh; + flex-direction: row; + align-items: stretch; + background: url("/assets/images/login_bg.png") center !important; + background-size: cover; + } */ diff --git a/app/Views/policy_grid.php b/app/Views/policy_grid.php index dc1747d7..f69a7648 100644 --- a/app/Views/policy_grid.php +++ b/app/Views/policy_grid.php @@ -309,7 +309,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -319,13 +319,13 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
- +
@@ -343,17 +343,17 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
- +
- +
@@ -371,13 +371,13 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
- +
@@ -387,18 +387,18 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
- +
- +
@@ -417,12 +417,12 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
- +
`; @@ -438,12 +438,12 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
- +
@@ -462,7 +462,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -476,7 +476,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -497,7 +497,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -510,7 +510,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -530,7 +530,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -544,7 +544,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -565,7 +565,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -578,7 +578,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -600,7 +600,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -609,7 +609,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -629,12 +629,12 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
- +
`; @@ -650,7 +650,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -663,7 +663,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -683,7 +683,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -692,12 +692,12 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
- +
@@ -717,7 +717,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -735,7 +735,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -755,7 +755,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -781,7 +781,7 @@ function addGridHTML(event = false, data = false, ui_type = false, si_or_bp = fa
- +
@@ -1065,13 +1065,14 @@ $('body').on('click', '.btnPolicyModel', function() { var additional_relationship = null; var premium_type_for_sec_rr = [] var premium_type_for_primary_rr = [] + var first = 0; if (res.premiumData && res.premiumData.length > 0) { $.each(res.premiumData, function(index, item) { if (item.rack_rate_type == 0 || policy_type_string == 'GPA') { policy_grid_id_value = item.policy_grid_id; - secondary = item.policy_grid_id; + first = item.policy_grid_id; premium_type_for_primary_rr.push(item.premium_type); } else if (item.rack_rate_type == 1) { @@ -1223,16 +1224,32 @@ $('body').on('click', '.btnPolicyModel', function() { } - $(`input[name="${id_for_trigger}_si[]"]`).each(function() { + console.log('id_for_trigger', id_for_trigger) + console.log('temp_for_premiumData', temp_for_premiumData) + console.log('temp_for_premiumData', temp_for_premiumData[0]) + + + $(`input[name="${first}_si[]"]`).each(function() { // console.log($(this)); $(this).trigger('keyup'); }); - $(`input[name="${id_for_trigger}_premium[]"]`).each(function() { + $(`input[name="${first}_premium[]"]`).each(function() { // console.log($(this)); $(this).trigger('keyup'); }); + $(`input[name="${secondary}_si[]"]`).each(function() { + // console.log($(this)); + $(this).trigger('keyup'); + }); + + $(`input[name="${secondary}_premium[]"]`).each(function() { + // console.log($(this)); + $(this).trigger('keyup'); + }); + + }, error: function(xhr, status, error) { console.error(xhr.responseText); @@ -1514,12 +1531,12 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) { html = `
- +
- +
@@ -1542,13 +1559,13 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
- +
@@ -1568,12 +1585,12 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
- +
@@ -1598,7 +1615,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1614,7 +1631,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1627,7 +1644,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1650,7 +1667,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1665,7 +1682,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1678,7 +1695,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1693,7 +1710,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1702,7 +1719,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1717,7 +1734,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1726,7 +1743,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1741,7 +1758,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1754,7 +1771,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1769,7 +1786,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1778,12 +1795,12 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
- +
@@ -1797,7 +1814,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1815,7 +1832,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1829,7 +1846,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
@@ -1855,7 +1872,7 @@ function appendGridtHtml(ui_type = false, secondary = 0, data = false) {
- +
diff --git a/app/Views/policy_type_list.php b/app/Views/policy_type_list.php index 3bea931d..2318324f 100644 --- a/app/Views/policy_type_list.php +++ b/app/Views/policy_type_list.php @@ -6,7 +6,7 @@

Policy Type List

- diff --git a/app/Views/tpa_basic_info.php b/app/Views/tpa_basic_info.php index 401a9e11..f0b976b1 100644 --- a/app/Views/tpa_basic_info.php +++ b/app/Views/tpa_basic_info.php @@ -31,7 +31,7 @@
- +
diff --git a/app/Views/tpa_list.php b/app/Views/tpa_list.php index cdba3ab7..9df0a1c0 100644 --- a/app/Views/tpa_list.php +++ b/app/Views/tpa_list.php @@ -6,7 +6,7 @@

TPA List

- diff --git a/writable/e_card_template/fhpl_tpa.html b/writable/e_card_template/fhpl_tpa.html index e476dddb..a074425b 100644 --- a/writable/e_card_template/fhpl_tpa.html +++ b/writable/e_card_template/fhpl_tpa.html @@ -59,9 +59,9 @@
-
+

TERMS AND CONDITIONS:

-
+
  1. This card is generated as per the details given by your employer/HR. Incase of any errors in the details you may confirm the same through your employer for making required corrections.