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 @@ -