Commit 3f2ab3ef authored by Florian Azizian's avatar Florian Azizian

FEAT #8760 TIME 1 clean signatureBookId after retrieve doc from MP

parent b4f3d94e
......@@ -266,7 +266,7 @@ function Bt_refusedSignedMail($aArgs = [])
[$aArgs['resIdMaster'], $creatorName . $aArgs['noteContent']]
);
}
$GLOBALS['db']->query("UPDATE ".$aArgs['tableAttachment']." SET status = 'A_TRA' WHERE res_id = ?", [$aArgs['resIdAttachment']]);
$GLOBALS['db']->query("UPDATE ".$aArgs['tableAttachment']." SET status = 'A_TRA', external_id = external_id - 'signatureBookId' WHERE res_id = ?", [$aArgs['resIdAttachment']]);
$GLOBALS['db']->query('UPDATE listinstance SET process_date = NULL WHERE res_id = ? AND difflist_type = ?', [$aArgs['resIdMaster'], 'VISA_CIRCUIT']);
$GLOBALS['db']->query("UPDATE res_letterbox SET status = '" . $aArgs['refusedStatus'] . "' WHERE res_id = ?", [$aArgs['resIdMaster']]);
......
......@@ -335,7 +335,7 @@ foreach ($retrievedMails['isVersion'] as $resId => $value) {
}
$GLOBALS['logger']->write('Document validated', 'INFO');
$GLOBALS['db']->query("UPDATE res_version_attachments set status = 'OBS' WHERE res_id = ?", [$resId]);
$GLOBALS['db']->query("UPDATE res_version_attachments set status = 'OBS', external_id = external_id - 'signatureBookId' WHERE res_id = ?", [$resId]);
if (!empty($value->onlyVisa) && $value->onlyVisa) {
$status = $validatedStatusOnlyVisa;
} else {
......@@ -450,7 +450,7 @@ foreach ($retrievedMails['noVersion'] as $resId => $value) {
}
$GLOBALS['logger']->write('Document validated', 'INFO');
$GLOBALS['db']->query("UPDATE res_attachments SET status = 'OBS' WHERE res_id = ?", [$resId]);
$GLOBALS['db']->query("UPDATE res_attachments SET status = 'OBS', external_id = external_id - 'signatureBookId' WHERE res_id = ?", [$resId]);
if (!empty($value->onlyVisa) && $value->onlyVisa) {
$status = $validatedStatusOnlyVisa;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment