FIX_CLAIM_AUTO_UPDATE_STATUS :RV
This commit is contained in:
parent
b2083b97b9
commit
e5f84f7fe4
@ -41,6 +41,8 @@ class TicketController extends BaseController
|
|||||||
public $placeHolders;
|
public $placeHolders;
|
||||||
public $extraFields;
|
public $extraFields;
|
||||||
public $nonIDReason;
|
public $nonIDReason;
|
||||||
|
public $removeArrayKey;
|
||||||
|
|
||||||
|
|
||||||
protected $clientModel;
|
protected $clientModel;
|
||||||
protected $ticketMasterModel;
|
protected $ticketMasterModel;
|
||||||
@ -278,7 +280,6 @@ class TicketController extends BaseController
|
|||||||
58 => ['cancel_remark' => 'Cancel Remark']
|
58 => ['cancel_remark' => 'Cancel Remark']
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
$this->nonIDReason = [
|
$this->nonIDReason = [
|
||||||
"Newborn Baby" => "Newborn Baby",
|
"Newborn Baby" => "Newborn Baby",
|
||||||
"Newly Wedded Spouse" => "Newly Wedded Spouse",
|
"Newly Wedded Spouse" => "Newly Wedded Spouse",
|
||||||
@ -287,6 +288,46 @@ class TicketController extends BaseController
|
|||||||
"Exceptional Case" => "Exceptional Case"
|
"Exceptional Case" => "Exceptional Case"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$this->removeArrayKey = [
|
||||||
|
2 => [],
|
||||||
|
6 => [],
|
||||||
|
12 => [],
|
||||||
|
15 => [],
|
||||||
|
16 => [],
|
||||||
|
17 => [],
|
||||||
|
18 => [],
|
||||||
|
19 => [],
|
||||||
|
21 => [],
|
||||||
|
22 => [],
|
||||||
|
23 => [],
|
||||||
|
25 => [],
|
||||||
|
26 => [],
|
||||||
|
27 => [],
|
||||||
|
28 => [],
|
||||||
|
29 => [],
|
||||||
|
31 => [],
|
||||||
|
32 => [],
|
||||||
|
33 => [],
|
||||||
|
35 => [],
|
||||||
|
36 => [],
|
||||||
|
37 => [],
|
||||||
|
38 => [],
|
||||||
|
39 => [],
|
||||||
|
41 => [],
|
||||||
|
42 => [],
|
||||||
|
43 => [],
|
||||||
|
45 => [],
|
||||||
|
46 => [],
|
||||||
|
49 => [],
|
||||||
|
50 => [],
|
||||||
|
51 => [],
|
||||||
|
52 => [],
|
||||||
|
55 => [],
|
||||||
|
56 => [],
|
||||||
|
57 => [],
|
||||||
|
60 => []
|
||||||
|
];
|
||||||
|
|
||||||
$this->ticketMasterModel = new TicketMasterModel();
|
$this->ticketMasterModel = new TicketMasterModel();
|
||||||
$this->claimStatus = new TicketClaimStatusModel();
|
$this->claimStatus = new TicketClaimStatusModel();
|
||||||
$this->clientModel = new ClientModel();
|
$this->clientModel = new ClientModel();
|
||||||
@ -1705,9 +1746,22 @@ class TicketController extends BaseController
|
|||||||
$lastMatchedStatus = $incoming_form_values['claim_status_id'];
|
$lastMatchedStatus = $incoming_form_values['claim_status_id'];
|
||||||
|
|
||||||
// Use the provided `extra_fields_array_for_validate` from the incoming data
|
// Use the provided `extra_fields_array_for_validate` from the incoming data
|
||||||
$statusMapping = json_decode($incoming_form_values['extra_fields_array_for_validate']);
|
$statusMapping = json_decode($incoming_form_values['extra_fields_array_for_validate'], true);
|
||||||
|
// print_r($statusMapping);
|
||||||
|
// echo "-------------------------------";
|
||||||
|
|
||||||
|
//for remove the non used arrays
|
||||||
|
foreach ($statusMapping as $key1 => $value1) {
|
||||||
|
foreach ($this->removeArrayKey as $key2 => $value2) {
|
||||||
|
if($key1 === $key2){
|
||||||
|
unset($statusMapping[$key1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// print_r($statusMapping); die;
|
||||||
|
|
||||||
|
// if($incoming_form_values['claim_status_id'] != $old_ticket_data['claim_status_id']){
|
||||||
|
|
||||||
if($incoming_form_values['claim_status_id'] != $old_ticket_data['claim_status_id']){
|
|
||||||
foreach ($statusMapping as $status => $requiredFields) {
|
foreach ($statusMapping as $status => $requiredFields) {
|
||||||
|
|
||||||
if(!empty($requiredFields) && $status != $old_ticket_data['claim_status_id']){
|
if(!empty($requiredFields) && $status != $old_ticket_data['claim_status_id']){
|
||||||
@ -1742,7 +1796,8 @@ class TicketController extends BaseController
|
|||||||
$lastMatchedStatus = 2;
|
$lastMatchedStatus = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
// }
|
||||||
|
|
||||||
return $lastMatchedStatus;
|
return $lastMatchedStatus;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user