Merge branch 'main' of bitbucket.org:jubilian/nhance_partner_be

This commit is contained in:
sanjeev.p 2025-12-16 15:01:30 +05:30
commit 8ea62f6b0f
5 changed files with 17 additions and 11 deletions

View File

@ -105,7 +105,7 @@ class InvoiceController extends ResourceController
'agent_id' => $input['agent_id'] ?? '',
'till_date' => $input['till_date'] ? date('Y-m-d', strtotime($input['till_date'])) : null,
'invoice_date' => $input['invoice_date'] ? date('Y-m-d', strtotime($input['invoice_date'])) : null,
'payout_status' => $input['payout_status'] ?? 0,
'payout_status' => 1,
'is_active' => 1,
'updated_at' => date('Y-m-d H:i:s'),
'updated_by' => $input['updated_by'] ?? 0

View File

@ -54,7 +54,7 @@ class MasterController extends ResourceController
public function getRoleMaster()
{
$data = $this->RoleMasterModel->whereIn('id',[2,3])->findAll();
$data = $this->RoleMasterModel->whereIn('id',[2,3,4])->findAll();
if (!$data) {
return $this->failNotFound('No data found');
@ -162,6 +162,7 @@ class MasterController extends ResourceController
$data = [
'name' => $input['name'],
'short_name' => $input['short_name'],
'is_active' => 1,
'created_by' => $input['created_by'] ?? null,
];
@ -197,7 +198,8 @@ class MasterController extends ResourceController
}
$data = [
'name' => $input['name'] ?? null,
'name' => $input['name'] ,
'short_name'=> $input['short_name'],
'updated_by' => $input['updated_by'] ?? null,
];

View File

@ -31,7 +31,7 @@ class StaffController extends ResourceController
$data = $this->StaffModel->select('partner_staff.* , R.role')
->join('partner_role_master R', 'R.id = partner_staff.role_id', 'left')
->where('partner_staff.manager_id' , $manager_id )
->whereIn('partner_staff.role_id' , [2,3] )
->whereIn('partner_staff.role_id' , [2,3,4] )
->findAll();
}else if(!empty($handler_id)){

View File

@ -108,6 +108,7 @@ if (!function_exists('createBDS')) {
'month' => $policyData['issued_date'],
'policy_start_date' => $policyData['start_date'],
'policy_end_date' => $policyData['end_date'],
'renewal_date' => (new DateTime($policyData['end_date']))->modify('+1 day')->format('Y-m-d'),
'endorsement_no' => null,
'action_type' => 'inception',
'revenue_type' => "NA",
@ -131,13 +132,15 @@ if (!function_exists('createBDS')) {
// 5. Always create pt co-share details
$ptCoShareDetails = [
'pt_id' => $policyTransactionId,
'insurer_id' => $policyData['insurer_id'],
'insurer_branch_id' => $policyData['insurer_branch_id'],
'co_share_type' => 1,
'co_share_per' => 100,
'bp_amt' => $policyData['premium_amount'],
'cop_amt' => $policyData['premium_amount'],
'pt_id' => $policyTransactionId,
'insurer_id' => $policyData['insurer_id'],
'insurer_branch_id' => $policyData['insurer_branch_id'],
'co_share_type' => 1,
'co_share_per' => 100,
'bp_amt' => $policyData['premium_amount'],
'cop_amt' => $policyData['premium_amount'],
'exp_amt' => $policyData['commission_amount'],
'pt_policy_issue_date' => $policyData['issued_date']
];
$ptCoShareId = $ptCoShareDetailsModel->insert($ptCoShareDetails, true);
$log[] = "PT Co-Share details created (ID: {$ptCoShareId})";

View File

@ -14,6 +14,7 @@ class PartnerBrokerModel extends Model
protected $allowedFields = [
'name',
'short_name',
'is_active',
'created_by',
'updated_by'