FIX intervention fetch user author/modify ID (#38738)
* Added user ID to fetch. Updated contributor details. * Cleaned code * Fixed SQL
This commit is contained in:
parent
b83565d380
commit
dca7b5bfab
1 changed files with 5 additions and 3 deletions
|
|
@ -7,7 +7,7 @@
|
|||
* Copyright (C) 2015-2026 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023-2024 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2023-2026 William Mead <william@m34d.com>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -504,9 +504,10 @@ class Fichinter extends CommonObject
|
|||
public function fetch($rowid, $ref = '', $ref_ext = '')
|
||||
{
|
||||
$sql = "SELECT f.rowid, f.ref, f.ref_client, f.description, f.fk_soc, f.fk_statut as status, f.signed_status,";
|
||||
$sql .= " f.datec, f.dateo, f.datee, f.datet, f.fk_user_author,";
|
||||
$sql .= " f.datec, f.dateo, f.datee, f.datet,";
|
||||
$sql .= " f.date_valid as datev,";
|
||||
$sql .= " f.tms as datem,";
|
||||
$sql .= " f.fk_user_author, f.fk_user_modif,";
|
||||
$sql .= " f.duree, f.fk_projet as fk_project, f.note_public, f.note_private, f.model_pdf, f.last_main_doc, f.extraparams, fk_contrat, f.entity as entity";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."fichinter as f";
|
||||
$sql .= " WHERE f.entity IN (".getEntity('intervention').")";
|
||||
|
|
@ -545,7 +546,8 @@ class Fichinter extends CommonObject
|
|||
$this->fk_contrat = $obj->fk_contrat;
|
||||
$this->entity = $obj->entity;
|
||||
|
||||
$this->user_creation_id = $obj->fk_user_author;
|
||||
$this->user_author_id = $this->user_creation_id = $obj->fk_user_author;
|
||||
$this->user_modification_id = $obj->fk_user_modif;
|
||||
|
||||
$this->extraparams = is_null($obj->extraparams) ? [] : (array) json_decode($obj->extraparams, true);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue