Jump to content
Fivewin Brasil

Classe Sintegra


oribeiro

Recommended Posts

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...