01. DADOS GERAIS

Produto:

Linha de Produto:

Segmento:

Módulo:

Totvs Dms (Linhas Protheus) - Veículos (SIGAVEI)

Função:Remitos de Entrega Futura em Outras Filiais (VEIA351)
País:Argentina
Ticket:Não há.
Requisito/Story/Issue (informe o requisito relacionado) :DVARMIL-11167


02. SITUAÇÃO/REQUISITO

Atualmente, o processo de faturamento de veículos com entrega futura só permite gerar a fatura e o remito de entrega (nota de transferência/entrega) na mesma filial.No entanto, há situações em que o veículo está em estoque em outra filial e será necessário faturar pela filial de venda, mas emitir o remito pela filial onde o veículo realmente está.


<section style="font-family: 'Segoe UI', Roboto, sans-serif; color: #222; margin: 24px 0;">
  <h2 style="color: #004080; font-size: 1.6em; border-bottom: 2px solid #0078d7; padding-bottom: 6px;">
    🔧 O que será alterado no sistema
  </h2>

  <p style="margin: 12px 0; color: #444;">
    Abaixo estão detalhadas as principais alterações que serão implementadas no sistema
    para permitir o faturamento em uma filial e a geração do remito de entrega em outra filial.
  </p>

  <div style="margin-top: 18px; display: grid; gap: 14px;">
    
    <div style="background:#f4f8ff; border-left: 5px solid #0078d7; padding: 14px 18px; border-radius: 6px;">
      <h3 style="margin:0; font-size:1.1em; color:#003366;">1️⃣ Novo campo: Filial do Remito</h3>
      <p style="margin:6px 0 0;">
        Será criado o campo <strong>VV0_FILREM</strong> no atendimento de veículos, armazenando a filial responsável por gerar o remito
        (geralmente a filial que possui o veículo em estoque).
      </p>
    </div>

    <div style="background:#f9fcff; border-left: 5px solid #00aaff; padding: 14px 18px; border-radius: 6px;">
      <h3 style="margin:0; font-size:1.1em; color:#004466;">2️⃣ Identificação automática da filial do estoque</h3>
      <p style="margin:6px 0 0;">
        No momento do faturamento com <strong>entrega futura</strong>, o sistema verificará onde o veículo está em estoque.
        Caso esteja em outra filial, o usuário será questionado se deseja gerar o remito pela filial onde o estoque se encontra.
      </p>
    </div>

    <div style="background:#f4f8ff; border-left: 5px solid #0078d7; padding: 14px 18px; border-radius: 6px;">
      <h3 style="margin:0; font-size:1.1em; color:#003366;">3️⃣ Bloqueio de ações após confirmação</h3>
      <p style="margin:6px 0 0;">
        Se o usuário confirmar que o remito será feito em outra filial, o sistema gravará o campo
        <strong>VV0_FILREM</strong> e bloqueará o atendimento para novas ações, permitindo apenas a geração da fatura de entrega futura.
      </p>
    </div>

    <div style="background:#f9fcff; border-left: 5px solid #00aaff; padding: 14px 18px; border-radius: 6px;">
      <h3 style="margin:0; font-size:1.1em; color:#004466;">4️⃣ Nova tela: Remitos pendentes</h3>
      <p style="margin:6px 0 0;">
        Será criada uma nova tela listando todos os atendimentos faturados com entrega futura que ainda não possuem remito gerado.
        Essa tela exibirá apenas os atendimentos vinculados à filial logada (filial responsável pelo remito).
      </p>
      <ul style="margin:8px 0 0 20px; color:#333;">
        <li>Filtro automático pela filial logada;</li>
        <li>Opção <strong>Gerar Remito de Entrega</strong> disponível para seleção;</li>
        <li>Visualização das informações principais do atendimento antes da geração.</li>
      </ul>
    </div>

    <div style="background:#f4f8ff; border-left: 5px solid #0078d7; padding: 14px 18px; border-radius: 6px;">
      <h3 style="margin:0; font-size:1.1em; color:#003366;">5️⃣ Geração automática do Remito</h3>
      <p style="margin:6px 0 0;">
        Ao gerar o remito, o sistema criará automaticamente os registros necessários (<strong>SC5/SC6 – MATA410</strong> e
        o <strong>Remito – A462ANGera</strong>) na filial logada (estoque), atualizando também os campos correspondentes
        no <strong>VV0/VVA</strong> do atendimento da filial de venda.
      </p>
    </div>

    <div style="background:#f9fcff; border-left: 5px solid #00aaff; padding: 14px 18px; border-radius: 6px;">
      <h3 style="margin:0; font-size:1.1em; color:#004466;">6️⃣ Tratamento de cancelamentos e devoluções</h3>
      <p style="margin:6px 0 0;">
        As rotinas de <strong>cancelamento de atendimento</strong> e de <strong>entrada por devolução de venda</strong> serão
        revisadas para garantir o tratamento adequado de remitos gerados em outras filiais.
      </p>
    </div>

  </div>
</section>



03. SOLUÇÃO


Atualmente, quando uma venda é feita com entrega futura, o sistema só permite faturar e entregar o veículo pela mesma filial.
Com esta melhoria, o sistema passará a permitir faturar em uma filial e entregar (gerar o remito) em outra filial — ou seja, será possível que a filial que vendeu o veículo não seja necessariamente a mesma que o entrega ao cliente.

Durante o faturamento, o sistema vai identificar em qual filial o veículo está realmente em estoque.
Se o veículo estiver em outra unidade, o sistema vai avisar o usuário e perguntar se a entrega será feita pela filial onde o veículo se encontra.
Caso o usuário confirme, o sistema vai registrar essa informação automaticamente e o atendimento ficará bloqueado para evitar outras alterações até que o remito (entrega) seja feito.

Também será criada uma nova tela para que as filiais possam acompanhar os atendimentos que ainda estão com entrega pendente.
Nessa tela, o usuário poderá gerar o remito de entrega com apenas um clique, e o sistema fará todas as atualizações automaticamente — tanto na filial que entrega quanto na filial que fez a venda.

Além disso, as rotinas de cancelamento de atendimento e de devolução de venda também serão ajustadas para reconhecer os casos em que o remito foi feito por outra filial.



<section style="font-family: 'Segoe UI', Roboto, sans-serif; margin: 24px 0;">
  <h2 style="color: #004080; font-size: 1.6em; border-bottom: 2px solid #0078d7; padding-bottom: 6px;">
    🌟 Benefícios da Mudança
  </h2>

  <div style="display: grid; gap: 14px; margin-top: 12px;">

    <div style="background:#f9fcff; border-left: 5px solid #00aaff; padding: 14px 18px; border-radius: 6px;">
      <h3 style="margin:0; font-size:1.1em; color:#004466;">✅ Mais flexibilidade entre filiais</h3>
      <p style="margin:6px 0 0;">
        Agora será possível vender um veículo em uma filial e fazer a entrega por outra, de forma simples e controlada,
        refletindo o dia a dia real das concessionárias.
      </p>
    </div>

    <div style="background:#f4f8ff; border-left: 5px solid #0078d7; padding: 14px 18px; border-radius: 6px;">
      <h3 style="margin:0; font-size:1.1em; color:#003366;">🔒 Processos mais seguros</h3>
      <p style="margin:6px 0 0;">
        O sistema passa a registrar qual filial foi responsável pela entrega, evitando erros, divergências e garantindo
        mais segurança nas informações.
      </p>
    </div>

    <div style="background:#f9fcff; border-left: 5px solid #00aaff; padding: 14px 18px; border-radius: 6px;">
      <h3 style="margin:0; font-size:1.1em; color:#004466;">⚙️ Menos trabalho manual</h3>
      <p style="margin:6px 0 0;">
        O processo de geração do remito será automático. O sistema faz o controle de forma integrada,
        sem precisar de lançamentos ou ajustes manuais.
      </p>
    </div>

    <div style="background:#f4f8ff; border-left: 5px solid #0078d7; padding: 14px 18px; border-radius: 6px;">
      <h3 style="margin:0; font-size:1.1em; color:#003366;">📋 Melhor acompanhamento das entregas</h3>
      <p style="margin:6px 0 0;">
        Com a nova tela de entregas pendentes, as filiais terão uma visão clara de tudo o que ainda falta entregar,
        facilitando o controle e o planejamento das equipes.
      </p>
    </div>

    <div style="background:#f9fcff; border-left: 5px solid #00aaff; padding: 14px 18px; border-radius: 6px;">
      <h3 style="margin:0; font-size:1.1em; color:#004466;">🚀 Menos erros e mais agilidade</h3>
      <p style="margin:6px 0 0;">
        A automatização e o controle entre filiais reduzem falhas e deixam o processo de faturamento e entrega
        mais rápido e confiável.
      </p>
    </div>

  </div>
</section>




Criação de Campo no arquivo SX3 – Campos (Todos os países exceto o Brasil)




  • Tabela VV0- Saídas de Veículos


<table style="width:100%; border-collapse:collapse; font-family:'Segoe UI', Roboto, sans-serif; font-size:13px; margin:20px 0; border:1px solid #ccc; border-radius:8px; overflow:hidden;">
  <thead>
    <tr style="background:#0078d7; color:#fff;">
      <th style="padding:10px; text-align:left; width:250px;">Nome do Campo</th>
      <th style="padding:10px; text-align:left;">Valor / Descrição</th>
    </tr>
  </thead>
  <tbody>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Campo</td><td style="padding:8px;">VV0_FILREM</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Tipo</td><td style="padding:8px;">Caractere</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Grupo de Campos</td><td style="padding:8px;">033</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Ordem</td><td style="padding:8px;">12</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Tamanho</td><td style="padding:8px;">02</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Decimal</td><td style="padding:8px;">0</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Formato</td><td style="padding:8px;">@!</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Contexto</td><td style="padding:8px;">1-Real</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Propriedade</td><td style="padding:8px;">2-Visualizar</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Título</td><td style="padding:8px;">Fil.Remito</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Descrição</td><td style="padding:8px;">Filial Remito Entrega</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Val. Sistema</td><td style="padding:8px;"></td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Opções</td><td style="padding:8px;"></td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Inic. Padrão</td><td style="padding:8px;"></td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Inic. Browse</td><td style="padding:8px;"></td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Cons. Padrão</td><td style="padding:8px;"></td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Nível</td><td style="padding:8px;">1</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Usado</td><td style="padding:8px;">Sim</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Obrigatório</td><td style="padding:8px;">Não</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Browse</td><td style="padding:8px;">Sim</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">When</td><td style="padding:8px;"></td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Pasta</td><td style="padding:8px;"></td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Help</td><td style="padding:8px;">Informe a Filial do Remito de Entrega.</td></tr>
  </tbody>
</table>





  • Tabela VVA- Itens das Saídas de Veículos


<table style="width:100%; border-collapse:collapse; font-family:'Segoe UI', Roboto, sans-serif; font-size:13px; margin:20px 0; border:1px solid #ccc; border-radius:8px; overflow:hidden;">
  <thead>
    <tr style="background:#0078d7; color:#fff;">
      <th style="padding:10px; text-align:left; width:250px;">Nome do Campo</th>
      <th style="padding:10px; text-align:left;">Valor / Descrição</th>
    </tr>
  </thead>
  <tbody>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Campo</td><td style="padding:8px;">VVA_TESREM</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Tipo</td><td style="padding:8px;">Caractere</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Grupo de Campos</td><td style="padding:8px;"></td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Ordem</td><td style="padding:8px;">HL</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Tamanho</td><td style="padding:8px;">03</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Decimal</td><td style="padding:8px;">0</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Formato</td><td style="padding:8px;">@!</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Contexto</td><td style="padding:8px;">1-Real</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Propriedade</td><td style="padding:8px;">1-Alterar</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Título</td><td style="padding:8px;">TES Remito</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Descrição</td><td style="padding:8px;">TES do Remito de Entrega</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Val. Sistema</td><td style="padding:8px;">vazio() .or. (FG_Seek("SF4","M->VVA_TESREM",1,.f.).and.MaAvalTes("S",M->VVA_TESREM))</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Opções</td><td style="padding:8px;"></td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Inic. Padrão</td><td style="padding:8px;"></td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Inic. Browse</td><td style="padding:8px;"></td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Cons. Padrão</td><td style="padding:8px;">SF4</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Nível</td><td style="padding:8px;">1</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Usado</td><td style="padding:8px;">Sim</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Obrigatório</td><td style="padding:8px;">Não</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Browse</td><td style="padding:8px;">Sim</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">When</td><td style="padding:8px;"></td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Pasta</td><td style="padding:8px;"></td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Help</td><td style="padding:8px;">Informe o TES do Remito de Entrega.</td></tr>
  </tbody>
</table>




  • Tabela VVF- Entradas de Veículos


<table style="width:100%; border-collapse:collapse; font-family:'Segoe UI', Roboto, sans-serif; font-size:13px; margin:20px 0; border:1px solid #ccc; border-radius:8px; overflow:hidden;">
  <thead>
    <tr style="background:#0078d7; color:#fff;">
      <th style="padding:10px; text-align:left; width:250px;">Nome do Campo</th>
      <th style="padding:10px; text-align:left;">Valor / Descrição</th>
    </tr>
  </thead>
  <tbody>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Campo</td><td style="padding:8px;">VVF_FILNCC</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Tipo</td><td style="padding:8px;">Caractere</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Grupo de Campos</td><td style="padding:8px;">033</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Ordem</td><td style="padding:8px;">A0</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Tamanho</td><td style="padding:8px;">02</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Decimal</td><td style="padding:8px;">0</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Formato</td><td style="padding:8px;">@!</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Contexto</td><td style="padding:8px;">1-Real</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Propriedade</td><td style="padding:8px;">2-Visualizar</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Título</td><td style="padding:8px;">Filial NCC</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Descrição</td><td style="padding:8px;">Filial NCC</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Val. Sistema</td><td style="padding:8px;"></td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Opções</td><td style="padding:8px;"></td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Inic. Padrão</td><td style="padding:8px;"></td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Inic. Browse</td><td style="padding:8px;"></td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Cons. Padrão</td><td style="padding:8px;"></td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Nível</td><td style="padding:8px;">1</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Usado</td><td style="padding:8px;">Sim</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Obrigatório</td><td style="padding:8px;">Não</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Browse</td><td style="padding:8px;">Sim</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">When</td><td style="padding:8px;"></td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Pasta</td><td style="padding:8px;"></td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Help</td><td style="padding:8px;">Informe a Filial da NCC.</td></tr>
  </tbody>
</table>




Alteração de Campo no arquivo SX3 – Campos


  • Tabela VVA- Itens das Saídas de Veículos


<table style="width:100%; border-collapse:collapse; font-family:'Segoe UI', Roboto, sans-serif; font-size:13px; margin:20px 0; border:1px solid #ccc; border-radius:8px; overflow:hidden;">
  <thead>
    <tr style="background:#0078d7; color:#fff;">
      <th style="padding:10px; text-align:left; width:250px;">Nome do Campo</th>
      <th style="padding:10px; text-align:left;">Valor / Descrição</th>
    </tr>
  </thead>
  <tbody>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Campo</td><td style="padding:8px;">VVA_CODTES</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Val. Sistema</td><td style="padding:8px;">FG_Seek("SF4","M->VVA_CODTES",1,.f.).and.MaAvalTes("S",M->VVA_CODTES).and.MaFisRef("IT_TES","VX001",M->VVA_CODTES)</td></tr>
 </tbody>
</table>






Criação de Relacionamento no arquivo SX9 – Relacionamento (Somente para o país Argentina):



<table style="width:100%; border-collapse:collapse; font-family:'Segoe UI', Roboto, sans-serif; font-size:13px; margin:20px 0; border:1px solid #ccc; border-radius:8px; overflow:hidden;">
  <thead>
    <tr style="background:#0078d7; color:#fff;">
      <th style="padding:10px; text-align:left; width:250px;">Relacionamento SX9</th>
      <th style="padding:10px; text-align:left;">Valor / Descrição</th>
    </tr>
  </thead>
  <tbody>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Domínio</td><td style="padding:8px;">SF4</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Identificação</td><td style="padding:8px;">Ultimo identificador da tabela VVA</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">C. Domínio</td><td style="padding:8px;">VVA</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">E. Domínio</td><td style="padding:8px;">F4_CODIGO</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">E. C. Domínio</td><td style="padding:8px;">VVA_TESREM</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">Propriedade</td><td style="padding:8px;">S</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">L. Domínio</td><td style="padding:8px;">1</td></tr>
    <tr style="background:#cfe7fa;"><td style="padding:8px;">L. C. Domínio</td><td style="padding:8px;">N</td></tr>
    <tr style="background:#e9f3fb;"><td style="padding:8px;">Condição SQL</td><td style="padding:8px;"></td></tr>
  </tbody>
</table>






04. DEMAIS INFORMAÇÕES


Pacotes Gerados

12.1.2210: https://r.totvs.io/p/1220771

12.1.2310: https://r.totvs.io/p/1220772

12.1.2410: https://r.totvs.io/p/1220773

12.1.2510: https://r.totvs.io/p/1220774





05. ASSUNTOS RELACIONADOS