oribeiro Posted March 16, 2018 Author Report Share Posted March 16, 2018 Alain, Se você fizer alguma melhoria nessa função, por favor, poste aqui para que todos tirem proveito. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted March 19, 2018 Report Share Posted March 19, 2018 Galera, ajuda ahi, estou fazendo correto usando a FlexDocs? FUNCTION SINTEGRA( CCNPJ, CCUF ) LOCAL cResultado:=0, msgResultado := "", objNfeUtil := NIL LOCAL oNFeUtil, cCertificado cCertificado := IF( EMPTY(CADPARAM->CERTIF), "", ALLTRIM(CADPARAM->CERTIF ) ) oNFEUtil := tVoNFeUtil2G():New(CADPARAM->UF,val(cTpAmb),IIF(VAL(cCertificado)>1, .F., .T.), wProxy,wUsuario,wSenha,cLicenca,.F.) // .F. NAO POR .T. DA PAU If oNFeUtil == Nil Return nil Endif siglaUF := "SP" tipoAmbiente := val(cTpAmb) nomeCertificado := cCertificado versao := "3.10" msgDados := "" msgRetWS := "" msgResultado := "" //tpArgumento = "0" ' 0=IE, 1=CNPJ e 2=CPF tpArgumento := "1" // argumento = "495171423115" ' inscrição estadual argumento := "48209381000140" // cnpj // wProxy,wUsuario,wSenha proxy := wProxy usuario := wUsuario senha := wSenha cResultado := objNfeUtil:ConsultaCad(siglaUF, tipoAmbiente, nomeCertificado, versao, msgDados, msgRetWS, msgResultado, tpArgumento, argumento, proxy, usuario, senha) ? cResultado RETURN NIL Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.