Produtos/Categ. - Regra Descon
A tabela MB8 faz parte do sistema ERP Protheus da TOTVS e é utilizada para produtos/categ. - regra descon.
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 MB8 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 MB8, incluindo todos os campos e índices relacionados.
| Propriedade | Valor |
|---|---|
| X2_CHAVE | MB8 |
| X2_PATH | \DATA\ |
| X2_ARQUIVO | MB8990 |
| X2_NOME | Produtos/Categ. - Regra Descon |
| X2_NOMESPA | Prod./Categ. - Regla Desc. |
| X2_NOMEENG | Product/Categ. - Disc.Rule |
| X2_ROTINA | - |
| X2_MODO | C |
| X2_MODOUN | C |
| X2_MODOEMP | C |
| X2_DELET | 0 |
| X2_TTS | - |
| X2_UNICO | MB8_FILIAL+MB8_CODREG+MB8_REFGRD |
| X2_PYME | S |
| X2_MODULO | 12 |
| 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_ | 6311 |
| 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MB8 | 01 | MB8_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 x | - | - | 1 | xx | - | - | - | N | - | - | - | - | - | - | - | - | - | - | 033 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 101099 | 0 |
| MB8 | 02 | MB8_CODREG | C | 6 | 0 | Cod Regra | Cod Regla | Rule Code | Codigo da regra de descon | Codigo de regla descuento | Disc.Rule Code | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | xxx | - | - | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 101100 | 0 |
| MB8 | 03 | MB8_REFGRD | C | 2 | 0 | Ref.Grade | Ref.Grilla | Grid ref. | Referencia da Grade. | Referencia de la Grilla | Grid Reference | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x xxx | - | - | - | S | V | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 1 | - | - | - | 101101 | 0 |
| MB8 | 04 | MB8_CODPRO | C | 15 | 0 | Produto | Producto | Product | Codigo de produto | Codigo de producto | Product Code | @! | Vazio().Or.ExistCpo("SB1") | x x x x x x x x x x x x x x x x | - | SB1 | 1 | xx | - | S | - | S | A | R | - | - | - | - | - | - | - | - | 030 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 101102 | 0 |
| MB8 | 05 | MB8_DESPRO | C | 50 | 0 | Desc Prod | Desc Prod | Prod.Desc. | Descricao Produto | Descripcion Producto | Product Desc. | @! | - | x x x x x x x x x x x x x x x x | IF(!INCLUI,POSICIONE("SB1",1,XFILIAL("SB1")+MB8->MB8_CODPRO,"B1_DESC"),"") | - | 1 | xx | - | - | - | N | V | V | - | - | - | - | - | - | - | Posicione("SB1",1,xFilial("SB1")+MB8->MB8_CODPRO,"B1_DESC") | 171 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 101103 | 0 |
| MB8 | 06 | MB8_CATEGO | C | 6 | 0 | Cod Categor. | Cod Categor. | Catg.Code | Codigo da categoria Prod | Codigo de la categoria Pr | Product Category Code | @! | ExistCpo("ACU") | x x x x x x x x x x x x x x x x | - | ACU | 1 | xx | - | S | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 101104 | 0 |
| MB8 | 07 | MB8_DESCPR | N | 5 | 2 | Perc.Desc | Porc.Desc | Disc.% | Percentual de desconto | Porcentaje de descuento | Discount % | @E 99.99 | POSITIVO() | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | S | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | S | N | N | - | - | - | 1 | 2 | - | - | - | 101105 | 0 |
| MB8 | 08 | MB8_DESCVL | N | 7 | 2 | Val.Desc | Val.Desc | Disc.Value | Valor do desconto | Valor del descuento | Discount Value | @E 9,999.99 | POSITIVO() | x x x x x x x x x x x x x x x x | - | - | 1 | xx | - | S | - | S | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 101106 | 0 |
| MB8 | 09 | MB8_GRUPO | C | 4 | 0 | Grupo | Grupo | Group | Codigo grupo de produto | Codigo grupo de producto | Product Group Code | @! | ExistCpo("SBM") | x x x x x x x x x x x x x x x x | - | SBM | 1 | xx | - | - | - | N | A | R | - | - | - | - | - | - | - | - | 162 | - | S | - | - | N | N | N | - | - | - | 1 | 2 | - | - | - | 101107 | 0 |
| MB8 | 10 | MB8_TPREGR | C | 1 | 0 | Tipo Regra | Tipo regla | Rule Type | Tipo Regra | Tipo regla | Rule Type | @! | Pertence('123') | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | - | A | R | - | - | 1=Desconto;2=Bonificacao;3=Brinde | 1=Descuento;2=Bonificacion;3=Regalo | 1=Discount;2=Bonus;3=Gift | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 101108 | 0 |
| MB8 | 11 | MB8_QTDMUL | C | 1 | 0 | Multiplo Qtd | Multiplo Ctd | Qty Multiple | Multiplo de Quantidade | Multiplo de cantidad | Quantity Multiple | @! | - | x x x x x x x x x x x x x x x x | - | - | 1 | x | - | - | - | - | A | R | - | - | 1=Sim;2=Não | 1=Si;2=No | 1=Yes;2=No | - | - | - | - | - | S | - | - | S | - | N | - | - | - | 1 | 2 | - | - | - | 101109 | 0 |
| MB8 | 12 | MB8_QTDPRO | N | 6 | 2 | Qtd Venda | Ctd Venta | Sales Qty | Qtd Venda | Ctd Venta | Sales Qty | @E 999.99 | Naovazio() | x x x x x x x x x x x x x x x x | - | - | 1 | x x | - | - | - | - | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | S | - | N | - | - | - | 1 | 1 | - | - | - | 101110 | 0 |
| MB8 | 13 | MB8_IDPROD | C | 6 | 0 | Prod Relacao | Prod Relac | Relation Pro | Produto Relacionado | Producto relacionado | Related Product | @! | - | x x x x x x x x x x x x x x x x | - | LOJ004 | 1 | x | - | - | - | - | A | R | - | - | - | - | - | - | - | - | - | - | S | - | - | S | - | N | - | - | - | 1 | 2 | - | - | - | 101111 | 0 |
| MB8 | 14 | MB8_DESCTO | C | 1 | 0 | Desc. Total | Desc. Total | Total Disc. | Desconto Total Itens | Desc. Total ítems | Total Item Discount | @! | - | x x x x x x x x x x x x x x x x | "2" | - | 1 | xx | - | - | - | - | A | R | - | - | 1=Sim;2=Nao | 1=Sí;2=No | 1=Yes;2=No | - | - | - | - | - | S | - | - | N | - | N | - | - | - | 1 | 2 | - | - | - | 101112 | 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_ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MB8 | 1 | MB8_FILIAL+MB8_CODREG+MB8_REFGRD | Cod Regra + Ref.Grade | Cod Regla + Ref.Grilla | Rule Code + Grid ref. | S | - | - | S | 2 | 3 | - | 14467 | 0 |
| MB8 | 2 | MB8_FILIAL+MB8_CODPRO | Produto | Producto | Product | S | - | - | S | 2 | 3 | - | 14468 | 0 |
| MB8 | 3 | MB8_FILIAL+MB8_CATEGO | Cod Categor. | Cod Categor. | Catg.Code | S | - | - | S | 2 | 3 | - | 14469 | 0 |
| MB8 | 4 | MB8_FILIAL+MB8_CODREG+MB8_CODPRO | Cod Regra + Produto | Cod Regla + Producto | Rule Code + Product | S | - | - | S | 2 | 3 | - | 14470 | 0 |
Ela é utilizada para produtos/categ. - regra descon 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
MB8_FILIAL,
MB8_CODREG,
MB8_REFGRD,
MB8_CODPRO,
MB8_DESPRO,
MB8_CATEGO,
MB8_DESCPR,
MB8_DESCVL,
MB8_GRUPO,
MB8_TPREGR,
MB8_QTDMUL,
MB8_QTDPRO,
MB8_IDPROD,
MB8_DESCTO
FROM MB8
WHERE
D_E_L_E_T_ = ' '
AND MB8_FILIAL = 'VALOR'
AND MB8_CODREG = 'VALOR'
AND MB8_REFGRD = 'VALOR'
AND MB8_CODPRO = 'VALOR'
AND MB8_DESPRO = 'VALOR'
AND MB8_CATEGO = 'VALOR'
AND MB8_DESCPR = 0
AND MB8_DESCVL = 0
AND MB8_GRUPO = 'VALOR'
AND MB8_TPREGR = 'VALOR'
AND MB8_QTDMUL = 'VALOR'
AND MB8_QTDPRO = 0
AND MB8_IDPROD = 'VALOR'
AND MB8_DESCTO = 'VALOR'