broker short name added
This commit is contained in:
parent
b64658b637
commit
b320b05923
@ -103,7 +103,7 @@ class InvoiceController extends ResourceController
|
|||||||
'agent_id' => $input['agent_id'] ?? '',
|
'agent_id' => $input['agent_id'] ?? '',
|
||||||
'till_date' => $input['till_date'] ? date('Y-m-d', strtotime($input['till_date'])) : null,
|
'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,
|
'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,
|
'is_active' => 1,
|
||||||
'updated_at' => date('Y-m-d H:i:s'),
|
'updated_at' => date('Y-m-d H:i:s'),
|
||||||
'updated_by' => $input['updated_by'] ?? 0
|
'updated_by' => $input['updated_by'] ?? 0
|
||||||
|
|||||||
@ -162,6 +162,7 @@ class MasterController extends ResourceController
|
|||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $input['name'],
|
'name' => $input['name'],
|
||||||
|
'short_name' => $input['short_name'],
|
||||||
'is_active' => 1,
|
'is_active' => 1,
|
||||||
'created_by' => $input['created_by'] ?? null,
|
'created_by' => $input['created_by'] ?? null,
|
||||||
];
|
];
|
||||||
@ -197,7 +198,8 @@ class MasterController extends ResourceController
|
|||||||
}
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'name' => $input['name'] ?? null,
|
'name' => $input['name'] ,
|
||||||
|
'short_name'=> $input['short_name'],
|
||||||
'updated_by' => $input['updated_by'] ?? null,
|
'updated_by' => $input['updated_by'] ?? null,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -108,6 +108,7 @@ if (!function_exists('createBDS')) {
|
|||||||
'month' => $policyData['issued_date'],
|
'month' => $policyData['issued_date'],
|
||||||
'policy_start_date' => $policyData['start_date'],
|
'policy_start_date' => $policyData['start_date'],
|
||||||
'policy_end_date' => $policyData['end_date'],
|
'policy_end_date' => $policyData['end_date'],
|
||||||
|
'renewal_date' => (new DateTime($policyData['end_date']))->modify('+1 day')->format('Y-m-d'),
|
||||||
'endorsement_no' => null,
|
'endorsement_no' => null,
|
||||||
'action_type' => 'inception',
|
'action_type' => 'inception',
|
||||||
'revenue_type' => "NA",
|
'revenue_type' => "NA",
|
||||||
@ -131,13 +132,15 @@ if (!function_exists('createBDS')) {
|
|||||||
|
|
||||||
// 5. Always create pt co-share details
|
// 5. Always create pt co-share details
|
||||||
$ptCoShareDetails = [
|
$ptCoShareDetails = [
|
||||||
'pt_id' => $policyTransactionId,
|
'pt_id' => $policyTransactionId,
|
||||||
'insurer_id' => $policyData['insurer_id'],
|
'insurer_id' => $policyData['insurer_id'],
|
||||||
'insurer_branch_id' => $policyData['insurer_branch_id'],
|
'insurer_branch_id' => $policyData['insurer_branch_id'],
|
||||||
'co_share_type' => 1,
|
'co_share_type' => 1,
|
||||||
'co_share_per' => 100,
|
'co_share_per' => 100,
|
||||||
'bp_amt' => $policyData['premium_amount'],
|
'bp_amt' => $policyData['premium_amount'],
|
||||||
'cop_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);
|
$ptCoShareId = $ptCoShareDetailsModel->insert($ptCoShareDetails, true);
|
||||||
$log[] = "PT Co-Share details created (ID: {$ptCoShareId})";
|
$log[] = "PT Co-Share details created (ID: {$ptCoShareId})";
|
||||||
|
|||||||
@ -14,6 +14,7 @@ class PartnerBrokerModel extends Model
|
|||||||
|
|
||||||
protected $allowedFields = [
|
protected $allowedFields = [
|
||||||
'name',
|
'name',
|
||||||
|
'short_name',
|
||||||
'is_active',
|
'is_active',
|
||||||
'created_by',
|
'created_by',
|
||||||
'updated_by'
|
'updated_by'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user