Skip to content
Snippets Groups Projects
Commit 7b555c7e authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FIX #14657 TIME 0:05 fix signatory in get by id

parent 77f64ef3
No related branches found
No related tags found
No related merge requests found
......@@ -128,13 +128,17 @@ class AttachmentController
if ($attachment['status'] == 'SIGN') {
$signedResponse = AttachmentModel::get([
'select' => ['res_id', 'creation_date', 'typist'],
'select' => ['res_id', 'creation_date', 'typist', 'signatory_user_serial_id'],
'where' => ['origin = ?', 'status not in (?)'],
'data' => ["{$args['id']},res_attachments", ['DEL']]
]);
if (!empty($signedResponse[0])) {
$attachment['signedResponse'] = $signedResponse[0]['res_id'];
$attachment['signatory'] = UserModel::getLabelledUserById(['id' => $signedResponse[0]['typist']]);
if (!empty($signedResponse[0]['signatory_user_serial_id'])) {
$attachment['signatory'] = UserModel::getLabelledUserById(['id' => $signedResponse[0]['signatory_user_serial_id']]);
} else {
$attachment['signatory'] = UserModel::getLabelledUserById(['login' => $signedResponse[0]['typist']]);
}
$attachment['signDate'] = $signedResponse[0]['creation_date'];
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment