Ir para conteúdo
  • Cadastre-se

Fabio de Paula Oliveira

Membros
  • Total de ítens

    12
  • Registro em

  • Última visita

Últimos Visitantes

O bloco dos últimos visitantes está desativado e não está sendo visualizado por outros usuários.

Fabio de Paula Oliveira's Achievements

Apprentice

Apprentice (3/14)

  • First Post
  • Collaborator Rare
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

1

Reputação

  1. Boa tarde, Alguém está tendo problema com os serviços da SEFAZ RJ/RS ? Estou tendo muita instabilidade com os serviços. Obrigado.
  2. Pessoal estou tento um pequeno problema ao imprimir o Danfe. Alguém já passou por esse problema ? Sabe como posso resolver ? Segue o trecho do código que dá o erro: C:\ComponentesXT\ACBr\FONTES\fortesreport-ce-master\Source\RLUtils.pas procedure RotateBitmap(ASource, ADest: TBitmap; AAngle: Double; AAxis, AOffset: TPoint); type {$ifdef CLX} TRGBQuad = packed record rgbBlue: Byte; rgbGreen: Byte; rgbRed: Byte; rgbReserved: Byte; end; {$endif} PRGBArray = ^TRGBArray; TRGBArray = array[0..0] of TRGBQuad; var I: Integer; iDest: Integer; iOriginal: Integer; iPrime: Integer; iPrimeRotated: Integer; // J: Integer; jDest: Integer; jOriginal: Integer; jPrime: Integer; jPrimeRotated: Integer; // RowSource: PRGBArray; RowDest: PRGBArray; // Radians: Double; RadiansCos: Double; RadiansSin: Double; begin // Convert degrees to radians. Use minus sign to force clockwise rotation. Radians := AAngle * PI / 180; RadiansSin := Sin(Radians); RadiansCos := Cos(Radians); // Step through each row of rotated image. for J := 0 to ADest.Height - 1 do begin RowDest := ADest.ScanLine[J]; jDest := J - AOffset.Y; jPrime := 2 * (jDest - AAxis.Y) + 1; // center y: -1,0,+1 // Step through each col of rotated image. for I := 0 to ADest.Width - 1 do begin iDest := I - AOffset.X; iPrime := 2 * (iDest - AAxis.X) + 1; // center x: -1,0,+1 // Rotate (iPrime, jPrime) to location of desired pixel // Note: There is negligible difference between floating point and scaled integer arithmetic here, so keep the math simple (and readable). iPrimeRotated := Round(iPrime * RadiansCos - jPrime * RadiansSin); jPrimeRotated := Round(iPrime * RadiansSin + jPrime * RadiansCos); // Transform back to pixel coordinates of image, including translation // of origin from axis of rotation to origin of image. iOriginal := (iPrimeRotated - 1) div 2 + AAxis.X; jOriginal := (jPrimeRotated - 1) div 2 + AAxis.Y; // Make sure (iOriginal, jOriginal) is in aSource. If not, assign blue color to corner points. if (iOriginal >= 0) and (iOriginal <= ASource.Width - 1) and (jOriginal >= 0) and (jOriginal <= ASource.Height - 1) then begin // Assign pixel from rotated space to current pixel in aDest RowSource := ASource.ScanLine[jOriginal]; //RowDest := RowSource[iOriginal]; <-- aqui gera o erro end else begin RowSource := ASource.ScanLine[0]; RowDest := RowSource[0]; end; end; end; end;
  3. Pessoal, Segue o trecho do código que dá o erro: C:\ComponentesXT\ACBr\FONTES\fortesreport-ce-master\Source\RLUtils.pas procedure RotateBitmap(ASource, ADest: TBitmap; AAngle: Double; AAxis, AOffset: TPoint); type {$ifdef CLX} TRGBQuad = packed record rgbBlue: Byte; rgbGreen: Byte; rgbRed: Byte; rgbReserved: Byte; end; {$endif} PRGBArray = ^TRGBArray; TRGBArray = array[0..0] of TRGBQuad; var I: Integer; iDest: Integer; iOriginal: Integer; iPrime: Integer; iPrimeRotated: Integer; // J: Integer; jDest: Integer; jOriginal: Integer; jPrime: Integer; jPrimeRotated: Integer; // RowSource: PRGBArray; RowDest: PRGBArray; // Radians: Double; RadiansCos: Double; RadiansSin: Double; begin // Convert degrees to radians. Use minus sign to force clockwise rotation. Radians := AAngle * PI / 180; RadiansSin := Sin(Radians); RadiansCos := Cos(Radians); // Step through each row of rotated image. for J := 0 to ADest.Height - 1 do begin RowDest := ADest.ScanLine[J]; jDest := J - AOffset.Y; jPrime := 2 * (jDest - AAxis.Y) + 1; // center y: -1,0,+1 // Step through each col of rotated image. for I := 0 to ADest.Width - 1 do begin iDest := I - AOffset.X; iPrime := 2 * (iDest - AAxis.X) + 1; // center x: -1,0,+1 // Rotate (iPrime, jPrime) to location of desired pixel // Note: There is negligible difference between floating point and scaled integer arithmetic here, so keep the math simple (and readable). iPrimeRotated := Round(iPrime * RadiansCos - jPrime * RadiansSin); jPrimeRotated := Round(iPrime * RadiansSin + jPrime * RadiansCos); // Transform back to pixel coordinates of image, including translation // of origin from axis of rotation to origin of image. iOriginal := (iPrimeRotated - 1) div 2 + AAxis.X; jOriginal := (jPrimeRotated - 1) div 2 + AAxis.Y; // Make sure (iOriginal, jOriginal) is in aSource. If not, assign blue color to corner points. if (iOriginal >= 0) and (iOriginal <= ASource.Width - 1) and (jOriginal >= 0) and (jOriginal <= ASource.Height - 1) then begin // Assign pixel from rotated space to current pixel in aDest RowSource := ASource.ScanLine[jOriginal]; //RowDest := RowSource[iOriginal]; <-- aqui gera o erro end else begin RowSource := ASource.ScanLine[0]; RowDest := RowSource[0]; end; end; end; end;
  4. Pessoal estou tento um pequeno problema ao imprimir o Danfe. Alguém já passou por esse problema ? Sabe como posso resolver ?
  5. Boa tarde, Italo! Os fontes estão todos atualizados de acordo com o setor Fiscal aqui da empresa. O módulo de vendas que dou manutenção usa os fontes do setor Fiscal.
  6. Boa tarde, Thiago! Desculpe, o problema é na NFe.
  7. Boa tarde, Pessoal! Estou com um pequeno problema ao gerar a Carta de Correção. Estou tendo problemas nesse trecho: O programa diz que fTpEvento = teNaoMapeado e cai direto no raise. function TInfEvento.getDescEvento: String; begin case fTpEvento of teCCe : Result := 'Carta de Correcao'; teCancelamento : Result := 'Cancelamento'; teManifDestConfirmacao : Result := 'Confirmacao da Operacao'; teManifDestCiencia : Result := 'Ciencia da Operacao'; teManifDestDesconhecimento : Result := 'Desconhecimento da Operacao'; teManifDestOperNaoRealizada: Result := 'Operacao nao Realizada'; teEPECNFe : Result := 'EPEC'; teEPEC : Result := 'EPEC'; teMultiModal : Result := 'Registro Multimodal'; teRegistroPassagem : Result := 'Registro de Passagem'; teRegistroPassagemNFe : Result := 'Registro de Passagem NF-e'; teRegistroPassagemBRId : Result := 'Registro de Passagem BRId'; teEncerramento : Result := 'Encerramento'; teInclusaoCondutor : Result := 'Inclusao Condutor'; teRegistroCTe : Result := 'CT-e Autorizado para NF-e'; teRegistroPassagemNFeCancelado: Result := 'Registro de Passagem para NF-e Cancelado'; teRegistroPassagemNFeRFID : Result := 'Registro de Passagem para NF-e RFID'; teCTeAutorizado : Result := 'CT-e Autorizado'; teCTeCancelado : Result := 'CT-e Cancelado'; teMDFeAutorizado, teMDFeAutorizado2 : Result := 'MDF-e Autorizado'; teMDFeCancelado : Result := 'MDF-e Cancelado'; teVistoriaSuframa : Result := 'Vistoria SUFRAMA'; tePedProrrog1, tePedProrrog2 : Result := 'Pedido de Prorrogacao'; teCanPedProrrog1, teCanPedProrrog2 : Result := 'Cancelamento de Pedido de Prorrogacao'; teEventoFiscoPP1, teEventoFiscoPP2, teEventoFiscoCPP1, teEventoFiscoCPP2 : Result := 'Evento Fisco'; teConfInternalizacao : Result := 'Confirmacao de Internalizacao da Mercadoria na SUFRAMA'; else raise EventoException.Create('Descrição do Evento não Implementado!'); end; end; Unit: ACBr\FONTES\PCN2\pcnEventoNFe.pas Obrigado.
  8. Vou fazer um teste aqui. Obrigado Daniel.
  9. Boa tarde, Felipe! Vou baixar as DLLs e atualizar novamente. De ante mão o erro ocorre aqui: function TDFeSSLXmlSignXmlSec.XmlSecSign(const ConteudoXML: String; SignatureNode, SelectionNamespaces, InfElement: String): String; { sign the template } SignResult := xmlSecDSigCtxSign(FdsigCtx, SignNode); if (SignResult < 0) then begin xmlsecMsg := xmlSecErrorsGetMsg(2); raise EACBrDFeException.CreateFmt(cErrDSigSign + sLineBreak + xmlsecMsg, [SignResult]); end;
  10. Usei {$R-} E agora o erro é esse: EACBrDFeException - Falha ao assinar o Envio de Evento Erro -1: Falha ao assinar o Documento strdup function failed Endereço: 00760B3D
  11. Estou com um pequeno problema ao realizar o cancelamento de uma NF. Alguém já teve esse problema e sabe como posso resolver: Erro: EACBrDFeException - Falha ao assinar o Envio de Evento Range check error Endereço: 00760B65 procedure AddCertContexToStoreMemory(NewCertContext: PCCERT_CONTEXT); begin // Adicionando o Certificado Atual, na nova Store Dummy := Nil; if not CertAddCertificateContextToStore( AStore, NewCertContext, CERT_STORE_ADD_REPLACE_EXISTING, Dummy ) then raise EACBrDFeException.Create( 'ExportCertStoreToPFXData: Falha Importanto Certificado na Store. Erro: '+GetLastErrorAsHexaStr); CertFreeCertificateContext( Dummy ); end; begin // Criando uma Store em memória, para ser exportada AStore := CertOpenStore( CERT_STORE_PROV_MEMORY, 0, 0, 0, Nil ); if (AStore = Nil) then raise EACBrDFeException.Create( 'ExportCertStoreToPFXData: Falha Criando Store. Erro: '+GetLastErrorAsHexaStr); try // Adicionando o Certificado Recebido, no Store temporário // AddCertContexToStoreMemory( ACertContext ); // Verificando se o Certificado Informado, pode ter sua Chave Privada, Exportada // PFXBlob.cbData := 0; PFXBlob.pbData := Nil; dwFlags := (EXPORT_PRIVATE_KEYS or REPORT_NOT_ABLE_TO_EXPORT_PRIVATE_KEY or PKCS12_INCLUDE_EXTENDED_PROPERTIES); if not PFXExportCertStoreEx( AStore, PFXBlob, LPCWSTR(WideString( APass )), Nil, dwFlags) then if not ( (wFpDadosCertificado_Tipo = 'tpcA3' ) or (wFpDadosCertificado_Tipo = 'tpcA1' ) ) then // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< { 2017 } raise EACBrDFeExceptionNoPrivateKey.Create('Certificado não permite Exportar Chave Privada.'); // Obtendo a cadeia de Certificados /// Dummy := Nil; pChainContext := Nil; ZeroMemory(@ChainPara, SizeOf(ChainPara)); ChainPara.cbSize := sizeof( CERT_CHAIN_PARA ); ChainPara.RequestedUsage.dwType := USAGE_MATCH_TYPE_AND; ChainPara.RequestedUsage.Usage.cUsageIdentifier := 0; ChainPara.RequestedUsage.Usage.rgpszUsageIdentifier := Nil; if not CertGetCertificateChain( HCCE_CURRENT_USER, // use the default chain engine ACertContext, // pointer to the end certificate AFileTime, // use the default time Nil, // ACertContext^.hCertStore, ChainPara, // use AND logic and enhanced key usage as indicated in the ChainPara data structure 0, // No Flags Dummy, // currently reserved pChainContext) then raise EACBrDFeException.Create( 'ExportCertStoreToPFXData: Falha obtendo a cadeia de Certificados. Erro: '+GetLastErrorAsHexaStr); // Adicionando o Certificado Recebido, no Store temporário (na ordem correta) // AddCertContexToStoreMemory( ACertContext ); // Exportando a Store, com todos os certificados // Result := ''; PFXBlob.cbData := 0; PFXBlob.pbData := Nil; dwFlags := (EXPORT_PRIVATE_KEYS or PKCS12_INCLUDE_EXTENDED_PROPERTIES); if not PFXExportCertStoreEx( AStore, PFXBlob, LPCWSTR(WideString( APass )), Nil, dwFlags) then raise EACBrDFeException.Create( 'ExportCertStoreToPFXData: Falha em calcular tamanho do buffer. Erro: '+GetLastErrorAsHexaStr); PFXBlob.pbData := AllocMem(PFXBlob.cbData); // Aloca a memória para receber o Blob try if not PFXExportCertStoreEx( AStore, PFXBlob, LPCWSTR(WideString( APass )), Nil, dwFlags) then raise EACBrDFeException.Create( 'ExportCertStoreToPFXData: Falha em "PFXExportCertStoreEx" Erro: '+GetLastErrorAsHexaStr); SetLength(Result, PFXBlob.cbData); Move(PFXBlob.pbData^, Result[1], PFXBlob.cbData); finally Freemem(PFXBlob.pbData); end; finally //CertCloseStore(AStore, CERT_CLOSE_STORE_CHECK_FLAG); //Teste Fabio Oliveira - 07/08/2018 end; end; Obrigado.
×
×
  • Criar Novo...

Informação Importante

Colocamos cookies em seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies, caso contrário, assumiremos que você está bem para continuar.

The popup will be closed in 10 segundos...
The popup will be closed in 10 segundos...