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

FIX retrieve document from signatory book

parent d25e04d7
No related branches found
No related tags found
No related merge requests found
......@@ -178,7 +178,7 @@ function Bt_createAttachment($aArgs = [])
if (!empty($aArgs['table'])) {
$table = $aArgs['table'];
} else {
$table = 'res_letterbox';
$table = 'res_attachments';
}
if (!empty($aArgs['relation'])) {
......@@ -187,6 +187,12 @@ function Bt_createAttachment($aArgs = [])
$relation = 1;
}
if (!empty($aArgs['status'])) {
$status = $aArgs['status'];
} else {
$status = 'TRA';
}
$dataValue = [];
array_push($dataValue, ['column' => 'res_id_master', 'value' => $aArgs['res_id_master'], 'type' => 'integer']);
array_push($dataValue, ['column' => 'title', 'value' => $aArgs['title'], 'type' => 'string']);
......@@ -201,13 +207,17 @@ function Bt_createAttachment($aArgs = [])
array_push($dataValue, ['column' => 'relation', 'value' => $relation, 'type' => 'integer']);
array_push($dataValue, ['column' => 'in_signature_book','value' => $inSignatureBook, 'type' => 'bool']);
if (!empty($aArgs['attachment_id_master'])) {
array_push($dataValue, ['column' => 'attachment_id_master','value' => $aArgs['attachment_id_master'], 'type' => 'integer']);
}
$allDatas = [
"encodedFile" => $aArgs['encodedFile'],
"data" => $dataValue,
"collId" => "letterbox_coll",
"table" => $table,
"fileFormat" => $aArgs['format'],
"status" => 'TRA'
"status" => $status
];
$opts = [
......
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