Created
November 26, 2019 18:51
-
-
Save facilita-tecnologia/d0ec9458da100366749e28286cbd1404 to your computer and use it in GitHub Desktop.
Tabelas do Sistema Pro Farma
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `tb_nf_entrada` ( | |
`ID_COMPRA` int(11) NOT NULL AUTO_INCREMENT, | |
`CRT` longtext, | |
`modFrete` int(11) NOT NULL, | |
`indFinal` int(11) NOT NULL, | |
`idDest` int(11) NOT NULL, | |
`indPres` int(11) NOT NULL, | |
`indPag` int(11) NOT NULL, | |
`tpAmb` int(11) NOT NULL, | |
`Fornecedor_Id` int(11) NOT NULL, | |
`Transportadora_Id` int(11) NOT NULL, | |
`procEmi` int(11) NOT NULL, | |
`Mod` int(11) NOT NULL, | |
`cStat` longtext, | |
`Status` int(11) NOT NULL, | |
`Serie` longtext, | |
`nNF` longtext, | |
`cNF` longtext, | |
`natOp` longtext, | |
`Chave` longtext, | |
`dhEmi` datetime NOT NULL, | |
`dtEntrada` date NOT NULL, | |
`Usuario_Id` smallint(6) NOT NULL, | |
`Empresa_Id` smallint(6) NOT NULL, | |
`vProd` decimal(18,2) NOT NULL, | |
`vFrete` decimal(18,2) NOT NULL, | |
`vSeg` decimal(18,2) NOT NULL, | |
`vDesc` decimal(18,2) NOT NULL, | |
`vOutro` decimal(18,2) NOT NULL, | |
`vNF` decimal(18,2) NOT NULL, | |
`vBC` decimal(18,2) NOT NULL, | |
`vICMS` decimal(18,2) NOT NULL, | |
`vICMSDeson` decimal(18,2) NOT NULL, | |
`vBCST` decimal(18,2) NOT NULL, | |
`vST` decimal(18,2) NOT NULL, | |
`vII` decimal(18,2) NOT NULL, | |
`vIPI` decimal(18,2) NOT NULL, | |
`vPIS` decimal(18,2) NOT NULL, | |
`vCOFINS` decimal(18,2) NOT NULL, | |
`Status_Precificacao` int(11) NOT NULL, | |
`Usuario_Precificacao` int(11) NOT NULL, | |
`vICMSUFDest` decimal(18,2) NOT NULL, | |
`vICMSUFRemet` decimal(18,2) NOT NULL, | |
`vTotTrib` decimal(18,2) NOT NULL, | |
`XML` tinyint(1) NOT NULL, | |
`Obs` text, | |
`Path_XML` longtext, | |
`infCpl` text, | |
`infAdFisco` text, | |
`obsCont` text, | |
PRIMARY KEY (`ID_COMPRA`) | |
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; | |
CREATE TABLE `tb_nf_entrada_item` ( | |
`ID_COMPRA_ITEM` int(11) NOT NULL AUTO_INCREMENT, | |
`FATOR` decimal(11,3) NOT NULL, | |
`CFOP` longtext, | |
`CST_IPI` longtext, | |
`XPED` longtext, | |
`NITEMPED` longtext, | |
`modBC` int(11) NOT NULL, | |
`ID_COMPRA` int(11) NOT NULL, | |
`Produto_Id` int(11) NOT NULL, | |
`nItem` int(11) NOT NULL, | |
`cProd` longtext, | |
`cEAN` longtext, | |
`xProd` longtext, | |
`Desc_Complementar` longtext, | |
`NCM` longtext, | |
`CEST` longtext, | |
`uCom` longtext, | |
`qCom` decimal(11,3) NOT NULL, | |
`vUnCom` decimal(11,4) NOT NULL, | |
`vProd` decimal(18,2) NOT NULL, | |
`vDesc` decimal(18,2) NOT NULL, | |
`vFrete` decimal(18,2) NOT NULL, | |
`vSeg` decimal(18,2) NOT NULL, | |
`vOutro` decimal(18,2) NOT NULL, | |
`indTot` int(11) NOT NULL, | |
`orig` int(11) NOT NULL, | |
`CST_CSOSN` longtext, | |
`vBC` decimal(18,2) DEFAULT NULL, | |
`pICMS` decimal(18,2) NOT NULL, | |
`vICMS` decimal(18,2) NOT NULL, | |
`cEnq` int(11) NOT NULL, | |
`vBC_IPI` decimal(18,2) NOT NULL, | |
`pIPI` decimal(18,2) NOT NULL, | |
`vIPI` decimal(18,2) NOT NULL, | |
`CST_PIS` longtext, | |
`vBC_PIS` decimal(18,2) NOT NULL, | |
`pPIS` decimal(18,2) NOT NULL, | |
`vPIS` decimal(18,2) NOT NULL, | |
`CST_COFINS` longtext, | |
`vBC_COFINS` decimal(18,2) NOT NULL, | |
`pCOFINS` decimal(18,2) NOT NULL, | |
`vCOFINS` decimal(18,2) NOT NULL, | |
`vBCST` decimal(18,2) NOT NULL, | |
`vST` decimal(18,2) NOT NULL, | |
`pCredSN` decimal(18,2) NOT NULL, | |
`vCredICMSSN` decimal(18,2) NOT NULL, | |
`modBCST` int(11) NOT NULL, | |
`pMVAST` decimal(18,2) DEFAULT NULL, | |
`pRedBCST` decimal(18,2) DEFAULT NULL, | |
`pICMSST` decimal(18,2) NOT NULL, | |
`vICMSST` decimal(18,2) NOT NULL, | |
`vBCSTRet` decimal(18,2) DEFAULT NULL, | |
`vICMSSTRet` decimal(18,2) DEFAULT NULL, | |
`pRedBC` decimal(18,2) DEFAULT NULL, | |
`vICMSDeson` decimal(18,2) NOT NULL, | |
`motDesICMS` int(11) NOT NULL, | |
`Qtd_Final` decimal(18,2) NOT NULL, | |
`CFOP_Entrada` longtext, | |
`SubTotal` decimal(18,2) NOT NULL, | |
`Status_Precif` tinyint(1) NOT NULL, | |
`Margem` decimal(18,2) NOT NULL, | |
`Margem_Promoc` decimal(18,2) NOT NULL, | |
`Valor_Venda` decimal(18,2) NOT NULL, | |
`Unitario_Precif` decimal(18,2) NOT NULL, | |
`PMC` decimal(18,2) NOT NULL, | |
`Comissao` decimal(18,2) NOT NULL, | |
PRIMARY KEY (`ID_COMPRA_ITEM`) | |
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8; | |
CREATE TABLE `tb_historico_custo` ( | |
`Historico_Custo_Id` int(11) NOT NULL AUTO_INCREMENT, | |
`Empresa_Id` int(11) NOT NULL, | |
`Produto_Id` int(11) NOT NULL, | |
`Compra_Id` int(11) NOT NULL, | |
`Fornecedor_Id` int(11) NOT NULL, | |
`Usuario_Id` int(11) NOT NULL, | |
`Quantidade` decimal(18,2) NOT NULL, | |
`Custo` decimal(18,2) NOT NULL, | |
`Custo_Anterior` decimal(18,2) NOT NULL, | |
`Data` date NOT NULL, | |
PRIMARY KEY (`Historico_Custo_Id`) | |
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment