diff --git a/app/Config/Filters.php b/app/Config/Filters.php index b219e60e..f0aeda92 100755 --- a/app/Config/Filters.php +++ b/app/Config/Filters.php @@ -69,8 +69,8 @@ class Filters extends BaseConfig 'before' => [ 'HttpRequestLog' => ['except' => 'cli/*'], 'Cors', - 'AclFilter' => ['except' => ['login', 'logout', 'auth/*', 'oauth2callback','claim-form-download', 'claims-feedback-form', 'autobookstackLogin','employeeRest/*','processjob','getCommission','downloadEmployeeEcardZip']], - 'SecurityInputFilter' => ['except' => ['/client/notification/create','/ticket/crud_mail_template/*','test_mail','leads/sendMail'] ], + 'AclFilter' => ['except' => ['login', 'logout', 'auth/*', 'oauth2callback','claim-form-download', 'claims-feedback-form', 'autobookstackLogin','employeeRest/*','processjob','getCommission','downloadEmployeeEcardZip', 'downloadClaimFile']], + 'SecurityInputFilter' => ['except' => ['/client/notification/create','/ticket/crud_mail_template/*','test_mail','leads/sendMail', 'ticket/reply'] ], 'GlobalPostFileUploadGuard' // 'csrf', // 'invalidchars', diff --git a/app/Controllers/PolicyTransactionController.php b/app/Controllers/PolicyTransactionController.php index a272f609..6dcb63ad 100644 --- a/app/Controllers/PolicyTransactionController.php +++ b/app/Controllers/PolicyTransactionController.php @@ -925,7 +925,6 @@ class PolicyTransactionController extends BaseController // ========================================== 'client_type' => ['label' => 'Client Type', 'rules' => 'required', 'errors' => ['required' => 'Client Type must be selected.']], 'client_id' => ['label' => 'Client', 'rules' => 'required', 'errors' => ['required' => 'Please select a Client.']], - 'client_branch_id' => ['label' => 'Client Branch', 'rules' => 'required', 'errors' => ['required' => 'Client branch is required']], 'issue_type' => ['label' => 'Business Type', 'rules' => 'required', 'errors' => ['required' => 'Please select a Business Type.']], 'ref' => ['label' => 'Reference', 'rules' => 'permit_empty|regex_match[/^[a-zA-Z0-9 _-]+$/]', 'errors' => [ 'regex_match' => 'The {field} can only contain letters, numbers, spaces, dashes, and underscores.' @@ -1052,6 +1051,9 @@ class PolicyTransactionController extends BaseController 'exp_amt.*' => ['label' => 'Expected Amount', 'rules' => 'permit_empty|decimal', 'errors' => ['decimal' => 'The Expected Amount field must contain a valid number.']] ]; + if(isset($post_data['client_type']) && $post_data['client_type'] == 1){ + $rules['client_branch_id'] = ['label' => 'Client Branch', 'rules' => 'required', 'errors' => ['required' => 'Client branch is required']]; + } $isValid = $this->validate($rules);