Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
abe917bfab
@ -1390,7 +1390,7 @@ class EmployeeController extends AdminController
|
|||||||
}
|
}
|
||||||
|
|
||||||
//STEP:3 - Update files table status
|
//STEP:3 - Update files table status
|
||||||
$this->fileModel->where('id', $file_id)->set(['status' => 'truncated'])->update();
|
$this->fileModel->where('id', $file_id)->set(['status' => 'truncated','updated_by' => $loggedInUserID])->update();
|
||||||
$this->myLogger->logme('error', '---- files table updated ----');
|
$this->myLogger->logme('error', '---- files table updated ----');
|
||||||
|
|
||||||
//FINAL STEP - Update reverse entry in cash_deposite table
|
//FINAL STEP - Update reverse entry in cash_deposite table
|
||||||
@ -1479,7 +1479,7 @@ class EmployeeController extends AdminController
|
|||||||
|
|
||||||
// dd($affectedRows);
|
// dd($affectedRows);
|
||||||
$affectedRows = $affectedRows * 2;
|
$affectedRows = $affectedRows * 2;
|
||||||
$this->fileModel->where('id', $file_id)->set(['status' => 'truncated'])->update();
|
$this->fileModel->where('id', $file_id)->set(['status' => 'truncated','updated_by' => $loggedInUserID])->update();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1546,7 +1546,7 @@ class EmployeeController extends AdminController
|
|||||||
|
|
||||||
// STEP 3:
|
// STEP 3:
|
||||||
//update files table status to "truncated"
|
//update files table status to "truncated"
|
||||||
$this->fileModel->where('id', $file_id)->set(['status' => 'truncated'])->update();
|
$this->fileModel->where('id', $file_id)->set(['status' => 'truncated','updated_by' => $loggedInUserID])->update();
|
||||||
$this->myLogger->logme('error', 'files table updated');
|
$this->myLogger->logme('error', 'files table updated');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2596,6 +2596,25 @@ class EmployeeRestController extends AdminController
|
|||||||
$data['ticket_data'] = $ticketController->getMoreInfo($requestFrom = 'rest', $ticket_id);
|
$data['ticket_data'] = $ticketController->getMoreInfo($requestFrom = 'rest', $ticket_id);
|
||||||
|
|
||||||
|
|
||||||
|
// $data = $response['data']; // Assuming your full array is stored in $response
|
||||||
|
// $ticketData = $data['ticket_data'];
|
||||||
|
// $ticketHistory = $data['ticket_history'];
|
||||||
|
|
||||||
|
// Loop through ticket_data
|
||||||
|
foreach ($data['ticket_data'] as $status => &$fields) {
|
||||||
|
// Search ticket_history for matching old_status_value
|
||||||
|
foreach ($data['ticket_history'] as $history) {
|
||||||
|
if ($history['old_status_value'] === $status) {
|
||||||
|
// Attach modified_by and created_at
|
||||||
|
$fields['modified_by'] = $history['modified_by'];
|
||||||
|
$fields['modified_at'] = date('d-m-Y h:i A', strtotime($history['created_at']));
|
||||||
|
// Break after first match (assuming latest entry is enough)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $this->respond(['status' => (count($data) ? 'success' : 'failed'),'code' => (count($data) ? 200 : 404),'data' => $data ], 200);
|
return $this->respond(['status' => (count($data) ? 'success' : 'failed'),'code' => (count($data) ? 200 : 404),'data' => $data ], 200);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,8 @@ class FileModel extends Model
|
|||||||
"client_id",
|
"client_id",
|
||||||
"policy_id",
|
"policy_id",
|
||||||
"client_branch_id",
|
"client_branch_id",
|
||||||
"uploaded_by"
|
"uploaded_by",
|
||||||
|
"updated_by"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user