# Configurações Vinculadas



# PROC000 - Criação das configurações associadas

<table border="1" id="bkmrk-%C2%A0-projeto%2Fsistema%3Age" style="border-collapse: collapse; width: 100.123%; height: 49px;"><tbody><tr style="border-style: solid;"><td rowspan="3" style="width: 26.6667%; height: 49px; border-color: black; border-top-style: hidden; border-left-style: hidden; border-bottom-style: hidden;">  
<span style="color: #000000;"> [![logosoften1.png](https://docs.softensistemas.com.br/uploads/images/gallery/2026-04/scaled-1680-/logosoften1.png)](https://docs.softensistemas.com.br/uploads/images/gallery/2026-04/logosoften1.png)</span>

</td><td style="width: 49.9999%; height: 10px; border-color: black; border-style: solid;"><span style="color: #000000;">**Projeto/Sistema:**</span>  
<span style="color: #000000;">DC-e GerencieAqui</span></td><td class="align-center" style="width: 23.3333%; height: 10px; border-color: black; border-style: solid;"><span style="color: #000000;">**Versão do *Template:***</span>  
<span style="color: #000000;">1.2</span></td></tr><tr style="border-style: solid;"><td style="width: 49.9999%; height: 29px; border-color: black; border-style: solid;"><span style="color: #000000;">**Processo:**</span>  
Criação das configurações associadas</td><td class="align-center" style="width: 23.3333%; height: 29px; border-color: black; border-style: solid;"><span style="color: #000000;">**Versão do Documento:**</span>  
<span style="color: #000000;">1.1</span></td></tr><tr style="border-style: solid;"><td style="width: 49.9999%; height: 10px; border-color: black; border-style: solid;"><span style="color: #000000;">**Responsável(eis):** </span>  
<span style="color: #000000;">Daniela Taino</span></td><td class="align-center" style="width: 23.3333%; height: 10px; border-color: black; border-style: solid;"><span style="color: #000000;">**Data:** </span>

<span style="color: #000000;">20/04/2026</span>

</td></tr></tbody></table>

##### <span style="color: #000000;">**1. Introdução**</span>

<span style="color: #000000;"> Essa documentação visa descrever as configurações que deverão ser criadas para possibilitar a emissão de um novo tipo de documento no GerencieAqui, a DC-e (Declaração de Conteúdo Eletrônica).</span>

##### <span style="color: #000000;">**2. Processos**</span>

<table cellpadding="9" cellspacing="0" id="bkmrk-processo-envolvidos-" style="width: 100%;" width="100%"><tbody><tr valign="top"><td bgcolor="#acb9ca" style="border-style: solid; border-color: black; width: 27%;" width="27%"><span style="font-size: small; color: #000000;">**Processo**</span>

</td><td bgcolor="#acb9ca" style="border-style: solid; border-color: black; width: 19%;" width="19%"><span style="font-size: small; color: #000000;">**Envolvidos**</span>

</td><td bgcolor="#acb9ca" style="border-style: solid; border-color: black; width: 27%;" width="27%"><span style="font-size: small; color: #000000;">**Dados de Entrada**</span>

</td><td bgcolor="#acb9ca" style="border-style: solid; border-color: black; width: 27%;" width="27%"><span style="font-size: small; color: #000000;">**Dados de Saída**</span>

</td></tr><tr><td style="width: 27%;">PROC000 - Criação das Configurações Associadas</td><td style="width: 19%;"> </td><td style="width: 27%;">Parâmetros de configuração</td><td style="width: 27%;">Sistema habilitado para emissão

</td></tr><tr valign="top"><td style="width: 27%;" width="27%">PROC001 - Listagem de DC-e</td><td style="width: 19%;" width="19%"> </td><td style="width: 27%;" width="27%">Listagem dos DC-e lançadas</td><td style="width: 27%;" width="27%"></td></tr><tr><td style="width: 27%;">PROC002 - Nova DC-e</td><td style="width: 19%;">-</td><td style="width: 27%;">Novas DC-e ou edição de DC-e já lançadas

</td><td style="width: 27%;">DC-e cadastrada ou alterada

</td></tr></tbody></table>

#### <span style="color: #000000;">**Processos Relacionados** </span>

- - - - - -

[PROC001 - Listagem de DC-e](https://docs.softensistemas.com.br/books/dce-documentacao-de-conteudo-eletronica/page/proc001-listagem-de-dc-e)

[PROC002 - Nova DC-e](https://docs.softensistemas.com.br/books/dce-documentacao-de-conteudo-eletronica/page/proc002-nova-dc-e)

#### <span style="color: #000000;">**Especificação Funcional**</span>

- - - - - -

#### <span style="color: #000000;">**PROC000.1 Documentos Fiscais**</span>

##### <span style="color: #000000;">***Protótipo de Tela:***</span>

[![image-1776212245558.png](https://docs.softensistemas.com.br/uploads/images/gallery/2026-04/scaled-1680-/image-1776212245558.png)](https://docs.softensistemas.com.br/uploads/images/gallery/2026-04/image-1776212245558.png)

<span style="color: #000000;">*Imagem I - Opção a ser inserida nas configurações "Documentos Fiscais".*</span>

##### <span style="color: #000000;">***Descrição dos Campos:***</span>

<table border="1" cellpadding="7" cellspacing="0" id="bkmrk-campo-tipo-tamanho-o" style="width: 822px; height: 185px;"><tbody><tr style="height: 57px;" valign="top"><td bgcolor="#acb9ca" style="width: 205px; border-style: solid; border-color: black; height: 57px;"><span style="color: #000000;">**Campo**</span>

</td><td bgcolor="#acb9ca" style="width: 115px; border-style: solid; border-color: black; height: 57px;"><span style="color: #000000;">**Tipo**</span>

</td><td bgcolor="#acb9ca" style="width: 82px; border-style: solid; border-color: black; height: 57px;"><span style="color: #000000;">**Tamanho**</span>

</td><td bgcolor="#acb9ca" style="width: 105px; border-style: solid; border-color: black; height: 57px;"><span style="color: #000000;">**Obrig. ?**</span>

</td><td bgcolor="#acb9ca" style="width: 115px; border-style: solid; border-color: black; height: 57px;"><span style="color: #000000;">**Máscara**</span>

</td><td bgcolor="#acb9ca" style="width: 200px; border-style: solid; border-color: black; height: 57px;"><span style="color: #000000;">**Observações**</span>

</td></tr><tr style="height: 29px;"><td style="width: 205px; border-style: solid; border-color: black; height: 29px;">Identificação do Ambiente</td><td class="align-center" style="width: 115px; border-style: solid; border-color: black; height: 29px;">RadioButton</td><td class="align-center" style="width: 82px; border-style: solid; border-color: black; height: 29px;">-</td><td class="align-center" style="width: 105px; border-style: solid; border-color: black; height: 29px;">Sim</td><td class="align-center" style="width: 115px; border-style: solid; border-color: black; height: 29px;"> </td><td style="width: 200px; border-style: solid; border-color: black; height: 29px;">A escolher entre: Produção e Homologação</td></tr><tr style="height: 29px;"><td style="width: 205px; border-style: solid; border-color: black; height: 29px;">Tipo de Emissão</td><td class="align-center" style="width: 115px; border-style: solid; border-color: black; height: 29px;">RadioButton</td><td class="align-center" style="width: 82px; border-style: solid; border-color: black; height: 29px;">-</td><td class="align-center" style="width: 105px; border-style: solid; border-color: black; height: 29px;">Sim</td><td class="align-center" style="width: 115px; border-style: solid; border-color: black; height: 29px;"> </td><td style="width: 200px; border-style: solid; border-color: black; height: 29px;">A escolher entre: Própria e Transportadora</td></tr><tr style="height: 35px;"><td style="width: 205px; border-style: solid; border-color: black; height: 35px;">Série</td><td class="align-center" style="width: 115px; border-style: solid; border-color: black; height: 35px;">Número</td><td class="align-center" style="width: 82px; border-style: solid; border-color: black; height: 35px;">3</td><td class="align-center" style="width: 105px; border-style: solid; border-color: black; height: 35px;">Não</td><td class="align-center" style="width: 115px; border-style: solid; border-color: black; height: 35px;"> </td><td style="width: 200px; border-style: solid; border-color: black; height: 35px;"> </td></tr><tr style="height: 35px;"><td style="width: 205px; border-style: solid; border-color: black; height: 35px;">Nº da última DC-e emitida</td><td class="align-center" style="width: 115px; border-style: solid; border-color: black; height: 35px;">Número</td><td class="align-center" style="width: 82px; border-style: solid; border-color: black; height: 35px;">9</td><td class="align-center" style="width: 105px; border-style: solid; border-color: black; height: 35px;">Não</td><td class="align-center" style="width: 115px; border-style: solid; border-color: black; height: 35px;"> </td><td style="width: 200px; border-style: solid; border-color: black; height: 35px;"> </td></tr></tbody></table>

#####  

##### ***Regras de Interface:***

***1. Identificação do Ambiente:*** valor padrão: Homologação.  
***1. Tipo de Emissão:*** valor padrão: Transportadora. ***2. Série:*** valor padrão: 0.  ***3. Nº da última DC-e emitida:*** valor padrão: vazio.

##### ***Regras de Negócio:***

***1.*** A section será adicionada a página existente com as configurações fiscais, Todas as regras de interface e negócio já existentes, devem ser mantidas. Inserir do lado do card "Geral".

#### **PROC000.2 Configurações Adicionais** 

##### <span style="color: #000000;">***Protótipo de Tela:***</span>

[![image-1775783226154.png](https://docs.softensistemas.com.br/uploads/images/gallery/2026-04/scaled-1680-/image-1775783226154.png)](https://docs.softensistemas.com.br/uploads/images/gallery/2026-04/image-1775783226154.png)

<span style="color: #000000;">*Imagem II - Section a ser inserida na página "Configurações Gerais"*</span>

##### <span style="color: #000000;">***Descrição dos Campos:***</span>

<table border="1" cellpadding="7" cellspacing="0" id="bkmrk-campo-tipo-tamanho-o-0" style="width: 843px; height: 86px;"><tbody><tr style="height: 57px;" valign="top"><td bgcolor="#acb9ca" style="width: 205.99px; border-style: solid; border-color: black; height: 57px;"><span style="color: #000000;">**Campo**</span>

</td><td bgcolor="#acb9ca" style="width: 115.99px; border-style: solid; border-color: black; height: 57px;"><span style="color: #000000;">**Tipo**</span>

</td><td bgcolor="#acb9ca" style="width: 82.9688px; border-style: solid; border-color: black; height: 57px;"><span style="color: #000000;">**Tamanho**</span>

</td><td bgcolor="#acb9ca" style="width: 105.99px; border-style: solid; border-color: black; height: 57px;"><span style="color: #000000;">**Obrig. ?**</span>

</td><td bgcolor="#acb9ca" style="width: 115.99px; border-style: solid; border-color: black; height: 57px;"><span style="color: #000000;">**Máscara**</span>

</td><td bgcolor="#acb9ca" style="width: 200px; border-style: solid; border-color: black; height: 57px;"><span style="color: #000000;">**Observações**</span>

</td></tr><tr style="height: 29px;"><td style="width: 205.99px; border-style: solid; border-color: black; height: 29px;">DC-e</td><td class="align-center" style="width: 115.99px; border-style: solid; border-color: black; height: 29px;">RadioButton</td><td class="align-center" style="width: 82.9688px; border-style: solid; border-color: black; height: 29px;">-</td><td class="align-center" style="width: 105.99px; border-style: solid; border-color: black; height: 29px;">Sim</td><td class="align-center" style="width: 115.99px; border-style: solid; border-color: black; height: 29px;"> </td><td style="width: 200px; border-style: solid; border-color: black; height: 29px;">A escolher entre: Sem Controle Estoque, Baixa Manual eBaixa Automática</td></tr></tbody></table>

##### ***Regras de Interface:***

***1. DC-e:*** valor padrão: Sem Controle Estoque

##### ***Regras de Negócio:***

***1.*** A section será adicionada a página existente com as configurações gerais, Todas as regras de interface e negócio já existentes, devem ser mantidas. Assim como os outros documentos, o DC-e obedece o fluxo das configurações de estoque (venda mediante estoque zerado, etc).

##### ***Questões Técnicas:***

Para armazenar as novas configurações, as novas colunas deverão ser criadas na tabela "empresa"

```SQL
ALTER TABLE `gerencieaqui`.`empresa` 
ADD COLUMN `tpAmbDCe` INT(1) NULL AFTER `tipoBackup`,
ADD COLUMN `tpEmissaoDCe` INT(1) NULL AFTER `tpAmbDCe`,
ADD COLUMN `serieDCeInicial` VARCHAR(3) NULL AFTER `tpEmissaoDCe`,
ADD COLUMN `numDCeInicial` VARCHAR(9) NULL AFTER `serieDCeInicial`,
ADD COLUMN `estoqueDCe` INT(11) NULL AFTER `numDCeInicial`;

```

