-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+ | Premium Details |
+
+
+
+
+ | Insurer |
+
+
+ | Is Leader? |
+
+
+ | CD Acc No |
+
-
-
-
-
- | Premium Details |
-
-
-
-
- | Insurer |
-
-
- | Is Leader? |
-
-
- | CD Acc No |
-
+
+ | CD Amount |
+
+
+ | Follower Policy No |
+
+
+ | Co-Share % |
+
+
+ Non Commitional Premium Amount |
+
+
+ | Base Premium |
+
+
+ | TP Premium |
+
+
+ | TEP Premium |
+
+
+ | Co-Premium |
+
+
+ | Co-TP Premium |
+
+
+ | Co-TEP Premium |
+
+
+ | CGST |
+
+
+ | SGST |
+
+
+ | IGST |
+
+
+ | GST Amount |
+
+
+ | Stamp Duty |
+
+
+ | Total |
+
-
- | CD Amount |
-
-
- | Follower Policy No |
-
-
- | Co-Share % |
-
-
- Non Commitional Premium Amount |
-
-
- | Base Premium |
-
-
- | TP Premium |
-
-
- | TEP Premium |
-
-
- | Co-Premium |
-
-
- | Co-TP Premium |
-
-
- | Co-TEP Premium |
-
-
- | CGST |
-
-
- | SGST |
-
-
- | IGST |
-
-
- | GST Amount |
-
-
- | Stamp Duty |
-
-
- | Total |
-
+
+ | Agreed BP % |
+
+
+ | Agreed TP % |
+
+
+ | Agreed TEP % |
+
-
- | Agreed BP % |
-
-
- | Agreed TP % |
-
-
- | Agreed TEP % |
-
+
-
+ >
+ | Agreed Amount |
+
- >
- | Agreed Amount |
-
+
-
+
+ | Standard BP % |
+
+
+ | Standard TP % |
+
+
+ | Standard TEP % |
+
-
- | Standard BP % |
-
-
- | Standard TP % |
-
-
- | Standard TEP % |
-
+
-
+
+ | Actual BP Amount |
+
+
+ | Actual TP Amount |
+
+
+ | Actual TEP Amount |
+
+
+ | Actual BP % |
+
+
+ | Actual TP % |
+
+
+ | Actual TEP % |
+
+
+ Actual BP Remuneration Amount |
+
+
+ Actual TP Remuneration Amount |
+
+
+ Actual TEP Remuneration Amount |
+
+
+ | Expected Amount |
+
+
+
-
- | Actual BP Amount |
-
-
- | Actual TP Amount |
-
-
- | Actual TEP Amount |
-
-
- | Actual BP % |
-
-
- | Actual TP % |
-
-
- | Actual TEP % |
-
-
- Actual BP Remuneration Amount |
-
-
- Actual TP Remuneration Amount |
-
-
- Actual TEP Remuneration Amount |
-
-
- | Expected Amount |
-
-
-
+
-
+
+ |
+
+
+
+
-
- |
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
@@ -915,7 +1008,7 @@
@@ -5616,6 +6160,8 @@
$(".individual_client").find("select, input, textarea").val("").prop("required", true);
}
+ toggleRequiredWithAsterisk('#gst', false);
+ toggleRequiredWithAsterisk('#mobile', false);
$("#client_form_row_div").on("input change", "input, select, textarea", function () {
if ($("#client_type").val() === "") {
@@ -5661,39 +6207,75 @@
toastr.warning(message, 'WARNING');
// $(input).val('');
isGSTValid = false;
- $('#client_add_modal_submit_btn').prop('disabled', true);
+ $('#client_form_submit_btn').prop('disabled', true);
+ $('#vehicle_form_submit_btn_id_for_disable').prop('disabled', true);
} else {
isGSTValid = true;
- $('#client_add_modal_submit_btn').prop('disabled', false);
+ $('#client_form_submit_btn').prop('disabled', false);
+ $('#vehicle_form_submit_btn_id_for_disable').prop('disabled', false);
}
});
- $('#hide_smbt_btn button').prop('disabled', false);
+ $('#hide_smbt_btn_button').prop('disabled', false);
}
$('#client_type').on('change', function() {
let client_type = $(this).val();
+ console.log( "client_type", client_type);
if(client_type == 1){
$('.group_client').show();
$('.individual_client').hide();
$(".group_client").find("select, input, textarea").val("").prop("required", true);
$(".individual_client").find("select, input, textarea").val("").prop("required", false);
+ toggleRequiredWithAsterisk('#gst', false);
}else{
$('.group_client').hide();
$('.individual_client').show();
$(".group_client").find("select, input, textarea").val("").prop("required", false);
$(".individual_client").find("select, input, textarea").val("").prop("required", true);
+ toggleRequiredWithAsterisk('#gst', false);
}
});
+ function toggleRequiredWithAsterisk(inputSelector, makeRequired) {
+
+ var $input = $(inputSelector);
+ var $label = $input.closest('.form-group').find('label');
+
+ console.log('Toggling required for:', inputSelector, 'Make required:', makeRequired);
+
+ if(makeRequired) {
+ $input.attr('required', true);
+ console.log('Added required attribute');
+
+ // Add asterisk if not already present
+ if($label.find('span.text-danger').length === 0) {
+ $label.append('
*');
+ console.log('Added * to label');
+ } else {
+ console.log('* already exists in label');
+ }
+ } else {
+ $input.removeAttr('required');
+ console.log('Removed required attribute');
+
+ // Remove asterisk
+ $label.find('span.text-danger').remove();
+ console.log('Removed * from label');
+ }
+
+ console.log('Current input attributes:', $input.prop('outerHTML'));
+ console.log('Current label html:', $label.html());
+ }
+
$(document).on("input change", "input[name='total[]']", function () {
let val = $(this).val();
console.log("✅ total[] changed:", val);
});
-
\ No newline at end of file
+