test 2
This commit is contained in:
parent
30216a0930
commit
e3b39a2596
@ -291,9 +291,11 @@ class EnquiryController extends ResourceController
|
|||||||
// trigger_email('enquiry_created', ['enquiry_id' => $enquiryId]);
|
// trigger_email('enquiry_created', ['enquiry_id' => $enquiryId]);
|
||||||
|
|
||||||
// QUOTATION MULTIPLE INSERT LOGIC
|
// 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
|
//get insurer_branch_id
|
||||||
if(isset($q['insurer_id']))
|
if(isset($q['insurer_id']))
|
||||||
@ -317,6 +319,7 @@ class EnquiryController extends ResourceController
|
|||||||
|
|
||||||
$this->QuotationModel->insert($quotationData);
|
$this->QuotationModel->insert($quotationData);
|
||||||
}
|
}
|
||||||
|
$this->enquiryModel->update($enquiryId, [ 'status' => 'Proposal Created' ]);
|
||||||
}
|
}
|
||||||
else if ($isStaff == 1 && $isQuick == 0)
|
else if ($isStaff == 1 && $isQuick == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user