static public function getSaleEditableDocumentTypes(SaleInterface $sale)
    {
        $types = [];

        foreach (DocumentTypes::getTypes() as $type) {
            if (!static::isSaleSupportsDocumentType($sale, $type)) {
                continue;
            }

            foreach ($sale->getAttachments() as $attachment) {
                if ($attachment->getType() === $type) {
                    continue 2;
                }
            }

            $types[] = $type;
        }

        return $types;
    }
static public function getSaleEditableDocumentTypes(SaleInterface $sale)
    {
        $types = [];

        foreach (DocumentTypes::getTypes() as $type) {
            if (!static::isSaleSupportsDocumentType($sale, $type)) {
                continue;
            }

            foreach ($sale->getAttachments() as $attachment) {
                if ($attachment->getType() === $type) {
                    continue 2;
                }
            }

            $types[] = $type;
        }

        return $types;
    }
Returns the types of the sale editable documents.

@param SaleInterface $sale

@return array