This commit is contained in:
Gowtham M 2025-11-29 12:45:01 +05:30
parent 30216a0930
commit e3b39a2596

View File

@ -291,9 +291,11 @@ class EnquiryController extends ResourceController
// trigger_email('enquiry_created', ['enquiry_id' => $enquiryId]);
// QUOTATION MULTIPLE INSERT LOGIC
if ($isStaff == 1 && $isQuick == 1 && !empty($data['quotation']) && is_array($data['quotation']))
if ($isStaff == 1 && $isQuick == 1 && !empty($data['quotation']) && is_string($data['quotation']) )
{
foreach ($data['quotation'] as $q) {
$quotationArray = json_decode($data['quotation'], true);
foreach ($quotationArray as $q) {
//get insurer_branch_id
if(isset($q['insurer_id']))
@ -317,6 +319,7 @@ class EnquiryController extends ResourceController
$this->QuotationModel->insert($quotationData);
}
$this->enquiryModel->update($enquiryId, [ 'status' => 'Proposal Created' ]);
}
else if ($isStaff == 1 && $isQuick == 0)
{