diff --git a/app/Controllers/LeadsController.php b/app/Controllers/LeadsController.php index 0a16cb5e..45a7ba85 100644 --- a/app/Controllers/LeadsController.php +++ b/app/Controllers/LeadsController.php @@ -241,8 +241,12 @@ class LeadsController extends BaseController $form_file_name = "file_name_" . $index_plus_one; $form_docs_name = "docs_name_" . $index_plus_one; $leads_file_primary_key = $data['leads_file_id'] ?? []; - $files = $this->request->getFileMultiple($form_file_name); - $multi_file_data = $this->uploadMultiFiles($files, $data[$form_docs_name], $leads_file_primary_key); + + $multi_file_data = []; + if(isset($data[$form_docs_name])){ + $files = $this->request->getFileMultiple($form_file_name); + $multi_file_data = $this->uploadMultiFiles($files, $data[$form_docs_name], $leads_file_primary_key); + } // Separate the insurer and insurer branch, handle missing or invalid data if (isset($data['insurer']) && strpos($data['insurer'], '-') !== false) { diff --git a/app/Views/leads_non_eb.php b/app/Views/leads_non_eb.php index 409965e3..3b1f02c5 100644 --- a/app/Views/leads_non_eb.php +++ b/app/Views/leads_non_eb.php @@ -661,6 +661,13 @@ $('.renewalFields').show(); $('.renewalFields').find('select, input').attr('required', 'required'); + if (value == 3) { + $("#source_policy_id").removeAttr("required"); + $("#source_policy_start_date").removeAttr("required"); + $("#source_policy_end_date").removeAttr("required"); + + } + $('.proposed_div').show().find('select, input').attr('required', 'required'); $('#policy_end_date').removeAttr('required'); diff --git a/app/Views/policy_transaction_inception_form.php b/app/Views/policy_transaction_inception_form.php index e7632e56..1f75098a 100644 --- a/app/Views/policy_transaction_inception_form.php +++ b/app/Views/policy_transaction_inception_form.php @@ -446,7 +446,7 @@ - Make Entry in CD + Make Entry in CD @@ -532,13 +532,13 @@ - Installment + Installment - Installment Data + Installment Data diff --git a/app/Views/rfq/multi_files.php b/app/Views/rfq/multi_files.php index a071172b..11e517ed 100644 --- a/app/Views/rfq/multi_files.php +++ b/app/Views/rfq/multi_files.php @@ -1,50 +1,67 @@ - $value) { - $isFirstField = ($index === 0); // First file must be Demography + $isFirstField = ($index === 0); $placeholder = $isFirstField ? 'First file must be Demography.' : ''; $accept = $isFirstField ? '.xls,.xlsx' : ''; - $index = $index + 1; + $displayIndex = $index + 1; ?> - + + - - - - Document Name + Document Name + value="= htmlspecialchars($value['docs_name']) ?>" id="docs_name_= $displayIndex ?>"> - - File Upload - - + File Upload + = !empty($value['file_name']) ? htmlspecialchars($value['file_name']) : 'No file chosen' ?> - - + onchange="showFileName(this, = $displayIndex ?>)"> - - - x + x + - \ No newline at end of file + + + + + + + Document Name + + + + + + File Upload + No file chosen + + + + + + x + + + + +