informax Posted August 14, 2018 Report Share Posted August 14, 2018 Boa Tarde a Todos, Desculpem a ignorância, mas como faço para inserir duplicatas pela TVONFe2g, pois com o ONFe:SetValue( "cobr", "nDup", nCoddup ) só é lançada uma e não sei como inserir. se Alguém puder me ajudar, agradeço muito, pois só falta isso. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 14, 2018 Report Share Posted August 14, 2018 Quote Link to comment Share on other sites More sharing options...
jfaguiar Posted August 15, 2018 Report Share Posted August 15, 2018 Boa Tarde a Todos, Desculpem a ignorância, mas como faço para inserir duplicatas pela TVONFe2g, pois com o ONFe:SetValue( "cobr", "nDup", nCoddup ) só é lançada uma e não sei como inserir. se Alguém puder me ajudar, agradeço muito, pois só falta isso. Se estiver usando a Flexdocs com a classe do dr. Gilmer, adapte essa função pra carregar as tags que funciona: FUNCTION LoadDuplicatas( oNFe,nTOTNF,cUFDES) local nQTDDEUP := 0 DbSelectArea("TBCOBR") // sua tabela de contas a receber SEEK STR(nNFISCAL,7) WHILE RECSEQ=nNFISCAL .AND. !EOF() ++ nQTDDEUP oItem := TVoNfeCobr() // TVoNFeDupl() WITH OBJECT oItem IF nQTDDEUP = 1 // Fatura :nFat := RECSEQ :vOrig := nTOTNF IF cUFDES == "SP" IF DATE() >= CTOD("03/09/18") :vDesc := 0.001 ENDIF ELSE :vDesc := 0.001 ENDIF :vLiq := nTOTNF ENDIF // Duplicata :nDup := RECPARC // Numero da Duplicata :dVenc := RECDVEN // Data de vencimento :vDup := RECVAL // Valor Duplicata END oNFe:AddItem( oItem ) DbSkip() ENDDO Return(nil) ***************************************************************************** Quote Link to comment Share on other sites More sharing options...
informax Posted August 16, 2018 Author Report Share Posted August 16, 2018 Muito obrigado mesmo J F Aguiar. Ajudou muito. 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.