Skip to content
Snippets Groups Projects
Verified Commit befb865e authored by Florian Azizian's avatar Florian Azizian
Browse files

start remoteSignatoryBooks

parent 7b5762f4
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,9 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col
}
}
\Attachment\models\AttachmentModel::freezeAttachment(['resId' => $attachmentToFreeze, 'table' => 'res_attachments']);
foreach ($attachmentToFreeze as $resId => $externalId) {
\Attachment\modelsx\AttachmentModel::freezeAttachment(['resId' => $resId, 'table' => 'res_attachments', 'externalId' => $externalId]);
}
}
return ['result' => $result, 'history_msg' => ''];
......
......@@ -179,14 +179,14 @@ abstract class AttachmentModelAbstract
public static function freezeAttachment(array $aArgs)
{
ValidatorModel::notEmpty($aArgs, ['table', 'resId']);
ValidatorModel::stringType($aArgs, ['table']);
ValidatorModel::arrayType($aArgs, ['resId']);
ValidatorModel::notEmpty($aArgs, ['table', 'resId', 'externalId']);
ValidatorModel::stringType($aArgs, ['table', 'externalId']);
ValidatorModel::intType($aArgs, ['resId']);
DatabaseModel::update([
'table' => $aArgs['table'],
'set' => ['status' => 'FRZ'],
'where' => ['res_id in (?)'],
'set' => ['status' => 'FRZ', 'external_id' => $aArgs['externalId']],
'where' => ['res_id = ?'],
'data' => [$aArgs['resId']]
]);
......
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