Lotes de Faturamento
A tabela GAT faz parte do sistema ERP Protheus da TOTVS e é utilizada para lotes de faturamento.
Ela pertence ao dicionário de dados do Protheus (SX2) e armazena informações essenciais utilizadas em processos como cadastros, movimentações e integrações do sistema.
A tabela GAT possui diversos campos (SX3), cada um com regras específicas como tipo, tamanho e validações, além de índices (SIX) que otimizam a performance das consultas.
Nesta página você pode consultar a estrutura completa da tabela GAT, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | GAT |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | GAT990 |
| X2_NOME | Lotes de Faturamento |
| X2_NOMESPA | Lotes de Facturación |
| X2_NOMEENG | Billing Lots |
| X2_ROTINA | - |
| X2_MODO | E |
| X2_MODOUN | E |
| X2_MODOEMP | E |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | - |
| X2_PYME | N |
| X2_MODULO | 51 |
| X2_DISPLAY | - |
| X2_SYSOBJ | - |
| X2_USROBJ | - |
| X2_POSLGT | 1 |
| X2_CLOB | 2 |
| X2_AUTREC | 2 |
| X2_TAMFIL | 2 |
| X2_TAMUN | 0 |
| X2_TAMEMP | 0 |
| X2_STAMP | 2 |
| X2_INSDT | 2 |
| D_E_L_E_T_ | - |
| R_E_C_N_O_ | 4811 |
| R_E_C_D_E_L_ | 0 |
| X3_ARQUIVO | X3_ORDEM | X3_CAMPO | X3_TIPO | X3_TAMANHO | X3_DECIMAL | X3_TITULO | X3_TITSPA | X3_TITENG | X3_DESCRIC | X3_DESCSPA | X3_DESCENG | X3_PICTURE | X3_VALID | X3_USADO | X3_RELACAO | X3_F3 | X3_NIVEL | X3_RESERV | X3_CHECK | X3_TRIGGER | X3_PROPRI | X3_BROWSE | X3_VISUAL | X3_CONTEXT | X3_OBRIGAT | X3_VLDUSER | X3_CBOX | X3_CBOXSPA | X3_CBOXENG | X3_PICTVAR | X3_WHEN | X3_INIBRW | X3_GRPSXG | X3_FOLDER | X3_PYME | X3_CONDSQL | X3_CHKSQL | X3_IDXSRV | X3_ORTOGRA | X3_IDXFLD | X3_TELA | X3_PICBRV | X3_AGRUP | X3_POSLGT | X3_MODAL | X3_CHKSUM | X3_ADDSUM | D_E_L_E_T_ | R_E_C_N_O_ | R_E_C_D_E_L_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GAT | 01 | GAT_FILIAL | C | 2 | 0 | Filial | Sucursal | Branch | Filial | Sucursal | Branch | - | - | x x x x x x x x x x x x x x x | - | - | 1 | - | - | - | - | N | - | - | - | - | - | - | - | - | - | - | 033 | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77609 | 0 |
| GAT | 02 | GAT_TGTISS | C | 50 | 0 | Guias Perm. | Form. Perm. | Perm. Forms | Tipos Guias TISS perm. | Tipos Form. TISS perm. | Perm. TISS Forms Types | @! | - | x x x x x x x x x x x x x x x x | - | G17001 | 1 | x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77610 | 0 |
| GAT | 03 | GAT_NUMLOT | C | 6 | 0 | Numero Lote | Numero Lote | Lot Number | Numero do Lote | Numero del Lote | Number of Lot | @! | - | x x x x x x x x x x x x x x x x | GetSxeNum('GAT', 'GAT_NUMLOT',, 1) | - | 1 | xx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77611 | 0 |
| GAT | 04 | GAT_CODCON | C | 3 | 0 | Cod Convenio | Cod Convenio | H.Care Code | Codigo do Convenio | Codigo del Convenio | Health Care Code | @! | HS_VLDA51(1) | x x x x x x x x x x x x x x x xx | - | GA9 | 1 | xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77612 | 0 |
| GAT | 05 | GAT_NOMCON | C | 30 | 0 | Convenio | Convenio | Health Care | Nome do Convenio | Nombre del Convenio | Health Care Name | @! | - | x x x x x x x x x x x x x x x xx | IIF(!INCLUI, POSICIONE("GA9",1,XFILIAL("GA9")+GAT->GAT_CODCON,"GA9_NOME"), "") | - | 1 | xx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77613 | 0 |
| GAT | 06 | GAT_CODPLA | C | 6 | 0 | Plano | Plan | Health plan | Plano do Convenio | Plan del Convenio | Health Insurance Plan | @! | HS_VLDA51(2) | x x x x x x x x x x x x x x x x | - | GCM | 1 | xxxxxxxx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77614 | 0 |
| GAT | 07 | GAT_DESPLA | C | 30 | 0 | Descricao | Descripcion | Description | Descricao do Plano | Descripcion del Plan | Health plan description | @! | - | x x x x x x x x x x x x x x x xx | If(!Inclui,Posicione("GCM",1,xFilial("GCM")+GAT->GAT_CODCON+GAT->GAT_CODPLA,"GCM_DESPLA"),"") | - | 1 | xxxxxx x | - | - | - | S | V | V | - | - | - | - | - | - | - | Posicione("GCM",1,xFilial("GCM")+GAT->GAT_CODCON+GAT->GAT_CODPLA,"GCM_DESPLA") | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77615 | 0 |
| GAT | 08 | GAT_TIPATE | C | 1 | 0 | Tipo Atend. | Tipo Atenc | Att. Type | Tipo de Atendimento | Tipo de Atencion | Attendance Type | @! | PERTENCE('01234567') | x x x x x x x x x x x x x x x x | "0" | - | 1 | xx | - | - | - | S | A | R | - | - | 0=Plano;1=Amb.-Consulta Eletiva;2=Amb.-Exame Eletivo;3=Amb.-Geral;4=Pronto Atend.;5=Amb.+Pronto Atend.;6=Internacao;7=Retorno | 0=Plan;1=Amb.-Consulta Electiva;2=Amb.-Examen Electivo;3=Amb.-General;4=Atenc rapida.;5=Amb.+Atenc.rapida;6=Internacion;7=Retorn | 0=Plan;1=Pol.-Elective Appoint.;2=Pol.-Elec. Exam;3=Pol.-General;4=Emerg.Attend.;5=Pol.+Emerg. Att.;6=Hospitalization;7=Return | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77616 | 0 |
| GAT | 09 | GAT_DTFTLT | D | 8 | 0 | Dt Fat Lote | Fch.Fact Lot | Lot In.Dt. | Data de Faturamento Lote | Fch. de Facturacion Lote | Lot Invoice Date | @D | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxxxx x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77617 | 0 |
| GAT | 10 | GAT_DTRCLT | D | 8 | 0 | Dt Rec Lote | Fch.Rec Lote | Lot Rec.Dt. | Data de Recebimento Lote | Fecha de Recepcion Lote | Lot Reception Date | @D | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxxxx x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77618 | 0 |
| GAT | 11 | GAT_DESCOM | C | 40 | 0 | Descr. Compl | Descr. Compl | Comp.Desc. | Descricao complementar | Descripcion complement. | Compl.Description | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxxxx x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77619 | 0 |
| GAT | 12 | GAT_DTCRI | D | 8 | 0 | Dt. Criacao | Fc. Creacion | Dt. creation | DATA DA CRIACAO DO LOTE | FECHA CREACION DE LOTE | DATA DA CRIACAO DO LOTE | @D | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxxxxx x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77620 | 0 |
| GAT | 13 | GAT_NUMPRO | C | 15 | 0 | Num.Processo | Num.Proceso | Process Nbr. | NUMERO DO PROCESSO | NUMERO DE PROCESO | PROCESS NUMBER | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77621 | 0 |
| GAT | 14 | GAT_LIMITE | N | 6 | 0 | Lim. Guias | Lim. Guias | Guide Lmt | Limite de Guias | Limite de Guias | Guides Limit | 999999 | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77622 | 0 |
| GAT | 15 | GAT_ITENS | N | 6 | 0 | Itens | Itens | Items | Itens no Lote | Itens en Lote | Items in the Lot | 999999 | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77623 | 0 |
| GAT | 16 | GAT_IDMARC | C | 2 | 0 | Marca | Marca | Brand | Marca | Marca | Brand | - | - | x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77624 | 0 |
| GAT | 17 | GAT_MESREF | C | 5 | 0 | Mes/Ano Ref. | Mes/Ano Ref. | Mth/Yr Ref. | Mes / Ano de referencia | Mes / Ano de referencia | Month/Year of reference | 99/99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | x xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77625 | 0 |
| GAT | 18 | GAT_SERIE | C | 3 | 0 | Prefixo | Prefijo | Prefix | Prefixo do titulo | Prefijo del titulo | Bill prefix | - | - | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77626 | 0 |
| GAT | 19 | GAT_NRFATU | C | 9 | 0 | Titulo | Titulo | Bill | Titulo | Titulo | Bill | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | 018 | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77627 | 0 |
| GAT | 20 | GAT_CODGPP | C | 9 | 0 | Grupo Proced | Grupo Proced | Proced. Grp. | Codigo Grupo Procedimento | Codigo Grupo Procedim. | Procedure Group Code | @! | HS_SeekRet("GAQ", "M->GAT_CODGPP", 1, .F., "GAT_DESGPP", "GAQ_DESC") | x x x x x x x x x x x x x x x x | - | GAQ | 1 | xxxxxx x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77628 | 0 |
| GAT | 21 | GAT_DESGPP | C | 30 | 0 | Descricao | Descripcion | Description | Descricao do Grupo Proced | Descripcion Grupo Proced. | Procedure Group Descript. | @! | - | x x x x x x x x x x x x x x x x | IF(!INCLUI, POSICIONE("GAQ", 1, XFILIAL("GAQ") + GAT->GAT_CODGPP, "GAQ_DESC"),"") | - | 1 | xxxxxx x | - | - | - | S | V | V | - | - | - | - | - | - | - | POSICIONE("GAQ", 1, XFILIAL("GAQ") + GAT->GAT_CODGPP, "GAQ_DESC") | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77629 | 0 |
| GAT | 22 | GAT_MATMED | C | 1 | 0 | Aceita MT/MD | Acepta MT/MD | Accept MT | Aceita Despesas Mat/Med | Acepta gastos Mat/Med | Accept Mat/Med Expenses | @! | PERTENCE("01") | x x x x x x x x x x x x x x x x | "1" | - | 1 | xxxxxx x | - | - | - | S | A | R | - | - | 0=Nao;1=Sim | 0=Nao;1=Sim | 0=No;1=Yes | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77630 | 0 |
| GAT | 23 | GAT_TAXDIA | C | 1 | 0 | Aceita TX/DI | Acepta TS/DI | Accept Rt/Dy | Aceita Despesas Tax/Dia | Acepta Gastos Ts/Dia | Accept Expenses Rate/Day | @! | PERTENCE("01") | x x x x x x x x x x x x x x x x | "1" | - | 1 | xxxxxx x | - | - | - | S | A | R | - | - | 0=Nao;1=Sim | 0=Nao;1=Sim | 0=No;1=Yes | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77631 | 0 |
| GAT | 24 | GAT_LOGARQ | C | 40 | 0 | Log do Arq | Log del Arch | File Log | Log do Arq | Log del Arch | File Log | - | - | x x x x x x x x x x x x x x x | HS_LOGARQ() | - | 1 | xxxxxx x | - | - | - | N | - | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77632 | 0 |
| GAT | 25 | GAT_DTAPRE | C | 5 | 0 | Data Apres. | Fch Present. | Present.Date | Data Apresentacao | Fecha Presentacion | Presentation Date | 99/99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77633 | 0 |
| INDICE | ORDEM | CHAVE | DESCRICAO | DESCSPA | DESCENG | PROPRI | F3 | NICKNAME | SHOWPESQ | IX_VIRTUAL | IX_VIRCUST | D_E_L_E_T_ | R_E_C_N_O_ | R_E_C_D_E_L_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GAT | 1 | GAT_FILIAL+GAT_NUMLOT | Numero Lote | Numero Lote | Lot Number | S | - | - | S | 2 | 3 | - | 11393 | 0 |
| GAT | 2 | GAT_FILIAL+GAT_CODCON+GAT_NUMLOT | Cod Convenio + Numero Lote | Cod Convenio + Numero Lote | H.Care Code + Lot Number | S | - | - | S | 2 | 3 | - | 11394 | 0 |
| GAT | 3 | GAT_FILIAL+GAT_NOMCON+GAT_NUMLOT | Convenio + Numero Lote | Convenio + Numero Lote | Health Care + Lot Number | S | - | - | S | 2 | 3 | - | 11395 | 0 |
| GAT | 4 | GAT_FILIAL+GAT_SERIE+GAT_NRFATU | Prefixo + Titulo | Prefijo + Titulo | Prefix + Bill | S | - | - | S | 2 | 3 | - | 11396 | 0 |
Ela é utilizada para lotes de faturamento dentro do sistema ERP Protheus.
Nesta página você pode visualizar todos os campos, incluindo tipo, tamanho e validações.
Os índices são estruturas que melhoram a performance de busca e acesso aos dados dentro do Protheus.
Modelo de query gerado automaticamente com base na estrutura da tabela.
SELECT
GAT_FILIAL,
GAT_TGTISS,
GAT_NUMLOT,
GAT_CODCON,
GAT_NOMCON,
GAT_CODPLA,
GAT_DESPLA,
GAT_TIPATE,
GAT_DTFTLT,
GAT_DTRCLT,
GAT_DESCOM,
GAT_DTCRI,
GAT_NUMPRO,
GAT_LIMITE,
GAT_ITENS,
GAT_IDMARC,
GAT_MESREF,
GAT_SERIE,
GAT_NRFATU,
GAT_CODGPP,
GAT_DESGPP,
GAT_MATMED,
GAT_TAXDIA,
GAT_LOGARQ,
GAT_DTAPRE
FROM GAT
WHERE
D_E_L_E_T_ = ' '
AND GAT_FILIAL = 'VALOR'
AND GAT_TGTISS = 'VALOR'
AND GAT_NUMLOT = 'VALOR'
AND GAT_CODCON = 'VALOR'
AND GAT_NOMCON = 'VALOR'
AND GAT_CODPLA = 'VALOR'
AND GAT_DESPLA = 'VALOR'
AND GAT_TIPATE = 'VALOR'
AND GAT_DTFTLT BETWEEN '20260401' AND '20260430'
AND GAT_DTRCLT BETWEEN '20260401' AND '20260430'
AND GAT_DESCOM = 'VALOR'
AND GAT_DTCRI BETWEEN '20260401' AND '20260430'
AND GAT_NUMPRO = 'VALOR'
AND GAT_LIMITE = 0
AND GAT_ITENS = 0
AND GAT_IDMARC = 'VALOR'
AND GAT_MESREF = 'VALOR'
AND GAT_SERIE = 'VALOR'
AND GAT_NRFATU = 'VALOR'
AND GAT_CODGPP = 'VALOR'
AND GAT_DESGPP = 'VALOR'
AND GAT_MATMED = 'VALOR'
AND GAT_TAXDIA = 'VALOR'
AND GAT_LOGARQ = 'VALOR'
AND GAT_DTAPRE = 'VALOR'