alter table pre1 add if not exists pedido_numero integer; alter table nfe add if not exists NFe_Consumidor_Final boolean; CREATE TABLE IF NOT EXISTS "impressoras" ( "codigo" AUTOINC, "descricao" VARCHAR(20), PRIMARY KEY ("codigo") COMPRESS NONE DESCRIPTION 'Impressoras do sistema.' LOCALE CODE 0 USER MAJOR VERSION 4 ); alter table produtos add if not exists impressora integer; alter table pre1 add if not exists impressora integer; alter table pre1 add if not exists impresso boolean; alter table pre1 add if not exists etapa integer; alter table pre1 add if not exists tipo_movimento integer; alter table pre1 add if not exists data_hora_pedido Timestamp; alter table pre1 add if not exists data_hora_processo Timestamp; alter table pre1 add if not exists data_hora_entrega Timestamp; alter table pre add if not exists movimento float; alter table cupom2 add if not exists tpIntegra integer; alter table cupom2 add if not exists CNPJ varchar(20); alter table cupom2 add if not exists indPag integer; alter table cupom2 add if not exists tBand integer; alter table cupom2 add if not exists NSU varchar(40); alter table cupom2 add if not exists rede varchar(30); alter table cupom2 add if not exists Nome_do_Produto varchar(30); alter table cupom2 add if not exists cAut varchar(10); CREATE TABLE IF NOT EXISTS "dep" ( "numero" AUTOINC, "atalho" VARCHAR(1), "codigo" INTEGER, PRIMARY KEY ("codigo") COMPRESS NONE DESCRIPTION 'Departamentos - Atalhos para vender' LOCALE CODE 0 USER MAJOR VERSION 4 ); CREATE INDEX IF NOT EXISTS "atalho" ON "dep" ("atalho"); alter table pdv add if not exists movimento float; alter table formas add if not exists ordem_touch varchar(2); alter table formas add if not exists arquivo_imagem varchar(100); CREATE INDEX IF NOT EXISTS "ordem" ON "formas" ("ordem_touch"); CREATE TABLE IF NOT EXISTS "locais" ( "numero" AUTOINC, "local_mesa" INTEGER, "descricao" VARCHAR(20), "tipo" INTEGER, "status" INTEGER, "obs" VARCHAR(60), "id" VARCHAR(40), PRIMARY KEY ("numero") COMPRESS NONE DESCRIPTION 'Cadastro de locais / mesas' LOCALE CODE 0 USER MAJOR VERSION 4 ); CREATE INDEX IF NOT EXISTS "local_mesa" ON "locais" ("local_mesa"); alter table produtos add if not exists Tipo_Produto integer; CREATE TABLE IF NOT EXISTS "prod3" ( "codigo_produto" INTEGER, "codigo_complemento" INTEGER, "acao" INTEGER, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Complementos do produto' LOCALE CODE 0 USER MAJOR VERSION 4 ); CREATE INDEX IF NOT EXISTS "codigo_produto" ON "prod3" ("codigo_produto"); CREATE INDEX IF NOT EXISTS "codigo_complemento" ON "prod3" ("codigo_complemento"); alter table ficha add if not exists nro autoinc; alter table nfe1 add if not exists vBCSTRet float; alter table nfe1 add if not exists vICMSSTRet float; alter table nfe1 add if not exists pST float; alter table compra1 add if not exists vBCSTRet float; alter table compra1 add if not exists vICMSSTRet float; alter table compra1 add if not exists pST float; alter table cupom1 add if not exists impressora integer; alter table pre1 add if not exists vendedor integer; alter table pre1 add if not exists Pagamento_efetuado boolean; alter table cupom2 add if not exists acrescimo_p float; alter table cupom2 add if not exists acrescimo_v float; alter table cupom2 add if not exists liquido float; alter table cupom1 add if not exists codigo_da_unidade integer; alter table cupom1 add if not exists qtde_de_unidades_vendidas float; CREATE TABLE IF NOT EXISTS "cupom4" ( "numero" INTEGER, "item_na_venda" INTEGER, "codigo" INTEGER, "codigo_da_composicao" INTEGER, "qtde_vendida" FLOAT, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Produtos do kit' LOCALE CODE 0 USER MAJOR VERSION 4 ); CREATE INDEX IF NOT EXISTS "numero" ON "cupom4" ("numero"); CREATE INDEX IF NOT EXISTS "item" ON "cupom4" ("item_na_venda"); alter table nfe_cce drop if exists xml; alter table nfe_cce add if not exists Arquivo_xml varchar(80); CREATE TABLE IF NOT EXISTS "cupom5" ( "numero" INTEGER, "ordem_no_turno" INTEGER, "numero_do_turno" INTEGER, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Complementos do cabeçalho cupom' LOCALE CODE 0 USER MAJOR VERSION 4 ); CREATE INDEX IF NOT EXISTS "numero" ON "cupom5" ("numero"); alter table cupom5 add if not exists data date; alter table formas add if not exists tipo_financiamento varchar(2); alter table formas add if not exists rede varchar(20); alter table formas add if not exists tipo_operacao varchar(2); alter table cupom1 add if not exists vl_encargos float; alter table pdv1 add if not exists Emitido_NFCe boolean; alter table pdv1 add if not exists Emitido_NFe boolean; alter table usuarios add if not exists comissao float; alter table usuarios add if not exists user_senha varchar(80); alter table pdv drop if exists fpDinheiro; alter table pdv drop if exists fpCheque; alter table pdv drop if exists fpCartaoDebito; alter table pdv drop if exists fpCartaoCredito; alter table pdv drop if exists fpCreditoLoja; alter table pdv drop if exists fpCreditoLoja_convenio; alter table pdv drop if exists fpValeAlimentacao; alter table pdv drop if exists fpValeRefeicao; alter table pdv drop if exists fpValePresente; alter table pdv drop if exists fpValeCombustivel; alter table pdv drop if exists fpOutro; CREATE TABLE IF NOT EXISTS "pdv2" ( "numero" INTEGER, "forma" VARCHAR(20), "valor_contado" FLOAT, "valor_lancado" FLOAT, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Contagem das formas de pagamento' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); alter table cliente add if not exists limite_de_credito float; CREATE TABLE IF NOT EXISTS "manufatura" ( "numero" AUTOINC, "data" DATE, "hora" TIME, "codigo" INTEGER, "qtde" FLOAT, "tipo" INTEGER, PRIMARY KEY ("numero") COMPRESS NONE DESCRIPTION 'Manufaturas - Arquivo pai' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE TABLE IF NOT EXISTS "manufatura1" ( "numero" INTEGER, "codigo" INTEGER, "qtde" FLOAT, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Ítens que compões a manufatura' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "manufatura1" ("numero"); alter table produtos add if not exists data_hora_ultima_alteracao timestamp; CREATE INDEX IF NOT EXISTS "NCM" ON "produtos" ("NCM"); alter table confignf add if not exists vl_max_prod float; alter table confignf add if not exists vl_max_venda float; CREATE TABLE IF NOT EXISTS "cli1" ( "codigo" INTEGER, "indice" AUTOINC, "nome" VARCHAR(30), "fone" VARCHAR(15), "email" VARCHAR(30), PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Contatos de Clientes' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "codigo" ON "cli1" ("codigo"); CREATE TABLE IF NOT EXISTS "cli2" ( "codigo" INTEGER, "indice" AUTOINC, "endereco" VARCHAR(60), "numero" VARCHAR(10), "complemento" VARCHAR(15), "bairro" VARCHAR(30), "cep" VARCHAR(10), "cidade" VARCHAR(30), "uf" VARCHAR(2), "referencia" VARCHAR(80), "taxa" FLOAT, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Lista de endereços' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "codigo" ON "cli2" ("codigo"); CREATE INDEX IF NOT EXISTS "fone" ON "cliente" ("fone"); alter table cupom add if not exists endereco_entrega integer; alter table cliente add if not exists dados memo; alter table cliente TEXT INDEX ("nome","fantasia","fone","dados"); alter table sistema add if not exists HOST_TPC_IP varchar(40); alter table confignf add if not exists Permitir_Troco_Alto boolean; CREATE TABLE IF NOT EXISTS "prod4" ( "codigo" INTEGER, "arquivo" VARCHAR(70), PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Imagens do produto' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "codigo" ON "prod4" ("codigo"); alter table sistema add if not exists codigo integer; alter table sistema add if not exists PRODUTOS_Seq_Codigo_Barras integer; alter table cupom add if not exists venda_estornada boolean; alter table cupom1 add if not exists venda_estornada boolean; alter table produtos add if not exists codigo_balanca varchar(6); CREATE INDEX IF NOT EXISTS "codigo_balanca" ON "produtos" ("codigo_balanca"); alter table sistema add if not exists CLIENTES_Seq_Codigo integer; alter table sistema add if not exists INTEGRADOR_Seq_Codigo integer; alter table operacao add if not exists produtos_cfop_st varchar(3); alter table operacao add if not exists produtos_csosn_st varchar(3); alter table operacao add if not exists produtos_cfop_ANP varchar(3); alter table operacao add if not exists produtos_csosn_ANP varchar(3); alter table operacao add if not exists produtos_cfop_interestadual varchar(3); alter table operacao add if not exists produtos_csosn_interestadual varchar(3); alter table operacao add if not exists produtos_cfop_st_interestadual varchar(3); alter table operacao add if not exists produtos_csosn_st_interestadual varchar(3); alter table operacao add if not exists produtos_cfop_ANP_interestadual varchar(3); alter table operacao add if not exists produtos_csosn_ANP_interestadual varchar(3); alter table sistema add if not exists TURNO_Seq_Numero integer; alter table sistema add if not exists CUPOM_Seq_Numero integer; alter table inventario add if not exists lote varchar(20); alter table sistema add if not exists COMPRA_Seq_Numero integer; alter table cp add if not exists forma varchar(20); alter table cp add if not exists turno_numero integer; alter table confignf add if not exists codigo_diversos_na_balanca integer; alter table confignf add if not exists CNPJ_Principal varchar(20); alter table nfce add if not exists arquivo_XML_Antes_de_Enviar varchar(50); alter table nfce add if not exists arquivo_XML_Enviado varchar(50); alter table nfce add if not exists arquivo_XML_Cancelamento varchar(50); alter table nfce add if not exists arquivo_XML_Inutilizacao varchar(50); alter table sistema add if not exists CP_Seq_Numero integer; alter table compra drop if exists cnpj; alter table compra drop if exists ie; alter table compra drop if exists cnpj; alter table compra drop if exists fone; alter table compra drop if exists cep; alter table compra drop if exists endereco; alter table compra drop if exists nro; alter table compra drop if exists complemento; alter table compra drop if exists bairro; alter table compra drop if exists cidade; alter table compra drop if exists uf; alter table compra drop if exists modelo; alter table compra drop if exists serie; DROP INDEX if exists compra."nome"; alter table compra drop if exists nome; DROP INDEX if exists compra."fantasia"; alter table compra drop if exists fantasia; alter table compra drop if exists lctofiscal; drop index if exists compra1."ref"; alter table compra1 drop if exists ref; alter table compra1 drop if exists barra; alter table compra1 drop if exists descricao; alter table compra1 drop if exists un; alter table compra1 drop if exists ncm; alter table compra1 drop if exists marca; alter table compra1 drop if exists cfop_sped; alter table compra1 drop if exists lcto_fiscal; alter table compra1 drop if exists cnpj; alter table compra1 drop if exists nome; alter table compra1 drop if exists documento; alter table compra1 drop if exists cnpj_do_destinatario; alter table compra1 drop if exists cst_icms_sped; alter table compra1 drop if exists CST_PIS_COFINS_SPED; alter table compra1 drop if exists CST_IPI_SPED; alter table compra1 drop if exists linha; alter table compra1 drop if exists lctofiscal; alter table compra1 drop if exists ITEM_NA_NF; alter table compra1 drop if exists VL_Frete; alter table compra1 drop if exists VL_Seguro; alter table compra1 drop if exists VL_Desconto; alter table compra1 drop if exists ICMS_CST; alter table compra1 drop if exists ICMS_VBC; alter table compra1 drop if exists ICMS_Valor; alter table compra1 drop if exists ICMS_VL_ICMSST; alter table compra1 drop if exists IPI_valor; alter table compra1 drop if exists margem; alter table compra1 drop if exists venda; alter table compra1 drop if exists estoque; alter table compra drop if exists ICMS_VBC; alter table compra drop if exists ICMS_Valor; alter table compra drop if exists ICMS_VBCST; alter table compra drop if exists ICMS_VST; alter table compra drop if exists ICMS_VlProd; alter table compra drop if exists ICMS_VlFrete; alter table compra drop if exists ICMS_VlSeguro; alter table compra drop if exists ICMS_VlDesconto; alter table compra drop if exists ICMS_VlIPI; alter table compra drop if exists ICMS_VlOutros; alter table compra drop if exists margem_padrao; alter table compra1 add if not exists vl_venda float; alter table compra drop if exists NF_Modelo; alter table compra drop if exists NF_Serie; drop index if exists cupom1."ref"; drop index if exists cupom1."descricao"; alter table cupom1 drop if exists ref; alter table cupom1 drop if exists descricao; alter table cupom1 drop if exists un; alter table cupom1 drop if exists marca; alter table cupom1 drop if exists ncm; alter table cupom1 drop if exists nome_computador; alter table cupom1 drop if exists linha; alter table cupom1 drop if exists desconto_valor_unitario; alter table cupom1 drop if exists desconto_valor_total; alter table cupom1 drop if exists valor_arredondamento_total; alter table cupom1 drop if exists valor_liquido_unitario; alter table cupom1 drop if exists valor_liquido_total; alter table cupom1 drop if exists tributos_percentual; alter table cupom1 drop if exists tributos_valor; alter table cupom1 drop if exists cnpj_gerador_do_movimento; alter table cupom1 drop if exists filial_geradora_do_movimento; alter table cupom1 drop if exists turno_numero; alter table cupom1 drop if exists estoque; alter table cupom1 drop if exists codigo_cliente; alter table cupom1 drop if exists data_venda; alter table cupom1 drop if exists hora_venda; alter table cupom1 drop if exists valor_descontos_cupom; alter table cupom1 drop if exists valor_arredondamento_cupom; alter table cupom1 drop if exists valor_produtos_cupom; alter table cupom1 drop if exists NFCe_Numero; alter table cupom1 drop if exists NFe_Numero; alter table cupom1 drop if exists venda_estornada; alter table cupom1 drop if exists codigo_da_unidade; alter table cupom1 drop if exists qtde_de_unidades_vendidas; alter table cupom drop if exists obs1_venda; alter table cupom drop if exists obs2_venda; alter table cupom drop if exists obs3_venda; alter table cupom drop if exists obs4_venda; alter table cupom add if not exists vl_frete float; alter table cupom add if not exists vl_despesas float; CREATE TABLE IF NOT EXISTS "cupom6" ( "numero" INTEGER, "obs1_venda" VARCHAR(50), "obs2_venda" VARCHAR(50), "obs3_venda" VARCHAR(50), "obs4_venda" VARCHAR(50), PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Observaços complementares da venda' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "cupom6" ("numero"); alter table cliente add if not exists vl_frete float; alter table nfce drop if exists obs_linha1; alter table nfce drop if exists obs_linha2; alter table nfce drop if exists obs_linha3; alter table nfce drop if exists obs_linha4; alter table nfce drop if exists obs_linha5; alter table nfce drop if exists obs_linha6; alter table nfce drop if exists obs; alter table nfce drop if exists nfce_motivo_cancelamento; alter table nfce drop if exists NFCe_Enviada_ao_WS; alter table nfce drop if exists destinatario_nome; alter table nfce drop if exists destinatario_fantasia; alter table nfce drop if exists destinatario_cnpj_cpf; alter table nfce drop if exists destinatario_ie; alter table nfce drop if exists destinatario_endereco; alter table nfce drop if exists destinatario_numero; alter table nfce drop if exists destinatario_complemento; alter table nfce drop if exists destinatario_bairro; alter table nfce drop if exists destinatario_ibge_cidade; alter table nfce drop if exists destinatario_cidade; alter table nfce drop if exists destinatario_uf; alter table nfce drop if exists destinatario_fone; alter table nfce drop if exists destinatario_email; alter table sistema drop if exists numero_de_serie_certificado_sistema; CREATE TABLE IF NOT EXISTS "statuspd" ( "codigo" AUTOINC, "ordem" VARCHAR(2), "descricao" VARCHAR(40), "comunicar_cliente" BOOLEAN, "tempo_fixo" INTEGER, "tempo_proporcional" INTEGER, "cor_etapa_letra" VARCHAR(20), "cor_etapa_fundo" VARCHAR(20), "cor_atraso_letra" VARCHAR(20), "cor_atraso_fundo" VARCHAR(20), "usar_no_painel" BOOLEAN, "id" VARCHAR(20), PRIMARY KEY ("codigo") COMPRESS NONE DESCRIPTION 'Tabela de estados em que um pedido pode passarproporc' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "ordem" ON "statuspd" ("ordem"); CREATE TABLE IF NOT EXISTS "cupom7" ( "numero" INTEGER, "codigo_status" INTEGER, "data_programada" DATE, "hora_programada" TIME, "data_execucao" DATE, "hora_execucao" TIME, "em_execucao" BOOLEAN, "executado" BOOLEAN, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Etapas do pedido - Fases do processo' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "cupom7" ("numero"); CREATE TABLE IF NOT EXISTS "cupom8" ( "numero" INTEGER, "data_para_entregar" DATE, "hora_para_entregar" TIME, "data_da_entrega" DATE, "hora_da_entrega" TIME, "entrega_realizada" BOOLEAN, "entregador" INTEGER, "etapa" INTEGER, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Controle de entrega - Dados adicionais' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "cupom8" ("numero"); CREATE INDEX IF NOT EXISTS "endereco" ON "cliente" ("endereco","numero","complemento","bairro","cidade"); alter table statuspd add if not exists informar_responsavel boolean; alter table cupom8 add if not exists ordem varchar(2); alter table pre add if not exists id_pre varchar(20); alter table sistema add if not exists CAIXA_Seq_Numero integer; alter table confignf add if not exists Desativar_AutoCadastro boolean; alter table nfe add if not exists numero_romaneio integer; alter table confignf add if not exists Codigo_modelo_NFe_romaneio integer; alter table nfe1 add if not exists xPed varchar(20); alter table nfe1 add if not exists nItemPed varchar(20); alter table nfe1 add if not exists nFCI varchar(20); alter table nfe1 add if not exists cBenef varchar(20); alter table produtos add if not exists tipo_operacao_produto integer; CREATE TABLE IF NOT EXISTS "romaneio" ( "numero" AUTOINC, "data" DATE, "hora" TIME, "modelo_nfe" INTEGER, "total" FLOAT, "finalizado" BOOLEAN, PRIMARY KEY ("numero") COMPRESS NONE DESCRIPTION 'Cabeçalho do romaneio' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE TABLE IF NOT EXISTS "romaneio1" ( "numero" INTEGER, "codigo" INTEGER, "qtde" FLOAT, "valor" FLOAT, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Produtos do romaneio' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "romaneio1" ("numero"); CREATE TABLE IF NOT EXISTS "romaneio2" ( "numero" INTEGER, "numero_nf" INTEGER, "nNf" INTEGER, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Notas fiscais de saida - Manifesto de mercadorias para venda fora do estabelecimento' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "romaneio2" ("numero"); alter table romaneio2 add if not exists tipo integer; alter table confignf add if not exists Codigo_modelo_NFe_romaneio_Retorno integer; alter table nfce add if not exists numero_romaneio_manifesto integer; CREATE TABLE IF NOT EXISTS "cupom9" ( "numero" INTEGER, "romaneio" INTEGER, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Dados do romaneio' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "cupom9" ("numero"); CREATE INDEX IF NOT EXISTS "romaneio" ON "cupom9" ("romaneio"); alter table sistema add if not exists PRE_Seq_Numero integer; alter table ficha add if not exists lote_nr integer; alter table ficha add if not exists vencimento date; alter table sistema add if not exists LOTE_FICHA_Seq_Numero integer; alter table ficha add if not exists dt_quitacao date; alter table cliente add if not exists dia_limite_compra integer; alter table cliente add if not exists dia_vencimento_compra integer; alter table confignf add if not exists NFe_Nao_Distribuir_DESP_FRETE boolean; alter table cupom1 add if not exists estoque float; alter table compra1 add if not exists estoque float; CREATE INDEX IF NOT EXISTS "codigo" ON "cupom" ("codigo" DESC,"data" DESC,"hora" DESC); CREATE TABLE IF NOT EXISTS "perdas" ( "numero" AUTOINC, "data" DATE, "hora" TIME, "codigo" INTEGER, "qtde" FLOAT, "descricao" VARCHAR(60), "grupo" VARCHAR(30), "funcion" INTEGER, "dt_lcto" DATE, "hr_lcto" TIME, "turno" INTEGER, "id" VARCHAR(25), PRIMARY KEY ("numero") COMPRESS NONE DESCRIPTION 'Saida avulsa de estoque - Perdas e danos/Doação/Consumo' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "data" ON "perdas" ("data","hora"); CREATE INDEX IF NOT EXISTS "codigo" ON "perdas" ("codigo"); CREATE INDEX IF NOT EXISTS "grupo" ON "perdas" ("grupo"); CREATE TABLE IF NOT EXISTS "prod6" ( "codigo" INTEGER, "cfop" VARCHAR(3), "cst_icms" VARCHAR(3), "UN_Trib" VARCHAR(6), "Qtde_Trib" FLOAT, "vBCSTRet" FLOAT, "vICMSSTRet" FLOAT, "pST" FLOAT, "cst_pis_cofins" VARCHAR(2), "icms" FLOAT, "pis" FLOAT, "cofins" FLOAT, "red_bc" FLOAT, "cBenef" VARCHAR(8), "ANP" VARCHAR(15), "anp_tipo" INTEGER, "informacao_complementar" VARCHAR(150), PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'dados complementares do produto' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "codigo" ON "prod6" ("codigo"); alter table sistema add if not exists autXML_CNPJCPF varchar(20); alter table etiquetas add if not exists ETQ_Avanco integer; alter table etiquetas add if not exists ETQ_BackFeed boolean; alter table etiquetas add if not exists ETQ_DPI integer; alter table etiquetas add if not exists ETQ_MargemEsquerda integer; alter table etiquetas add if not exists ETQ_Modelo integer; alter table etiquetas add if not exists ETQ_Origem integer; alter table etiquetas add if not exists ETQ_PaginaDeCodigo integer; alter table etiquetas add if not exists ETQ_Temperatura integer; alter table etiquetas add if not exists ETQ_Unidade integer; alter table etiquetas add if not exists ETQ_Velocidade integer; alter table etiquetas add if not exists ETQ_PY integer; alter table etiquetas add if not exists ETQ_PX integer; alter table etiquetas add if not exists ETQ_Altura integer; alter table etiquetas add if not exists ETQ_Largura integer; alter table confignf add if not exists SCANTECH_Integrar boolean; alter table confignf add if not exists SCANTECH_Usuario varchar(40); alter table confignf add if not exists SCANTECH_Senha varchar(20); alter table confignf add if not exists SCANTECH_IdEmpresa varchar(10); alter table confignf add if not exists SCANTECH_IdLocal varchar(5); alter table confignf add if not exists SCANTECH_Host1 varchar(50); alter table confignf add if not exists SCANTECH_Host2 varchar(50); alter table confignf add if not exists SCANTECH_Host3 varchar(50); alter table confignf add if not exists SCANTECH_Intevalo integer; CREATE TABLE IF NOT EXISTS "etiq1" ( "numero" INTEGER, "operacao" INTEGER, "Horizontal" INTEGER, "Vertical" INTEGER, "Orientacao" INTEGER, "fonte" varchar(10), "MultiplicadorH" INTEGER, "MultiplicadorV" INTEGER, "SubFonte" INTEGER, "ImprimirReverso" BOOLEAN, "TipoBarras" INTEGER, "LarguraBarraLarga" INTEGER, "LarguraBarraFina" INTEGER, "AlturaCodBarras" INTEGER, "ExibeCodigo" INTEGER, "Largura" INTEGER, "Altura" INTEGER, "EspessuraVertical" INTEGER, "EspessuraHorizontal" INTEGER, "LarguraModulo" INTEGER, "ErrorLevel" INTEGER, "Tipo" INTEGER, "dado_fonte" INTEGER, "dado_campo" INTEGER, "dado_tipo" INTEGER, "dado_literal" VARCHAR(60), "dado_pinicio" INTEGER, "dado_pfim" INTEGER, "dado_mascara" VARCHAR(60), PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Itens das etiquetas' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "etiq1" ("numero"); CREATE TABLE IF NOT EXISTS "etiq2" ( "codigo" AUTOINC, "dado_fonte" INTEGER, "descricao" VARCHAR(20), "dado" VARCHAR(60), "DataType" INTEGER, PRIMARY KEY ("codigo") COMPRESS NONE DESCRIPTION 'Fonte de dados para etiquetas' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "dado_fonte" ON "etiq2" ("dado_fonte"); alter table etiquetas add if not exists ETQ_Impressao_por_Script boolean; alter table compra1 add if not exists cEAN varchar(20); alter table compra1 add if not exists uCom varchar(5); alter table compra1 add if not exists qCom float; alter table compra1 add if not exists vUnCom float; alter table compra1 add if not exists vFrete float; alter table compra1 add if not exists vSeg float; alter table compra1 add if not exists vICMSST float; alter table compra1 add if not exists vIPI float; alter table compra1 add if not exists vOutro float; alter table compra1 add if not exists vDesc float; alter table compra1 add if not exists vl_venda float; alter table pre1 add if not exists Status_item integer; alter table pre1 add if not exists Obs varchar(30); alter table pre add if not exists produtos_cancelados float; CREATE TABLE IF NOT EXISTS "pre11" ( "numero" INTEGER, "item" INTEGER, "terminal" VARCHAR(20), PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Produtos marcados para operar' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "pre11" ("numero"); CREATE INDEX IF NOT EXISTS "item" ON "pre11" ("item"); alter table pre1 add if not exists impressao_via integer; alter table usuarios add if not exists COMANDA_Usar_Dispositivo boolean; alter table usuarios add if not exists COMANDA_Nome_Dispositivo varchar(20); CREATE TABLE IF NOT EXISTS "cupom10" ( "numero" INTEGER, "item" INTEGER, "impressora" INTEGER, "numero_ticket" INTEGER, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Impressão dos itens que tem guia de produção vinculado' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "cupom10" ("numero"); CREATE INDEX IF NOT EXISTS "item" ON "cupom10" ("item"); CREATE INDEX IF NOT EXISTS "impressora" ON "cupom10" ("impressora"); alter table sistema add if not exists TICKET_Seq_Numero integer; CREATE TABLE IF NOT EXISTS "nfce4" ( "numero" INTEGER, "terminal" VARCHAR(20), PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Marcação de item - Seleção' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "nfce4" ("numero"); CREATE TABLE IF NOT EXISTS "nfe6" ( "numero" INTEGER, "terminal" VARCHAR(20), PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Marcação de NFe - Selecionar' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "nfe6" ("numero"); CREATE TABLE IF NOT EXISTS "prod7" ( "numero" AUTOINC, "tipo" INTEGER, "codigo" INTEGER, "dti" TIMESTAMP, "dtf" TIMESTAMP, "preco" FLOAT, "desconto_percentual" FLOAT, "qtde_venda" FLOAT, "qtde_pagar" FLOAT, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Relação de promoções' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 2 ); CREATE INDEX IF NOT EXISTS "codigo" ON "prod7" ("codigo"); alter table desdobra add if not exists forma integer; alter table desdobra add if not exists tipo integer; alter table desdobra add if not exists vencimento_dia integer; alter table desdobra add if not exists inicio_parcelamento_mes_atual integer; alter table desdobra add if not exists aplicar_juro boolean; alter table desdobra add if not exists com_entrada boolean; alter table compra drop if exists cnpj_gerador_do_movimento; alter table compra drop if exists filial_geradora_do_movimento; alter table compra drop if exists id; alter table prod6 add if not exists pFCP float; alter table prod6 add if not exists pDif float; alter table ficha drop if exists cnpj_gerador_do_movimento; alter table ficha drop if exists filial_geradora_do_movimento; alter table ficha drop if exists id; alter table desdobra add if not exists juro float; CREATE TABLE IF NOT EXISTS "ficha1" ( "nro" INTEGER, "nome_terminal" VARCHAR(30), PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Marcação dos ítens da FICHA' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 2 ); CREATE INDEX IF NOT EXISTS "nro" ON "ficha1" ("nro"); CREATE INDEX IF NOT EXISTS "nuumero" ON "pdv2" ("numero"); CREATE INDEX IF NOT EXISTS "composicao" ON "prod1" ("codigo_da_composicao"); alter table cliente add if not exists cliente boolean; alter table cliente add if not exists fornecedor boolean; alter table confignf add if not exists orcamento_linha1 varchar(60); alter table confignf add if not exists orcamento_linha2 varchar(60); alter table confignf add if not exists Limite_Sangria float; delete from acessos where codigo=8; INSERT INTO acessos (codigo, descricao) VALUES (8, 'PERMITE ALTERAR O VALOR DO PRODUTO 1'); update produtos set qtde=0 where qtde=null; alter table pre add if not exists data_entrega date; alter table pre add if not exists hora_entrega time; CREATE TABLE IF NOT EXISTS "pre2" ( "numero" INTEGER, "data" date, "hora" time, "forma_pagamento" varchar(20), "valor_entrada" float, "movimento" float, "codigo_operador" INTEGER, "codigo_func" INTEGER, "estornado" BOOLEAN, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Adiantamentos de Pré Venda' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 2 ); alter table pre add if not exists data_entrega date; alter table pre add if not exists hora_entrega time; CREATE INDEX IF NOT EXISTS "numero" ON "pre2" ("numero"); CREATE INDEX IF NOT EXISTS "entrega" ON "pre" ("data_entrega","hora_entrega"); alter table pre add if not exists atendente integer; alter table pre add if not exists nome_atendente varchar(40); CREATE TABLE IF NOT EXISTS "pre10" ( "numero" INTEGER, "item" INTEGER, "impressora" INTEGER, "numero_ticket" INTEGER, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Impressão dos itens que tem guia de produção vinculado' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "pre10" ("numero"); CREATE INDEX IF NOT EXISTS "item" ON "pre10" ("item"); CREATE INDEX IF NOT EXISTS "impressora" ON "pre10" ("impressora"); alter table sistema add if not exists contadorpedidos integer; CREATE TABLE IF NOT EXISTS "cartao_prevenda" ( "numero" Autoinc, "codbarra" char(13), "status_impresso" Boolean, "aberto" Boolean, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Cartões para Pre venda' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "numero" ON "cartao_prevenda" ("numero");