Fechamento da Arrecadação
A tabela G59 faz parte do sistema ERP Protheus da TOTVS e é utilizada para fechamento da arrecadação.
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 G59 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 G59, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | G59 |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | G59990 |
| X2_NOME | Fechamento da Arrecadação |
| X2_NOMESPA | Cierre de la recaudación |
| X2_NOMEENG | Collection Closing |
| X2_ROTINA | - |
| X2_MODO | C |
| X2_MODOUN | E |
| X2_MODOEMP | E |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | G59_FILIAL+G59_CODIGO |
| X2_PYME | N |
| X2_MODULO | 88 |
| X2_DISPLAY | - |
| X2_SYSOBJ | GTPA500 |
| 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_ | 4670 |
| 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| G59 | 01 | G59_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 | A | R | - | - | - | - | - | - | - | - | 033 | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75427 | 0 |
| G59 | 02 | G59_CODIGO | C | 6 | 0 | Codigo | Codigo | Code | Cod. Seguradora | Cod. aseguradora | Insurance Code | @! | NaoVazio() .And. ExistChav('G59') | x x x x x x x x x x x x x x x x | GETSXENUM("G59", "G59_CODIGO") | - | 1 | x x | - | - | - | S | A | R | - | - | - | - | - | - | INCLUI | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 75428 | 0 |
| G59 | 03 | G59_AGENCI | C | 6 | 0 | Agência | Agencia | Branch | Agência | Agencia | Branch | - | - | x x x x x x x x x x x x x x x x | - | - | 1 | x x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 75429 | 0 |
| G59 | 04 | G59_DESCAG | C | 50 | 0 | Dsc. Agência | Dsc. Agecia | Branch desc | Descrição Agência | Descripción Agencia | Branch description | - | - | x x x x x x x x x x x x x x x x | If(!Inclui,POSICIONE("GI6",1,XFILIAL("GI6")+G59->G59_AGENCI,"GI6_DESCRI"),"") | - | 1 | x | - | - | - | S | V | V | - | - | - | - | - | - | - | POSICIONE("GI6",1,XFILIAL("GI6")+G59->G59_AGENCI,"GI6_DESCRI") | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75430 | 0 |
| G59 | 05 | G59_DATINI | D | 8 | 0 | Data Inicio | Fch Inicial | Start Date | Data Inicio | Fecha inicial | Start Date | - | - | x x x x x x x x x x x x x x x x | - | - | 1 | x x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 75431 | 0 |
| G59 | 06 | G59_DATFIM | D | 8 | 0 | Data Fim | Fch Final | End Date | Data Fim | Fecha final | End Date | - | - | x x x x x x x x x x x x x x x x | - | - | 1 | x x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 75432 | 0 |
| G59 | 07 | G59_STATUS | L | 1 | 0 | Status | Estatus | Status | Status | Estatus | Status | - | - | x x x x x x x x x x x x x x x x | .F. | - | 1 | x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 75433 | 0 |
| G59 | 08 | G59_RECBIL | N | 9 | 2 | Rec. Bil. | Ing. Boletos | Tckt inc | Receita Bilhetes | Ingreso boletos | Ticket income | @E 999,999.99 | Positivo() | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 75434 | 0 |
| G59 | 09 | G59_DESBIL | N | 9 | 2 | Des. Bil. | Gast Boletos | Tckt exp | Despesa Bilhetes | Gasto boletos | Ticket expense | @E 999,999.99 | Positivo() | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 75435 | 0 |
| G59 | 10 | G59_RECTAX | N | 9 | 2 | Rec. Tax. | Ingr. Tasas | Rate inc | Receita Taxas | Ingreso Tasas | Rate income | @E 999,999.99 | Positivo() | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 75436 | 0 |
| G59 | 11 | G59_DESTAX | N | 9 | 2 | Des. Tax. | Gast. Tasas | Rate exp | Despesa Taxas | Gasto Tasas | Rates expense | @E 999,999.99 | Positivo() | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 75437 | 0 |
| G59 | 12 | G59_VLRCTE | N | 9 | 2 | Valor CTE | Valor CTE | CTE Value | Valor CTE | Valor CTE | CTE Value | @E 999,999.99 | Positivo() | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75438 | 0 |
| G59 | 13 | G59_TOTAL | N | 9 | 2 | Total | Total | Total | Total | Total | Total | @E 999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 75439 | 0 |
| G59 | 14 | G59_NUMFCH | C | 10 | 0 | Num. Ficha | Núm. Ficha | Form No. | Número da Ficha | Número de la ficha | Form Number | - | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 75440 | 0 |
| G59 | 15 | G59_DESCRI | C | 30 | 0 | Descricao | Descripcion | Description | Desc.Seguradora | Desc.Aseguradora | Insurance co desc | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 75441 | 0 |
| G59 | 16 | G59_VLRREC | N | 9 | 2 | Vl Receita | Val Ingresos | Inc Value | Valor receita | Valor ingresos | Income Value | @E 999,999.99 | Positivo() | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75442 | 0 |
| G59 | 17 | G59_VLRDES | N | 9 | 2 | Vl Despesa | Val Gastos | Expense Val | Valor total despesas | Valor total gastos | Total Value Expenses | @E 999,999.99 | Positivo() | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75443 | 0 |
| G59 | 18 | G59_VLPOS | N | 9 | 2 | Valor POS | Valor POS | Value POS | Valor total pos | Valor total POS | Total Value pos | @E 999,999.99 | Positivo() | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75444 | 0 |
| G59 | 19 | G59_VLREQ | N | 9 | 2 | Requisição | Requisición | Request | Valor toral requisição | Valor total requisición | Total Value Request | @E 999,999.99 | Positivo() | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75445 | 0 |
| G59 | 20 | G59_STFINA | C | 1 | 0 | Status Finan | Estatus Fina | Finan Status | Status financeiro | Estatus financiero | Financial Status | - | Pertence("0123 ") | x x x x x x x x x x x x x x x x | '0' | - | 1 | xx | - | - | - | N | V | R | - | - | 0=Aguard.Fecham.;1=Financ.Gerado;2=Inconsistência Financ.;3=Sem Vinc. Financ. | 0=Espera cierre.;1=Financ.Generada;2=Inconsistencia Financ.;3=Sin Vínc. Financ. | 0=Waiting to Close;1=Fin Generated;2=Fin Inconsistency;3=W/out Fin Link | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75446 | 0 |
| G59 | 21 | G59_VLTODE | N | 15 | 2 | Tot.Depósito | Tot.Depósito | DepositTotal | Total do depósito | Total de depósito | Deposit Total | @E 999,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75447 | 0 |
| G59 | 22 | G59_VLTOES | N | 15 | 2 | Tot.Estorno | Tot.Revers. | Reversal Tot | Total Depos. Estorno | Total Depós. Revers. | Reversal Dep. Total | @E 999,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75448 | 0 |
| G59 | 23 | G59_VLDIFE | N | 15 | 2 | Dif.Fich.Arr | Dif.Fich.Rec | Coll Form Di | Vlr Dif.Ficha e Arrecadaç | Val. Dif.Ficha y Recaudac | Form and Collec Diff Val | @E 999,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75449 | 0 |
| G59 | 24 | G59_VLFICH | N | 15 | 2 | Valor Ficha | Valor ficha | Form Value | Valor Total da Ficha | Valor total de ficha | Total Value of Form | @E 999,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75450 | 0 |
| G59 | 25 | G59_VLRLIQ | N | 15 | 2 | Vlr.Liq.Fich | Val.Net.Fich | Form Net Val | Vlr.Liquido Ficha | Val.Neto ficha | Form Net Value | @E 999,999,999,999.99 | - | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 75451 | 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| G59 | 1 | G59_FILIAL+G59_CODIGO | Codigo | Codigo | Code | S | - | - | S | 2 | 3 | - | 11078 | 0 |
Ela é utilizada para fechamento da arrecadação 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
G59_FILIAL,
G59_CODIGO,
G59_AGENCI,
G59_DESCAG,
G59_DATINI,
G59_DATFIM,
G59_STATUS,
G59_RECBIL,
G59_DESBIL,
G59_RECTAX,
G59_DESTAX,
G59_VLRCTE,
G59_TOTAL,
G59_NUMFCH,
G59_DESCRI,
G59_VLRREC,
G59_VLRDES,
G59_VLPOS,
G59_VLREQ,
G59_STFINA,
G59_VLTODE,
G59_VLTOES,
G59_VLDIFE,
G59_VLFICH,
G59_VLRLIQ
FROM G59
WHERE
D_E_L_E_T_ = ' '
AND G59_FILIAL = 'VALOR'
AND G59_CODIGO = 'VALOR'
AND G59_AGENCI = 'VALOR'
AND G59_DESCAG = 'VALOR'
AND G59_DATINI BETWEEN '20260601' AND '20260630'
AND G59_DATFIM BETWEEN '20260601' AND '20260630'
AND G59_RECBIL = 0
AND G59_DESBIL = 0
AND G59_RECTAX = 0
AND G59_DESTAX = 0
AND G59_VLRCTE = 0
AND G59_TOTAL = 0
AND G59_NUMFCH = 'VALOR'
AND G59_DESCRI = 'VALOR'
AND G59_VLRREC = 0
AND G59_VLRDES = 0
AND G59_VLPOS = 0
AND G59_VLREQ = 0
AND G59_STFINA = 'VALOR'
AND G59_VLTODE = 0
AND G59_VLTOES = 0
AND G59_VLDIFE = 0
AND G59_VLFICH = 0
AND G59_VLRLIQ = 0