GWM : policy additional fields added

This commit is contained in:
Gowtham M 2025-11-07 10:17:32 +05:30
parent d0598c37d7
commit 2edc117f53
2 changed files with 62 additions and 1 deletions

View File

@ -107,6 +107,26 @@ class PolicyController extends ResourceController
'agent_id' => $quotData['agent_id'],
'policy_pdf_file_name' => $pdfFileName,
'policy_payment_receipt_file_name' => $receiptFileName,
// newly added fields
'tp' => $data['tp'] ?? null,
'od' => $data['od'] ?? null,
'pa' => $data['pa'] ?? null,
'cgst' => $data['cgst'] ?? null,
'sgst' => $data['sgst'] ?? null,
'igst' => $data['igst'] ?? null,
'rto_state_code' => $data['rto_state_code'] ?? null,
'rto_city_code' => $data['rto_city_code'] ?? null,
'weight' => $data['weight'] ?? null,
'fuel_type' => $data['fuel_type'] ?? null,
'date_of_registration' => format_date_for_database($data['date_of_registration'] ?? null),
'year_of_manufacture' => $data['year_of_manufacture'] ?? null,
'engine_no' => $data['engine_no'] ?? null,
'chassis_no' => $data['chassis_no'] ?? null,
'make' => $data['make'] ?? null,
'model' => $data['model'] ?? null,
'cubic_capacity' => $data['cubic_capacity'] ?? null,
'vehicle_type' => $data['vehicle_type'] ?? null,
'created_by' => $data['created_by']
];
@ -166,6 +186,26 @@ class PolicyController extends ResourceController
'premium_amount' => $data['premium_amount'] ?? $policy['premium_amount'],
'policy_number' => $data['policy_number'] ?? $policy['policy_number'],
'payment_mode' => $data['payment_mode'] ?? $policy['payment_mode'],
// newly added fields
'tp' => $data['tp'] ?? null,
'od' => $data['od'] ?? null,
'pa' => $data['pa'] ?? null,
'cgst' => $data['cgst'] ?? null,
'sgst' => $data['sgst'] ?? null,
'igst' => $data['igst'] ?? null,
'rto_state_code' => $data['rto_state_code'] ?? null,
'rto_city_code' => $data['rto_city_code'] ?? null,
'weight' => $data['weight'] ?? null,
'fuel_type' => $data['fuel_type'] ?? null,
'date_of_registration' => format_date_for_database($data['date_of_registration'] ?? null),
'year_of_manufacture' => $data['year_of_manufacture'] ?? null,
'engine_no' => $data['engine_no'] ?? null,
'chassis_no' => $data['chassis_no'] ?? null,
'make' => $data['make'] ?? null,
'model' => $data['model'] ?? null,
'cubic_capacity' => $data['cubic_capacity'] ?? null,
'vehicle_type' => $data['vehicle_type'] ?? null,
'updated_by' => $data['updated_by'] ?? null
];

View File

@ -28,7 +28,28 @@ class PolicyModel extends Model
'policy_transaction_id',
'pt_oc_share_details_id',
'created_by',
'updated_by'
'updated_by',
// newly added
'tp',
'od',
'pa',
'cgst',
'sgst',
'igst',
'rto_state_code',
'rto_city_code',
'weight',
'fuel_type',
'date_of_registration',
'year_of_manufacture',
'engine_no',
'chassis_no',
'make',
'model',
'cubic_capacity',
'vehicle_type'
];
protected $useTimestamps = false;
}