CMXX - Include updated/by on multiple tables and views
This commit is contained in:
@@ -2283,7 +2283,7 @@ $messages = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
$stmt->execute([$carbrand,$cartype,$header,$questions,$datapoints,$nametester,$accounthierarchy]);
|
||||
|
||||
//MARK HISTORY ITEM FOR DELETATION
|
||||
$sql = 'UPDATE equipment_history SET type = "delete" WHERE rowID = '.$message['rowID'];
|
||||
$sql = 'UPDATE equipment_history SET type = "delete", updatedby = "system" WHERE rowID = '.$message['rowID'];
|
||||
$stmt = $pdo->prepare($sql);
|
||||
//Excute Query
|
||||
$stmt->execute();
|
||||
@@ -2477,9 +2477,9 @@ foreach ($messages as $message){
|
||||
//Validate if contract end date is in the past change contact status to closed and set users to not active
|
||||
if (date("Y-m-d") > $end_date){
|
||||
//Contract expired -> change status to closed (2)
|
||||
$sql = 'UPDATE contracts SET status = ? WHERE rowID = ?';
|
||||
$sql = 'UPDATE contracts SET status = ?, updatedby = ? WHERE rowID = ?';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([2,$message['rowID']]);
|
||||
$stmt->execute([2,"system",$message['rowID']]);
|
||||
|
||||
//CHECK FOR ASSIGNED USER END SET SERVICE TO INACTIVE
|
||||
foreach (json_decode($message['assigned_users']) as $user_assigned){
|
||||
|
||||
Reference in New Issue
Block a user