
dreamsoft_PR
Membros-
Total de ítens
631 -
Registro em
-
Última visita
Tudo que dreamsoft_PR postou
-
olá, estou precisando colocar uma imagem (assinatura scaneada) em cada pagina nova no relatorio, so consegui colocar no ultimo (usando o componente imagem)
-
SQL para vereficar mensalidades
um tópico no fórum postou dreamsoft_PR Dúvidas não relacionadas ao ACBr
olá, alguem ja fez algo parecido , eu uso para vereficar quais mensalidades dos contratos estao abanando para o cliente gerar novamente (um plano) essa que eu uso atualmente para vereficar 1 mil contratos leva 18 segundos , se puderem me dar uma dica para otimizar SELECT C.NUCONTRATO,A.NOMCLIE,D.NOMPLANO, C.DATA1PAG,( SELECT MAX(E.DATVENC) FROM TAB_CONTA_REC_PAG E WHERE E.ID_INTERACAO IS NULL AND E.CODVEND IS NULL AND E.CODCONT = C.CODCONT GROUP BY CODCONT) ULTIMA_PARC, ( SELECT COUNT(E.SEQUEN_PARC) FROM TAB_CONTA_REC_PAG E WHERE E.ID_INTERACAO IS NULL AND E.CODVEND IS NULL AND E.CODCONT = C.CODCONT GROUP BY CODCONT) NUMERO_PARC, ( SELECT (COALESCE(COUNT(E.ID_REC_PAG),0)) FROM TAB_CONTA_REC_PAG E WHERE E.ID_INTERACAO IS NULL AND E.CODVEND IS NULL AND E.CODCONT = C.CODCONT AND E.STATUS='A' GROUP BY CODCONT) QTD_PARC_FIM, C.ID_SECAO, C.ID_SECAO2, C.ID_SECAO3, EXTRACT( DAY FROM C.DATA1PAG ) AS DIA , F.NOMFUNC , F.CODFUNC , D.CODPLANO, C.VLRTOTAL, C.QTDPAR ,C.CODCONT, C.CODCLIE,C.TIPO_COBRANCA , CASE C.TIPO_COBRANCA WHEN 'C' THEN 'CARNÊ ' WHEN 'B' THEN 'BOLETO' END NOME_TIPO_COBRANCA FROM TAB_CONT C LEFT JOIN TAB_CLIE A ON (A.CODCLIE= C.CODCLIE) LEFT JOIN TAB_PLANO D ON (D.CODPLANO= C.CODPLAN) LEFT JOIN TAB_SECAO Y ON (Y.ID_SECAO = C.ID_SECAO) LEFT JOIN TAB_SECAO W ON (W.ID_SECAO =C.ID_SECAO2) LEFT JOIN TAB_FUNC F ON (F.CODFUNC= C.ID_COBRADOR) WHERE C.STATUS='A' AND (( SELECT (COALESCE(COUNT(E.ID_REC_PAG),0)) FROM TAB_CONTA_REC_PAG E WHERE E.ID_INTERACAO IS NULL AND E.CODVEND IS NULL AND E.codcont = C.codcont AND E.STATUS='A' GROUP BY codcont )<=:QTD_PARC OR C.CODCONT NOT IN ( SELECT E.CODCONT FROM TAB_CONTA_REC_PAG E WHERE E.ID_INTERACAO IS NULL AND E.CODVEND IS NULL AND E.CODCONT = C.CODCONT AND E.STATUS='A' )) ORDER BY C.NUCONTRATO -
obrigado fiz assim deu certo select count(*), case when trunc((CURRENT_DATE - C.DATNASC) / 365.25) <= 20 then 'GRUPO 1 -> até 20' when trunc((CURRENT_DATE - C.DATNASC) / 365.25) between 21 and 30 then 'GRUPO 2 -> 21 a 30' when trunc((CURRENT_DATE - C.DATNASC) / 365.25) between 31 and 41 then 'GRUPO 3 -> 31 a 41' when trunc((CURRENT_DATE - C.DATNASC) / 365.25) between 42 and 51 then 'GRUPO 4 -> 42 a 51' end, p.nomplano FROM TAB_CLIE C inner JOIN tab_cont p1 ON (p1.codclie = c.codclie) lEFT JOIN tab_plano p ON (p.codplano = p1.codplan) group by case when trunc((CURRENT_DATE - C.DATNASC) / 365.25) <= 20 then 'GRUPO 1 -> até 20' when trunc((CURRENT_DATE - C.DATNASC) / 365.25) between 21 and 30 then 'GRUPO 2 -> 21 a 30' when trunc((CURRENT_DATE - C.DATNASC) / 365.25) between 31 and 41 then 'GRUPO 3 -> 31 a 41' when trunc((CURRENT_DATE - C.DATNASC) / 365.25) between 42 and 51 then 'GRUPO 4 -> 42 a 51' end, p.nomplano
-
select count(*), case when trunc((CURRENT_DATE - C.DATNASC) / 365.25) <= 20 then 'ate 20' when trunc((CURRENT_DATE - C.DATNASC) / 365.25) between 21 and 31 then 'de 25 a 30' when trunc((CURRENT_DATE - C.DATNASC) / 365.25) between 32 and 41 then 'de 31 a 35' end, p.nomplano FROM TAB_CLIE C inner JOIN tab_cont p1 ON (p1.codclie = c.codclie) lEFT JOIN tab_plano p ON (p.codplano = p1.codplan) group by CURRENT_DATE - C.DATNASC, p.nomplano ele so ao grupa o resultado
-
nao sei fiz errado vc diz assim: select count(*), case when trunc((CURRENT_DATE - C.DATNASC) / 365.25) <= 20 then 'ate 20' when trunc((CURRENT_DATE - C.DATNASC) / 365.25) between 21 and 31 then 'de 25 a 30' when trunc((CURRENT_DATE - C.DATNASC) / 365.25) between 32 and 41 then 'de 31 a 35' end , p.nomplano FROM TAB_CLIE C inner JOIN tab_cont p1 ON (p1.codclie = c.codclie) inner JOIN tab_plano p ON (p.codplano = p1.codplan) group by 2 deu erro Invalid expression in the select list (not contained in either an aggregate function or the GROUP BY clause).
-
tentei assim tambem nao deu select count(*), case when trunc((CURRENT_DATE - C.DATNASC) / 365.25) <= 20 then 'ate 20' when trunc((CURRENT_DATE - C.DATNASC) / 365.25) between 21 and 31 then 'de 25 a 30' when trunc((CURRENT_DATE - C.DATNASC) / 365.25) between 32 and 41 then 'de 31 a 35' end FROM TAB_CLIE C inner JOIN tab_cont p1 ON (p1.codclie = c.codclie) lEFT JOIN tab_plano p ON (p.codplano = p1.codplan) group by CURRENT_DATE - C.DATNASC, p.nomplano
-
ola, Alguem pode me dar uma orientação como faria para trazer clientes com faixas de idades de sql exemplo cliente de 30 /40 anos tem x de 41 a 51 tem y eu estou fazendo assim mais traz todas as idades SELECT EXTRACT(YEAR FROM CURRENT_DATE) - EXTRACT(YEAR FROM C.DATNASC) IDADE, p.nomplano FROM TAB_CLIE C inner JOIN tab_cont p1 ON (p1.codclie = c.codclie) lEFT JOIN tab_plano p ON (p.codplano = p1.codplan) group by EXTRACT(YEAR FROM CURRENT_DATE) - EXTRACT(YEAR FROM C.DATNASC), p.nomplano
-
ola , estou com um problema o cliente ja formatou o pc mesmo assim da isso , se alguem ja passou por isso 403 - Forbidden: Acess is denied You do not have permission to view this directory or page using the credentials that you supplied na hora que emiti ou quando vai consultar
-
oi , eu fiz o seguinte renomei a pasta baixo tudo do zero ai deu certo obrigado
-
teria como mandar esse arquivo aqui por favor
-
tem esse procedure TDFeHttpWinHttp.Execute; begin inherited; // Enviando, dispara exceptions no caso de erro // try //<<<<<<< .mine anulei esse try // Enviando, dispara exceptions no caso de erro // FWinHTTPReqResp.Execute(ConteudoXML, Resp); // DEBUG // //Resp.SaveToFile('c:\temp\ReqResp.xml'); Resp.Position := 0; Result := String( ReadStrFromStream(Resp, Resp.Size) ); // Verifica se o ResultCode é: 200 OK; 201 Created; 202 Accepted // https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html if not (FWinHTTPReqResp.HTTPResultCode in [200, 201, 202]) then raise EACBrDFeException.Create(Result); except On E: Exception do begin raise EACBrDFeException.CreateDef( Format( cACBrDFeSSLEnviarException, [InternalErrorCode, HTTPResultCode, AURL] ) + sLineBreak + E.Message ) ; end; end; /// .r18406 try // Enviando, dispara exceptions no caso de erro // FWinHTTPReqResp.Execute(ConteudoXML, Resp); // DEBUG // //Resp.SaveToFile('c:\temp\ReqResp.xml'); Resp.Position := 0; Result := String( ReadStrFromStream(Resp, Resp.Size) ); // Verifica se o ResultCode é: 200 OK; 201 Created; 202 Accepted // https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html if not (FWinHTTPReqResp.HTTPResultCode in [200, 201, 202]) then raise EACBrDFeException.Create(''); except On E: Exception do begin raise EACBrDFeException.CreateDef( Format( cACBrDFeSSLEnviarException, [InternalErrorCode, HTTPResultCode, AURL] ) + sLineBreak + E.Message ) ; end; end; ======= FWinHTTPReqResp.Execute(DataResp); HeaderResp.Text := FWinHTTPReqResp.HeaderResp.Text; ///.r21492 finally FpHTTPResultCode := FWinHTTPReqResp.HttpResultCode; FpInternalErrorCode := FWinHTTPReqResp.InternalErrorCode; end; // DEBUG // //DataResp.SaveToFile('c:\temp\ReqResp.xml'); end; exclui tambem a pasta mas o erro continua agora deu isso: Compiling package C:\Componentes Delphi10\ACBR\Pacotes\Delphi\ACBrDFe\ACBr_DFeComum.dpk "C:\Program Files (x86)\Embarcadero\Studio\17.0\bin\dcc32.exe" "C:\Componentes Delphi10\ACBR\Pacotes\Delphi\ACBrDFe\ACBr_DFeComum.dpk" Embarcadero Delphi for Win32 compiler version 30.0 Copyright (c) 1983,2015 Embarcadero Technologies, Inc. C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(98) Error: E2003 Undeclared identifier: 'ConteudoXML' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(98) Error: E2003 Undeclared identifier: 'Resp' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(102) Error: E2066 Missing operator or semicolon C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(103) Error: E2003 Undeclared identifier: 'Result' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(103) Error: E2029 ')' expected but identifier 'Size' found C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(107) Error: E2066 Missing operator or semicolon C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(114) Error: E2003 Undeclared identifier: 'AURL' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(121) Error: E2250 There is no overloaded version of 'Execute' that can be called with these arguments C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(125) Error: E2066 Missing operator or semicolon C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(126) Error: E2029 ')' expected but identifier 'Size' found C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(130) Error: E2066 Missing operator or semicolon C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(133) Error: E2029 'END' expected but 'EXCEPT' found C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(135) Error: E2029 ';' expected but 'BEGIN' found C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(137) Error: E2003 Undeclared identifier: 'InternalErrorCode' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(137) Error: E2003 Undeclared identifier: 'HTTPResultCode' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(137) Error: E2003 Undeclared identifier: 'AURL' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(138) Error: E2003 Undeclared identifier: 'E' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(139) Error: E2029 '.' expected but ';' found C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(52) Error: E2065 Unsatisfied forward or external declaration: 'TDFeHttpWinHttp.ConfigConnection' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(53) Error: E2065 Unsatisfied forward or external declaration: 'TDFeHttpWinHttp.GetLastErrorDesc' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(60) Error: E2065 Unsatisfied forward or external declaration: 'TDFeHttpWinHttp.Abortar' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeSSL.pas(2786) Fatal: F2063 Could not compile used unit 'ACBrDFeHttpWinApi.pas' Compilation failure Erro ao compilar o pacote "ACBr_DFeComum.dpk". Abortando... Ocorreram erros na compilação dos pacotes.
-
fiz isso limpou mas deu o mesmo erro Embarcadero Delphi for Win32 compiler version 30.0 Copyright (c) 1983,2015 Embarcadero Technologies, Inc. C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(95) Error: E2029 Statement expected but '<' found C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(96) Error: E2125 EXCEPT or FINALLY expected C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(96) Error: E2029 ';' expected but 'TRY' found C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(114) Error: E2003 Undeclared identifier: 'InternalErrorCode' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(114) Error: E2003 Undeclared identifier: 'HTTPResultCode' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(114) Error: E2003 Undeclared identifier: 'AURL' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(115) Error: E2003 Undeclared identifier: 'E' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(116) Error: E2029 '.' expected but ';' found C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(52) Error: E2065 Unsatisfied forward or external declaration: 'TDFeHttpWinHttp.ConfigConnection' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(53) Error: E2065 Unsatisfied forward or external declaration: 'TDFeHttpWinHttp.GetLastErrorDesc' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(60) Error: E2065 Unsatisfied forward or external declaration: 'TDFeHttpWinHttp.Abortar' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeSSL.pas(2786) Fatal: F2063 Could not compile used unit 'ACBrDFeHttpWinApi.pas' Compilation failure Erro ao compilar o pacote "ACBr_DFeComum.dpk". Abortando... Ocorreram erros na compilação dos pacotes.
-
OI o meu da um erro isso no log : C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(95) Error: E2029 Statement expected but '<' found C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(96) Error: E2125 EXCEPT or FINALLY expected C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(96) Error: E2029 ';' expected but 'TRY' found C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(114) Error: E2003 Undeclared identifier: 'InternalErrorCode' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(114) Error: E2003 Undeclared identifier: 'HTTPResultCode' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(114) Error: E2003 Undeclared identifier: 'AURL' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(115) Error: E2003 Undeclared identifier: 'E' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(116) Error: E2029 '.' expected but ';' found C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(52) Error: E2065 Unsatisfied forward or external declaration: 'TDFeHttpWinHttp.ConfigConnection' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(53) Error: E2065 Unsatisfied forward or external declaration: 'TDFeHttpWinHttp.GetLastErrorDesc' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeHttpWinApi.pas(60) Error: E2065 Unsatisfied forward or external declaration: 'TDFeHttpWinHttp.Abortar' C:\Componentes Delphi10\ACBR\Fontes\ACBrDFe\ACBrDFeSSL.pas(2786) Fatal: F2063 Could not compile used unit 'ACBrDFeHttpWinApi.pas' Compilation failure Erro ao compilar o pacote "ACBr_DFeComum.dpk".
-
vou procurar ler isso
-
ela acabou de me passar um modelo vou anexar aqui pra vcs verem Modelo Inventário.csv
-
valeu pessoal muito obrigado a todos!
-
certo vou passar pra ela pra ver mais pelo jeito ela nao sabe como ela disse, me respondeu assim: SPED é Perfil A
-
ela me passou isso agora diz que é "SPED é Perfil A"
-
lascou porque nao ela sabe , dizendo ela é do EStado de AL, que agora quer simples nacional mande o SPED
-
esse fiscal eu abri tem todos esses Registros Blocos, qual sei o que contador disse que tem mandar, ja o que mesmo so me disse isso: "erar o SPED Fiscal- ICMS"
-
nao sei se sabe, olha o que me falaram o contador Toda empresa independente da tributação pode gerar o SPED Fiscal- ICMS . Tenho empresa do Simples Nacional que já apresento o SPED Fiscal desde 2018. O layout para gerar o SPED-ICMS ele verificar no site da SEFAZ- AL (pessoal de sistema sabe como fazer). no exemplo de vcs tem varias pasta qual seria contabil Fcont Fiscal piscofins
-
Olá, preciso de uma orientação quem puder me dar uma dica. Preciso fazer um sped para um cliente de Alagoas que agora será obrigatório para Simples também , sei que tem componente da ACBR (vi na pasta acbrsped contabil, ou seria Fiscal ou Fiscal importar?) no exemplo tem Registros Bloco 0 Registros Bloco I Registros Bloco J nao entendo disso, qual que faço para mandar para o contador ele quer entrada, saída, valor de compras
-
oi alguem aqui ja fez rodar sistema em delphi em OS ?
-
Olá uma duvida alguem aqui ja fez programa feito em delphi rodar em linux
-
ha certo obrigado