FIX_ENDORSEMENT : RV

This commit is contained in:
VENKATESHWARAN 2025-03-11 10:06:41 +05:30
parent 8a5b5fcfd0
commit 33761b31ac
2 changed files with 467 additions and 409 deletions

View File

@ -1063,6 +1063,7 @@ class PolicyTransactionController extends BaseController
{
$id = $this->request->getPost('id');
$data = $this->preparePolicyTransactionData();
// print_r($data); die;
if (!$id) {
return $this->insertEndorsementTransaction($data);
@ -1079,25 +1080,12 @@ class PolicyTransactionController extends BaseController
// print_r($data);
// die;
// $data_received_date = (string)$this->request->getPost('data_received_date');
// $closure_date = (string)$this->request->getPost('closure_date');
// $endorse_eff_date = (string)$this->request->getPost('endorse_eff_date');
// $month = (string)$this->request->getPost('month');
// $data['data_received_date'] = empty($data['data_received_date']) ? null : date('Y-m-d', strtotime($data_received_date));
// $data['closure_date'] = empty($data['closure_date']) ? null : date('Y-m-d', strtotime($closure_date));
// $data['endorse_eff_date'] = empty($data['endorse_eff_date']) ? null : date('Y-m-d', strtotime($endorse_eff_date));
// $month = '01-'.$data['month'];
// $data['month'] = empty($data['month']) ? null : date('Y-m-d', strtotime($month));
if (!isset($data['policy_with_corr'])) {
$data['policy_with_corr'] = 0;
} elseif ($data['policy_with_corr']) {
$data['policy_with_corr'] = 1;
}
if(empty($data['data_received_date'])){
$data['data_received_date'] = null;
}else{
@ -1287,18 +1275,9 @@ class PolicyTransactionController extends BaseController
->join('client_policy', 'policy_transaction.client_policy_id = client_policy.id', 'left')
->where('policy_transaction.id', $id)
->where('policy_transaction.is_active', 1)
->orderBy('id', 'asc')
->first();
// $data['policy_start_date'] = empty($data['policy_start_date']) ? '' : date('d/m/Y', strtotime($data['s_date']));
// $data['policy_end_date'] = empty($data['policy_end_date']) ? '' : date('d/m/Y', strtotime($data['e_date']));
// $data['data_received_date'] = empty($data['data_received_date']) ? '' : date('d/m/Y', strtotime($data['data_received_date']));
// $data['closure_date'] = empty($data['closure_date']) ? '' : date('d/m/Y', strtotime($data['closure_date']));
// $data['endorse_eff_date'] = empty($data['endorse_eff_date']) ? '' : date('d/m/Y', strtotime($data['endorse_eff_date']));
// $data['month'] = (isset($data['month']) && $data['month'] !== null && $data['month'] !== '')
// ? date('M/Y', strtotime($data['month']))
// : null;
if (!empty($data['policy_start_date'])) {
$data['policy_start_date'] = change_date_format($data['policy_start_date'], 'Y-m-d', 'd/m/Y');
@ -1465,7 +1444,6 @@ class PolicyTransactionController extends BaseController
} else {
return $this->respond(['status' => false], 200);
}
}
//------------------------------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff