Commit b6481eb6 authored by ludo's avatar ludo
Browse files

ANOMALIE #16345

parent 1711cfa8
......@@ -324,7 +324,7 @@ class AttachmentController
return $response->withStatus(403)->withJson(['errors' => 'Query limit is not an integer']);
}
$excludeAttachmentTypes = ['signed_response'];
$excludeAttachmentTypes = ['signed_response', 'summary_sheet'];
$attachments = AttachmentModel::get([
'select' => [
......
......@@ -708,8 +708,8 @@ class FolderController
if (!empty($resIds)) {
$attachments = AttachmentModel::get([
'select' => ['COUNT(res_id)', 'res_id_master'],
'where' => ['res_id_master in (?)', 'status not in (?)', '((status = ? AND typist = ?) OR status != ?)'],
'data' => [$resIds, ['DEL', 'OBS'], 'TMP', $GLOBALS['id'], 'TMP'],
'where' => ['res_id_master in (?)', 'status not in (?)', '((status = ? AND typist = ?) OR status != ?)', 'attachment_type <> ?'],
'data' => [$resIds, ['DEL', 'OBS'], 'TMP', $GLOBALS['id'], 'TMP', 'summary_sheet'],
'groupBy' => ['res_id_master']
]);
......
......@@ -781,7 +781,7 @@ class ResController extends ResourceControlController
}
$formattedData['linkedResources'] = count($linkedResources);
$attachments = AttachmentModel::get(['select' => ['count(1)'], 'where' => ['res_id_master = ?', 'status in (?)'], 'data' => [$args['resId'], ['TRA', 'A_TRA', 'FRZ']]]);
$attachments = AttachmentModel::get(['select' => ['count(1)'], 'where' => ['res_id_master = ?', 'status in (?)', 'attachment_type <> ?'], 'data' => [$args['resId'], ['TRA', 'A_TRA', 'FRZ'], 'summary_sheet']]);
$formattedData['attachments'] = $attachments[0]['count'];
$formattedData['diffusionList'] = 0;
......
......@@ -95,7 +95,7 @@ class ResourceListController
$displayFolderTags = false;
$templateColumns = 0;
if (!empty($resIds)) {
$excludeAttachmentTypes = ['signed_response'];
$excludeAttachmentTypes = ['signed_response', 'summary_sheet'];
$attachments = AttachmentModel::get([
'select' => ['COUNT(res_id)', 'res_id_master'],
'where' => ['res_id_master in (?)', 'status not in (?)', 'attachment_type not in (?)', '((status = ? AND typist = ?) OR status != ?)'],
......
......@@ -117,8 +117,8 @@ class UserFollowedResourceController
if (!empty($resIds)) {
$attachments = AttachmentModel::get([
'select' => ['COUNT(res_id)', 'res_id_master'],
'where' => ['res_id_master in (?)', 'status not in (?)', '((status = ? AND typist = ?) OR status != ?)'],
'data' => [$resIds, ['DEL', 'OBS'], 'TMP', $GLOBALS['id'], 'TMP'],
'where' => ['res_id_master in (?)', 'status not in (?)', '((status = ? AND typist = ?) OR status != ?)', 'attachment_type <> ?'],
'data' => [$resIds, ['DEL', 'OBS'], 'TMP', $GLOBALS['id'], 'TMP', 'summary_sheet'],
'groupBy' => ['res_id_master']
]);
......
......@@ -191,7 +191,7 @@ class SearchController
return $response->withJson(['resources' => [], 'count' => 0, 'allResources' => []]);
}
$excludeAttachmentTypes = ['signed_response'];
$excludeAttachmentTypes = ['signed_response', 'summary_sheet'];
$attachments = AttachmentModel::get([
'select' => ['COUNT(res_id)', 'res_id_master'],
'where' => ['res_id_master in (?)', 'status not in (?)', 'attachment_type not in (?)', '((status = ? AND typist = ?) OR status != ?)'],
......
Supports Markdown
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