diff --git a/sql/structure.sql b/sql/structure.sql index 59a4bb57184f0f15be82e21aab5d055051e38c4c..00ab2c4856610f542c5b1f10e8bf54355e3657b5 100755 --- a/sql/structure.sql +++ b/sql/structure.sql @@ -1295,7 +1295,6 @@ CREATE TABLE shippings id serial NOT NULL, user_id INTEGER NOT NULL, attachment_id INTEGER NOT NULL, -is_version boolean NOT NULL, options json DEFAULT '{}', fee FLOAT NOT NULL, recipient_entity_id INTEGER NOT NULL, diff --git a/src/app/attachment/models/AttachmentModelAbstract.php b/src/app/attachment/models/AttachmentModelAbstract.php index fc1e47b0e08a54552709b0b0e21694ba4b16cc89..b3790d7da553e9d4f8c1ad0a9ad94ed2d843d6ce 100755 --- a/src/app/attachment/models/AttachmentModelAbstract.php +++ b/src/app/attachment/models/AttachmentModelAbstract.php @@ -39,25 +39,6 @@ abstract class AttachmentModelAbstract return $attachments; } - public static function getOnView(array $aArgs) - { - ValidatorModel::notEmpty($aArgs, ['select']); - ValidatorModel::arrayType($aArgs, ['select', 'where', 'data', 'orderBy', 'groupBy']); - ValidatorModel::intType($aArgs, ['limit']); - - $aAttachments = DatabaseModel::select([ - 'select' => $aArgs['select'], - 'table' => ['res_view_attachments'], - 'where' => empty($aArgs['where']) ? [] : $aArgs['where'], - 'data' => empty($aArgs['data']) ? [] : $aArgs['data'], - 'groupBy' => empty($aArgs['groupBy']) ? [] : $aArgs['groupBy'], - 'order_by' => empty($aArgs['orderBy']) ? [] : $aArgs['orderBy'], - 'limit' => empty($aArgs['limit']) ? 0 : $aArgs['limit'] - ]); - - return $aAttachments; - } - public static function getById(array $aArgs) { ValidatorModel::notEmpty($aArgs, ['id']); diff --git a/src/app/convert/controllers/ConvertPdfController.php b/src/app/convert/controllers/ConvertPdfController.php index 6e6fa4c69bc1d7508340d4d15040e8cecb29775a..7bdbd9a08c1321e61771965f638da668d40a381d 100755 --- a/src/app/convert/controllers/ConvertPdfController.php +++ b/src/app/convert/controllers/ConvertPdfController.php @@ -128,7 +128,6 @@ class ConvertPdfController } else { AdrModel::createAttachAdr([ 'resId' => $aArgs['resId'], - 'isVersion' => $aArgs['isVersion'], 'type' => 'PDF', 'docserverId' => $storeResult['docserver_id'], 'path' => $storeResult['destination_dir'], diff --git a/src/app/email/controllers/EmailController.php b/src/app/email/controllers/EmailController.php index bf1fc6f5f1dcac6042ef57acda310db73d4e348d..588e50dc200bcfb0d1555e6ec16e3d7caee89f79 100644 --- a/src/app/email/controllers/EmailController.php +++ b/src/app/email/controllers/EmailController.php @@ -143,11 +143,7 @@ class EmailController $document['attachments'] = (array)$document['attachments']; foreach ($document['attachments'] as $attachment) { $attachment = (array)$attachment; - if ($attachment['isVersion']) { - $email['attachments_version'][] = $attachment['id']; - } else { - $email['attachments'][] = $attachment['id']; - } + $email['attachments'][] = $attachment['id']; } } @@ -477,7 +473,6 @@ class EmailController } foreach ($args['data']['document']['attachments'] as $attachment) { $check = Validator::intVal()->notEmpty()->validate($attachment['id']); - $check = $check && Validator::boolType()->validate($attachment['isVersion']); $check = $check && Validator::boolType()->validate($attachment['original']); if (!$check) { return ['errors' => 'Data document[attachments] errors', 'code' => 400]; diff --git a/src/app/shipping/models/ShippingModel.php b/src/app/shipping/models/ShippingModel.php index 26a8ec2ceeef0e7ed6f54b1ae9e38026bb7c64f1..38bf95224c1036c558ad6dfafae1d71536fb23e0 100644 --- a/src/app/shipping/models/ShippingModel.php +++ b/src/app/shipping/models/ShippingModel.php @@ -24,14 +24,12 @@ class ShippingModel ValidatorModel::notEmpty($args, ['userId', 'attachmentId', 'accountId']); ValidatorModel::intVal($args, ['userId', 'attachmentId', 'recipientEntityId']); ValidatorModel::stringType($args, ['accountId']); - ValidatorModel::boolType($args, ['isVersion']); DatabaseModel::insert([ 'table' => 'shippings', 'columnsValues' => [ 'user_id' => $args['userId'], 'attachment_id' => $args['attachmentId'], - 'is_version' => empty($args['isVersion']) ? 'false' : 'true', 'options' => $args['options'], 'fee' => $args['fee'], 'recipient_entity_id' => $args['recipientEntityId'],