update path set NFCE_Modo_operacao=0 where NFCE_Modo_operacao is null; alter table path add if not exists NFe_DANFE_Mostrar_preview boolean; alter table path add if not exists NFe_Impressora_Padrao_Nome varchar(100); alter table path add if not exists nfe_danfe_modelo integer; alter table path add if not exists NFe_Pasta_Logo varchar(100); alter table path add if not exists NFe_Pasta_Marca_Agua varchar(100); alter table path add if not exists NFCE_Pasta_Arquivo_LOGO varchar(100); alter table path add if not exists NFCe_Resolver_pendencias_automatico boolean; alter table path add if not exists NFCe_NFe_SSLLib integer; alter table path add if not exists Nao_Fiscal_reimprimir_cupom boolean; alter table path add if not exists Nao_Fiscal_imprimir_adicional_convenio boolean; alter table path add if not exists NFCE_Balanca_Checkout_Data_bits integer; alter table path add if not exists NFCE_Balanca_Checkout_Paridade integer; alter table path add if not exists NFCE_Balanca_Checkout_Stop_bits integer; alter table path add if not exists NFCE_Balanca_Checkout_Handshack integer; alter table path add if not exists BACKUP_Automatico boolean; alter table path add if not exists BACKUP_Pasta varchar(200); alter table path add if not exists CONTAB_Pasta_Arquivos varchar(200); alter table path add if not exists NFCE_HTTP_HOST varchar(30); alter table path add if not exists NFCE_HTTP_Timeout integer; alter table path add if not exists NFCE_Perguntar_Para_Imprimir boolean; alter table path add if not exists NFCE_Modo_operacao integer; alter table path add if not exists Formato_de_tela integer; alter table path add if not exists NFCE_Acionar_Gaveta_Guilhotina boolean; alter table path add if not exists NFe_Enviar_Email_Automatico boolean; alter table path add if not exists apresentar_Tela_Fim_Venda boolean; alter table path add if not exists local boolean; alter table path add if not exists hostserver varchar(30); alter table path add if not exists banco varchar(30); alter table path add if not exists user varchar(10); alter table path add if not exists pw varchar(10); alter table path add if not exists IMPRESSORA_Nao_Fiscal_codigo integer; alter table path add if not exists NFCE_NFE_TLS_Protocolo integer; alter table path add if not exists NFCE_Processar_Pendencia_na_Emissao boolean; alter table path add if not exists PESAGEM_Pasta_Carregar_TXT varchar(100); alter table path add if not exists Tipo_de_Movimento_Padrao integer; alter table path add if not exists Pasta_Salvar_Impresssos varchar(100); alter table path add if not exists TEF_Disc_Dial_Pasta varchar(60); alter table path add if not exists Imprimir_Ticket_Retirada boolean; alter table path add if not exists NFCE_DANFCe_Largura_Bobina integer; alter table path add if not exists Ocultar_Visualizacao_Turno boolean; alter table path add if not exists Juntar_Comandas_ao_Carregar boolean; alter table path add if not exists Balanca_checkout_pesar_automatico boolean; alter table path add if not exists imprimir_guia_producao_venda boolean; alter table path add if not exists COMPRA_Cadastrar_Produtos_Automatico boolean; alter table path add if not exists Considerar_duas_Casas_decimais boolean; alter table path add if not exists CERTIFICADO_Alerta_Expirar boolean; alter table path add if not exists INTEGRADOR_Modo_Conexao integer; alter table path add if not exists INTEGRADOR_Enviar_Produtos boolean; alter table path add if not exists INTEGRADOR_Enviar_Clientes boolean; alter table path add if not exists Usar_Cartao_Fidelidade boolean; alter table path add if not exists NFCE_Validar_NFCe_ao_Consultar boolean; alter table path add if not exists Imprimir_Ticket_Retirada_internet boolean; alter table path add if not exists Imprimir_Ticket_Retirada_tele boolean; alter table path add if not exists Imprimir_Ticket_Retirada_entrega boolean; alter table path add if not exists Imprimir_Ticket_Retirada_fora boolean; alter table path add if not exists Avisar_Produto_sem_Estoque boolean; alter table path add if not exists Turno_Habilitar_Contagem boolean; alter table path add if not exists INTEGRADOR_Enviar_Turno boolean; alter table path add if not exists BACKUP_Copiar_XML boolean; alter table path add if not exists Omitir_ICMS_Efetivo boolean; alter table path add if not exists HOST_Atualizacao varchar(50); alter table path add if not exists CAMERA_IP_Host varchar(80); alter table path add if not exists CAMERA_Compressao integer; alter table path add if not exists Entrega_Mostrar_Painel boolean; alter table path add if not exists Romaneio_vias_impresso integer; alter table path add if not exists ROMANEIO_Imprimir_Totais boolean; alter table path add if not exists COMPROVANTE_Vias integer; alter table path add if not exists Imprimir_Romaneio_em_NFCe boolean; alter table path add if not exists Exigir_Romaneio_na_Venda boolean; alter table path add if not exists NFE_Margem_Esquerda float; alter table path add if not exists NFE_Margem_Direita float; alter table path add if not exists VENDA_Alterar_Preco_no_Cadastro boolean; alter table path add if not exists COMPRA_Gerenciar_XML_automatico boolean; alter table path add if not exists COMANDA_Comandas_por_Mesa boolean; alter table path add if not exists COMANDA_Exigir_Mesa boolean; alter table path add if not exists COMANDA_Pode_Trocar_Mesa boolean; alter table path add if not exists COMANDA_Uar_Digito_Verificado boolean; alter table path add if not exists TICKET_Tipo_Emissao integer; alter table path add if not exists Impressao_do_Carne integer; alter table path drop if exists logo_cabecalho; alter table path drop if exists Leitor_Serial_Ativo; alter table path drop if exists Leitor_Serial_porta; alter table path drop if exists Leitor_Serial_baud; alter table path drop if exists Leitor_Serial_intervalo; alter table path drop if exists INTEGRADOR_Pasta_Entrada; alter table path drop if exists INTEGRADOR_Pasta_Saida; alter table path drop if exists INTEGRADOR_Intervalo; alter table path drop if exists INTEGRADOR_Host; alter table path drop if exists INTEGRADOR_User; alter table path drop if exists INTEGRADOR_Senha; alter table path drop if exists INTEGRADOR_Integrar; alter table path drop if exists INTEGRADOR_Lancar_Movimentos; alter table path drop if exists INTEGRADOR_Atualizar_Preco_no_Cadastro; alter table path drop if exists INTEGRADOR_Modo_Conexao; alter table path drop if exists INTEGRADOR_Enviar_Produtos; alter table path drop if exists INTEGRADOR_Enviar_Clientes; alter table path drop if exists INTEGRADOR_Enviar_Turno; alter table path drop if exists INTEGRADOR_Enviar_Estoque; alter table path drop if exists Provedor_de_CEP; alter table path drop if exists NFCE_Codigo_Gaveta; alter table path drop if exists NFCE_Codigo_Guilhotina; alter table path drop if exists NFCE_Codigo_Barras; alter table path drop if exists NFCE_Balanca_5_Digitos; alter table path drop if exists descritivo_rodape; alter table path drop if exists digitos_decimais_em_produtos; alter table path drop if exists NFe_Pasta_XML; alter table path drop if exists NFe_Pasta_Schemas; alter table path drop if exists NFCE_Pasta_SCHEMAS; alter table path drop if exists NFCE_Pasta_XML; alter table path drop if exists MDFE_Pasta_XML; alter table path drop if exists MDFE_Pasta_SCHEMAS; alter table path add if not exists CONVENIO_Imprimir_Resumo boolean; alter table path add if not exists CONVENIO_Imprimir_Via_Adicional boolean; alter table path add if not exists Caminho_Servidor_de_Arquivos varchar(60); alter table path add if not exists IMPRESSORA_Geral varchar(60); CREATE TABLE IF NOT EXISTS "estoque" ( "codigo" INTEGER, "ref" VARCHAR(20), "descricao" VARCHAR(80), "un" VARCHAR(2), "barra" VARCHAR(20), "marca" VARCHAR(30), "data" DATE, "hora" TIME, "inventario" FLOAT, "compras" FLOAT, "vendas" FLOAT, "estoque" FLOAT, "vl_custo_estoque" FLOAT, "vl_venda_estoque" FLOAT, "vl_compras" FLOAT, "vl_vendas" FLOAT, "data_ultimo_movimento" DATE, "hora_ultimo_movimento" TIME, "custo_unitario" FLOAT, "venda_unitario" FLOAT, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Temporário para relatório de estoque' LOCALE CODE 0 USER MAJOR VERSION 3 USER MINOR VERSION 8 ); CREATE TABLE IF NOT EXISTS "gerencial" ( "codigo" INTEGER, "ref" VARCHAR(20), "barra" VARCHAR(20), "descricao" VARCHAR(80), "un" VARCHAR(2), "marca" VARCHAR(30), "qtde_nfe" FLOAT, "qtde_nfce" FLOAT, "qtde_nf" FLOAT, "qtde_compra" FLOAT, "vl_nfe" FLOAT, "vl_nfce" FLOAT, "vl_nf" FLOAT, "vl_compra" FLOAT, "qtde_saida" FLOAT, "vl_saida" FLOAT, "vl_saida_fiscal" FLOAT, "qtde_saida_fiscal" FLOAT, "diferenca_valor" FLOAT, "diferenca_qtde" FLOAT, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Relatório Gerencial - Temporário' LOCALE CODE 0 USER MAJOR VERSION 3 USER MINOR VERSION 8 ); CREATE INDEX IF NOT EXISTS "codigo" ON "gerencial" ("codigo"); CREATE INDEX IF NOT EXISTS "descricao" ON "gerencial" ("descricao"); CREATE INDEX IF NOT EXISTS "qtde_saida" ON "gerencial" ("qtde_saida"); CREATE INDEX IF NOT EXISTS "vl_saida" ON "gerencial" ("vl_saida"); alter table historico add if not exists qtde_inventario float; CREATE TABLE IF NOT EXISTS "vendanfce2" ( "item" INTEGER, "codigo" INTEGER, "descricao" VARCHAR(30), "valor" FLOAT, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Complementos' LOCALE CODE 0 USER MAJOR VERSION 3 USER MINOR VERSION 8 ); alter table historico add if not exists tipo integer; alter table vendanfce add if not exists taxa_servico boolean; alter table movprod add if not exists qtde_cupom integer; alter table movprod1 add if not exists qtde_cupom integer; alter table movprod add if not exists linha varchar(20); alter table movprod1 add if not exists linha varchar(20); alter table movprod add if not exists qtde_nfce float; alter table movprod add if not exists vl_nfce float; alter table movprod add if not exists qtde_nfe float; alter table movprod add if not exists vl_nfe float; alter table movprod add if not exists qtde_orcamento float; alter table movprod add if not exists vl_orcamento float; alter table movprod1 add if not exists qtde_nfce float; alter table movprod1 add if not exists vl_nfce float; alter table movprod1 add if not exists qtde_nfe float; alter table movprod1 add if not exists vl_nfe float; alter table movprod1 add if not exists qtde_orcamento float; alter table movprod1 add if not exists vl_orcamento float; alter table movprod add if not exists codigo_vendedor integer; alter table movprod1 add if not exists codigo_vendedor integer; alter table movprod add if not exists nome_vendedor varchar(40); alter table movprod1 add if not exists nome_vendedor varchar(40); alter table vendanfce2 add if not exists atalho varchar(3); alter table vendanfce add if not exists valor_complementos float; alter table vendanfce add if not exists valor_original float; alter table movprod1 add if not exists estoque float; alter table movprod add if not exists estoque float; CREATE TABLE IF NOT EXISTS "comprar" ( "codigo" INTEGER, "ref" VARCHAR(20), "descricao" VARCHAR(60), "un" VARCHAR(2), "barra" VARCHAR(20), "grupo" VARCHAR(30), "qtde" FLOAT, "custo" FLOAT, "venda" FLOAT, "custo_medio" FLOAT, "qtde_movimentos_de_compras" INTEGER, "qtde_movimentos_de_venda" FLOAT, "qtde_compras" FLOAT, "vl_total_compras" FLOAT, "qtde_vendas" FLOAT, "vl_total_vendas" FLOAT, "qtde_dias_do_periodo" INTEGER, "media_venda_diaria" FLOAT, "media_compra_diaria" FLOAT, "compras_para_qtde_dias" INTEGER, "sugestao_de_qtde_comprar" FLOAT, "dt_ultima_compra" DATE, "fornecedor" VARCHAR(80), "qtde_comprada" FLOAT, "custo_unit_compra" FLOAT, PRIMARY KEY ("codigo") COMPRESS NONE DESCRIPTION 'Temporario para relatório de compras - Listagem resumida' LOCALE CODE 0 USER MAJOR VERSION 4 ); CREATE INDEX IF NOT EXISTS "descricao" ON "comprar" ("descricao"); alter table comprar add if not exists qtde_transferencias float; CREATE TABLE IF NOT EXISTS "impressoes" ( "codigo" INTEGER, "descricao" VARCHAR(20), "nome_da_impressora_local" VARCHAR(100), "tiipo_de_impressora" INTEGER, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Configuração e direcionamento das impressoras' LOCALE CODE 0 USER MAJOR VERSION 4 ); CREATE INDEX IF NOT EXISTS "codigo" ON "impressoes" ("codigo"); alter table vendanfce add if not exists item_na_venda integer; alter table historico add if not exists tipo_de_compra integer; alter table historico add if not exists qtde_transferencia float; alter table movprod1 add if not exists transferencia float; alter table vendanfce add if not exists custo float; alter table vendanfce1 add if not exists tpIntegra integer; alter table vendanfce1 add if not exists CNPJ varchar(20); alter table vendanfce1 add if not exists indPag integer; alter table vendanfce1 add if not exists tBand integer; alter table vendanfce1 add if not exists NSU varchar(40); alter table vendanfce1 add if not exists rede varchar(30); alter table vendanfce1 add if not exists Nome_do_Produto varchar(30); alter table vendanfce1 add if not exists cAut varchar(10); alter table vendanfce add if not exists linha varchar(40); alter table vendanfce add if not exists Tipo_Produto integer; alter table vendanfce add if not exists impressora integer; alter table vendanfce add if not exists marca varchar(30); alter table vendanfce add if not exists vendedor integer; alter table vendanfce1 add if not exists acrescimo_p float; alter table vendanfce1 add if not exists acrescimo_v float; alter table vendanfce1 add if not exists liquido float; alter table vendanfce add if not exists codigo_da_unidade integer; alter table vendanfce add if not exists qtde_de_unidades_vendidas float; CREATE TABLE IF NOT EXISTS "vendanfce3" ( "item_na_venda" INTEGER, "codigo" INTEGER, "codigo_da_composicao" INTEGER, "qtde_vendida" FLOAT, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Componentes do KIT' LOCALE CODE 0 USER MAJOR VERSION 4 ); alter table impressoes add if not exists modelo_custom integer; alter table historico add if not exists cnpj_gerador_do_movimento varchar(20); alter table historico add if not exists filial_geradora_do_movimento integer; alter table historico add if not exists nome_da_filial varchar(50); alter table historico add if not exists qtde_transferencia_entrada float; alter table historico add if not exists qtde_transferencia_informativa float; alter table historico add if not exists qtde_perdas float; alter table vendanfce add if not exists PRE_Numero integer; alter table vendanfce add if not exists PRE_ID1 varchar(20); alter table vendanfce add if not exists PRE_ID2 varchar(20); alter table vendanfce add if not exists PRE_ID3 varchar(20); alter table vendanfce add if not exists PRE_Item integer; alter table vendanfce add if not exists PRE_Obs varchar(30); CREATE TABLE IF NOT EXISTS "comanda" ( "codigo_dispositivo" INTEGER, "item" AUTOINC, "codigo" INTEGER, "ref" VARCHAR(20), "descricao" VARCHAR(60), "un" VARCHAR(2), "barra" VARCHAR(20), "marca" VARCHAR(30), "grupo" VARCHAR(30), "qtde" FLOAT, "valor" FLOAT, "total" FLOAT, "vl_complementos" FLOAT, "vl_nominal" FLOAT, "complementavel" BOOLEAN, PRIMARY KEY ("item") COMPRESS NONE DESCRIPTION 'Vendas do SMARTGARCOM' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE TABLE IF NOT EXISTS "comanda1" ( "codigo_dispositivo" INTEGER, "ordem" AUTOINC, "item" INTEGER, "codigo" INTEGER, "descricao" VARCHAR(40), "valor" FLOAT, "atalho" VARCHAR(3), PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Complementos dos itens vendidos na comanda' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "item" ON "comanda1" ("item"); alter table vendanfce add if not exists numero_ticket integer; CREATE TABLE IF NOT EXISTS "vendanfce4" ( "codigo" INTEGER, "descricao" VARCHAR(40), "valor" FLOAT, "funcion" INTEGER, "baixado" BOOLEAN, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Serviços e ítens adicionais da venda - Taxa de entrega' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE TABLE IF NOT EXISTS "vendanfce5" ( "item_na_venda" INTEGER, "numero_promocao" INTEGER, "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 'Promoção de preco - Uma cópia do PROD7' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 1 ); CREATE INDEX IF NOT EXISTS "item" ON "vendanfce5" ("item_na_venda"); CREATE INDEX IF NOT EXISTS "codigo" ON "vendanfce5" ("codigo"); alter table vendanfce add if not exists preco_cadastro float; CREATE TABLE IF NOT EXISTS "prodabc" ( "codigo" INTEGER, "ref" VARCHAR(20), "barra" VARCHAR(20), "descricao" VARCHAR(80), "un" VARCHAR(2), "marca" VARCHAR(30), "qtde" FLOAT, "custo" FLOAT, "venda" FLOAT, "lucro" FLOAT, "lucratividade" FLOAT, "estoque" FLOAT, "curva" VARCHAR(1), "percentual_venda" FLOAT, "percentual_acumulado" FLOAT, PRIMARY KEY ("RecordID") COMPRESS NONE DESCRIPTION 'Tabela para estatística de produtos - ABC' LOCALE CODE 0 USER MAJOR VERSION 4 USER MINOR VERSION 2 ); CREATE INDEX IF NOT EXISTS "codigo" ON "prodabc" ("codigo"); CREATE INDEX IF NOT EXISTS "descricao" ON "prodabc" ("descricao"); CREATE INDEX IF NOT EXISTS "ref" ON "prodabc" ("ref"); CREATE INDEX IF NOT EXISTS "barra" ON "prodabc" ("barra"); CREATE INDEX IF NOT EXISTS "qtde" ON "prodabc" ("qtde" DESC); CREATE INDEX IF NOT EXISTS "venda" ON "prodabc" ("venda" DESC); CREATE INDEX IF NOT EXISTS "custo" ON "prodabc" ("custo" DESC); CREATE INDEX IF NOT EXISTS "lucro" ON "prodabc" ("lucro" DESC); CREATE INDEX IF NOT EXISTS "lucratividade" ON "prodabc" ("lucratividade" DESC); alter table prodabc add if not exists ncm varchar(8); alter table prodabc add if not exists cest varchar(7); alter table prodabc add if not exists tributos float; alter table prodabc add if not exists ICMS_PIS_COFINS float; alter table prodabc add if not exists SIMPLES float; alter table path add if not exists beep_maior boolean; alter table path add if not exists imprimir_guia_producao_pedido boolean;