diff --git a/src/app/action/controllers/ShippingTrait.php b/src/app/action/controllers/ShippingTrait.php index 9d5ea91775bfda8f3b1510f7a500bd5f81d737bf..0198115a87dbbafba1106a582063b228f3a25b2d 100644 --- a/src/app/action/controllers/ShippingTrait.php +++ b/src/app/action/controllers/ShippingTrait.php @@ -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; diff --git a/src/app/attachment/models/AttachmentModelAbstract.php b/src/app/attachment/models/AttachmentModelAbstract.php index 99a55a5493e8f4ebf391ef14b9b10a783904f509..01d3015c7f9bd3ea1058c2d8c5efaf462b89aff5 100755 --- a/src/app/attachment/models/AttachmentModelAbstract.php +++ b/src/app/attachment/models/AttachmentModelAbstract.php @@ -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'] ]);