Serviços Externos Prestados
A tabela GB9 faz parte do sistema ERP Protheus da TOTVS e é utilizada para serviços externos prestados.
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 GB9 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 GB9, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | GB9 |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | GB9990 |
| X2_NOME | Serviços Externos Prestados |
| X2_NOMESPA | Servicios Prestados Externos |
| X2_NOMEENG | External Services Rendered |
| 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_ | 4827 |
| 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GB9 | 01 | GB9_FILIAL | C | 2 | 0 | Filial | Sucursal | Branch | Filial do Sistema | Sucursal del Sistema | System 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 | - | - | - | 77918 | 0 |
| GB9 | 02 | GB9_CODCON | C | 3 | 0 | Cod Convenio | Cod Convenio | H.Care Code | Codigo do Convenio | Codigo del Convenio | Health Care Code | @! | - | x x x x x x x x x x x x x x x xx | - | - | 1 | xxxxxx x | - | - | - | S | V | - | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77919 | 0 |
| GB9 | 03 | GB9_NOMCON | C | 30 | 0 | Convenio | Convenio | Health Care | Nome do Convenio | Nomb del Convenio | Health Care Name | @! | - | x x x x x x x x x x x x x x x xx | If(!Inclui,Posicione("GA9",1,xFilial("GA9")+GB9->GB9_CODCON,"GA9_NREDUZ"),"") | - | 1 | xx | - | - | - | S | V | V | - | - | - | - | - | - | - | Posicione("GA9",1,xFilial("GA9")+GB9->GB9_CODCON,"GA9_NREDUZ") | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77920 | 0 |
| GB9 | 04 | GB9_DTIFAT | D | 8 | 0 | Dt Inicio FT | Fch.Inic.FAC | Inv.In.Dt. | Data Inicio Faturamento | Fecha Inicio Facturacion | Invoicing Initial Date | @D | - | x x x x x x x x x x x x x x x | - | - | 1 | - | - | - | - | S | V | - | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77921 | 0 |
| GB9 | 05 | GB9_DTFFAT | D | 8 | 0 | Dt Fim FAT | Fch.Fin FACT | Inv.Fin.Date | Data Fim de Faturamento | Fch. Fin. de Facturacion | Invoicing Final Date | @D | - | x x x x x x x x x x x x x x x | - | - | 1 | - | - | - | - | S | V | - | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77922 | 0 |
| GB9 | 06 | GB9_CODGDE | C | 2 | 0 | Grp Despesas | Grp. Gastos | Exp. Group | Codigo do Grupo Despesas | Codigo del Grupo Gastos | Exp. Group Code | @! | HS_SeekRet("GAW","M->GB9_CODGDE",1,.f.,"GB9_DESGDE","GAW_DESC") | x x x x x x x x x x x x x x x x | - | GAW | 1 | xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77923 | 0 |
| GB9 | 07 | GB9_DESGDE | C | 30 | 0 | Desc Grp Dsp | Desc Grp Gst | Exp.Grp.Desc | Descricao Grupo Despesas | Descripcion Grupo Gastos | Expense Gr.Description | @! | - | x x x x x x x x x x x x x x x xx | If(!Inclui,Posicione("GAW",1,xFilial("GAW")+GB9->GB9_CODGDE,"GAW_DESC"),"") | - | 1 | xxxxxx x | - | - | - | S | V | V | - | - | - | - | - | - | - | Posicione("GAW",1,xFilial("GAW")+GB9->GB9_CODGDE,"GAW_DESC") | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77924 | 0 |
| GB9 | 08 | GB9_VALOR | N | 10 | 2 | Valor em R$ | Valor en $ | Value in R$ | Valor em Reais (R$) | Valor en Moneda Corriente | Value in Reais (R$) | @E 9,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77925 | 0 |
| GB9 | 09 | GB9_CODPRE | C | 6 | 0 | Cd Prestador | Cd Prestador | Renderer Cd. | Codigo do Prestador | Codigo del Prestador | Renderer Code | @! | HS_SeekRet("GAZ","M->GB9_CODPRE",1,.f.,"GB9_NOMPRE","GAZ_FANPRE") | x x x x x x x x x x x x x x x x | - | ZA2 | 1 | xx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 77926 | 0 |
| GB9 | 10 | GB9_NOMPRE | C | 30 | 0 | Prestador | Prestador | Renderer | Nome do Prestador | Nomb. del Prestador | Renderer´s Name | @! | - | x x x x x x x x x x x x x x x xx | If(!Inclui,Posicione("GAZ",1,xFilial("GAZ")+GB9->GB9_CODPRE,"GAZ_FANPRE"),"") | - | 1 | xxxxxx x | - | - | - | N | V | V | - | - | - | - | - | - | - | Posicione("GAZ",1,xFilial("GAZ")+GB9->GB9_CODPRE,"GAZ_FANPRE") | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77927 | 0 |
| GB9 | 11 | GB9_NUMFAT | C | 6 | 0 | Nro Fatura | Num. Factura | Invoice Nr. | Numero da Fatura | Numero de la factura | Invoice Number | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | - | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77928 | 0 |
| GB9 | 12 | GB9_REGATE | C | 6 | 0 | Reg.Internac | Reg.Internac | Confin. Reg. | Registro de Internacao | Registro de Internacion | Confinement registration | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | xxxxxx x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77929 | 0 |
| GB9 | 13 | GB9_NUMLOT | C | 4 | 0 | Nro Lote | Nº Lote | Lot No. | Nro do Lote Faturamento | Nº de Lote Facturacion | Invoicing Lot No. | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | xxxxxx x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77930 | 0 |
| GB9 | 14 | GB9_LOGARQ | C | 40 | 0 | Log do Arq | Log de Arch. | File Log | . | . | . | - | - | x x x x x x x x x x x x x x x xx | HS_LOGARQ() | - | 1 | xxxxxx x | - | - | - | S | V | - | - | - | - | - | - | - | - | - | - | - | N | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 77931 | 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GB9 | 1 | GB9_FILIAL+GB9_CODCON+DTOS(GB9_DTIFAT)+GB9_CODGDE | Cod Convenio + Dt Inicio FT + Grp Despesas | Cod Convenio + Fch.Inic.FAC + Grp. Gastos | H.Care Code + Inv.In.Dt. + Exp. Group | S | - | - | S | 2 | 3 | - | 11444 | 0 |
| GB9 | 2 | GB9_FILIAL+GB9_CODGDE+DTOS(GB9_DTIFAT) | Grp Despesas + Dt Inicio FT | Grp. Gastos + Fch.Inic.FAC | Exp. Group + Inv.In.Dt. | S | - | - | S | 2 | 3 | - | 11445 | 0 |
| GB9 | 3 | GB9_FILIAL+GB9_CODPRE+DTOS(GB9_DTIFAT) | Cd Prestador + Dt Inicio FT | Cd Prestador + Fch.Inic.FAC | Renderer Cd. + Inv.In.Dt. | S | - | - | S | 2 | 3 | - | 11446 | 0 |
| GB9 | 4 | GB9_FILIAL+GB9_NUMFAT | Nro Fatura | Num. Factura | Invoice Nr. | S | - | - | S | 2 | 3 | - | 11447 | 0 |
Ela é utilizada para serviços externos prestados 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
GB9_FILIAL,
GB9_CODCON,
GB9_NOMCON,
GB9_DTIFAT,
GB9_DTFFAT,
GB9_CODGDE,
GB9_DESGDE,
GB9_VALOR,
GB9_CODPRE,
GB9_NOMPRE,
GB9_NUMFAT,
GB9_REGATE,
GB9_NUMLOT,
GB9_LOGARQ
FROM GB9
WHERE
D_E_L_E_T_ = ' '
AND GB9_FILIAL = 'VALOR'
AND GB9_CODCON = 'VALOR'
AND GB9_NOMCON = 'VALOR'
AND GB9_DTIFAT BETWEEN '20260501' AND '20260531'
AND GB9_DTFFAT BETWEEN '20260501' AND '20260531'
AND GB9_CODGDE = 'VALOR'
AND GB9_DESGDE = 'VALOR'
AND GB9_VALOR = 0
AND GB9_CODPRE = 'VALOR'
AND GB9_NOMPRE = 'VALOR'
AND GB9_NUMFAT = 'VALOR'
AND GB9_REGATE = 'VALOR'
AND GB9_NUMLOT = 'VALOR'
AND GB9_LOGARQ = 'VALOR'