Fretamento Custos
A tabela G6S faz parte do sistema ERP Protheus da TOTVS e é utilizada para fretamento custos.
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 G6S 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 G6S, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | G6S |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | G6S990 |
| X2_NOME | Fretamento Custos |
| X2_NOMESPA | Fletamiento Costos |
| X2_NOMEENG | Chartering costs |
| X2_ROTINA | - |
| X2_MODO | E |
| X2_MODOUN | E |
| X2_MODOEMP | E |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | G6S_FILIAL+G6S_CODIGO+G6S_ITEM |
| X2_PYME | N |
| X2_MODULO | 88 |
| 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_ | 4723 |
| 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| G6S | 01 | G6S_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 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | 033 | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 76161 | 0 |
| G6S | 02 | G6S_CODIGO | C | 8 | 0 | Código | Código | Code | Código Sequencial | Código secuencial | Sequential Code | @! | - | x x x x x x x x x x x x x x x | - | - | 1 | - | - | - | - | N | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 76162 | 0 |
| G6S | 03 | G6S_ITEM | C | 2 | 0 | Item | Ítem | Item | Item | Ítem | Item | @! | - | 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 | - | - | - | 76163 | 0 |
| G6S | 04 | G6S_CUSTO | C | 6 | 0 | Cód. Custo | Cód. Costo | Code Cost | Cód Configuração Custo | Cód Configuración costo | Cost Config Code | @! | - | x x x x x x x x x x x x x x x x x | - | GIM | 1 | x | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 76164 | 0 |
| G6S | 05 | G6S_DCUSTO | C | 30 | 0 | Descrição | Descripción | Description | Descrição do Custo | Descripción del costo | Cost Description | @! | - | x x x x x x x x x x x x x x x x | IIF( !INCLUI, POSICIONE('GIM',1,XFILIAL('GIM')+G6S->G6S_CUSTO,'GIM_DESCRI'), '') | - | 1 | x | - | - | - | N | V | V | - | - | - | - | - | - | - | POSICIONE('GIM',1,XFILIAL('GIM')+G6S->G6S_CUSTO,'GIM_DESCRI') | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 76165 | 0 |
| G6S | 06 | G6S_UM | C | 2 | 0 | Unidade | Unidad | Unit | Unidade de Medida | Unidad de medida | Measurement Unit | - | Vazio().Or.ExistCpo("SAH") | x x x x x x x x x x x x x x x x | - | SAH | 1 | x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | 122 | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 76166 | 0 |
| G6S | 07 | G6S_DESUM | C | 9 | 0 | Desc. Unidad | Desc. Unidad | Unit Desc | Descrição da Unidade | Descripción de la unidad | Unit description | @! | - | x x x x x x x x x x x x x x x x | IIF( !INCLUI, POSICIONE("SAH",1,XFILIAL("SAH")+G6S->G6S_UM,"AH_UMRES"), "") | - | 1 | x | - | - | - | N | V | V | - | - | - | - | - | - | - | Posicione("SAH",1,xFilial("SAH")+G6S->G6S_UM,"AH_UMRES") | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 76167 | 0 |
| G6S | 08 | G6S_FORMUL | C | 1 | 0 | Formula | Fórmula | Formula | Usa Formula | Usa fórmula | Use Formula | @! | Pertence("12") | x x x x x x x x x x x x x x x x | "2" | - | 1 | x | - | - | - | N | V | R | - | - | 1=Sim;2=Não | 1=Sí;2=No | 1=Yes;2=No | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 76168 | 0 |
| G6S | 09 | G6S_QUANT | N | 12 | 2 | Quantidade | Cantidad | Quantity | Quantidade | Cantidad | Quantity | @E 999,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 | - | - | - | 76169 | 0 |
| G6S | 10 | G6S_CUSUNI | N | 14 | 2 | Custo Unit. | Costo Unit. | Unit Cost | Custo Unitario | Costo unitario | Unit Cost | @E 99,999,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 | - | - | - | 76170 | 0 |
| G6S | 11 | G6S_VALTOT | N | 14 | 2 | Valor Total | Valor total | Total Value | Valor Total | Valor total | Total Value | @E 99,999,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 | - | - | - | 76171 | 0 |
| G6S | 12 | G6S_PLAN | M | 10 | 0 | Xml Planilha | Xml Planilla | XML Spread | Xml Planilha Calculo | Xml Planilla cálculo | Calc XML Spread | - | - | 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 | - | - | - | 76172 | 0 |
| G6S | 13 | G6S_EMISSA | D | 8 | 0 | Dt Emissao | Fch Emisión | Issue Dt | Data de Emissao | Fecha de emisión | Issue Date | - | - | 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 | 1 | - | - | - | 76173 | 0 |
| G6S | 14 | G6S_VENCTO | D | 8 | 0 | Dt Vencto | Fch Venc | Expir Dt | Data de Vencimento | Fecha de vencimiento | Expiration Date | - | - | 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 | 1 | - | - | - | 76174 | 0 |
| G6S | 15 | G6S_VALOR | N | 7 | 2 | Valor | Valor | Value | Valor do Cheque | Valor del cheque | Check Value | @E 9,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 | 1 | - | - | - | 76175 | 0 |
| G6S | 16 | G6S_CODAGE | C | 6 | 0 | Cód Agência | Cód Agencia | Branch Code | Código da Agência | Código de la agencia | Branch Code | @! | - | 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 | - | - | - | 76176 | 0 |
| G6S | 17 | G6S_DTVEND | D | 8 | 0 | Dt Venda | Fch Venta | Sales Dt | Data da Venda | Fecha de la venta | Sales Date | - | - | 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 | 1 | - | - | - | 76177 | 0 |
| G6S | 18 | G6S_NUMCHQ | C | 15 | 0 | Nr Cheque | Nº Cheque | Check No. | Número do Cheque | Número del cheque | Check Number | @! | - | 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 | 1 | - | - | - | 76178 | 0 |
| G6S | 19 | G6S_CONTA | C | 10 | 0 | Nr Conta | Nº Cuenta | Acc Number | Número da Conta | Número de la cuenta | Account Number | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | 009 | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 76179 | 0 |
| G6S | 20 | G6S_AGENCI | C | 5 | 0 | Agência Banc | Agencia Banc | Bank Branch | Agência do Banco | Agencia del banco | Bank Branch | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | 008 | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 76180 | 0 |
| G6S | 21 | G6S_BANCO | C | 3 | 0 | Banco | Banco | Bank | Código do Banco. | Código del banco. | Bank Code | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | A | R | - | - | - | - | - | - | - | - | 007 | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 76181 | 0 |
| G6S | 22 | G6S_CLIENT | C | 6 | 0 | Cliente | Cliente | Customer | Cliente | Cliente | Customer | @! | ExistCPO("SA1") | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | S | - | N | A | R | - | - | - | - | - | - | - | - | 001 | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 76182 | 0 |
| G6S | 23 | G6S_LOJA | C | 2 | 0 | Loja | Tienda | Store | Loja | Tienda | Store | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | N | V | R | - | - | - | - | - | - | - | - | 002 | - | S | - | - | N | - | N | - | - | - | 1 | 1 | - | - | - | 76183 | 0 |
| G6S | 24 | G6S_NROPOR | C | 6 | 0 | Nr. Oportuni | Nº Oportun. | Opp No. | Nr. Oportunidade | Nº de la oportunidad | Opportunity No. | @! | - | 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 | - | - | - | 76184 | 0 |
| G6S | 25 | G6S_CODG99 | C | 6 | 0 | Código | Código | Code | Código Sequêncial | Código secuencial | Sequence Code | @! | - | 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 | 1 | - | - | - | 76185 | 0 |
| G6S | 26 | G6S_CHAVE | C | 24 | 0 | Chv Titulo | Clav Título | Bill Key | Chave do Titulo | Clave del título | Bill Key | @! | - | 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 | - | - | - | 76186 | 0 |
| G6S | 27 | G6S_NUMFCH | C | 30 | 0 | Nr Ficha Rem | Nº Ficha Env | Remitt Form | Numero Ficha Remessa | Numero ficha envío | Remittance Form Number | @! | - | 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 | - | - | - | 76187 | 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| G6S | 1 | G6S_FILIAL+G6S_CODIGO+G6S_ITEM | Código + Item | Código + Ítem | Code + Item | S | - | - | S | 2 | 3 | - | 11177 | 0 |
| G6S | 2 | G6S_FILIAL+G6S_CUSTO+G6S_CODIGO+G6S_ITEM | Cód. Custo + Código + Item | Cód. Costo + Código + Ítem | Code Cost + Code + Item | S | - | - | S | 2 | 3 | - | 11178 | 0 |
| G6S | 3 | G6S_FILIAL+G6S_CODIGO+G6S_CUSTO | Código + Cód. Custo | Código + Cód. Costo | Code + Code Cost | S | - | - | S | 2 | 3 | - | 11179 | 0 |
Ela é utilizada para fretamento custos 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
G6S_FILIAL,
G6S_CODIGO,
G6S_ITEM,
G6S_CUSTO,
G6S_DCUSTO,
G6S_UM,
G6S_DESUM,
G6S_FORMUL,
G6S_QUANT,
G6S_CUSUNI,
G6S_VALTOT,
G6S_PLAN,
G6S_EMISSA,
G6S_VENCTO,
G6S_VALOR,
G6S_CODAGE,
G6S_DTVEND,
G6S_NUMCHQ,
G6S_CONTA,
G6S_AGENCI,
G6S_BANCO,
G6S_CLIENT,
G6S_LOJA,
G6S_NROPOR,
G6S_CODG99,
G6S_CHAVE,
G6S_NUMFCH
FROM G6S
WHERE
D_E_L_E_T_ = ' '
AND G6S_FILIAL = 'VALOR'
AND G6S_CODIGO = 'VALOR'
AND G6S_ITEM = 'VALOR'
AND G6S_CUSTO = 'VALOR'
AND G6S_DCUSTO = 'VALOR'
AND G6S_UM = 'VALOR'
AND G6S_DESUM = 'VALOR'
AND G6S_FORMUL = 'VALOR'
AND G6S_QUANT = 0
AND G6S_CUSUNI = 0
AND G6S_VALTOT = 0
AND G6S_EMISSA BETWEEN '20260401' AND '20260430'
AND G6S_VENCTO BETWEEN '20260401' AND '20260430'
AND G6S_VALOR = 0
AND G6S_CODAGE = 'VALOR'
AND G6S_DTVEND BETWEEN '20260401' AND '20260430'
AND G6S_NUMCHQ = 'VALOR'
AND G6S_CONTA = 'VALOR'
AND G6S_AGENCI = 'VALOR'
AND G6S_BANCO = 'VALOR'
AND G6S_CLIENT = 'VALOR'
AND G6S_LOJA = 'VALOR'
AND G6S_NROPOR = 'VALOR'
AND G6S_CODG99 = 'VALOR'
AND G6S_CHAVE = 'VALOR'
AND G6S_NUMFCH = 'VALOR'