diff --git a/src/app/resource/controllers/ResourceControlController.php b/src/app/resource/controllers/ResourceControlController.php index 9ead2e473c1403ab08dbbe0191469e39067f1182..2e5aad504a090920ac523242167e1eb800007727 100644 --- a/src/app/resource/controllers/ResourceControlController.php +++ b/src/app/resource/controllers/ResourceControlController.php @@ -426,10 +426,13 @@ class ResourceControlController return ['errors' => "Body documentDate is not a date"]; } - $documentDate = new \DateTime($body['documentDate']); - $tmr = new \DateTime('tomorrow'); - if ($documentDate > $tmr) { - return ['errors' => "Body documentDate is not a valid date"]; + $model = IndexingModelModel::getById(['id' => $body['modelId'], 'select' => ['category']]); + if ($model['category'] != 'outgoing') { + $documentDate = new \DateTime($body['documentDate']); + $tmr = new \DateTime('tomorrow'); + if ($documentDate > $tmr) { + return ['errors' => "Body documentDate is not a valid date"]; + } } } if (!empty($body['arrivalDate'])) { diff --git a/src/app/resource/controllers/StoreController.php b/src/app/resource/controllers/StoreController.php index be67493a6d692fd30ce2de26592c11edf5ee1f9d..9dc17a54a4d88c26fbdf483f270cb424d7e88956 100755 --- a/src/app/resource/controllers/StoreController.php +++ b/src/app/resource/controllers/StoreController.php @@ -206,7 +206,7 @@ class StoreController } $integrations = ['inSignatureBook' => false, 'inShipping' => false]; - if (!empty($args['integrations'])) { + if (!empty($args['integrations']) && !empty($args['encodedFile'])) { $integrations['inSignatureBook'] = !empty($args['integrations']['inSignatureBook']); $integrations['inShipping'] = !empty($args['integrations']['inShipping']); }