Tabela CGM

Ident. de Sócios ou Titular
23camposNome físicoCGM010(empresa 01)

Campos da tabela CGM

23 campos no dicionário de dados do TOTVS Protheus.

23
CampoDescrição
CGM_FILIAL
Caractere (C)(2)
Filial
Contexto:
Real
CGM_ID
Caractere (C)(36)
ID
Contexto:
Real
CGM_PERIOD
Data (D)(8)
Periodo
Contexto:
Real
CGM_INCSOC
Data (D)(8)
Dt Inc Soc
Contexto:
Real
Validação:
xFunVldDt(,"CGM_FIMSOC")
CGM_FIMSOC
Data (D)(8)
Dt Saida Soc
Contexto:
Real
Validação:
xFunVldDt("CGM_INCSOC")
CGM_PAIS
Caractere (C)(6)
Pais
Máscara:
@!
Contexto:
Real
Consulta F3:
C08
Validação:
XFUNVldCmp("C08",3)
CGM_DPAIS
Caractere (C)(220)
Desc Pais
Máscara:
@!
Contexto:
Virtual (não existe no banco)
CGM_QUASOC
Caractere (C)(1)
Qualif Socio
Máscara:
@!
Contexto:
Real
Validação:
Pertence(" 123")
3 valores possíveis
  • 1Pessoa Fisica
  • 2Pessoa Juridica
  • 3Fundo de Investimento
CGM_CPFCNP
Caractere (C)(14)
CNPJ ou CPF
Máscara:
@!
Contexto:
Real
Validação:
(Empty(M->CGM_CPFCNP) .OR. XFUNVldPJF("CGM_QUASOC", ,.T.)) .And. XFUNVld(2)
CGM_NOMEMP
Caractere (C)(220)
Nome Empresa
Máscara:
@!
Contexto:
Real
CGM_QUALIF
Caractere (C)(2)
Qualificacao
Máscara:
@!
Contexto:
Virtual (não existe no banco)
Consulta F3:
CGN
Validação:
XFUNVldCmp("CGN",2)
CGM_DQUALI
Caractere (C)(220)
Desc Qualif
Máscara:
@!
Contexto:
Virtual (não existe no banco)
CGM_IDQUAL
Caractere (C)(36)
Id. Qualific
Contexto:
Real
CGM_PERTOT
Numérico (N)(8,4)
Perc Total
Máscara:
@E 999.9999
Contexto:
Real
CGM_PERVOT
Numérico (N)(8,4)
Perc Votante
Máscara:
@E 999.9999
Contexto:
Real
CGM_CPFLEG
Caractere (C)(11)
CPF Legal
Máscara:
@R 999.999.999-99
Contexto:
Real
Validação:
Empty(M->CGM_CPFLEG) .OR. XFUNVldPJF( ,1,.F.)
CGM_QUALEG
Caractere (C)(2)
Qlf Rep Leg
Máscara:
@!
Contexto:
Real
Validação:
Pertence(" |01|02|03|04|05|06")
6 valores possíveis
  • 01Procurador
  • 02Curador
  • 03Mae
  • 04Pai
  • 05Tutor
  • 06Outro
CGM_STATUS
Caractere (C)(1)
Status Reg.
Máscara:
@!
Contexto:
Real
2 valores possíveis
  • 0Reg. Valido
  • 1Reg. Invalido
CGM_VLRMTR
Numérico (N)(16,2)
Vl. Rem.Trab
Máscara:
@E 9,999,999,999,999.99
Contexto:
Real
CGM_VLLCDV
Numérico (N)(16,2)
Lc.Dividendo
Máscara:
@E 9,999,999,999,999.99
Contexto:
Real
CGM_JURCAP
Numérico (N)(16,2)
Jur.Sb.Cap.P
Máscara:
@E 9,999,999,999,999.99
Contexto:
Real
CGM_VLDMRD
Numérico (N)(16,2)
Vl.Dem.Rend
Máscara:
@E 9,999,999,999,999.99
Contexto:
Real
CGM_VLIRRT
Numérico (N)(16,2)
Vl.Ir.Retido
Máscara:
@E 9,999,999,999,999.99
Contexto:
Real

SELECT de exemplo da tabela CGM

No Protheus a tabela física leva o código da empresa (01 → 010) e registros excluídos ficam com D_E_L_E_T_ = '*'.

SQL · SQL Server
SELECT TOP 100
  CGM.CGM_FILIAL,
  CGM.CGM_ID,
  CGM.CGM_PERIOD,
  CGM.CGM_INCSOC,
  CGM.CGM_FIMSOC,
  CGM.CGM_PAIS,
  CGM.CGM_QUASOC,
  CGM.CGM_CPFCNP
FROM CGM010 CGM
WHERE CGM.D_E_L_E_T_ = ' '

Tabelas próximas no índice do Protheus

O ERPSeeker é um projeto independente, sem vínculo com a TOTVS. A estrutura pode variar conforme a versão e as customizações do seu ambiente.