Skip to content
Snippets Groups Projects
Verified Commit 2850ad65 authored by Damien's avatar Damien
Browse files

FEAT Maileva No TMP attachments

parent f42bb7c6
No related branches found
No related tags found
No related merge requests found
......@@ -56,8 +56,8 @@ trait ShippingTrait
$attachments = AttachmentModel::getOnView([
'select' => ['res_id', 'res_id_version', 'title', 'dest_address_id', 'external_id'],
'where' => ['res_id_master = ?', 'in_send_attach = ?', 'status not in (?)'],
'data' => [$args['resId'], true, ['OBS', 'DEL']]
'where' => ['res_id_master = ?', 'in_send_attach = ?', 'status not in (?)', 'attachment_type not in (?)'],
'data' => [$args['resId'], true, ['OBS', 'DEL', 'TMP'], ['converted_pdf', 'print_folder']]
]);
if (empty($attachments)) {
return true;
......
......@@ -74,8 +74,8 @@ abstract class AttachmentModelAbstract
$aAttachments = DatabaseModel::select([
'select' => empty($aArgs['select']) ? ['max(relation) as relation', 'res_id_master', 'title', 'res_id', 'res_id_version', 'identifier', 'dest_address_id'] : $aArgs['select'],
'table' => ['res_view_attachments'],
'where' => ['res_id_master in (?)', 'status not in (?, ?)', 'attachment_type not in (?, ?)', 'in_send_attach = TRUE'],
'data' => [$aArgs['ids'], 'OBS', 'DEL', 'converted_pdf', 'print_folder'],
'where' => ['res_id_master in (?)', 'status not in (?)', 'attachment_type not in (?, ?)', 'in_send_attach = TRUE'],
'data' => [$aArgs['ids'], ['OBS', 'DEL', 'TMP'], 'converted_pdf', 'print_folder'],
'groupBy' => ['res_id_master', 'title', 'res_id', 'res_id_version', 'identifier', 'dest_address_id'],
'order_by' => empty($aArgs['orderBy']) ? [] : $aArgs['orderBy']
]);
......
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